Add game mode switcher with per-game sessions and statistics - #53
Conversation
every playable mode (klondike draw counts, spider suit counts, single-mode variants) is now a first-class game with its own save slot and statistics bucket. switching games stashes the outgoing session and resumes the target's exactly where it left off, with no statistics penalty. the switcher is a felt-set title on the board opening a drill-in picker; per-mode options leave settings. one-shot migrations carry legacy saves and pooled klondike/spider statistics forward. also fixes cross-variant view re-evaluation crashes during switches and unifies the header layout.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2aa61a01c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
the seven-segment scope picker could not scale past a handful of games and hid cross-game comparison. statistics now opens as an overview — aggregate highlights plus one row per game with games played and win rate — drilling into each game's full breakdown, where the mode sub-picker (draw counts, suit counts) remains. opening mid-game deep links to the current game's detail.
settings write to storage immediately while payloads save on a debounced autosave, so the stored mode can lag the legacy single-slot save by one change. the record migration now reports the mode of the game it moved out of the legacy slot and first hydration opens that game, re-syncing the stored selection — matching the old builds' payload-first restore.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75e029e7a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b74fea6bd8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
the pooled klondike/spider bucket splits assign history to the mode in active use. the game migrated out of the legacy single slot is the mode the old build would itself reconcile to on relaunch (payload-first write-back), so its qualifier steers its family's split; stored settings still steer the other family's.
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What Changed
GameModeidentity: every playable configuration (Klondike 1/3-card, Spider 1/2/4 suits, FreeCell, TriPeaks, Pyramid, Yukon) is a distinct game with its own save slot and statistics bucket, ordered by game-type popularity everywhereKLONDIKE · 3-CARD, qualifier dimmed) that opens a centered drill-in picker: a gallery of six games with schematic board art, mode rows for multi-mode families, and a "Won" badge as the only status markerWhy
Game switching was buried at the bottom of Settings and destroyed the game in progress — the abandoned game was recorded as a loss and its board lost forever. With six games (and more planned), switching needed to be first-class, safe, and identity-preserving.
Validation
UI Changes
Felt-set game title with dimmed mode qualifier on the board; drill-in game picker overlay with per-game schematic board art; stat strip flattened to typographic tiles; header title moved to its own row on all platforms