Repository navigation
feat(board): unified pause + leave menu (both apps) - #660
Merged
Merged
Conversation
Replace two-button chrome (✕ + ‖) with single pause button that shows a unified pause menu with Resume (primary) and Leave (destructive). Removes the confirmationDialog and close-button from GameRoot. PauseOverlayView gains title/message/leaveLabel/onLeave params; both boards wire onLeave via @Environment(\.dismiss). String params default to the existing leave.game.* keys so callers only need to pass onLeave + onResume. Removes: isShowingLeaveConfirmation, requestLeave, confirmLeave, cancelLeave, onClose/onCancelLeave/onConfirmLeave from GameRoot/VM. GameRootViewModelLeaveTests updated: Epic 2 tests removed, Epic 1 kept. Adds "game.paused" key to both app xcstrings (7 locales); fixture synced. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
UX-review adjustments to the unified pause/leave menu: - Full-screen .ultraThinMaterial mask (original pause blur, anti-cheat) at the board-body overlay level so it covers the whole screen and the card is SCREEN-centred (was framed to the board square). - Card titled "Leave Game?" (reuses leave.game.title), contained to maxWidth 340. - Resume = .borderedProminent (accent-filled primary/safe); Leave = .bordered (subtle destructive) — clear hierarchy, avoids accidental leave. - Top chrome (timer) hidden while paused so the mask isn't pierced. - Shared PauseOverlayView; Sudoku green / Minesweeper steel-blue. Co-Authored-By: Claude <[email protected]>
This was referenced Jul 1, 2026
wei18
added a commit
that referenced
this pull request
Jul 1, 2026
…ghting (#662) Records the unified pause/leave menu (#660, 4 owner-driven design rounds), the 3×3 keypad (#658), in-board peer+same-digit highlighting (#661), the CI PR-title relax (#659), and the session's lessons (ground UX in the actual screen; check worktrees before force-remove; don't trust subagent test claims). Co-authored-by: Claude <[email protected]>
This was referenced Jul 4, 2026
wei18
added a commit
that referenced
this pull request
Jul 5, 2026
* fix(minesweeper): give the pre-first-tap board an exit (refs #681) The MS board's pause toggle was gated to `.playing || isPaused`, but MS defers session start to the first reveal (first-click-safe mine placement), so a just-mounted board sits in `.idle` with NO exit — no back button, no pause control, and edge-swipe-back is a no-op (#660). Fat-fingering the wrong difficulty (e.g. Expert 16x30) stranded the player with force-quit as the only escape. Sudoku is immune: `BoardLoaderView.startOrResume()` drives its session to `.playing` at mount, so its board never renders in `.idle` (no SudokuKit change). Fix: widen the toggle gate to also render in `.idle`. Tapping it there sets a view-local `showIdleLeaveOverlay` flag that mounts the SAME `PauseOverlayView` (leave-confirm semantics, existing `leave.game.*` strings, no new chrome) WITHOUT calling `viewModel.pause()` — the session actor deliberately no-ops pause on `.idle` (no clock to freeze), so an idle-aware view branch is required, not optional. Resume from the idle overlay just clears the flag (no session call); Leave dismisses as before. Play -> pause -> resume is untouched. Also: - Add `resumeBeforeFirstActionIsNoop` VM test backing the design decision that `resume()` is a safe no-op on an `.idle` session. - Re-record the 3 intentionally-affected covered-board baselines (iPhone light/dark + iPad light) — the Ready-state status bar now carries the pause button. - Update `docs/screen-contracts.md` (MS-BOARD idle row + #681 delta note; PAUSE-OVERLAY entry/Resume rows) and `docs/navigation-flows.md` (dated #681 delta under the unified pause menu section). Verified: MinesweeperKit 174/174 green (--no-parallel), MinesweeperCoreKit 87/87 green, swiftlint --strict clean on changed files. Sim walkthrough skipped per coordinator (watchdog stall); covered by re-recorded baselines + VM tests. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(minesweeper): idle exit button reads as leave, not pause (refs #681) CR follow-up: the `.idle` exit control still showed the pause glyph / "Pause" a11y label while its tap opened the Leave confirmation — a label/behavior mismatch (VoiceOver announced "Pause"). Add a third label branch for `.idle`: glyph `xmark`, visible Label text (regular width) and `.accessibilityLabel` both reuse the pause overlay's own `leave.game.leave` key (verified present in the MS app catalog with all 7 locales; `mise run scan:l10n` green incl. the #594 dotted-key gate — no new string). `.playing` / `.paused` branches are byte-identical. Re-recorded the same 3 covered-board baselines: iPhone light + iPad light now show ✕ instead of ⏸ in the Ready state (iPad rail renders the raw key text — a harness artifact: the snapshot host bundle has no app catalog, so LocalizedStringKey falls back to the literal; at runtime Bundle.main is the MS app and resolves "Leave", the exact mechanism PauseOverlayView's own keys use). Dark iPhone: status-bar text remains invisible in this harness (pre-existing quirk). Also noted the ✕/Leave label on the MS-BOARD idle contract row in docs/screen-contracts.md. Verified: MinesweeperKit 174/174 green (--no-parallel), scan:l10n green, swiftlint --strict clean. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merges the board's Close(✕) and Pause(‖) into ONE button → a full-screen pause menu. Owner-designed + UX-reviewed; sim-verified on Sudoku (and shared code / earlier verify on Minesweeper).
What
.ultraThinMaterialmask (original pause blur, anti-cheat — board hidden) with a screen-centred "Leave Game?" card: Resume (primary, .borderedProminent, brand-accent — sage-green Sudoku / steel-blue MS) + Leave (subtle .bordered destructive red). Tap the mask = Resume.confirmationDialog, and the now-dead leave-confirmation VM plumbing from GameRoot/GameRootViewModel (deleted the 4 orphaned Epic-2 tests).PauseOverlayView(Resume/Leave/title/message threaded, localized — addedgame.pausedthen switched title to reuseleave.game.title; 7-localescan:l10ngreen).Verified
Follow-up: orphaned
game.pausedL10n key (harmless; scan:l10n doesn't flag it).🤖 Generated with Claude Code