Skip to content

test(completion): snapshot test + sim-driveable debug hook for Play Again - #655

Merged
wei18 merged 1 commit into
mainfrom
test/play-again-verifiable
Jun 30, 2026
Merged

wei18 merged 1 commit into
mainfrom
test/play-again-verifiable

Conversation

@wei18

@wei18 wei18 commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Follow-up to #654 — makes the Play Again CTA verifiable (test + DEBUG-only; no production logic change).

What

  • Snapshot test CompletionOverlayScaffoldTests: renders the scaffold with a non-nil onPlayAgain, locking the two-button layout (Play Again primary above Close secondary). The nil-case baselines are untouched.
  • DEBUG hook: -uitest-near-win-modal now wires onPlayAgain so the button appears and tapping it re-presents a fresh board (two-phase dismiss→rebuild). Production wiring untouched.
  • The onChange observes (nearWinBoard == nil) (a Bool) so it does not require SudokuNearWinBoard: Equatable.

Verified

Sim-driven on a device build (this is the point): tapping Play Again on the completion overlay dismisses cleanly and presents a fresh board with a reset timer — no blank cover, no stuck state. The earlier dismiss→present race concern is empirically clean. Screenshots 01/02 in the session shots dir.

GameShellKit 21 / SudokuKit 261 pass; swiftlint --strict 0.

🤖 Generated with Claude Code

…gain (#652)

Makes the #652 Play Again CTA verifiable:
- New snapshot test (CompletionOverlayScaffoldTests) renders the scaffold with a
  non-nil onPlayAgain, capturing the two-button layout (Play Again above Close).
  The nil-case baselines are untouched (byte-identical claim preserved).
- DEBUG-only: -uitest-near-win-modal now wires onPlayAgain into the near-win
  board, so the Play Again button appears and tapping it re-presents a fresh
  board (two-phase dismiss→rebuild). Production wiring untouched.

onChange observes (nearWinBoard == nil) rather than the board, so it does not
require SudokuNearWinBoard: Equatable (the agent's first cut failed to compile).

Sim-verified on device build: Play Again renders (primary green above secondary
Close) and re-presents a fresh board with a reset timer — clean transition.

GameShellKit 21 / SudokuKit 261 pass; swiftlint --strict 0.

Co-Authored-By: Claude <[email protected]>
@wei18
wei18 merged commit aaf0762 into main Jun 30, 2026
4 checks passed
@wei18
wei18 deleted the test/play-again-verifiable branch June 30, 2026 06:49
wei18 added a commit that referenced this pull request Jun 30, 2026
Extends the 2026-06-29 sim-audit log with the follow-on fixes (#646/#651/#654/#655), the Play Again arc, and four Leader-caught agent defects (Daily fork, placeholder L10n, catalog-reformat bleed, compile error masked by an incremental build).

Co-authored-by: Claude <[email protected]>
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