Skip to content

feat(completion): add Play Again (same difficulty) — revisit SDD-003 Epic 4 'Close only' #652

Closed

Description

@wei18

Decision

Product owner approved adding a "Play Again" action to the win/loss completion screen, reversing the SDD-003 Epic 4 decision that made the completion popup "Close only" (Retry / New Game / Leaderboard were deliberately removed — see CompletionView.swift:9-13). Both designers in the 2026-06-29 sim UX audit flagged the missing retry as a momentum gap.

GC entry-point relocation (the other half of #468) is OUT OF SCOPE here — this issue is only the Play-Again CTA.

Scope

  • Shared completion UI (GameShellKit CompletionOverlayScaffold) gains an OPTIONAL Play Again button above Close, themed with theme.accent.primary (Close stays as-is). When no onPlayAgain is provided, only Close renders (preserves snapshot parity for any caller that doesn't wire it).
  • Wire onPlayAgain in BOTH apps' completion sites (Sudoku CompletionView/BoardView+Completion; Minesweeper MinesweeperBoardView completion).
  • Play Again = start a fresh game of the SAME difficulty as the just-finished game.

Recommended approach (lower risk — reuse tested paths)

Do NOT add a determinism-sensitive in-place re-seed to the board VMs. Instead reuse the existing hub path: on Play Again, dismiss the current board cover, then drawPuzzle(difficulty:) + presentGame(route:) (the same calls the Practice hub already makes). Thread the current difficulty to the completion site (it is already known at board-construction time). A brief cover dismiss/re-present is acceptable for v1.

  • If this proves to need awkward plumbing, STOP and report the fork rather than guessing.

L10n

Adds one user-visible string ("Play Again") → needs all 7 locales via the ai-translated-localization skill + gen:l10n_fixture. The scan:l10n CI gate will fail until done.

Snapshots

Completion snapshots that now show a Play Again button will need re-recording (recolor/layout — confirm diff is only the new button).

Verify

  • Win a game (use -uitest-near-win-modal), tap Play Again → a new board of the same difficulty appears, timer reset.
  • swift test SudokuKit + MinesweeperKit + GameShellKit; mise run scan:l10n passes; swiftlint --strict.

Audit follow-up, 2026-06-29. Relates to #468 (completion CTA / GC entry point product question).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions