feat(economy): Sprint 2.1 — wire Tier-2/Tier-3 production chains end-to-end#97
Merged
Merged
Conversation
- Fix dead code bug in RuntimeEconomyController._renderOverviewTab (warningHtml was unreachable) - Add Production Chain tab to RuntimeEconomyController with Tier-2→Tier-3 flow visualization - Color-coded status (🟢 ok / 🟡 low / 🔴 starved) for each chain node - Bottleneck warnings rendered per colony - War/pirate conflict banner shown in production tab - Add PRODUCTION_CHAIN constant and GOOD_ICONS for all Tier-2/3/4/5 goods - Add _loadProductionTab() and _renderProductionTab() to the controller - Add Tier-3 input consumption in economy_flush.php (ECONOMY_TIER3_INPUT_RATIOS) - T3 buildings now consume T2 goods (e.g. consumer_factory uses steel_alloy + electronics_components) - T3 production rate is gated by available T2 stock (scale-down when T2 inputs depleted) - Add chain_status to api/economy.php get_production response - Per Tier-3 good: status (ok/low/starved), input stock info, output stock info - Add 18 new tests in tests/js/runtime-economy-controller.test.js - All 2563 tests pass Agent-Logs-Url: https://github.com/makr-code/GalaxyQuest/sessions/889849a5-507a-45ff-bc64-e2d0f85149c4 Co-authored-by: makr-code <150588092+makr-code@users.noreply.github.com>
…e adjustment Agent-Logs-Url: https://github.com/makr-code/GalaxyQuest/sessions/889849a5-507a-45ff-bc64-e2d0f85149c4 Co-authored-by: makr-code <150588092+makr-code@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Complete production chains for Tier-2 and Tier-3 goods
feat(economy): Sprint 2.1 — wire Tier-2/Tier-3 production chains end-to-end
Apr 12, 2026
makr-code
marked this pull request as ready for review
April 12, 2026 06:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tier-2 and Tier-3 production was computing at flat rates without enforcing input dependencies — T3 buildings produced freely regardless of T2 stock. The production flow had no UI representation.
Backend (
api/economy_flush.php)ECONOMY_TIER3_INPUT_RATIOSconstant mapping each T3 good to its required T2 inputs + consumption ratios (mirrorsEconomySimulation.jsrecipes)API (
api/economy.php—get_production)chain_statusto the response: per T3 good, reportsok/low/starved, per-input stock levels (qty, capacity, pct), and output stock — all derived from current T2 stock after flush.Frontend (
js/engine/runtime/RuntimeEconomyController.js)warningHtmlin_renderOverviewTabwas declared after an earlyreturn— war/pirate conflict banners were never rendered in the overview tab.economyBottleneckTests (
tests/js/runtime-economy-controller.test.js)PROCESSING_RECIPESTier-3 input validity