Add Main Street Tutorial scenario, non-interactive overlays, smoke test, and fix build#465
Conversation
… fix build" Agent-Logs-Url: https://github.com/TheWizardsCode/Tableau-Card-Engine/sessions/ebb9c04b-ffc7-4382-9616-306bcbc35fc5 Co-authored-by: SorraTheOrc <250240+SorraTheOrc@users.noreply.github.com>
…verlay operations Agent-Logs-Url: https://github.com/TheWizardsCode/Tableau-Card-Engine/sessions/ebb9c04b-ffc7-4382-9616-306bcbc35fc5 Co-authored-by: SorraTheOrc <250240+SorraTheOrc@users.noreply.github.com>
|
@copilot the CI tests failed. Fix them |
…using transient-tagged removal Replace hudContainer.removeAll(true) in refreshHud() with a targeted loop that only destroys children tagged with _hudTransient. The four transient HUD elements (strip, coinText, repText, scoreText) are tagged via the new markHudTransient() helper. Persistent overlay objects (HelpPanel, SettingsPanel, buttons) are never tagged and therefore survive every refresh cycle. Root cause of the pre-existing SidebarOverlay.browser.test.ts failure: removeAll(true) was destroying helpPanel.container and settingsPanel.container on every refresh, setting parentContainer to undefined. The assertion expect(helpParent).toBe(scene.hudContainer) then failed, and Vitest crashed with RangeError: Invalid string length when trying to serialize the large Phaser Container object in the failure message. Agent-Logs-Url: https://github.com/TheWizardsCode/Tableau-Card-Engine/sessions/0c9ef8cd-e9a7-4a48-98de-f8772edae356 Co-authored-by: SorraTheOrc <250240+SorraTheOrc@users.noreply.github.com>
Fixed in commit Root cause: The fix replaces |
…nk guard to prevent deep-link asset resolution issues
… by hiding svgDom while overlays visible; improve button layout
…e DOM-rendered cards; keep highlight on canvas
…n possible (prevents obscuring Challenges panel); measure tooltip height for accurate placement
…eW-40 width) instead of full-width
…ping right-hand log/challenge area
…port INCIDENT_QUEUE_SIZE; clamp widths to avoid log overlap
… compute Challenges highlight height from active challenges
…itles); compute Challenges highlight from challengeContainer bounds when available
…ue when available to match actual UI; fallback to layout-derived sizes
…ttings panel; persist tutorialSeen flag in campaign progress; auto-show on first run; allow replay from Settings
…ogs for Play Tutorial event
…s; warn if tutorialOverlay unavailable
…accessible from Settings and in-scene
… tutorial from game selector
…ndler to MainStreetLifecycleManager
…listens for replay event and restarts tutorial run
…scene restarts run in Easy and auto-shows tutorial
…on Continue/Cancel
Implements the "Scenario: Tutorial" Game Selector entry for Main Street with non-interactive tutorial overlays, a deterministic headless smoke test, and fixes a pre-existing build failure.
New files
MainStreetTutorialScene— subclass ofMainStreetScenewith scene key'MainStreetTutorialScene', Easy difficulty hardcoded, auto-shows tutorial overlays on first load, adds[?] TutorialHUD toggle buttonMainStreetTutorialOverlayManager— 7-step non-interactive overlay sequence (Welcome → Market → Incidents → Street Grid → Hand → Action Controls → Scoring). Each step renders a green highlight rect around the relevant UI region + a tooltip with Prev/Next/Dismiss navigation. Never blocks gameplay input.tests/main-street/smoke-scenario.test.ts— 8 headless unit tests using canonical seed"smoke-1": run completion, required summary fields, determinism, Easy-difficulty baseline, and 4 regression seedsModified files
MainStreetSceneconstructor now acceptsPartial<Phaser.Types.Scenes.SettingsConfig>so subclasses can supply a different Phaser scene key without forking the classmain.ts— registersMainStreetTutorialSceneand adds"Scenario: Tutorial"Game Selector entrydocs/main-street/playtest-scenarios.md— adds Scenario 0 "Tutorial Smoke" documenting thesmoke-1seed, expected outcome, and a guide for authoring/updating tutorial copyREADME.md— adds Tutorial scenario to the example games table and smoke test commandsBuild fix
Removed two unused imports (
highestUnlockedTier,CARD_TEMPLATE_NAMES) intests/main-street/meta-progression.test.tsthat were emitting TS6133 errors and causingnpm run buildto exit non-zero.