Skip to content

Merge dev → main (automated)#594

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

Merge dev → main (automated)#594
SorraTheOrc merged 19 commits into
mainfrom
release/dev-to-main-20260610000540

Conversation

@SorraTheOrc

Copy link
Copy Markdown
Member

Automated release created by ship skill.

Map added 19 commits June 6, 2026 21:01
…Renderer

- Re-export createSceneTitle, createSceneMenuButton, createSceneHeader and types from src/ui/Renderer/index.ts
- Update GolfAdapter to import from Renderer barrel instead of SceneHeader
- Update MainStreetRenderer, BeleagueredCastleRenderer, SushiGoRenderer, MindRenderer to import from @ui/Renderer
- Eliminate ad-hoc require() call in SushiGoRenderer
- Visual consistency across all games for headers and status text
…teSceneMenuButton from @ui/Renderer

GolfRenderer was the last Renderer file importing these shared UI helpers
from a relative path (GolfAdapter) instead of from the @ui/Renderer barrel.
Updated imports to use @ui/Renderer for the shared functions while keeping
game-specific helpers (createGolfHudText, getCardTexture) in the adapter.
- Extended createGameZone unit tests with negative cases for undefined/empty name
- Added Main Street z-order browser tests: HUD depth ≥ 1000 > gameplay containers depth 0
- Added Sushi Go z-order browser tests: consistent creation order, no explicit depth
- Added Feudalism z-order browser tests: sectionBox below gameplay, overlay above all
- All 22 z-order tests pass; all 3010 unit tests pass
…eGameZone

Replace 8 zone container creations in MainStreetRenderer.createContainers()
with createGameZone(scene, x, y, w, h, name) calls. Retains setDepth(1000)
on hudContainer and depthSort() call. Per-card containers unchanged.

Updated z-order tests to expect zone metadata on migrated containers.
…ateGameZone

- Replace all 8 scene.add.container(0,0) calls in createContainers() with
  createGameZone(this.scene, 0, 0, GAME_W, GAME_H, name)
- Import GAME_H and createGameZone from src/ui/Renderer
- Update FeudalismZOrder browser test to verify zone metadata is set
- Per-card containers in createMarketCard, createSmallCard, etc. remain
  unchanged (raw scene.add.container calls)
- All 137 Feudalism tests pass
Add a comprehensive comment block to src/ui/Renderer/index.ts covering:
- When to use createGameZone vs scene.add.container()
- When per-card containers should remain as scene.add.container()
- Zone dimension best practices (full-screen, layout-derived, zero/negative)
- Z-order conventions (HUD at 1000+, gameplay at 0, overlays on top)
- Container naming conventions with real examples from all 3 games
- Transient vs persistent children (markHudTransient/clearTransientHud)
- Summary checklist for adding new containers
# Conflicts:
#	.ralph/event.pending
#	example-games/beleaguered-castle/scenes/BeleagueredCastleRenderer.ts
#	example-games/golf/scenes/GolfRenderer.ts
#	example-games/main-street/scenes/MainStreetRenderer.ts
#	example-games/sushi-go/scenes/SushiGoRenderer.ts
#	src/ui/Renderer/index.ts
- Add w?: number and h?: number to NormalizedRect TypeScript interface
- Add optional w and h to JSON Schema rect.properties (number, minimum: 0)
- Update resolveRect() to return PixelRect with width/height when w/h present
- Change ResolvedZone.rect type from PixelPoint to PixelRect
- Update getZoneRect() return type to PixelRect
- Update documentation to reflect dimension support
- Add 10 tests for dimension validation, resolution, and backward compatibility
- Existing position-only zones continue to validate and resolve identically
… for SLL dimension schema

Add 5 new tests verifying composeResolvedLayouts propagates dimensioned
zones correctly through all three composition policies (sceneWins,
baseWins, namespace). Also adds a new tutorial layout fixture file with
dimensioned zones for the Main Street tutorial system.

Tests cover:
- Schema validation with optional w/h fields (existing)
- Backward compatibility with position-only zones (existing)
- Pixel resolution with and without dimensions (existing)
- Compose propagation of dimensioned zones (new)
- Mixed dimensioned/position-only zones in composition (new)
- pixelOverride with dimensions in composition (new)
…ge validation tests

- Add maximum:1 constraint to w/h schema properties (matching x/y bounds)
- Add test rejecting w>1 values
- Add test rejecting both w>1 and h>1 values
- All 17 dimension tests pass
…tion pattern

- Add tutorial layout composition section to docs/DEVELOPER.md SLL docs
- Document tutorial layout file, schema extension, and usage pattern
- Update Main Street README to reference tutorial layout JSON file
- Add JSDoc comments to TutorialHighlightZone and zoneToAnchor()
- Cross-reference tutorial layout file from canonical layout docs
…alHighlightZone addressing audit gaps

- TutorialHighlightZone: added @deprecated tag with migration narrative and
  kebab-case → camelCase zone ID mapping
- zoneToAnchor(): added @deprecated tag, clarified @param/@return docs, noted
  kebab-case → camelCase transition
- Build passes, 42 related tests pass
- Note: grep for zoneToAnchor still finds 4 references (2 code, 2 doc). The 2
  code references cannot be removed until parent refactoring (CG-0MP7IZ4RK008065O)
  completes.
… update TutorialHighlightZone to camelCase

- Replace hardcoded pixel-math in zoneToAnchor() with SLL-based resolution
  using composeResolvedLayouts(baseLayout, tutorialLayout, viewport) with
  sceneWins policy.
- Updated TutorialHighlightZone type from kebab-case to camelCase SLL zone
  IDs (marketBusinessRow, streetGrid, endTurnButton, etc.).
- Updated all TUTORIAL_STEP_DEFS highlightZone values to use new camelCase IDs.
- Updated tutorial-flow.test.ts assertions to match new zone name format.
- Pre-parse base and tutorial layout JSON at module load time.
- Added resolveZoneToAnchor() helper and NULL_ZONES set for cleaner logic.
- Removed deprecated pixel-math switch/case from zoneToAnchor().
…one assertions to camelCase

- Updated 'center-modal' and 'completion-modal' test names and inputs to
  'centerModal' and 'completionModal' for consistency with the new
  TutorialHighlightZone type.
@SorraTheOrc SorraTheOrc merged commit ba614c2 into main Jun 10, 2026
1 check failed
@SorraTheOrc SorraTheOrc deleted the release/dev-to-main-20260610000540 branch June 10, 2026 00:09
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