Skip to content

fix(sudoku): unify completion to the in-board overlay on all platforms - #669

Merged
wei18 merged 3 commits into
mainfrom
feat/667-2b-macos-completion-overlay
Jul 3, 2026
Merged

wei18 merged 3 commits into
mainfrom
feat/667-2b-macos-completion-overlay

Conversation

@wei18

@wei18 wei18 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

What

Item 2B from #667 (SDD-003 gameview UX audit follow-up): Sudoku's completion now presents as the in-board CompletionOverlayScaffold overlay on every platform. The macOS-only pushed .completion route — whose Close popped one route and stranded the player on the solved board (audit P1) — is gone.

  • shouldPresentCompletionOverlay no longer gates on path == nil; the overlay is the single completion presentation.
  • New exitToHub(dismiss:): modal context → dismiss() (unchanged); push context (macOS) → pops the board's own stack entry, landing back on the hub. Close and Play Again both route through it.
  • Removed GameViewModel.completionRoute, BoardView.pushCompletionIfNeeded(), and the hasNavigatedToCompletion state.
  • Terminal pause guard (audit P2): the pause button hides at terminal status, mirroring MinesweeperBoardView.pauseToggle.
  • Kept: AppRoute.completion + its LiveRouteFactory case — DailyHubViewModel.openCompleted() (UX: solved Daily card stays tappable → dead completed board #379, re-view a solved daily) still pushes it. That flow is unrelated to the terminal path.
  • Minesweeper: zero changes (git diff empty under Packages/MinesweeperKit) — its terminal flow was already overlay-based; its own .completion(difficulty:) route is the fix(minesweeper): mirror #379 — re-tap solved daily card routes to Completion #386 re-view feature.

Verification

  • swift test: SudokuKit 261/261 · MinesweeperKit 173/173 · GameShellKit 21/21 · GameAppKit 23/23.
  • mise run lint:swift_strict clean on changed files.
  • macOS runtime (the previously-missing evidence): real xcodebuild test XCUITest run on platform=macOS drove the production flow — Practice → Draw → push-context board → winning move → completion overlay (game.completion.hero) appeared → Close → landed back on the Practice hub, digit pad gone (not stranded on the solved board), overlay dismissed. Test passed in 36.9s. (Driven via a temporary local near-win hook + temp E2E test, both reverted — not part of this diff.)
  • Tests updated: the macOS "push suppresses overlay" regression lock inverted to assert the overlay now fires in push context; two new exitToHub unit tests (pops exactly the board's entry; safe on empty path).

Refs #667 (2B done; 2C tracked separately in the same issue).

🤖 Generated with Claude Code

wei18 and others added 3 commits July 4, 2026 06:26
#667)

macOS boards are NavigationStack pushes (path != nil), and the win handler
pushed a separate `.completion` route whose Close only popped that route,
stranding the player on the solved board underneath (SDD-003 audit P1).
`shouldPresentCompletionOverlay` no longer gates on `path`, so the overlay
now fires on every platform; Close picks dismiss (modal) vs a stack pop
(push) via the new `exitToHub` helper, always landing back on the hub.

DailyHubViewModel.openCompleted still constructs `AppRoute.completion` for
the unrelated re-view-a-solved-daily flow (#379), so the case and its
LiveRouteFactory destination stay.

Also adds the terminal-state pause-button guard (audit P2), mirroring
Minesweeper's `pauseToggle`, so the header control isn't visibly-but-dead
once a game is won.

Minesweeper is untouched (git diff confirms zero changes under
Packages/MinesweeperKit) — its terminal flow was already overlay-based and
its own pushed `.completion(difficulty:)` route is a different feature.

Co-Authored-By: Claude Fable 5 <[email protected]>
…667)

The `path` doc comment still described the deleted push-`.completion`
behavior; it now names the actual consumer (the completion overlay's
Close pop via exitToHub).

Co-Authored-By: Claude Fable 5 <[email protected]>
SudokuNearWinModalModifier still described its sibling as the
NavigationStack-push variant; both hooks are overlay-based since the
Jul-3 cleanup and the push completion path is deleted (#667 2B).

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 merged commit e83d42d into main Jul 3, 2026
4 checks passed
@wei18
wei18 deleted the feat/667-2b-macos-completion-overlay branch July 3, 2026 23:06
wei18 added a commit that referenced this pull request Jul 4, 2026
… uploads (#671)

Session log: #631 triage/fix (#666), 2B completion unification with the
first working macOS XCUITest verification (#669), dual iOS TestFlight
uploads, tf:upload backlog (#670), and the deferred-2C / submission-
checklist decisions.

Co-authored-by: Claude Fable 5 <[email protected]>
@github-actions github-actions Bot mentioned this pull request Jul 27, 2026
wei18 added a commit that referenced this pull request Jul 28, 2026
… order (#934) (#958)

* chore(upkeep): fix skill counts, prototype tags, noop spelling, plist order (#934)

Five surgically-scoped fixes from the #934 upkeep triage (all verified
against main @ 972d7a7):

1. CLAUDE.md §Where truth lives claimed 9 project-bound skills; actual
   flat-skill count under .claude/skills/ (excluding the apple-dev-skills
   submodule) is 8 — screen-contract-spec's master copy moved out to the
   design-app playbook on 2026-07-21 (6e5b1a2).
2. Same stale "9" count in docs/superpowers/specs/2026-06-24-apple-dev-skills
   -shared-plugin-design.md (AS-BUILT NOTE, architecture diagram, §5 header)
   — corrected to 8, with a new dated UPDATE note (mirroring the doc's own
   2026-07-13 correction convention) explaining the reversion without
   erasing the historical 07-13 record.
3. Both app-flow prototypes still labeled the board->completion transition
   "push .completion". Shipped reality (#667/#669 Sudoku, #388/#386 MS):
   completion mounts as an in-board overlay, not a stack push; the pushed
   .completion route serves only the daily re-view. Re-tagged the S09/M14
   edges and Sudoku's untagged S09 node + prose (which also referenced a
   nonexistent "retry" completion variant); MS's edge now uses the same
   kind:'state' (overlay, no push) treatment already used for its sibling
   M11->M12 lose-overlay edge.
4. Packages/TelemetryKit/Sources/Telemetry/NoOpTrackingSink.swift was the
   sole "NoOp" (capital O) type in a codebase that otherwise spells this
   pattern "Noop" (NoopErrorReporter and 6 other sibling placeholder types
   repo-wide). Renamed type + file to NoopTrackingSink; updated its test
   file and the GameAppKit call site.
5. App/Sudoku/Info.plist and App/Minesweeper/Info.plist had
   NSUserTrackingUsageDescription at different positions in an otherwise
   identical key sequence. Reordered Minesweeper's copy (the one that broke
   the shared LS*/NSGameKit*/NSUserTracking* block ordering, present since
   the two Info.plists first diverged pre-#393) to match Sudoku's.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs(designs): finish the S09 as-built sync + rename the foundations example (#934)

CR round 1 on PR #958:

- sudoku-app-flow.prototype.html: the sentence item 3 edited still claimed a
  leaderboard slice with sign-in/loading variants — all deleted by #698
  (CompletionView is hero + time + mistakes + Close only). Prose and the S09
  phone-label now say so.
- foundations.md: the TelemetrySink code example renamed to NoopTrackingSink to
  match the item-4 rename (a current-API example, unlike the frozen v1 docs
  which keep the old spelling as history).

Co-Authored-By: Claude <[email protected]>

* docs(designs): drop the stale .loaded(slice) source note on S09 (#934)

Acceptance caught the phone-source annotation two lines below the corrected
S09 label still citing the #698-deleted CompletionState machinery.

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude Fable 5 <[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