Skip to content

fix(ui): restore action icon mapping + log opacity (closes #762) - #766

Merged
PipFoweraker merged 1 commit into
mainfrom
fable/icon-regression-fix
Jul 21, 2026
Merged

fix(ui): restore action icon mapping + log opacity (closes #762)#766
PipFoweraker merged 1 commit into
mainfrom
fable/icon-regression-fix

Conversation

@PipFoweraker

Copy link
Copy Markdown
Owner

Summary

HIGH-priority regression fix for #762: most action-icon buttons rendered the magenta-checkerboard placeholder.

Root cause (diagnosed, not guessed)

IconLoader lookup is id-keyed (correct -- not the fragility). The gap was pure data: 8 top-level actions the main action panel renders had no entry in data/icon_mapping.json, so get_action_icon() fell back to the placeholder. A headless probe confirmed exactly which ids: operations, travel, financing, advertise, use_connections, interview_next, hire_best, onboard_next.

These ids entered data/actions/core.json in #627 (2026-07-13) (operations/travel/financing) and #664 (2026-07-17) (the hiring pipeline) without matching icon mappings -- so they have shown placeholders since then. What changed today and surfaced it: the new office backdrop (#760) sits behind the action panel, making the placeholders newly conspicuous in Pip's playtest. icon_mapping.json, icon_loader.gd, and the mapped icons themselves were not altered by #715 or #751 (verified: those merges did not touch the mapping keys, the ids, or delete any assets). The other 10 core actions resolve to real icons.

Fix

  • Mapped the 8 missing action ids to existing repo icons (reuse is an established pattern -- e.g. media_campaign/publicity already share one). Entries appended to the actions block and marked #762 interim so the art-batch lane (fable/art-batch-649) can promote dedicated icons later without confusion. Did not add the batch's 8 new icons; edit is minimal/append-safe.
  • New fast-tier test tests/unit/test_action_icon_resolution.gd: drives the same path the UI does (unlocked actions from GameActions.get_all_actions()) and asserts every id resolves to a real (non-placeholder) res:// icon. This would have caught the regression.

Log opacity (also in #762 scope)

The WATCH feed had no background stylebox, so its text floated over the office backdrop. TerminalTheme.style_feed now paints an off-black panel: #170A1C @ 0.88 alpha, matching the turn-counter box (StyleBoxFlat_TurnCounter) and backdrop scrim register.

First-load grey (investigated)

Most consistent with a one-time cold-import decode: #760's WebP backdrops import on first launch after pull; the first frame can render before the .ctex upload completes -> grey, then cached fine after. A preload() would not help -- the scene's ExtResource already effectively preloads the texture; the timing is import-cache generation, not runtime lazy load. Resolved by the normal --import pass. Documented rather than adding churn.

Tests

Fast gate: 539 tests, 0 failures, 60/60 files (includes the new icon-resolution test).

Do not merge -- for Pip's review.

🤖 Generated with Claude Code

Icon regression: 8 top-level actions the main panel renders had no entry
in data/icon_mapping.json, so IconLoader.get_action_icon() fell back to the
magenta-checkerboard placeholder. The ids (operations, travel, financing and
the hiring pipeline advertise/use_connections/interview_next/hire_best/
onboard_next) entered core.json in #627 (2026-07-13) and #664 (2026-07-17)
without matching icon mappings; the new office backdrop (#760) made the
placeholders newly conspicuous in playtest.

Root fix: lookup is already id-keyed (correct); the gap was pure data. Added
the 8 missing action-id mappings, reusing existing repo icons (interim -- the
art-batch lane may promote dedicated icons later; entries appended, minimal).
Added tests/unit/test_action_icon_resolution.gd: asserts every unlocked action
id resolves to a real (non-placeholder) icon path -- this would have caught it.

Log readability: the WATCH feed had no background stylebox, so its text floated
over the office backdrop. TerminalTheme.style_feed now paints an off-black
panel (#170A1C @ 0.88 alpha, matching the turn-counter box / backdrop scrim).

Fast gate: 539 tests, 0 failures, 60/60 files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@PipFoweraker
PipFoweraker merged commit d08175e into main Jul 21, 2026
13 of 14 checks passed
@PipFoweraker
PipFoweraker deleted the fable/icon-regression-fix branch July 21, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant