fix(ui): restore action icon mapping + log opacity (closes #762) - #766
Merged
Conversation
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>
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.
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, soget_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.jsonin #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
media_campaign/publicityalready share one). Entries appended to theactionsblock and marked#762 interimso 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.tests/unit/test_action_icon_resolution.gd: drives the same path the UI does (unlocked actions fromGameActions.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_feednow 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
.ctexupload completes -> grey, then cached fine after. Apreload()would not help -- the scene'sExtResourcealready effectively preloads the texture; the timing is import-cache generation, not runtime lazy load. Resolved by the normal--importpass. 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