Release: dev → main#593
Merged
Merged
Conversation
added 10 commits
June 8, 2026 12:12
Replace all scene.children.list.find/filter with a collectFromSceneAndHud helper that recursively walks Phaser 4's .list property on Containers and the hudContainer. Phaser 4 uses .list (not .children) for container children, causing overlay/button tests to miss objects parented into the HUD container. - HelpPanel.browser.test.ts: add collectFromSceneAndHud, find ? button - GolfOverlay.browser.test.ts: fix collect helper and findButtonContainer - SushiGoOverlay.browser.test.ts: fix collectFromSceneAndHud - TheMindOverlay.browser.test.ts: fix collect helper and newScene.walk - BeleagueredCastleOverlay.browser.test.ts: rewrite with collect helper All unit tests (3006) and browser tests pass. Build succeeds.
…ng to hudContainer - Add text elements in showRoundScoreOverlay() to hudContainer so they render above the overlay background box. - Add text elements in showGameOverOverlay() to hudContainer so they render above the overlay background box. - Add two new browser tests verifying text elements are in hudContainer for both round-score and game-over overlays. This mirrors the Main Street fix (CG-0MQ2IL40S0060FUG, commit d7446dc).
- Parent Next Round button (round-score overlay) to hudContainer. - Parent Play Again and Menu buttons (game-over overlay) to hudContainer. - Added 2 new browser tests verifying buttons are in hudContainer for correct z-ordering. This ensures buttons are rendered above the overlay background box.
…to hudContainer Before: Every game using OverlayManager had to manually parent every text button to hudContainer (error-prone, verbose, inconsistent). After: OverlayManager.add() automatically parents all objects to hudContainer, ensuring correct z-ordering above the overlay background box for ALL games that use OverlayManager. Impact on all games: - Sushi Go: Removed 5 redundant manual hudContainer.add() calls (cleaner) - Main Street: Already fixed via manual calls; no change needed - Feudalism: Automatically fixed (game-over + card action menu) - Beleaguered Castle: Automatically fixed (win + no-moves overlays) - Golf: Automatically fixed (end screen); also fixed test helper - Lost Cities: Automatically fixed (round + match summaries) - The Mind: Automatically fixed (win/loss overlays) This is a single change in src/ui/OverlayManager.ts that fixes all 5 broken games (Feudalism, Beleaguered Castle, Golf, Lost Cities, The Mind) in one go, plus cleans up the Sushi Go fix.
createOverlayBackground() was unconditionally parenting the overlay box/background to hudContainer (depth 1000). This broke custom overlays like Golf's end screen (depth 10) — the box at depth 10 inside hudContainer (1000) would cover HUD-level game elements like 'Stock' (also at depth 1000). Fix: Remove hudContainer parenting from createOverlayBackground(). Overlay content (text, buttons) is still correctly parented by OverlayManager.add(). The overlay box/background stays in the normal scene hierarchy at its specified depth so custom overlays render below the HUD layer. Also updated the Overlay unit test to reflect new behavior.
Parent HUD text elements (like 'Stock', 'Discard') into hudContainer so they share the same depth-sort space as the overlay box/background. Previously, the overlay box was in hudContainer (depth 1000) but 'Stock' text was in the normal scene hierarchy at depth 1000, causing 'Stock' to render above the overlay box. By putting both in hudContainer, the overlay box at depth 10 covers the HUD text at depth 1000. Fix in src/ui/Renderer/adapters/GolfAdapter.ts: createGolfHudText() now parents text into hudContainer when available.
…pters Parent HUD text into hudContainer so they share the same depth-sort space as overlay content. This ensures overlays correctly cover HUD labels (like 'Stock' in Golf, which was the original issue). - src/ui/Renderer/adapters/BeleagueredCastleAdapter.ts: createBcHudText() now parents text into hudContainer when available - src/ui/Renderer/adapters/LostCitiesAdapter.ts: createLcHudText() now parents text into hudContainer when available
…bels, and overlay container parenting
…ring - Update waitForScene helper to wait extra frames so create() completes before tests query scene objects - Fix GolfScene.browser.test.ts to search hudContainer.getAll() for HUD text elements (Phaser 4 Container API uses .getAll() or .list, not .children.list) - Fix GolfInteraction.browser.test.ts same pattern for score text lookup Root cause: After the HUD container refactoring, text elements are parented into hudContainer. Tests were still searching only in scene.children.list.
…bels, overlay container parenting, and Golf browser test fixes
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.
Automated release from
devtomain.Merge details:
dev(HEAD: f85e0bb)mainPre-merge checks:
Remaining open items: 48 (including 1 critical: Fix failing browser tests in HelpPanel)
This PR was created by the Ship skill release process.