Repository navigation
feat(ui): today / practice / progress tab-root screens per design.md §3.1–§3.3 - #1051
Conversation
… StreakHeaderView, calendar, bests (#1021 phase A) Shared zero-dependency GameShellUI components for the v3 Today / Practice / Progress tab roots (design.md §3.1–§3.3, §4.2): Canvas-rendered BoardPreview thumbnail + grid-preserving skeleton (always accessibilityHidden), deterministic BoardPreview.densitySample for Practice, DifficultyPips (count-encoded), HubCard standard-material container (no glass), DailyCardView/StreakHeaderView/ TodayAllDoneBlock/PracticeDifficultyCardView/PersonalBestRow/StreakCalendarView with combined a11y labels, pure StreakHistory + DayKey (current/longest/month cells from the existing YYYY-MM-DD completion keys), TodayPresentation enum. Unit + a11y-description tests (101 total, was 75). Visual snapshots land in the per-app suites in later phases — GameShellKit deliberately has no snapshot dep. part of #1021 Co-Authored-By: Claude <[email protected]>
… progress (#1021) Checkpoint after a usage-limit cut; not a phase boundary. Squashed at PR merge. part of #1021 Co-Authored-By: Claude <[email protected]>
…pshots (#1021) Checkpoint before Leader review rulings; squashed at PR merge. part of #1021 Co-Authored-By: Claude <[email protected]>
…s retired (#1021 phase C) Both Practice hubs drop the segmented picker + glass capsules for three shared PracticeDifficultyCardView rows (design.md §3.2 / prototype .bcard): leading BoardPreview density sample (fixed-seed representative sample, never the real next puzzle — D-2.1), title, detail, DifficultyPips, trailing checkmark when selected; HubCard standard material around the CTA. Sudoku keeps its 5-state draw machine untouched (PracticeHubViewModel has zero diff); MS stays single-state. Mappers: SudokuPracticeCardsMapper (givens 40/33/26 from the PuzzleCalibrator clue bands) and MinesweeperPracticeCardsMapper (Difficulty presets). Practice baselines re-recorded for the redesign + new default / selectedHard / accessibility3 + component snapshots in both apps. part of #1021 Co-Authored-By: Claude <[email protected]>
Checkpoint at a usage-limit cut; squashed at PR merge. part of #1021 Co-Authored-By: Claude <[email protected]>
…5 state variants, glass retired (#1021 phase B) Both Daily hubs are rebuilt on the shared TabRoots scaffold per design.md §3.1: plain-text StreakHeaderView (count + 7 tappable pips + Best, skeleton while loading/degraded) replaces the glass week-strip card; DailyCardContent rows (BoardPreview thumbnail leading, accessibilityHidden; title + pips + text status as the combined a11y label) replace DailyPuzzleCard / MinesweeperDailyCardView; TodayAllDoneBlock above the still-tappable solved cards; Sudoku exhausted block kept (same a11y ids) inside a HubCard. Pure per-app mappers (TodayMapper / MinesweeperTodayMapper) turn VM state into TodayPresentation: Sudoku maps all 5 variants; MS maps 4 and its exhaustive switch over the 3-case enum makes .exhausted structurally unreachable (test pins it, D21). DailyHubShellView gains an additive loading slot so loading renders grid-lined skeleton cards, not a spinner. Phase-2 completion-read failure -> degraded (thumbnails still drawn, status Not started, header skeleton). In-progress card = the one existing latestInProgress() read (MS: additive exposure on MinesweeperDailyOverlayReading; store already implemented it). Longest streak + month history come from the by-day completion dictionary already fetched for the week window (no new CloudKit reads). Deviations recorded for the PR: MS solved/failed thumbnails are uniform .filled (mine layout is first-reveal-salted, no pure-seed layout); rich per-card in-progress detail tracked in #1050. Tests: mapper unit tests both apps, snapshots for loading/loaded/allDone/ degraded/exhausted (+AX3) and shared-component snapshots, a11y label assertions; the 13 composed-screen baselines that the redesign necessarily changes were investigated and re-recorded once. Dead strip views deleted; DayTap tests migrated to the mapper. part of #1021 Co-Authored-By: Claude <[email protected]>
…calendar, native GC entry rows (#1021 phase D) One ProgressScreen in GameAppKit (design.md §3.3) replaces the per-app Stats tab roots: PersonalBestRow per difficulty (best time is the .title2 hero, count + average demoted to a footnote), StreakCalendarView month view (D-2.2 A) fed by StreakHistory over the existing fetchCompletedDailyIdsByDay() read, and two GameCenterEntryRows — Achievements / Leaderboards, HIG terminology only — routed through presentGameCenterOrAlert (C-36 contract kept); GameCenterDashboard gains presentAchievements(). No in-app achievement gallery. Pure ProgressModel lives in GameShellUI; per-app ProgressViewModel + ProgressHostView map persistence records into it; both Live+TabRoots point .progress at the shared screen. AchievementsRow generalized into GameCenterEntryRow (tests migrated 1:1, both rows covered). Tests: VM mapping + failure -> history unavailable, ProgressScreen snapshots (loaded / loading / unavailable / AX3) + component snapshots in both app suites, GC row activation tests. Old StatsView kept for now because the ASC store-screenshot script still names its baselines — retired in phase E. part of #1021 Co-Authored-By: Claude <[email protected]>
… + re-anchor hub screen contracts (#1021 phase E1) Adds the 22 (Sudoku) / 23 (Minesweeper) new user-visible keys from phases A–D to both app catalogs — en + zh-Hant authored, ja/zh-Hans/es/th/ko fanned out from en, text-spliced (no catalog round-trip) — incl. the VoiceOver-only combined labels. Closes a pre-existing MS gap ("Ready to play" was used but never catalogued). SudokuAppCompositionTests L10n fixture regenerated via gen:l10n_fixture; scan:l10n gate passes. docs/screen-contracts.md: SUD/MS-DAILY-HUB and SUD/MS-PRACTICE-HUB rewritten to the as-built 3.0 shape (tab-root entry, TabRoots components, mappers, state variants, interaction table, glass retired), every claim anchored to file:line. part of #1021 Co-Authored-By: Claude <[email protected]>
…el; hub title Daily → Today (#1021 phase F) iPad simulator pass findings: with the completion read degraded (iCloud signed out) the streak header redacted the count but still drew seven fully-lit pips — pipOff and accent are near-identical sage shades at 10pt — so the skeleton now forces pipOff at 40% opacity, drops the today ring, and reads "Streak unavailable" to VoiceOver (StreakHeaderModel.skeleton factory shared by both mappers). Both Today hubs are titled "Today" (existing AppTab key), not "Daily". 8 affected baselines re-recorded once (incl. exhausted, whose header is legitimately skeleton). part of #1021 Co-Authored-By: Claude <[email protected]>
phase F follow-up) The skeleton streak header a11y label introduced in phase F; fixture regenerated via gen:l10n_fixture, scan:l10n gate passes. part of #1021 Co-Authored-By: Claude <[email protected]>
… repoint ASC store slots, PROGRESS contract (#1021 phase E2) Personal bests per difficulty now merge both modes (best = min, count and average summed) — the old Stats tiles read both and a "personal best" must not drop daily records; a failing (mode, difficulty) pair degrades only itself. StatsView/StatsViewModel and the MS mirrors, their tests and baselines are deleted; the 01-home / 06-stats ASC screenshot slots in mise-tasks/store/screenshots and scripts/build-ascspec-screenshots.py now point at new ProgressScreen store-variant baselines (iPhone / iPad / Mac, plus a Mac loaded fixture for the MS 06-stats slot). docs/screen-contracts.md ## STATS replaced by ## PROGRESS, anchored to the as-built code. part of #1021 Co-Authored-By: Claude <[email protected]>
…ctice content scrolls below the large title (#1021 phase G) iPad AX3 findings: the Today grid kept three columns at accessibility text sizes so row cards hyphenated word-per-line; the Practice shell laid its content in a fixed VStack that collided with a two-line large title. DailyHubGridLayout.columnCount(sizeClass:dynamicTypeSize:) is now the one shared column rule (1 column whenever isAccessibilitySize) used by the shell and both hubs skeleton grids; PracticeHubShellView content flows in a ScrollView. 8 unit cases + iPad-regular AX3 snapshots in both apps. part of #1021 Co-Authored-By: Claude <[email protected]>
iPad Pro 11 (M5) simulator evidence — head 1453e22DEBUG builds of both apps, iCloud signed out (so the completion read is degraded by design), driven with idb; screenshots kept locally in the session scratchpad ( Sudoku, default text size: Today = "Today" title, skeleton streak count + muted pips, 3 row cards with combined labels Minesweeper, default text size: Today = same shape, thumbnails at 9×9 / 16×16 / 16×30 true proportions, labels Dynamic Type AX3 (accessibility-extra-extra-extra-large), Sudoku, after phases F/G: Today renders ONE full-width column ( Known pre-existing local red: |
…s + regenerate ASC-spec frames (#1021) Phase B renamed the Minesweeper Daily-hub baselines; the 02-daily rows in mise-tasks/store/screenshots and the generator Slot table still named the old streak2/compact/regular files. Repointed (iPhone loaded, iPad allDone, Mac loaded) and ran scripts/build-ascspec-screenshots.py: 168 slots, 77 frames changed under docs/app-store/screenshots-ascspec (01-home / 06-stats now show ProgressScreen, 02-daily the redesigned Today), all spec-verified (exact ASC pixel size, RGB). Eyeballed en/zh-Hant/ja samples — no tofu. part of #1021 Co-Authored-By: Claude <[email protected]>
… doc comments (#1021 CR round 1) StreakHeaderView tappable pips were 10pt hit targets; apply the retired DailyStripView contentShape inset (HIG 44pt minimum, visual unchanged). Five doc comments still cited the deleted StatsViewModel.fetchTiles seam — now name ProgressViewModel.fetchBests / MinesweeperProgressViewModel.fetchBests. part of #1021 Co-Authored-By: Claude <[email protected]>
…s with realistic fixtures + regenerate 02-daily frames (#1021 phase H) DailyHubViewTests.snapshotAllCompletedIPhoneLight and snapshotUnfinishedIPadLight — the baselines that feed the ASC 02-daily marketing frames — had lost their @test functions in the phase B rewrite, so the pipeline kept rendering stale pre-rewrite pixels ("0 day streak", "Not started · 80 givens"). Both tests are back (fixture helpers in DailyHubStoreFrameSnapshotTests.swift to respect file_length), fed by a valid masked solved-grid puzzle at ~42/32/26 givens, a 6-day streak (Best 6), realistic best times and one in-progress Medium card; only these two baselines re-recorded; 14 Sudoku 02-daily frames regenerated (build-ascspec 168/168, spec-verified, zh-Hant eyeballed — no tofu). Every store-fed baseline now has a live test function. part of #1021 Co-Authored-By: Claude <[email protected]>
… labels, degraded cards on phase-1 failure, shared bests math (#1021 CR round 2) M1 Progress data no longer goes stale for the whole session: both ProgressViewModels gained refresh() outside the bootstrap latch and both host views observe sessionTeardownCount (the DailyHubView pattern); telemetry still fires exactly once. M2 Loading no longer lies to VoiceOver: PersonalBestRow and StreakCalendarView swap combined labels to "loading" / "unavailable" instead of reading redacted zeros as facts (2 new keys x7 locales). M7 TodayMapper .failed -> .degraded was dead code: a phase-1 failure now renders the three cards with skeleton thumbnails and "Not started" per design.md 3.1, and the shell failure builder is retired in both apps; the N5 E2E test and navigation-flows N5 row follow the new behavior. M3 allDone docs match the code (block renders above the still-tappable cards). M4 the injected-Dynamic-Type snapshots are renamed and re- commented as spacing-only checks (fonts do not scale in NSHostingView); real AX evidence is the simulator pass. M6 bests merge/format extracted to GameShellUI PersonalBestMath, consumed by both apps. Minors: MS mapper takes an injected today:, practice mapper uses bundle: .main without a force unwrap, card ids applied via if-let, DifficultyPips comment matches the real hues, contract anchors re- verified. Store fixture bumped to a 7-day streak so the frames match the "Seven days running" headline; 14 Sudoku 02-daily frames regenerated. part of #1021 Co-Authored-By: Claude <[email protected]>
…seline orphan gate (#1021 CR round 3) snapshotUnfinishedIPhoneLight lost its @test in the Today rewrite but mise-tasks/store/screenshots still mapped the preview 02-daily slot at its frozen PNG — a "0 day streak" hero with seven LIT pips, the exact contradiction phase F fixed in code, preserved inside a committed asset. The slot now points at the live allDone baseline the ASC pipeline already uses and the orphan png/txt are deleted. New scan:store_baseline_orphans gate closes the class: for every baseline mapped by either pipeline it asserts the file exists AND a live test function still records it (the drift gate only fires when a mapped baseline CHANGES, so it is blind to orphans and to slots naming deleted files). Wired into lint.yml beside the drift gate; python3 stdlib only, so it runs on ubuntu. Verified both ways: 47/47 PASS, and a slot pointed at a nonexistent file fails it. part of #1021 Co-Authored-By: Claude <[email protected]>
|
T6 REJECT — independent fresh-context acceptance of #1021's own criteria + high-risk claims on PR head ebcf259 (base 3a253db). One item fails; everything else verified clean. Sanity check ✅ — Issue #1021 mechanical acceptance criteria
Test suites (throwaway detached worktree
|
| Package | Command | Result | PR claim |
|---|---|---|---|
| GameShellKit | swift test --package-path .../GameShellKit |
115/115 passed | 115 ✅ |
| GameAppKit | swift test --package-path .../GameAppKit |
85/85 passed | 85 ✅ |
| GameCenterKit | swift test --package-path .../GameCenterKit --no-parallel |
29/29 passed | 29 ✅ |
| MinesweeperKit | swift test --package-path .../MinesweeperKit (full) |
408/408 passed | 408 ✅ |
| SudokuKit | swift test --package-path .../SudokuKit --filter 'Daily|Today|Streak|Banner|TabRoots|Practice|Progress' |
197/197 passed | 197 ✅ |
Zero new failures. swiftlint lint --strict --quiet (0.57.1) on every changed .swift file → zero violations.
Store-pipeline integrity — ❌ FAIL (this is the reject reason)
scripts/build-ascspec-screenshots.py SLOTS (the real ASC-submission pipeline, "168 ASC frames" claim) — 24/24 entries clean: every baseline PNG exists at head and is produced by a live @Test function in its named suite/app test target. python3 -c "import ast; ast.parse(...)" → OK. This is genuinely fixed and matches the PR's "all 168 ASC frames regenerated and spec-verified" claim.
mise-tasks/store/screenshots MAP (the PREVIEW-ONLY symlink pipeline) — 1 of 23 rows is an orphaned baseline, the exact bug class the PR's own round-2 notes claim to have swept and fixed ("the two Sudoku baselines feeding the ASC 02-daily marketing frames had lost their @Test functions... restored"):
sudoku|iphone-6.9|en|02-daily|Packages/SudokuKit/Tests/SudokuUITests/__Snapshots__/DailyHubViewTests/snapshotUnfinishedIPhoneLight.DailyHub-iPhone-light-unfinished.png
grep -n "func snapshotUnfinishedIPhoneLight" Packages/SudokuKit/Tests/SudokuUITests/DailyHubViewTests.swift → no match. The function was deleted in git diff main...ebcf2591 (confirmed: - @Test(.enabled(if: !SnapshotEnv.isXcodeCloud)) func snapshotUnfinishedIPhoneLight() async { in the DailyHubViewTests.swift hunk), but the baseline .png/.txt files were left behind — and were even re-recorded with new bytes (63604→89332) by an earlier WIP commit in this same PR (ccd56817/5bda07c4) before the function was later removed. bash -n mise-tasks/store/screenshots → OK (syntax is fine, this is a data/content problem, not a script bug). swift test never touches this file (MAP entries aren't asserted by any test), so the suite runs above don't surface it.
Impact is scoped — this feeds mise run store:screenshots sync, explicitly documented in the file's own header as "PREVIEW-ONLY... NOT submission-ready," not the actual ASC upload path — but it's a real, mechanically-confirmed instance of the precise bug class this PR's deviation notes claim to have closed out, on a slot this PR itself edited twice. mise run store:screenshots sync today would silently link a stale pre-rewrite pixel render into the preview tree with no error.
Regression guard ✅
git diff main...ebcf2591 --stat → zero hits on BoardModalOverlayHoist.swift/RootShellView.swift/completion-overlay files. Only 2 new .disabled( additions in the whole diff, both .disabled(isDrawing) on the Practice CTA (expected draw-machine gating, not a shell/preference-observer disable). Today/Practice both route via rootViewModel.pathBinding(for: .today/.practice) in Live+TabRoots.swift (both apps); Progress correctly has no path binding — it never pushes a route, it only opens the native GC dashboard via GameCenterEntryRow.
Eyeball (full-res, extracted via git show ebcf2591:<path>)
docs/app-store/screenshots-ascspec/sudoku/iphone-6.9/en/02-daily.png: "7 day streak" + 7 filled pips + "Best 7" matches the "Seven days running, and counting." headline. No tofu, no clipping. All 3 cards happen to be Solved in this particular baseline (allCompleted), so it alone doesn't test solved-vs-not-started contrast.- Pulled
DailyHub-iPad-light-unfinished.png(mixed states) instead to check that specifically: Easy/Solved renders as a dense filled dark-green grid, Medium/In-progress a partial checkerboard, Hard/Not-started a near-white sparse grid — clearly visually distinguishable. Confirms the earlier round's "identical at 80 givens" finding is fixed. ProgressScreen-iPhone-light-store.png: populated realistic content, per-difficulty bests + solved/avg footnotes, August calendar with a real streak, Achievements/Leaderboards rows. No tofu, no clipping.
PR body / issue refs ✅
closes #1021 + part of #1014 + 🤖 footer present. Every #NNN in the body resolves: #1014 (open, epic), #1020 (closed), #1021 (open, this issue), #1038 (merged), #1047 (merged), #1048 (merged), #1050 (open, deviation tracker). Both PM-accepted deviations present and honestly described: the shared "%@, %@" a11y joiner key, and DailyHubViewTests.swift's swiftlint:disable file_length at line 13 with a documented rationale (445 lines, snapshot-testing's #filePath-keyed baseline directory forces every @Test to stay physically in this one file).
Recommendation: fix the one orphaned MAP row (either restore an iPhone-scoped snapshotUnfinishedIPhoneLight-equivalent @Test, or repoint the MAP row to a baseline that does have a live producer — e.g. mirroring the SLOTS iPhone 02-daily choice) before merge, then re-run mise run store:screenshots list to confirm all rows read [ok]. Everything else in this PR — all 5 test suites, all mechanical rg gates, the real ASC-submission SLOTS pipeline, the regression guard, and the visual/accessibility evidence — checks out clean.
…solution site (#1021) Both packages ship a suite literally named ProgressScreenTests, so deriving the owning package from the suite string reports a false MISSING for every Minesweeper slot using it — hit while writing the gate. The comment now says so at the parse site. part of #1021 Co-Authored-By: Claude <[email protected]>
…CR round 3) Round 2 made a phase-1 failure render the degraded cards, but silently — three inert "Not started" cards and no error signal, reversing #768, which deliberately replaced an alert with a visible inline failure. The degraded case now carries its cause in the type (DegradedReason .loadFailed vs .completionStatusUnknown) and only .loadFailed renders a shared TodayLoadFailureCaption above the grid: warning symbol plus "Couldn't load today's puzzles", static text, no retry control, no glass. Phase-2 degradation stays silent exactly as before. MS maps only .completionStatusUnknown — its phase-1 is synchronous and non-throwing, so .loadFailed is structurally unreachable there (pinned by a test) and the string stays Sudoku-only, matching the existing exhausted-state precedent. part of #1021 Co-Authored-By: Claude <[email protected]>
…e Today tab (#1021 CR round 3b) The failure caption was visible but terminal: refresh() only ever runs phase 2 and is guarded on .loaded, so nothing re-ran phase 1 and the tab stayed dead for the whole app session — visible without recoverable, which is half of what #768 asked for. DailyHubViewModel.retryIfFailed() re-runs phase 1 only from .failed, is a no-op elsewhere and guards against concurrent retries; bootstrap() and the retry share one runPhase1AndPhase2 path. The trigger is the signal a real player actually produces: after a phase-1 failure they cannot start a daily game, so sessionTeardownCount may never bump — the Today tab therefore observes GameRootViewModel.selectedTab through a new gameSelectedTab environment key (the shell already owned that state as the TabView selection; this only exposes it, mirroring gameSessionTeardownCount) and retries on return to Today. The teardown call site is kept. .onAppear is deliberately not used: the 3-tab shell memoizes each tab root, so it does not re-fire on tab switch (the #761 trap). MS needs no mirror — its phase 1 is synchronous and non-throwing, so it has no .failed to recover from (comment only, zero behavior change). Tests: retry recovers / stays failed on a second failure / is a no-op in loaded, loading and exhausted / concurrent retries do not double-fetch, plus a host-level test that drives a real render pass through an unchanged NSHostingView to prove the tab-return signal fires. New DEBUG-only dailyFailOnce fault mode (first fetch throws, later ones delegate) so the recovery is observable in the simulator; dailyFail semantics and the N5 E2E test are untouched. part of #1021 Co-Authored-By: Claude <[email protected]>
Round 3b evidence — phase-1 failure is now recoverable (head e4f992c)iPad Pro 11 (M5), DEBUG build, launched through XCUITest with the new DEBUG-only fault mode: 1. After the phase-1 failure — Today shows the caption and three inert cards; the accessibility tree reads: 2. Switch to Practice, switch back to Today — no relaunch, no retry button tapped: The caption is gone, the three real puzzles are loaded and tappable. Screenshots are in the session scratchpad ( The trigger is |
|
T6 ACCEPT — supersedes my earlier T6 REJECT at ebcf259. Delta verification ( 1. Orphan MAP row — dead ✅
2. New CI gate
|
| Package | Result | Claim |
|---|---|---|
| GameShellKit | 116/116 passed | 116 ✅ |
| GameAppKit | 85/85 passed | 85 ✅ |
MinesweeperKit (full, after rm -rf .build in the throwaway worktree per the stale-cache warning) |
409/409 passed | 409 ✅ |
| SudokuKit (filtered, same filter as round 1) | 205/205 passed | dispatch said 151 — mismatch, see below |
The 151 figure doesn't appear anywhere in the current PR body or any PR comment I could find (gh pr view 1051 --json body,comments) — the PR body's own "Verification" section still shows the stale round-1 numbers (115/85/29/408/197) and was never updated for rounds 2–3. 205 reconciles exactly: round-1's 197 + the 8 new tests added this delta (6 in DailyHubViewModelRetryIfFailedTests + 2 in DailyHubViewTabReturnRetryTests) = 205. Treating 205/205-all-green as correct; flagging 151 as unverifiable rather than blocking on it, since "any NEW failure" is the actual gate and there were none. swiftlint lint --strict --quiet on every changed file in the delta: zero violations.
7. PR comment with recovery evidence ✅
"## Round 3b evidence — phase-1 failure is now recoverable (head e4f992c)" comment exists, driven via XCUITest with the new -uitest-puzzle-fault dailyFailOnce DEBUG hook on iPad Pro 11 (M5). Shows AX-tree state before (caption "Couldn't load today's puzzles" + 3 inert , Not started buttons with no puzzle behind them) and after switching Practice→Today with no relaunch and no retry button tap (caption gone, 3 real tappable puzzle cards with givens counts). Screenshots referenced (retry-1-failed.png, retry-2-recovered.png) as session-scratchpad-local, not committed — consistent with this repo's "don't commit screenshots for issues" convention.
Verdict: ACCEPT. All 6 delta items check out; the store-pipeline reject reason from ebcf259 is fully resolved and backed by a real CI gate (positive + negative-tested here) that prevents recurrence. The recovery mechanism, typed degraded-reason distinction, DEBUG-only fault-mode additivity, and all 4 re-run suites are verified clean with zero new failures.
…ed by #1054 `scan:store_frame_drift` flags four changed baselines feeding the `03-board` slot for both apps across iphone-6.9 / ipad-13 / mac. Regenerating is the gate's prescribed fix, and it is the right one here even though the output is wrong: The regenerated frames show the board with NAKED, SURFACE-LESS CONTROLS — bare undo/redo/pencil/erase glyphs and bare digit keys with no backgrounds — because this repo's snapshot renderer draws Liquid Glass as nothing (measured both ways; see #1054). On device the same build renders the two glass groups correctly. Committing them anyway, deliberately. A stale frame depicting a design the app no longer has is the #1051 orphaned-baseline failure mode: it looks fine, so nobody investigates. A current frame we have measured, know is wrong, and have filed as a submission blocker is strictly safer — the artifact matches the app, and the "submit before it is fixed" risk is held by #1054 (labeled `pending`, referenced from the epic) rather than by anyone's memory. NOT using the gate's `frame-drift-verified` escape hatch. That hatch attests the baseline change does not alter any ASC frame; this one demonstrably does, so the trailer would be a false statement that happened to turn the gate green. 168 slots regenerated, 28 files changed, all matching their device ASC pixel size and RGB with no alpha. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…luster (#1056) * wip(board): full-bleed Sudoku board + G4 two-group glass cluster scaffold Checkpoint of #1022 phase 1 (Sudoku). Not yet verified — snapshot baselines are deliberately NOT re-recorded; see the open question below. - GameShellUI: new `BoardControlCluster`, the shared G4 shape both games mirror. Two glass groups (edit / input), each its own `GlassEffectContainer` so the two can never blend into one background; system default spacing throughout per design.md §4.6. A single-group initializer exists for Minesweeper, which has no edit-group controls (it has no undo at all — see #1052). - BoardView: the blanket `.padding(theme.spacing.medium)` screen margin is off the body. `compactLayout` now pads only its chrome, leaving the board edge-to-edge (design.md §3.4); `macLayout` re-applies the same 16pt it used to inherit, since the Mac board sits in a capped detail column and full-bleed does not apply there. - BoardView: G4 unmounts whenever `modalOverlayPresentation != nil` — the one value that already drives every board modal, so completion, pause and leave-confirmation are all covered with no new observer, no preference key and no `.disabled()` on the shell (§4.3 scene exclusivity). - DigitPadView: rebuilt as the two groups, per-button glass, never on the container (§12 error #8). §4.7 coloring pass — the whole-grid pencil-mode wash is gone and Erase/Undo/Redo lost their accent ink, leaving exactly one colored control per group. The #855 F-5 disabled gray-out and the #797 on-accent-ink placement both survive. Measured full-bleed cell side at 393pt = 43.7pt (786px / 9 / 2), at or above design.md §3.4's 43.2pt — the table deducts a 4pt outer frame this board does not have. Open: `.buttonStyle(.glass)` renders fully transparent in the headless macOS snapshot renderer (the previous `.bordered` keys rendered visible backgrounds). Investigating whether explicit `.glassEffect()` — the other spelling §4.6 allows and #1029's B-7 verified — renders, before touching any baseline. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * refactor(board): split BoardView / DigitPadView layouts into sibling files #1022's G4 rework pushed both files past SwiftLint's 400-line file_length ceiling. Repo convention is to extract a `+Feature.swift` sibling rather than disable the rule, so: - `BoardView+Layout.swift` takes both size-class arrangements; BoardView.swift keeps the view's state, `body` and lifecycle. - `DigitPadView+Mac.swift` takes the Mac rail arrangement. `adProvider` / `adGate` / `theme` / `compactLayout` / `macLayout` drop to `internal` for the cross-file reads, matching the same convention the existing BoardView+AccessibilityHeader.swift split already established. Also corrects BoardView's file header: the "NO .glassEffect on the board" rule still holds for the GRID (design.md §3.4 keeps the content layer glass-free) but no longer describes the control cluster around it. `swift build` clean; `swiftlint --strict` clean on GameShellUI/BoardControlCluster.swift and all of SudokuUI/Board/. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * test(board): assert design.md §7 — G4 never covers an interactive cell §7's rule is a layout rule ("幾何不隨開關改變,必須以最壞情況(IC+RT)為設計基準"), so a screenshot at one width cannot establish it. `BoardControlClusterLayout` states the compact board screen's top-down band assignment — margin, header, full-bleed board square, flexible gap, cluster groups — as pure geometry, and the suite sweeps §3.4's three breakpoint widths against cluster heights from a lone edit row up past anything the `.xLarge` Dynamic Type cap can render, asserting at every point that no glass group's rect intersects any cell rect. Also pinned: the two groups are disjoint bands rather than one merged surface; a single-group cluster (Minesweeper, #1052) reports one group and not an empty second one; Minesweeper's non-square 16×16 / 16×30 boards obey the same rule; and a taller cluster shrinks the BOARD rather than encroaching on it, with the board clamped at zero so a flipped rect can never sneak past `intersects`. Nothing here samples the eight Reduce Motion × Increase Contrast × Reduce Transparency combinations: `bands(...)` takes no accessibility input because those switches change how glass is painted, and painting is not layout — so sampling them would be sampling one call eight times. Dynamic Type is the input that can genuinely grow the cluster, and that is what the sweeps vary. Deliberately takes the group heights as INPUTS rather than freezing a metrics table: fixing them here and rendering with `.frame(height:)` would make the numbers true by force and hide a real overflow behind a clip. GameShellKit 122/122 green; swiftlint --strict clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * feat(board): extract MinesweeperControlClusterView + full-bleed MS board Phase 2 of #1022 — Minesweeper's half, mirroring Sudoku's SHAPE rather than copying DigitPadView (the two games' controls genuinely differ). - `MinesweeperControlClusterView` is new and builds the same shared `GameShellUI.BoardControlCluster`, takes plain values plus closures like DigitPadView does, and keeps the mode toggle's full a11y contract (label / value / hint / identifier) and its #786 on-accent ink, which must sit on the label content because a prominent style resolves its own label ink (#797). - It ships ONE group. design.md §3.4 and #1022 both describe MS's cluster as "揭開/旗標模式切換 + undo", but Minesweeper has no undo at any layer — no `canUndo`, no `undo()`, and the scope comments in `MinesweeperSession` and `MinesweeperGameViewModel` say so outright; the engine's `moves` array is a forward-only replay log that state restore discards. The edit group is omitted rather than rendered empty or filled with a disabled placeholder, which would be a dead control. Undo is engine work, tracked as #1052. - The MS board goes full-bleed the same way Sudoku's did: the blanket `.padding(theme.spacing.medium)` leaves `body`, chrome pads itself, and `macLayout` re-applies the margin it used to inherit. - The cluster unmounts whenever `modalOverlayPresentation != nil`, off the same single value that already drives every board modal. - Tap-mode persistence moves into `toggleInteractionMode()` unchanged, still writing through the injected store (#796) rather than `.standard`. Sudoku's board now centres in its vertical band instead of sitting under the header. Removing the padding had left the two apps disagreeing on the same screen — MS's grid already centres in its fitted branch (#764) — and §3.4's ASCII shows breathing room above and below the board. `BoardControlClusterLayout` models the band accordingly; centring can only move the square away from the header, never past the band's bottom edge, so §7's rule is unaffected. Board baselines re-recorded, and they legitimately show the cluster's controls as bare glyphs with no key surfaces. That is NOT "the controls disappeared": Liquid Glass renders as nothing in this repo's NSHostingView capture path, while standard materials and `.bordered` render fine — measured both ways, see the PR body. The App Store `03-board` slots read from these same baselines, so that consequence is tracked separately as #1054; it is not fixed here. MinesweeperKit 409/409 green. SudokuKit Board|DigitPad batch back to its pre-existing 104 tests / 2 issues (the load-sensitive `BoardLeaveOrPauseStateTests` clock flake, which passes in isolation). GameShellKit 122/122 + 6 new §7 geometry tests. swiftlint --strict clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * test(board): pin full-bleed at design.md §3.4's three cell-size breakpoints The existing board matrix only ever renders 393pt, the middle row of §3.4's cell table. These add 320 (iPhone SE) and 430 (Pro Max) so a horizontal inset creeping back in is caught at the widths the table is actually about. Measured from the recorded baselines (board width in pt / resulting cell side, against §3.4's figure): 320 → 235.0 pt wide, 26.1 pt cells (table 35.1) — NOT full-bleed, see below 393 → 393.0 pt wide, 43.7 pt cells (table 43.2) — full-bleed 430 → 430.0 pt wide, 47.8 pt cells (table 47.3) — full-bleed At 393 and 430 the board is width-bound, so it spans the screen exactly and the cell side lands above the table (the table deducts a 4pt outer frame this board does not have — 附錄 B's "扣除外框"). At 320 it is HEIGHT-bound: the header plus the control cluster plus the margins leave only ~235pt of vertical room, so the square is capped by height and removing the horizontal inset buys nothing. That is a property of the cluster's height on a 568pt screen, not of this change — the same chrome dominated before #1022 — but it does mean §3.4's SE row is not reachable with G4 at its current size, and 26.1pt sits under the 28pt absolute floor §3.4 itself cites. Raised with the PM rather than silently recorded. The baselines show the cluster's controls as bare glyphs. That is the NSHostingView capture path's Liquid Glass blind spot (#1054), not missing controls; `testName` is forwarded through the helper so each baseline files under its own `@Test` rather than all three under the helper's name. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * docs(design): correct §3.4's cell table and MS controls, defer §4.1's G3 row Four corrections #1022's implementation forced, each anchored to what the code actually does rather than what the spec assumed. §3.4 格徑表 — the "3.0 滿版" column is `(W − 4) / 9`: 附錄 B's "扣除外框" deducts a 4pt outer frame the board does not have (only 0.5pt per-cell hairlines). The real full-bleed side is `W / 9`, slightly LARGER than the table. Measured from the recorded baselines: 393 → 43.7pt and 430 → 47.8pt, both true full-bleed. §3.4 SE row — 320pt measures 26.1pt, not 35.1pt, because the board there is bound by HEIGHT, not width: header + G4 + margins leave ~235pt, so removing the horizontal inset buys nothing. The table's width-bound assumption never held on that device — the pre-3.0 "現況 32.0pt" figure was unreachable for the same reason — so this is a long-standing table error, not a #1022 regression. 26.1pt is under the 28pt absolute floor the section itself cites; the fix is a shorter cluster variant for short screens, tracked as #1055. §3.4 MS controls — the ASCII said "MS:揭開/旗標模式切換 + undo", but Minesweeper has no undo at any layer: no `canUndo`, no `undo()`, and both `MinesweeperSession` and `MinesweeperGameViewModel` say "no undo" in their scope comments. The engine's `moves` is a forward-only replay log that state restore discards. So MS ships ONE group and the edit group is not drawn at all — no disabled placeholder, because a dead control is worse than an absent one. Tracked as #1052. §4.1 — G3's row still says 刪除, but nothing has deleted it: #1022 left the header alone because the iPhone board is a `fullScreenCover` with no NavigationStack, so `.toolbar` draws nothing, and adding one would change BoardView's frame such that the in-place pause overlay stops covering the toolbar — the exact #763 guarantee #1019/#1038 paid to restore. Marked ⏳ with #1053 rather than left reading as done. §4.1 also gains the snapshot caveat: this repo's `NSHostingView` + `cacheDisplay` path renders standard materials and `.bordered` but draws Liquid Glass as nothing, so G4/G6 glass can only be verified on a simulator — and the App Store `03-board` slots read those same baselines (#1054, pre-submission blocker). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * chore(store): regenerate ASC 03-board frames — knowingly wrong, tracked by #1054 `scan:store_frame_drift` flags four changed baselines feeding the `03-board` slot for both apps across iphone-6.9 / ipad-13 / mac. Regenerating is the gate's prescribed fix, and it is the right one here even though the output is wrong: The regenerated frames show the board with NAKED, SURFACE-LESS CONTROLS — bare undo/redo/pencil/erase glyphs and bare digit keys with no backgrounds — because this repo's snapshot renderer draws Liquid Glass as nothing (measured both ways; see #1054). On device the same build renders the two glass groups correctly. Committing them anyway, deliberately. A stale frame depicting a design the app no longer has is the #1051 orphaned-baseline failure mode: it looks fine, so nobody investigates. A current frame we have measured, know is wrong, and have filed as a submission blocker is strictly safer — the artifact matches the app, and the "submit before it is fixed" risk is held by #1054 (labeled `pending`, referenced from the epic) rather than by anyone's memory. NOT using the gate's `frame-drift-verified` escape hatch. That hatch attests the baseline change does not alter any ASC frame; this one demonstrably does, so the trailer would be a false statement that happened to turn the gate green. 168 slots regenerated, 28 files changed, all matching their device ASC pixel size and RGB with no alpha. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(board): CR round 1 — blank-baseline guard, stale MS baselines, honest §7 anchor Two blockers and the must-fix list from the #1056 review. BLOCKER 2 — a baseline was committed with ZERO opaque pixels (`BoardViewDigitFirstTests/snapshotArmedDigit_iPhone_light`) and every gate stayed green: a blank capture matches a blank reference, the drift gate only fires on change, the orphan gate only proves a recording test exists. Root cause isolated with a throwaway probe, and it is narrower AND broader than the review's hypothesis: it is not `GlassEffectContainer` and not `.glassProminent` — it is **TINT**. Opaque-pixel counts through this exact capture path on a 300×200 ground: no glass at all 26800 .buttonStyle(.glass), untinted 26800 .buttonStyle(.glassProminent) 0 .buttonStyle(.glass) + .tint 0 .glassEffect(.regular.tint(_)) 0 .glassEffect(.regular.tint(_).interactive) 0 Any tinted glass blanks the WHOLE capture, background included. Untinted glass leaves the rest of the screen intact (the glass itself is still invisible — that is #1054's separate blind spot). On device the same build renders fine. Fixes: - `SnapshotBlankBaselineGuardTests` in BOTH apps — walks every committed baseline and fails on any with no opaque pixels. Content-agnostic, no per-fixture bookkeeping, and it would have caught this immediately. - `BoardViewDigitFirstTests` split by what this renderer can actually capture. The `isSameDigit` cell tint is ordinary board content, so it stays a pixel snapshot — now on `BoardCellView` directly, WITH an untinted control cell beside it, because one image proves nothing about a highlight (the pair differ in 98% of pixels, so the assertion has real discriminating power). The armed KEY's own highlight is uncapturable here and is verified on the simulator instead. Re-recording the old fixture would just re-commit a blank. BLOCKER 1 — three MS baselines were silently stale, not one. A full-suite re-record (never a filtered subset — a filter changes the execution set and order-dependent fixtures then bake a different state) found the iPad case the review named plus both Mac `snapshotFlagged_*`: 0.41% / 1.07% / 1.07% drift, every one a 224×104pt hit on the mode-toggle chip, every one inside `.tolerantImage`'s 5% budget. Sudoku is clean. `minesweeper/ipad-13/*` ASC frames regenerated (7 locales); the Mac ASC frame did NOT move despite its baseline drifting, because the drifted region sits outside the marketing crop — so the drift gate is not a proxy for baseline correctness. Class tracked as #1057. §7 suite — the review is right that it was self-consistent algebra: `boardSide` and the board band are the same quantity restated, so the non-overlap assertion could not fail. It now has an empirical anchor: real frames read off a running app with `idb ui describe-all`, asserted against the model. That immediately earned its keep — fed the measured chrome WITHOUT safe-area terms the model predicted a 402pt board where the device renders 392.5pt. Adding `safeAreaTop`/`safeAreaBottom` brings the cluster's top to the measured 539.0 exactly and the board within 4.5pt. The anchor also corrected a claim I had made from the same data: the cell PITCH is 43.61pt, not the 44.17pt `describe-all` reports as each cell's frame width — the hit rects are ~0.55pt wider than the pitch and overlap slightly. 43.61 clears §3.4's 43.2 but sits just UNDER the HIG 44pt default, exactly as §3.4's ruling anticipates. And on a real 402pt device the board spans 392.5, not 402: the layout applies no horizontal inset, but with real safe areas the square is still height-bound by ~9.5pt, so "full-bleed" describes the layout rule, not a guarantee of edge-to-edge on every device. Both are pinned by assertions now. Also in this batch: - M1: design.md §4.6 amended — each group gets its OWN `GlassEffectContainer`, with the B-7 reasoning (merging is proximity-driven, so one shared container makes "text and icons never share a background" depend on the gap between them; separate containers make it structural). - M2: `fullBleed_iPhoneSE_320` renamed `heightBound_iPhoneSE_320` (baseline follows) — a test named for a claim its own subject disproves is the contradiction §3.4 just had to be corrected for. `fullBleedCellSide`'s table comparison scoped to 393/430, where the board actually IS width-bound; at 320 `W/9 >= (W−4)/9` is true for every W and proved nothing. - M4-lite: `BoardControlClusterLayout` dropped to internal, header rewritten to claim only what it proves, and `stackSpacing * 3` replaced by a caller-supplied `stackGapCount` so it stops asserting a correspondence nothing checks. - M5: MS's dead `Spacer(minLength: 0)` deleted (the board already expands, so it resolved to zero height while still costing a stack gap); Sudoku's comment no longer describes a `Spacer` its stack does not have. - Cosmetic: `DigitPadView+Mac.swift`'s `}}`. GameShellKit 125/125, MinesweeperKit 410/410, SudokuKit Board|DigitPad|Snapshot 122/122. swiftlint --strict clean. Both store gates PASS. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * test(board): strict snapshots of the G4 cluster on its own, both apps The direct answer to CR B1: a glass restyle of one control drifted three Minesweeper board baselines by 0.41-1.07% and passed, because the whole-board suites use `.tolerantImage` (precision 0.95) for the antialiasing-heavy grid. Rendering the cluster ALONE gets strict comparison on the part that must not drift silently, without turning the board tests strict and flaky — `strict content / tolerant board` is already the repo's convention, and this is a content fixture. Chosen over region-masking inside the board snapshots: same targeting, far less machinery, and it lands where strict already belongs. Both apps, default (untinted) cluster state only. A tinted glass control blanks this entire capture path, so armed-digit / notes-on / flag-mode cannot be pixel-tested here at all and stay simulator-verified; `SnapshotBlankBaselineGuardTests` fails loudly if a future state change ever lands one of them in a fixture. Two fixtures were checked for discriminating power rather than assumed to have it, since a snapshot that cannot fail is worse than no snapshot: - Sudoku enabled vs history-disabled differ in 0.14% of pixels — the #855 F-5 gray-out is genuinely captured. - That case is COMPACT deliberately. The conditional ink #855 installed lives only in the compact row; the Mac rail leaves disabled styling to the system and renders byte-identical enabled vs disabled through this path, so a regular-class variant would have asserted nothing. Whether the rail dims on a real Mac is not answerable here — #1039 owns macOS interaction. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(test): re-record two Sudoku baselines that were still depicting the old design I got these wrong once and want the reasoning on the record, because the way I dismissed them is a trap anyone re-recording under a tolerant comparator will hit. `BoardViewBannerTests/snapshotAdsEnabledUnloadedSlot_iPhone_light` and `BoardViewTests/snapshotEmpty_Mac_light` were never re-recorded in this PR (`git log origin/main..HEAD -- <file>` is empty for both). They still showed the PRE-#1022 board: 16pt inset and `.bordered` key fills. A full-suite re-record produces something 35.91% / 17.12% different. My first sweep DID flag both, and I dismissed them as artifacts of my own harness on the grounds that "they pass against HEAD, so HEAD must be correct." That inference is invalid, and here is why: `.tolerantImage` is `.image(precision: 0.95, perceptualPrecision: 0.95)`. The perceptual term means a pixel counts as matching when its delta is small — and these boards are a low-contrast cream/white/light-grey palette, so an ENTIRE layout and styling change is composed almost entirely of small per-pixel deltas. A visibly different design passes. So under a tolerant comparator, "the suite is green" says nothing about whether a baseline matches the code. Staleness can only be established by re-recording and diffing. The magnitude heuristic I proposed earlier — that ~1% is real drift and 36% means the measurement is broken — was exactly backwards here: the large number was the honest signal and I explained it away. Sweep redone properly, deleting and re-recording EVERY baseline in both apps from a full-suite run and treating any difference as real: - Sudoku: these 2, now fixed. Nothing else. - Minesweeper: 0 remaining (the 3 fixed earlier were the whole set). Neither of these two feeds an ASC slot, so no marketing frame moved. SudokuKit 412/412, MinesweeperKit 412/412, both store gates PASS. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * test(board): CR round 2 — real dark coverage where it exists, delete where it can't NEW-1: two of the six strict cluster tests were asserting nothing. Diagnosed before fixing, and the cause is neither of the two the review offered. The dark variants were not byte-identical — they differ in 1469 / 6615 pixels — but every one of those differences is alpha ≤7 antialiasing residue. Visually identical, so the finding stands; my first measurement said "1469 differ" and was the same over-literal reading that nearly buried the stale baselines last round, just pointing the other way. The real cause is fixture SCOPE, not a broken colorScheme injection and not a capture-path limit. This path DOES flip theme-token ink (`Color(light:dark:)` resolves through SwiftUI's `\.colorScheme`); it does NOT flip system default label colours, which resolve from the AppKit drawing appearance `cacheDisplay` never applies. Measured on these exact fixtures: compact light vs dark 5998 VISIBLE differing px, ink (20,22,25) → (239,239,242) rail light vs dark 0 visible MS light vs dark 0 visible The compact row carries always-on theme ink (#855 F-5's conditional icon colours), so its dark variant is real coverage — ADDED, it did not exist before. The rail and MS fixtures contain no theme ink in any state this path can capture: their only `foregroundStyle` uses sit in the PROMINENT branches (armed digit / notes-on / flag mode), prominent means tinted, and tinted glass blanks the whole capture. No capturable state of those views can carry a dark-mode signal, so both dark tests are DELETED rather than left advertising coverage they never had. Dark appearance there is simulator-verified. M2 residual, and I got this wrong once more before getting it right. The first replacement compared `side > tableFigure` and I wrote a comment claiming a re-introduced 16pt inset would fail it. That was false: `fullBleedCellSide` is a pure function of screen width and knows nothing about the app's layout, so it could not fail either. Deleted. The table comparison now lives on the MEASURED device geometry — `#expect(cells[0].width > 43.2)` plus an upper bound below the HIG 44 default — where it is a statement about the board the device actually rendered rather than a rearrangement of W/9. The surviving pure-function test is renamed `fullBleedCellSideIsWidthOverColumns` and its doc comment says outright that it is an identity and cannot catch an inset regression. §3.4 backs the upper bound: it predicts this device class does NOT reach 44 ("仍未達,差距 3.9→0.8pt"), only Pro Max does ("首次跨過"). GameShellKit 124/124, MinesweeperKit 411/411, SudokuKit Board|DigitPad|Snapshot|Cluster 126/126. swiftlint --strict clean on every file touched. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * docs(board): correct a code comment anchored to the same false premise Sibling of the PR-body correction, found by auditing my own claims against `main` instead of against the current head — the habit that would have caught the original mistake. The comment introduced in 7d303e4 read "No `Spacer` here: `boardGrid` already expands into the slack…", which presupposes a `Spacer` existed on this stack and was removed. It never did on `main`: the compact stack has no `Spacer` before or after this PR, and the one deleted in round 1 was added by this PR's own cluster extraction in 01c6965. A future reader would have taken the comment as the aftermath of a real removal. Rewritten to say what is actually true — this stack never had one, here is why it should not gain one — with the intra-PR history noted explicitly so the comment cannot be misread the same way again. Audited the PR body's other net-change claims against `main` at the same time; all three verified as real deltas rather than intra-PR artifacts: - MS mode toggle moved below the banner: main `boardGrid / modeToggle / bannerSlot` → `boardGrid / bannerSlot / controlCluster`. Real. - Sudoku board centres in its band: `.frame(maxHeight: .infinity)` + `.layoutPriority(1)` are absent on main. Real. - MS Reveal was `.borderedProminent` + accent tint on main. Real. MinesweeperKit 411/411; swiftlint --strict clean; comment-only change. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…tracts (#1075) * ci(design): run contracts.py in lint and re-anchor the post-#1051 contracts scripts/design/contracts.py has been RESULT: FAIL on main since #1051 renamed `## STATS` to `## PROGRESS` in docs/screen-contracts.md, and no CI job or mise task ran it, so nobody noticed. - Re-anchor C-4 / C-5 / C-25 / C-29 to `## PROGRESS`, each checked against the section text: C-4 (PROGRESS replaces the retired STATS contract, record display), C-5 (STATS' "per-interaction outcome: none" no longer holds, PROGRESS has an outcome table for its GC rows), C-25 (6 tiles -> merged personal-best rows + streak calendar), C-29 (Achievements / Leaderboards rows bound to HIG terms). Output is now byte-identical to design.md Appendix A. - Add `mise run scan:design_contracts` (gate mode, exit 1 on a broken anchor or canonical drift). - Add lint.yml job 7 `design-contracts` on ubuntu-latest. Closes #1064 part of #1014 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * test(design): TEMPORARY — break C-4 anchor to prove the CI gate goes red Negative test for #1064: C-4 now anchors to a non-existent `## PROGRES`. The design-contracts job must fail on this commit. Reverted in the next commit. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Revert "test(design): TEMPORARY — break C-4 anchor to prove the CI gate goes red" Negative test for #1064 recorded (design-contracts job red on ac67ed2). Restore C-4's anchor to `## PROGRESS`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * docs(design): drop the unverified "six merges" count from the task comment CR (sonnet) on #1075: only 2 merges landed on main between #1051 and the filing of #1064 (26cec63, 32b1f5b); the "six" was inherited from the issue body. Reword without a count. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…o the Progress tab (#1090) * docs(design): retire the HOME contract and re-point GC entry points to the Progress tab HOME was deleted by #1020/#1038 and STATS became the Progress tab in #1051, but docs/screen-contracts.md and docs/navigation-flows.md still described the HOME-era entry points as current. The anchoring gate only checks that headings exist, so the stale prose passed. - screen-contracts.md `## HOME`: whole section replaced by a one-paragraph retired stub (heading kept so C-1 stays anchored and the section count stays 23). The resume-pill facts move into a "Today tab host" note in SUD-DAILY-HUB / MS-DAILY-HUB, which is where the pill lives as-built (GameAppKit/TodayTabHost.swift). - contracts.py: C-20 and C-34 re-anchored HOME -> SUD-DAILY-HUB (the Today tab root section, C-2); EXPECTED_SLUG_COUNT unchanged at 23. - GC-DASHBOARD / GC-SIGNED-OUT-ALERT entry points, S5 / M6 / N14: rewritten to the Progress tab's Leaderboards / Achievements rows + the SETTINGS GC row, matching C-15 / C-35 / C-36 / N-F / N-F2 / N-Q / N-AA. - Remaining "HOME resume pill" / "HOME/hub that pushed the board" / "HOME stays visible" cells in as-built sections say "Today tab" / "the tab root" now. - navigation-flows.md gains a "partially superseded by 3.0" banner naming the anchored BREAK rows (N-A / N-D / N-E / N-C) that own the remaining pre-3.0 HOME mentions (route enums, diagrams, S1-S3 / M1-M3, N4). Verified: python3 scripts/design/contracts.py -> RESULT: PASS, 23 sections. part of #1014 Closes #1081 Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs(design): mark the SETTINGS and N20 "Home leaderboard card" mentions retired (#1081 CR) PM CR on #1090: two SETTINGS passages ("same guard the Home leaderboard card uses"; "alongside the Home leaderboard card") and the N20 row ("Home card / Settings row") still treated the card as live, contradicting the rewritten GC-DASHBOARD / GC-SIGNED-OUT-ALERT text. They escaped the case-sensitive HOME grep. All three now say the card is the retired pre-3.0 one and name the PROGRESS GC rows as today's entry points. Also: the `## HOME` stub's "moved as follows" list gains the Practice card (-> Practice tab root, C-3 / C-3b) and is re-wrapped. Surviving-hit list re-run with `rg -n -i '\bhome\b'`; classification is in the PR body. `python3 scripts/design/contracts.py` -> RESULT: PASS. Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
Builds the three 3.0 tab-root screens — Today / Practice / Progress — per
docs/designs/v3/design.md§3.1–§3.3 (+ §4.2 standard materials, §7 accessibility), on the foundations already on main (BoardPreview #1047, 3-tab shell #1038, completion panel #1048).closes #1021
part of #1014
What changed
Shared scaffold —
GameShellUI/TabRoots/(zero-dep, both apps consume it):BoardPreviewView(Canvas thumbnail of #1047'sBoardPreview, digits never drawn, grid-preserving skeleton, alwaysaccessibilityHidden),BoardPreview.densitySample(fixed-seed representative sample),DifficultyPips(count-encoded, single-hue ramp),HubCard(standard material — no glass),DailyCardContent/DailyCardViewrow cards,StreakHeaderView(plain text row, tappable completed-past pips, muted skeleton),TodayAllDoneBlock,PracticeDifficultyCardView,PersonalBestRow,StreakCalendarView, pureStreakHistory/DayKey,TodayPresentation,ProgressModel.DailyHubShellViewgains an additiveloading:slot.Today (both apps): streak header + 3 real board-state thumbnail cards with text status as the combined a11y label (
"Easy, Not started · 42 givens","Solved · 4:32","In progress · 1:12", MS"Failed") — 5 variants for Sudoku (loadingskeleton cards /loaded/allDone/degraded/exhaustedinline block with its E2E ids), 4 for MS whose exhaustive mapper switch makes.exhaustedstructurally unreachable (D21, pinned by test). Degraded = phase-2 completion read failed: thumbnails still drawn, statuses "Not started", header skeleton reading "Streak unavailable". Longest streak + month history reuse the by-day completion read already made for the week window; the in-progress card reuses the one existinglatestInProgress()read (MS: additive exposure onMinesweeperDailyOverlayReading). Hub title is now "Today".Practice (both apps): three difficulty rows with density-sample thumbnails (never the real next puzzle — D-2.1), selected row gets the accent stroke + checkmark,
New GameCTA in aHubCard. Sudoku's 5-state draw machine is untouched (PracticeHubViewModelhas zero diff); MS stays single-state.Progress (shared
ProgressScreenin GameAppKit): personal bests per difficulty (best time is the.title2hero; count + average demoted to a footnote; daily and practice records merged), month-view streak calendar (D-2.2 A; completed days carry a symbol + label, not colour alone; "Streak history unavailable" footnote on read failure),Achievements/Leaderboardsrows → native Game Center dashboard throughpresentGameCenterOrAlert(C-36: signed out → alert).AchievementsRowgeneralized intoGameCenterEntryRow;GameCenterDashboard.presentAchievements()added. No in-app achievement gallery.StatsView/MinesweeperStatsViewretired; the01-home/06-statsASC store-screenshot slots now point at ProgressScreen store baselines.Glass: all 6 content-layer
glassEffectsites in the Daily/Practice hubs are gone.L10n: 23 new keys ×7 locales in both catalogs (text-spliced), fixture regenerated,
scan:l10npasses.Docs:
docs/screen-contracts.md— SUD/MS-DAILY-HUB, SUD/MS-PRACTICE-HUB rewritten to as-built;## STATS→## PROGRESS; every claim anchored tofile:line.Design rulings honored
D-2 single-hue difficulty ramp + pip count · D-2.1 representative sample · D-2.2 A month calendar · D21 no MS exhausted · §2.3 badge stays dropped (U-12, #1020) · §4.2 standard materials, no glass · §3.3 HIG terminology only (mechanical rg = 0 banned terms).
Review rounds folded in
Round 1: 44pt hit area on the tappable streak pips; stale
StatsViewdoc comments repointed. Round 2: Progress data refreshes on game teardown instead of going stale for the session; loading no longer reads redacted zeros to VoiceOver; the phase-1 failure path now renders degraded cards (dead.failed → .degradedmapping made live, shell failure builder retired, N5 E2E + navigation-flows row updated); allDone docs match the code; AX snapshots relabelled as spacing-only; the duplicated bests merge/format extracted toGameShellUI/PersonalBestMath. Round 3: the phase-1 failure path regained a visible caption (it had gone silent — three inert cards and no error signal, reversing #768's "visible, recoverable inline failure instead of an alert"), and a third orphaned store slot was repointed. Round 3b then made that failure actually recoverable, which it was not:refresh()only ever ran phase 2 and was guarded on.loaded, so a phase-1 failure left the Today tab dead for the whole app session.retryIfFailed()now re-runs phase 1 on return to the Today tab, driven by the newgameSelectedTabenvironment key alone — it exposes state the shell already owned (theTabViewselection), read-only..onAppearcannot carry this: the 3-tab shell memoizes each tab root, so it never re-fires on a tab switch (the #761 trap, in a second location).sessionTeardownCountcannot carry it either: a phase-1 failure leaves the player unable to start a daily game, so it may never bump. The two signals stay complementary and non-overlapping — the teardown hook keeps callingrefresh()(phase 2) exactly as before, and only the tab signal callsretryIfFailed(), which is a no-op in every state but.failed.Test infrastructure: a DEBUG-only
dailyFailOncefault mode was added toUITestFaultingPuzzleProvider(firstfetchDailyTriothrows, later calls delegate) so recovery is observable in the simulator — the existingdailyFailmode throws on every call and its N5 E2E test depends on that, so it is untouched. All 7 references to the new mode sit inside the seam's existing#if DEBUGregions.The orphan class, and how it is now closed. Three of the snapshot baselines feeding the store pipelines had lost their
@Testfunctions in the Today rewrite: the PNGs stayed on disk,swift teststayed green (nothing referenced them), the ASC drift gate stayed quiet (it only fires when a mapped baseline changes, and a frozen orphan never changes), and both pipelines kept compositing pre-rewrite pixels — including a "0 day streak" hero with seven lit pips, the exact contradiction fixed in code, preserved inside a committed asset. Three Minesweeper slots had the mirror defect, naming baselines that no longer existed. All are repointed at live baselines with realistic fixtures, the orphan files are deleted, andscan:store_baseline_orphansnow asserts both directions for every mapped baseline in both pipelines.Deviations (documented)
3 flags · 24 revealed, filled-cell count) needs a per-puzzleId saved-state read that no seam exposes; this PR ships a genericIn progress[ · m:ss]for the card matching the latest in-progress game. Tracked in feat(today): rich per-card in-progress daily status (flags/revealed, filled count) via one batched saved-state read #1050..filled— the mine layout is decided on the first reveal (salted by the tap), so there is no pure-seed layout to draw without a new read. Not-started MS thumbnails show the board proportions (all unrevealed), which is the honest state.StreakHeaderViewpips stay reachable to VoiceOver (per-pip labels,.contain) instead of a blanketaccessibilityHidden, because completed-past pips are tap targets (review picker).ja"Leaderboards" = ランキング, which is Apple's own Game Center Japanese term; the "no Rankings" rule is about the English source.Verification
swift testat the head SHA: GameShellKit 116 · GameAppKit 85 · GameCenterKit 29 (--no-parallel) · MinesweeperKit 409 (full) · SudokuKit 205 across the Daily/Today/Streak/Banner/TabRoots/Practice/Progress filter — all green. The unfiltered SudokuKit run segfaults near ToastController locally (pre-existing, documented); the two-batch split runs clean apart from the knownBoardLeaveOrPauseStateTestswall-clock flake from feat(nav): 3-tab sidebarAdaptable shell with per-tab paths, retire HOME (#1020) #1038 (7/7 in isolation, Board sources untouched here). Gates:mise run scan:l10nPASS,mise run scan:store_baseline_orphans47/47 PASS.failedcase proving the degraded render), MS 4 variants, Practice default/selected/AX3 + draw states, ProgressScreen loaded/loading/unavailable/AX3 + store variants, one direct snapshot per shared component. Baselines that necessarily changed with the redesign were investigated and re-recorded once (listed per phase commit).accessibilityLabelassertions (combined label contains the status text; thumbnailisAccessibilityHidden) + mapper tests.rg glassEffectover the four hub dirs = 0; banned GC terms in Progress sources = 0;swiftlint --strictclean;mise run scan:l10npasses;mise run store:screenshots listparses.scan:store_baseline_orphans(added here because this PR introduced the defect class it catches — see below): positive run reportsPASS … 47 mapped baselines, all present with a live recording test; negative run, with one slot deliberately repointed at a nonexistent file, fails withMISSING [store:screenshots] sudoku/iphone-6.9/02-daily. Wired intolint.ymlbeside the drift gate; python3 stdlib only, so it runs on the ubuntu fleet.dynamicTypeSizesnapshots only scale@ScaledSpacing(fonts do not scale inNSHostingView), so they are named and documented as spacing-only checks; the real Dynamic Type evidence is the AX3 simulator pass below.🤖 Generated with Claude Code