Repository navigation
feat(nav): 3-tab sidebarAdaptable shell with per-tab paths, retire HOME (#1020) - #1038
Merged
Merged
Conversation
…e HOME (stage A of #1020) Shared layer only (GameShellKit + GameAppKit); the per-app migrations follow in the next commits on this branch. GameShellKit (zero-dep): - AppTab (today/practice/progress) + RootShellView rewritten as a sidebarAdaptable TabView with one NavigationStack path per tab; navigationDestination(for:) at each stack root. - BoardModalOverlayHoist: the #1019-adopted shape — a board's Pause / Completion overlay renders as a ZStack sibling OUTSIDE the disabled TabView via BoardModalOverlayCoordinator, driven by the single `.boardModalOverlay(isActive:content:)` modifier that also emits BoardModalOverlayActivePreferenceKey (the #763 "same condition" invariant now holds by construction). iOS fullScreenCover boards keep rendering in place (no coordinator in that environment). - NavigationStackHost / SidebarItem / HomeScreen deleted outright. GameAppKit: - GameRootViewModel: `selectedTab` (plain stored, no side effects — N-AB) + `paths[AppTab]` with `setPath(_:for:persistJoin:)` owning the shrink detection; design.md §3.6.2 quoted verbatim (C-34). Tests: shrink on a non-selected tab refreshes the resume pill; tab switching alone never does. - GameConfig: drops sidebarItems/homeModes/presentLeaderboard/statsRoute/ statsSubtitleKey/homeAvatarImage/makeHome/title; adds `makeTabRoot`, invoked exactly once per tab per launch (memoized — #918 lesson, tested). - TodayTabHost: resume pill + themed banner slot; the ATT primer anchor moves here (C-33) with ATTPrimerCoordinator and its tests untouched. a11y id `game.today.root`. - AchievementsRow (C-36): Progress-tab Game Center entry through presentGameCenterOrAlert; HOME's leaderboard card is gone with GameHomeView/GameHomeViewModel (C-35). - UITestRouteModifier resolves to UITestLaunchTarget (.tab / .push) so `-uitest-route daily|practice` select a tab instead of pushing a route. - No `.badge(` and no custom dot view: U-12 resolved "not possible" (see the issue), badge dropped per design.md §2.3. Docs: v3 design.md U-12 closed, prototype.html B-4/U-12 re-tagged, v1 design.md §How.5.1 marked superseded. L10n: Today/Progress/Achievements added to both App catalogs (7 locales). part of #1014 Co-Authored-By: Claude Fable 5 <[email protected]>
PM checkpoint of session/brazen-starling-u7qw's uncommitted working tree so a successor session can continue from a pushed branch instead of a local-only worktree. Content is mid-edit stage B (app-composition wiring + contract re-anchoring); not reviewed, not expected to build clean. To be squashed by the continuing session. part of #1014 Co-Authored-By: Claude Fable 5 <[email protected]>
…es (stage B of #1020) - AppRoute: exactly board / completion / settings (design.md §2.2); daily, practice, stats are tab identities now, home is gone. - Live+TabRoots.swift builds the three tab roots once per launch: Today = DailyHub (per-tab path binding), Practice = PracticeHub, Progress = StatsView with the shared AchievementsRow in a new gameCenterSection slot (C-36). LiveRouteFactory keeps only the three push arms. - DailyHubViewModel: exhausted → Practice switches tab via an injected selectTab closure (design.md §3.1) instead of pushing a route; Cancel drops the block and stays on the Today root. - BoardView adopts `.boardModalOverlay(isActive:content:)` (single condition drives rendering + the #763 preference). - reminderTapRoute selects Today and pops it to root; -uitest-route daily/practice resolve to tabs, settings to a push. - Tests: Home suites + baselines deleted; TodayTabViewTests replaces them and feeds the 01-home marketing slot (mise-tasks/store/screenshots re-pointed); StatsView .txt structure baselines follow the generic slot (images unchanged). E2E: game.home.root → game.today.root, assertLandedOnHome → assertLandedOnTodayRoot. part of #1014 Co-Authored-By: Claude Fable 5 <[email protected]>
HOME's Settings card was the only Settings entry point; design.md §2.1/§3.7 want a trailing gear on each tab that pushes `.settings` inside the initiating tab. `TabRootChrome` (GameAppKit) applies it once for all three tabs — `chromedTabRoots` returns the unerased `ModifiedContent<AnyView, TabRootChrome<Route>>`, so no tab can skip it — and `GameConfig` gains the required `settingsRoute`. Sudoku's Live config passes `.settings`; Minesweeper follows in its migration commit. part of #1014 Co-Authored-By: Claude Fable 5 <[email protected]>
…5 cases (stage B of #1020) Mirrors the Sudoku migration file-role by file-role: - AppRoute: exactly board / replayDailyBoard / resumeBoard / completion / settings (design.md §2.2); daily, practice, stats are tab identities. - Live+TabRoots.swift builds Today = daily hub, Practice = practice hub, Progress = MinesweeperStatsView + the shared AchievementsRow (C-36); LiveRouteFactory keeps the five push arms, +Stats folded into the tab-roots file. Live config passes settingsRoute: .settings for the shared tab-root gear. - MinesweeperBoardView adopts `.boardModalOverlay(isActive:content:)`. - reminderTapRoute selects Today + pops to root; -uitest-route keys resolve to UITestLaunchTarget (daily/practice → tabs, settings/resumeFail → push). - Tests: Home suites + baselines deleted; MinesweeperTodayTabViewTests feeds the 01-home marketing slot (mise-tasks/store/screenshots re-pointed); MinesweeperStatsTests .txt structure baselines follow the generic slot. - L10n: "Settings" key added to the Minesweeper catalog (7 locales) — the shared gear label had no entry there. part of #1014 Co-Authored-By: Claude Fable 5 <[email protected]>
#1020) Code review found both still describing the retired HOME / sidebar types as current. screen-contracts.md gets the same "superseded by 3.0" banner docs/v1/design.md already carries; the game-factory-composition skill now describes the root shell / makeTabRoot / TabRootChrome shape a new game must plug into. part of #1014 Co-Authored-By: Claude Fable 5 <[email protected]>
…sKit sentinel comments (#1020) Acceptance pass caught two comment-only references to the type deleted in this branch. part of #1014 Co-Authored-By: Claude Fable 5 <[email protected]>
… tab (C-33, #1020) part of #1014 Co-Authored-By: Claude Fable 5 <[email protected]>
…es (#1020 review) - Today no longer stacks two banners: the daily hub's own banner slot is dropped on the Today root in both apps; TodayTabHost's slot (the C-33 ATT anchor) is the only one. - TodayTabHostTests: first ad context offers the primer when ATT is undetermined, never when determined, and the hasOffered latch holds across two hosts sharing one coordinator; the slot's onAdContext body is the free function the test calls (no behavior change). - TodayTabViewTests / MinesweeperTodayTabViewTests: one open-gate fixture each so the 01-home marketing baselines cover the banner region. - SudokuE2ETests: exhausted-Cancel test renamed to its Today-root landing; SudokuKit Package.swift trimmed under the file_length ceiling. part of #1014 Co-Authored-By: Claude Fable 5 <[email protected]>
…the pushed board (#1020) On macOS, clicking Pause on a board pushed inside a tab NavigationStack popped the board back to its hub while the path binding stayed [.board]. Bisection against the macOS XCUITest showed re-running RootShellView.body while a board is pushed unmounts the sidebarAdaptable stack destination; three things did that: .onPreferenceChange(BoardModalOverlayActivePreferenceKey), the .disabled(...) toggle, and reading coordinator.content in the shell body. - Drop BoardModalOverlayActivePreferenceKey and the shell .disabled(); the lock is the overlay scrim + .isModal trait (#1019 evidence), rendered by a new HoistedOverlayHost leaf — the ONLY observer of the coordinator. - boardModalOverlay(presentation:) takes a BoardModalPresentation key instead of a Bool, so completion-over-pause / leave->pause switches re-register the hoisted snapshot; dismiss(id:) scopes teardown to the presentation a board installed (outgoing/incoming boards coexist during transitions). - Both BoardViews expose modalOverlayPresentation (shared enum, mirror principle). - Tests: hoist routing + identity-scoped dismiss; board presentation-key branches; retire NavigationPreferencePropagationTests (its assumption is no longer load-bearing); make GameRootViewModelTabPathTests.settle() sleep so the refresh Task lands under the parallel runner (was 1-in-3 flaky). - macOS E2E: SudokuE2ETests+MacShell pins #763 on the 3-tab shell via window-anchored coordinate clicks (tabs inert / Resume live / Leave pops). Co-Authored-By: Claude <[email protected]>
Conflicts: UITestRouteModifier header comment (kept the #1020 launch-target wording, adopted #1037's all-platforms note) and MinesweeperAppComposition .uitestRoute (kept the UITestLaunchTarget return type, adopted #1037's board:<difficulty> key as .push(.board(...), tab: .practice)). UITestLaunchTarget gains Equatable so #1037's resolver tests compare targets directly. Co-Authored-By: Claude <[email protected]>
…ace (#1020 review) branchChangeReRegisters mounted two NSHostingViews, so only the onAppear path was ever exercised. Host one view over an @observable presentation probe and flip .pause -> .completion -> nil in place; mutation check: commenting out the .onChange(of: presentation) line fails exactly this test. Co-Authored-By: Claude <[email protected]>
…generate frames (#1020) HOME is retired, so the six Slot("01-home", …) entries in scripts/build-ascspec-screenshots.py pointed at deleted HomeViewTests / MinesweeperHomeSnapshotTests baselines and the #1001 frame-drift gate failed. Point them at TodayTabViewTests / MinesweeperTodayTabViewTests (iPhone, iPad, Mac light) and regenerate: 168 slots, 42 PNGs changed (01-home × 3 devices × 7 locales × 2 apps), every other slot byte-identical. Eyeballed sudoku/iphone en, minesweeper/iphone en, sudoku/mac zh-Hant, minesweeper/ipad ja — the Today hub sits in the same panel + copy layout the HOME card used. Co-Authored-By: Claude <[email protected]>
This was referenced Aug 26, 2026
Closed
Closed
…ments with the shipped shape (#1038 review) - design.md + prototype.html B-4: iPad idb PASS (#1019 evidence 06-10); macOS XCUITest pending -> #1039 (never cite the spike as macOS proof). - BoardModalOverlayHoist / GameRoot / RootShellView: no .disabled() anywhere; the #763 lock is scrim geometry + .isModal AX pruning, not by construction; hoisted evidence is 06-10, 01-04 is the naive failure. - SudokuE2ETests+MacShell: -uitest-route drives macOS too since #1037; only the near-win hooks stay iOS-only. - mise-tasks/ui/tour: default launch = Today tab; daily/practice keys select tabs. - BoardView.handleKeyPress: ignore key presses while an overlay is up (#763). Co-Authored-By: Claude <[email protected]>
wei18
added a commit
that referenced
this pull request
Aug 27, 2026
…Model (#1042) (#1043) GameRoot bound per-tab paths through `setPath(_:for:persistJoin:)` while both apps' Live+TabRoots.swift built a second Binding over the same storage calling `setPath(_:for:)` with no TerminalPersistJoin — two teardown contracts over one state (the #823 race guard was bypassed for hub-originated writes). Opus review of #1038, m4. - GameRootViewModel now OWNS the TerminalPersistJoin (defaulted init param so tests can pass a short-timeout join) and exposes `pathBinding(for:)` — the one place a per-tab path Binding is built. Lives in GameRootViewModel+PathBinding.swift (the VM file sits at 396 lines against SwiftLint's 400 ceiling). - GameRoot drops its `@State persistJoin`; environment injection, `dismissGame(persistJoin:)` and RootShellView's `path:` all read the VM's join / factory. Both apps' private `pathBinding` helpers deleted; `rg "setPath\("` now shows only the VM itself + UITestRouteModifier. - New GameRootViewModelTabPathTests case: a hub-originated pop through `pathBinding(for:)` defers the teardown bump until the registered terminal-persist task lands (fails if the factory drops the join). - memoizedTabRoots: DEBUG-only os_signpost interval + Logger line reporting how long the eager 3-tab build takes (issue item 3, measurement only — numbers in the PR body). part of #1014 Co-authored-by: Claude <[email protected]>
This was referenced Aug 27, 2026
Merged
wei18
added a commit
that referenced
this pull request
Aug 27, 2026
… retirement (#1040) (#1044) PR #1038 retired the HOME route and re-pointed the six 01-home store slots at the Today-tab baselines, which (a) duplicated 02-daily (same DailyHub card set), (b) left the copy describing the deleted Home mode-cards, and (c) shipped an empty-state fixture (all-missed week strip, "Best —" x3). - Slot("01-home") x6 (iPhone/iPad/Mac x Sudoku/MS) now point at new store-only Stats fixtures: snapshotStoreIPhoneLight / snapshotStoreIPadLight / snapshotMacLightStore in StatsViewTests and MinesweeperStatsTests. All six tiles populated (no "—"); existing seededRecords baselines untouched. 6 new baselines recorded. - COPY["01-home"] rewritten for both apps in all 7 locales to describe the Stats grid (best/average per difficulty, iCloud sync) — no streak / ranking / Game Center claim. CJK headlines kept single-line (wrap_text() splits pure-CJK strings per character and strands the final full stop otherwise). - mise-tasks/store/screenshots MAP: six 01-home rows re-pointed. - docs/app-store/screenshot-strategy.md: Shot 1 table renamed to Progress tab (Stats) with the new copy; iPad panel-fill numbers re-measured with detect_content_bbox (01-home 90.0%, 02-daily 96.9%). - Regenerated docs/app-store/screenshots-ascspec: exactly 42 PNGs changed (2 apps x 3 devices x 7 locales, all 01-home.png). Resume pill: lives only in TodayTabHost.resumeHeader, so a Stats-based 01-home cannot carry it; no snapshotMacLightWithResume fixture added (PM-approved deviation, acceptance item 3 amended on the issue). Gates: scan:store_frame_drift --base origin/main PASS; scan:l10n PASS; swiftlint --strict clean on both test files. Co-authored-by: Claude <[email protected]>
wei18
added a commit
that referenced
this pull request
Aug 27, 2026
…ign.md §3.7 (#1041) (#1046) * feat(nav): fixed sidebar Settings row on iPad regular / macOS per design.md §3.7 (#1041) design.md §3.7 specifies Settings on iPad regular / macOS as "gear + a fixed sidebar item"; #1038 shipped only the gear. The shared `RootShellView` now hosts a `.tabViewSidebarFooter` row (a11y `game.sidebar.settings`) that pushes the same `settingsRoute` the per-tab gear pushes, onto the SELECTED tab's own path, guarded by `last != settingsRoute` so a re-press on top of Settings no-ops. Zero per-app code: `GameConfig.settingsRoute` is threaded through `MakeGameApp` → `GameRoot` → `RootShellView`. Spike (iPadOS 26.5, idb): `.tabViewSidebarBottomBar` renders but is inert; the footer row pushes on top of a pushed board without resetting the stack. The modifier reads no board-time state, so it cannot trip the macOS body-re-run unmount (#1020 rule 2). Docs re-anchored in-PR: design.md §3.7 implementation note, screen-contracts SETTINGS entry points. Tests: RootShellViewGenericityTests +3. part of #1014 Co-Authored-By: Claude <[email protected]> * docs(nav): note the leaf-route assumption behind the sidebar Settings guard (#1041) Code-review nit: `openSettings()` guards on `last != settingsRoute`, which only holds because Settings is a leaf route in both apps. Say so next to the guard so a future Settings sub-route revisits it. part of #1014 Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
wei18
added a commit
that referenced
this pull request
Sep 2, 2026
…1023 Re-anchors both live completion-overlay screen contracts to the #1023 as-built shape: Liquid-Glass full-height panel (board visible behind), CompletionContext 4-row CTA hierarchy, streak section, liveSolve/review state variants, and the #1038 hoisted-presentation seam #1022's G4 must observe. Element inventories previously documented the pre-#1023 Play-Again/Close-only layout. Co-Authored-By: Claude Fable 5 <[email protected]>
wei18
added a commit
that referenced
this pull request
Sep 2, 2026
… + streak/haptics wiring (#1048) * feat(completion): full-height glass panel + liveSolve/review variants (#1023 Phase A) Rebuilds the shared game-completion overlay (CompletionOverlayScaffold) as a full-height Liquid-Glass panel per docs/designs/v3/design.md §3.5/§4.3/§4.4: the finished board now stays visible behind the panel instead of an opaque warm-paper background, with an accent glow painted behind the glass so it naturally picks up the tint. New value types in GameShellUI: CompletionVariant (liveSolve vs review), CompletionMotionPlan (pure M1/M2/M3/M4/M10 animation table incl. Reduce Motion fallbacks per §6), and CompletionContext (the §3.5 4-row CTA hierarchy: dailyMoreToday / dailyAllDone / practice / loss). All 4 production completion paths in both apps now pass the correct variant — only the live overlay plays the win ritual + haptic; the 3 review paths (pushed re-view route, Sudoku's completedRedirect, MS's resolved(.completed)) never do, matching the "no false report of a fresh accomplishment" contract. Haptic authority is unchanged (still fires only at the VM's terminal-transition edge); the review-variant surfaces hold no SoundPlaying/HapticPlaying reference at all. Wires real Daily "more today?" resolution (dailyMoreToday vs dailyAllDone) at every Daily call site in both apps, via a new fetchDailyProgress closure mirroring the existing makeDailyReminderPrimer injection shape. Adds a streak token group (StreakTokens.pipOff) to the Theme protocol + both apps' palettes + NeutralTheme, ahead of Phase B's streak view. New/refreshed localized strings (7 locales): "Done", "Next:", "See you tomorrow", "Try Again". Co-Authored-By: Claude Fable 5 <[email protected]> * feat(completion): wire streak pip/count advance ritual for daily wins (#1023) Adds the M3/M4 streak-ritual consumers (design.md §6) Phase A left unconsumed: a shared CompletionStreakView (pips row + count caption) in GameShellUI, gated exclusively to (variant == .liveSolve, outcome success, Daily context) so review/practice/loss paths never show a false "streak advanced" report. Both apps resolve pre/post streak state via a new makeFetchStreakAdvance factory that reuses the existing DailyStripLogic/MinesweeperDailyStripLogic.computeStreak — no second streak algorithm — and is race-free against the just-finished solve's async persist by explicitly excluding/including the current puzzleId from today's completed set rather than depending on write-then-read timing. Co-Authored-By: Claude Fable 5 <[email protected]> * docs(contracts): update SUD/MS completion-overlay as-built shape for #1023 Re-anchors both live completion-overlay screen contracts to the #1023 as-built shape: Liquid-Glass full-height panel (board visible behind), CompletionContext 4-row CTA hierarchy, streak section, liveSolve/review state variants, and the #1038 hoisted-presentation seam #1022's G4 must observe. Element inventories previously documented the pre-#1023 Play-Again/Close-only layout. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
wei18
added a commit
that referenced
this pull request
Sep 7, 2026
… 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]>
This was referenced Sep 7, 2026
wei18
added a commit
that referenced
this pull request
Sep 9, 2026
…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]>
This was referenced Sep 12, 2026
Open
Closed
Merged
wei18
added a commit
that referenced
this pull request
Sep 14, 2026
…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]>
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.
What
P1-6 of epic #1014: both apps move onto one shared 3-tab
sidebarAdaptableshell — Today / Practice / Progress — with aNavigationStack(path:)per tab, HOME retired, and the route tables cut to their leaves (SudokuAppRoute7 → 3 cases, Minesweeper 8 → 5). One implementation inGameShellKit(RootShellView,AppTab) +GameAppKit(GameRootViewModel.paths,makeTabRoot,TodayTabHost,TabRootChrome,AchievementsRow); the apps only supplymakeTabRoot+settingsRoute.Shell
RootShellView<Route, TabRoot>—TabView(selection:).sidebarAdaptable, threeTabs, each wrapping its ownNavigationStack(path:)withnavigationDestination(for:)at the stack root. Tab roots are built once per tab per launch (memoizedTabRoots,MemoizedTabRootsTests).GameRootViewModel—selectedTab,paths: [AppTab: [Route]],path(for:),setPath(_:for:persistJoin:),push(_:),popToRoot(of:).setPathcarries §3.6.2 verbatim as its doc comment.TabRootChrome, a11ygame.tab.settings) that pushessettingsRouteonto the selected tab.UITestRouteModifierresolves to aUITestLaunchTarget(.tab(_)/.push(_, tab:));daily/practicekeys now select tabs,settingspushes.Contracts (each with its own test)
hasOfferedlatch is untouchedTodayTabHostTests— "first ad context, ATT notDetermined: presents the primer" / "…already determined: never presents" / "hasOffered latch: exactly one offer across two ad-context hooks"dismissGame∪ bootstrap (#912 filter kept)GameRootViewModelTabPathTests— "C-34: a NON-current tab's pop refreshes the resume pill", "popToRoot counts as a shrink", "#912: a shrink while a game is presented is still filtered out"GameRootViewModelTabPathTests— "N-AB: switching tabs alone never refreshes or tears down", "growth on any tab does not refresh"presentLeaderboard/HomeModeContentgone fromGameConfig)AchievementsRowTests— authenticated presents / signed out alerts / unresolved alerts / "presenting does not push onto any tab"; Stats snapshots re-recorded with the row.badge()has no dot-only form (whitespace hack is undocumented and renders as text in the sidebar); recorded indocs/designs/v3/design.md+ prototype note#763 shell lock on the 3-tab shell (hoisted overlay from #1019)
A board pushed inside a tab registers its Pause / Completion overlay with
BoardModalOverlayCoordinator;RootShellViewrenders it as a ZStack sibling of theTabViewthrough aHoistedOverlayHostleaf (the only observer of the coordinator). iOSfullScreenCoverboards see no coordinator and render in place, unchanged.The first cut observed a preference key and toggled
.disabled()on theTabView. The macOS XCUITest caught a real regression: re-running the shell body while a board is pushed unmounts the pushed destination on macOSsidebarAdaptable(the path binding stays[.board], the stack falls back to its root). Bisected to three triggers — the preference observer, the.disabledtoggle, and readingcoordinator.contentin the shell body — all removed in b368c55. The lock is now the overlay's full-window scrim +.isModal(what #1019's spike actually measured). The modifier API isboardModalOverlay(presentation: BoardModalPresentation?)— a key, not a Bool — so completion-over-pause and leave-confirmation→pause re-register the hoisted snapshot, anddismiss(id:)scopes a board's teardown to the presentation it installed. Both boards exposemodalOverlayPresentationwith the same branch order (BoardModalOverlayActiveTests,MinesweeperBoardModalOverlayActiveTests,BoardModalOverlayHoistTests).Verification
Package tests (local,
swift test, at 828988d)live startOrResume() lands in the reachable Ready window(#849 suite,elapsedSeconds → 6under parallel load; passes in isolation). The RemoveAds / SettingsView / Toast batch hits the known local swiftpm-testing-helper segfault and is covered by CI.Reviewers (2, reading the PR head via
git show): APPROVE; the one MINOR —branchChangeReRegistersnever traversed.onChange— is closed by 828988d (mutation-checked: commenting out the.onChangeline fails exactly that test).macOS — native XCUITest, coordinate clicks (
App/SudokuE2ETests/SudokuE2ETests+MacShell.swift)test_pauseOverlayLocksShellOnMac_1019drives the real app: Practice row →sudoku.practiceHub.start→sudoku.board.pauseToggle, then asserts (a) Today/Practice/Progress rows do not switch tabs (pruned from the a11y tree / disabled / click has no effect — any is accepted), (b)game.pause.resumedismisses the overlay with the board still up, (c)game.pause.leavepops to the Practice hub.iPad — idb-driven, both apps
idb-driven on iPad Pro 11-inch (M5, iOS 26.5), app built at dd04b60 — includes the b368c55 hoist fix; the later commits are comment-only plus the key-press guard (the M4 sim on this machine only has iOS 18.4, below the iOS 26 deployment target), both apps built from the workspace, BGM muted. Evidence =
simctlscreenshots +idb ui describe-alldumps per step (kept local, not committed).Today/Practice/Progresstabs +game.tab.settingsgame.pause.resume+game.pause.leave(+ the prompt copy); no tab rows, no board controlsfullScreenCoveron iPad so no tab bar exists there; the tap lands on the overlay scrim, which resumes by design (PauseOverlayViewscrimonTapGesture { onResume() }), still on the same boardPause,Digit 1…9,Elapsed time)Ready, rows 1…9New Game,Ready to play, tabs back in the tree)Other gates
mise run scan:l10n— 2 catalogs, 7 locales complete, 0 placeholders (Today / Progress / Achievements + MS "Settings" strings added).swiftlint --stricton every changed file — clean (lefthook pre-commit).TodayTabViewTests,MinesweeperTodayTabViewTests, incl. banner-visible fixtures) and Stats (gameCenterSectionslot) re-recorded under the build(theme): actool build-tool plugin so themed snapshots pass under swift test #1036 actool plugin and eyeballed — themed, not blank.mise-tasks/store/screenshots01-homeslots re-pointed to the Today baselines.Docs
docs/screen-contracts.md— HOME retirement banner; ATT-PRIMER entry paragraph re-anchored to Today (C-33).docs/v1/design.md§How.5.1 superseded note;docs/designs/v3/design.mdU-12 row +prototype.htmlnote..claude/skills/game-factory-composition/SKILL.md— root-shell description for the 3-tab shell.Out of scope
P1-7 / P1-8 / P1-9 of #1014.
closes #1020
part of #1014
🤖 Generated with Claude Code