From 1cb6a657eacaf4d090be83fd97a6401bd6c7a91e Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 19 Jun 2026 02:51:46 -0500 Subject: [PATCH] =?UTF-8?q?docs(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=93=9D=20p2-87=20=E2=80=94=20override=E2=86=92inheritance?= =?UTF-8?q?=20foundation=20+=20pilot=20landed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Record the type-variation foundation (build-tool emission + 9 Label variations) and the knowledge_tree pilot (4 labels migrated, render-verified). Note the remaining scene-by-scene sweep + redundant-default deletes + font-size/StyleBox sub-sweeps. Co-Authored-By: Claude Opus 4.8 (1M context) --- .project/objectives/p2-87-single-color-system-sot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.project/objectives/p2-87-single-color-system-sot.md b/.project/objectives/p2-87-single-color-system-sot.md index 745c944e..3be20c0a 100644 --- a/.project/objectives/p2-87-single-color-system-sot.md +++ b/.project/objectives/p2-87-single-color-system-sot.md @@ -49,7 +49,7 @@ component tech.researchedBg = {semantic.positive} OR {palette.x} never i - [ ] **Accessibility palettes unified** — `palettes.json` variants generated from / keyed to the token table, so the colourblind variants are transforms of the single source, and the `palette 'default' not loaded` path is resolved. - [ ] **Web guide derives from tokens** — `build-ui-theme.py` (or a sibling) emits a generated TS/CSS colour module; `fantasy-theme.ts`'s ~20 raw hexes are replaced by references to it. Guide + game can no longer drift. Guide build green. - [~] **Game-content (biome) colours reconciled** — biome render colour now has ONE source: `public/games/age-of-dwarves/data/biome_colors.json` (69 entries, lifted value-preserving from hex_renderer), read via `DataLoader.get_biome_color()`. **Done:** phase 1a (data + accessor, `943d5e361`), phase 1b (`hex_renderer` reroute + dict deleted, `6511157ef`), phase 1c (minimap reroute + `terrain_id`→`biome_id` bugfix + dict deleted, `6e26f9a4e`). **Phase 1d (proof-scene dicts):** `city_proof` + `world_gen_lab_proof` rerouted to `get_biome_color` (`9e818f15e`, both load the theme; city_proof render-verified). **Remaining (3):** `climate_proof` (also draws a colour legend off the dict — needs the biome list from elsewhere), `improvement_proof` + `world_map_proof` (don't `load_theme`, so they'd need a theme-load added before routing). Test-viz only; low priority. **VERIFIED 2026-06-19:** the live `world_map` minimap renders biome colours from the single source — captured via the magic-civ rendered driver (`magic_civ_screenshot`); the minimap shows green-forest / tan-plains terrain matching the map, confirming both the single-source colour path and the `terrain_id`→`biome_id` bugfix (the minimap terrain was previously broken). Proof: `.local/ui-proofs/p2-87_worldmap_minimap_verified.png`. -- [ ] **Override → inheritance** — the ~314 `add_theme_*_override` + ~27 inline `StyleBoxFlat.new()` across scenes collapse into Godot Theme type-variations so widgets inherit; `ThemeAssets.color()` remains only for genuinely dynamic/computed colours. (B cluster-3; the bulk of "used everywhere it should be.") +- [~] **Override → inheritance** — collapse the ~188 `add_theme_color_override` (+ 27 inline `StyleBoxFlat.new()`) onto Godot Theme type-variations so widgets inherit; `ThemeAssets.color()` stays only for dynamic/computed colour. **Foundation done:** `build-ui-theme.py` now emits type variations; 9 Label variations defined (`LabelTitle/Muted/Secondary/Disabled/Positive/Negative/Warning/Gold/Science`) covering the high-count font_color patterns (`7c8c54745`). **Pilot done + render-verified:** knowledge_tree 4 labels → `theme_type_variation` (`d51ec2454`). **Remaining:** sweep the rest scene-by-scene (set `theme_type_variation`, delete the override; render-verify per scene via magic-civ driver); add Button/Panel variations + delete redundant overrides that already equal a theme default (e.g. Label font_color=text.primary); font-size overrides (176) + inline StyleBoxes are separate sub-sweeps. - [ ] **Coverage gate** — a check (script/test) asserts no raw `Color(r,g,b,...)` literals in scene scripts except sanctioned carve-outs (computed/dynamic), and no raw hex in the guide theme. Wired so regressions are caught. - [ ] **Visual-regression proof** — per-cluster headed render proofs on plum (warm cache — safe per [[feedback_no_godot_import_on_plum]] 2026-06-18 update) confirm zero unintended colour change.