Skip to content

Release: dev → main#593

Merged
SorraTheOrc merged 10 commits into
mainfrom
release/dev-to-main-1780949721
Jun 8, 2026
Merged

Release: dev → main#593
SorraTheOrc merged 10 commits into
mainfrom
release/dev-to-main-1780949721

Conversation

@SorraTheOrc

Copy link
Copy Markdown
Member

Automated release from dev to main.

Merge details:

  • Source: dev (HEAD: f85e0bb)
  • Target: main
  • Created: 2026-06-08T20:15:55Z
  • Scope:
    • HUD text parenting fixes (Beleaguered Castle, Lost Cities, Golf adapters)
    • Golf 'Stock' label visible above overlay fix
    • Overlay.ts auto-parents box to hudContainer
    • Golf browser test fixes for HUD container refactoring

Pre-merge checks:

  • ✅ Unit tests: 3006 passed, 5 skipped
  • ✅ Browser tests: 164 passed
  • ✅ Build: succeeds
  • ✅ No merge conflicts

Remaining open items: 48 (including 1 critical: Fix failing browser tests in HelpPanel)

This PR was created by the Ship skill release process.

Map 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
…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
@SorraTheOrc SorraTheOrc merged commit ff1af1b into main Jun 8, 2026
1 check failed
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