Repository navigation
feat(settings): persist practice difficulty and MS tap-mode across launches - #746
Merged
Merged
Conversation
Sudoku/Minesweeper Practice hubs reset to Medium/Beginner and the Minesweeper board's tap-mode toggle reset to Reveal every launch even though players expect these choices to stick (#720 gap-fill: G1/G2/G3). Adds a shared `LastSelectionStore` (GameAppKit) — a UserDefaults-backed "last selected" String preference, mirroring `MinesweeperWinCountStore`'s injectable-UserDefaults shape — reused for all three gaps since MinesweeperUI already depends on GameAppKit for GameRootViewModel: - G1: `PracticeHubViewModel` gains `initialDifficulty` / `persistDifficulty`, wired at SudokuAppComposition/LiveRouteFactory. - G2: `MinesweeperPracticeHubView` gains `onDifficultyChanged`, wired at MinesweeperAppComposition/LiveRouteFactory. - G3: `MinesweeperBoardView`'s tap-mode `@State` seeds from and persists to the same store directly (MS-only, no composition-root threading needed). Closes #720. Co-Authored-By: Claude Fable 5 <[email protected]>
wei18
enabled auto-merge (squash)
July 10, 2026 06:44
wei18
added a commit
that referenced
this pull request
Jul 10, 2026
Records the composition rename (#739/#745), settings-persistence inventory + LastSelectionStore fill (#720/#746), the two-round Acknowledgements diagnostic (#721/#748), the #700/#738 ASCRegister apply closeout (11 achievements + 77 loc, 21 leaderboard-loc UPDATEs), and the #713 upkeep-triage disposition including the unreconciled 13-vs-15 finding-count discrepancy. 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.
Closes #720 — the 3 persistence gaps from the inventory (players expect these to stick; they reset every launch):
What (11 files, +399/−6)
GameAppKit/LastSelectionStore(key:fallback:defaults:)— injectable-UserDefaults string store mirroring the existingMinesweeperWinCountStoreshape; one implementation, parameterized per game (mirror principle — no per-app copies).com.wei18.sudoku.practice.lastDifficulty(VM constructor seed + persist closure, wired in LiveRouteFactory's .practice branch).com.wei18.minesweeper.practice.lastDifficulty(view had no write-back seam — addedonDifficultyChanged+ internal binding).com.wei18.minesweeper.board.tapMode, reseeded per board open, garbage raw values fall back to Reveal.Verification
Review
Dual review (sonnet + haiku): zero findings. Sonnet verified the seam's suite isolation, the three key spellings against the issue, the .practice-branch-only composition change, the minimal MinesweeperEngine dependency addition, and that the relaunch-simulation tests are not tautologies.
🤖 Generated with Claude Code