Skip to content

feat(minesweeper): date-seeded Daily puzzle model + wired Daily hub (#290) - #307

Merged
wei18 merged 1 commit into
mainfrom
feat/ms-daily-model-290
Jun 4, 2026
Merged

wei18 merged 1 commit into
mainfrom
feat/ms-daily-model-290

Conversation

@wei18

@wei18 wei18 commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Closes #290. Gives Minesweeper a deterministic per-UTC-day Daily board (trio: Beginner/Intermediate/Expert) and replaces the Daily hub placeholder with real content. Mirrors Sudoku's Daily.

  • MinesweeperDaily + UTCDay (MinesweeperEngine): date → seed → board via a faithful mirror of Sudoku's dailySeed (FNV-1a StableHash over generatorVersion + "daily" + UTC-day + difficulty). UTCDay byte-mirrored (not imported — avoids MS→Sudoku coupling; shared extraction tracked refactor(core): extract shared UTCDay into a TimeKit leaf both game cores depend on #305).
  • MinesweeperDailyHubViewModel + MinesweeperDailyProvider + wired MinesweeperDailyHubView: trio cards (difficulty dot, board summary, completion checkmark, play→.board(seed)), MS theme tokens, non-blocking completed-state degrade via fetchCompletedDailyIds + ErrorReporter (parity until MS save-flow writes completions).

CR: APPROVE-WITH-NITS (no Blocker/High). Verified: deterministic per UTC-day (same day → identical seed AND post-first-reveal mine layout; UTC-midnight rollover pinned exact; no Date.now/locale leakage); hub under MinesweeperTheme (zero hardcoded colors); completion degrade non-blocking; zero Sudoku changes; 75 (CoreKit) + 55 (Kit) tests pass. Nit: prototype's per-card mini-board strip → text board-summary (cosmetic, documented). Daily-hub snapshot coverage is a follow-up.

🤖 Generated with Claude Code

…loses #290)

Mirror Sudoku's Daily mechanism for Minesweeper: a deterministic, per-UTC-day
board (same date -> same board everywhere; rolls at UTC midnight) surfaced in
MinesweeperDailyHubView as real daily content, replacing the U12 placeholder.

Core (MinesweeperEngine):
- UTCDay: minimal mirror of SudokuEngine's UTC day-bucket formatter (avoids a
  wrong-direction MS->Sudoku core dependency; backlog: shared TimeKit leaf).
- MinesweeperDaily: date -> seed -> board. Seed recipe mirrors Sudoku's dailySeed
  (FNV-1a StableHash over generatorVersion+"daily"+utcDay+difficulty). Daily
  difficulty policy = TRIO (one board per difficulty). Stable puzzleId
  daily-<YYYY-MM-DD>-<difficulty>.

UI (MinesweeperUI):
- MinesweeperDailyProviding + LiveMinesweeperDailyProvider: thin daily-trio seam.
- MinesweeperDailyHubViewModel: bootstrap fetches trio + completed daily ids
  (graceful-degrade on completion-fetch failure), marks cards; mirrors
  SudokuUI.DailyHubViewModel. Card tap -> .board(difficulty:seed:) with daily seed.
- MinesweeperDailyHubView: real themed cards (MinesweeperTheme tokens, difficulty
  tint, completion checkmark) via GameShellUI.DailyHubShellView.

Composition:
- LiveRouteFactory + MinesweeperRoot preview wire the VM at .daily, threading the
  already-available persistence.

Tests: determinism (same UTC-day -> identical seed + board layout), UTC rollover
boundary, difficulty separation, puzzleId format, VM bootstrap/idempotency/merge.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@wei18
wei18 merged commit 21881b2 into main Jun 4, 2026
@wei18
wei18 deleted the feat/ms-daily-model-290 branch June 4, 2026 02:36
wei18 added a commit that referenced this pull request Jun 4, 2026
…ily now wired (#293)

The pending-feature table predated the #293 build-out. Game Center
leaderboards (#291/#328, live in ASC) and Daily mode (#290/#307) are wired;
only saved-game resume remains unwired (store copy already scrubbed, #236).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
wei18 added a commit that referenced this pull request Jun 26, 2026
…#628)

The 7 genuine, doc-only findings from the #592 triage (already-tracked,
won't-fix, and the determinism-critical StableHash item handled separately —
see #627):

1. flow prototypes (sudoku + minesweeper) — re-tagged SUPERSEDED: they draw the
   pre-SDD-003 push flow; the shipped v2.6 flow is the fullScreenCover modal +
   Leave-Game + popup completion in the shared GameRoot. Pointer added.
2. minesweeper-v1.md feature-gating note — corrected to match the doc's own
   per-feature table: GC leaderboards WIRED (#291/#328), Daily hub WIRED
   (#290/#307); only achievements + save-flow remain gated.
3. SDD-005 RFC Status: DRAFT -> SHIPPED 2026-06-19 (resolves the spec-vs-skill
   contradiction; body kept as historical snapshot).
4. resume-seam-design.md — migration-checklist paths updated to the post-rename
   SudokuAppComposition target.
5. lint.yml header — "3 jobs" -> "4 jobs" (+ the l10n job it omitted).
6. docs/README.md — SDD-003 label "GameAppKit" -> "Puzzle Platform UX Refresh"
   (matches the spec title).
7. README version note — disambiguates the v2.6 repo milestone from each app's
   CFBundleShortVersionString (Sudoku 2.6, Minesweeper 1.0 first submission).

Doc-only; no new links (lychee-safe). Triage comment posted on #592; screenshots
stay tracked under #236, StableHash under #627.

Co-authored-by: Claude Opus 4.8 <[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.

feat(minesweeper): Daily date-seeded puzzle model

1 participant