Repository navigation
docs(contracts): sync screen contracts and navigation flows to as-built - #930
Merged
Merged
Conversation
…drift to as-built Nav audit (flow-audit-hubs/board/periphery.md) found docs/screen-contracts.md frozen at #684 (2026-07-05) while a dozen merged PRs changed navigation underneath it. This pass fixes gaps 1-4: - add ## STATS contract (Statistics Home entry, #773/#844) + wire it into HOME's element inventory/interactions (was completely undocumented) - rewrite MS-BOARD-LOAD-FAILED into 4 tiers covering the new MinesweeperDailyOpenGuardView (#842) / MinesweeperDailyReplayLoaderView (#841) / MinesweeperFreshBoardLoaderView (#910) loaders the docs claimed didn't exist ("direct mount, no loader" was wrong); update MS-DAILY-HUB's per-interaction table to route through them - add the week-strip (DailyStripView, #826) to SUD/MS-DAILY-HUB element inventory + interactions, and fix SUD/MS-COMPLETION-REVIEW's stale "completed-card tap only" entry points - add the Close button (#719) to SUD/MS-BOARD-LOAD-FAILED's element inventory, previously Retry-only - add SUD-BOARD's .leaveReady branch (#849/#868) to its interaction table, mirroring MS-BOARD's existing #681 note; extend PAUSE-OVERLAY's Resume row to name both apps' view-local flags No .swift changes — docs only. Every new/edited row re-verified against current source via rg before writing. Co-Authored-By: Claude Fable 5 <[email protected]>
…der, route enums Continues the previous commit (gaps 1-4) with gaps 5-8 from the same nav audit: - drop stale Practice hub CTA divergence: both apps read "New Game" since #885 (was "Draw new puzzle" Sudoku / "Start" MS); also note the MS Start tap now routes through MinesweeperFreshBoardLoaderView (#910) - add MS-COMPLETION-OVERLAY's reminder affordance (#814, mirrors Sudoku's #287) — was documented as Sudoku-only; update REMINDER-PRIMER's entry points to match - add the SETTINGS Game Center row as a real second entry point into GC-DASHBOARD / GC-SIGNED-OUT-ALERT (#685/#714), and give SETTINGS' own interaction table the row it was missing - fix GC-SIGNED-OUT-ALERT's code anchor: the alert moved from MakeGameApp+Modifiers.swift to GameRoot.swift:113-123 under #685 - navigation-flows.md: add the `.stats` case to both route enum reproductions, widen MS `.completion` with its `day` param (#826), add a dated note for Sudoku's `.leaveReady` state (#849/#868, mirrors MS's #681 note), and fix N14's stale GC-alert anchor to match No .swift changes — docs only. Every new/edited row re-verified against current source via rg before writing. Co-Authored-By: Claude Fable 5 <[email protected]>
CR round 1 — all three were coordinates pointing at the wrong code, not wrong claims about behavior: - HOME footnote 2: sidebarItems(from:) is at HomeScreen.swift:115-127, not :103-116 (that range covered the previous init + the extension header). - MS-BOARD-LOAD-FAILED tier 2: the whole anchor set had drifted. content switch is :145-205 (not :141-192), exitToHub :207-214 (not :198-205), resolve :244-265 (not :207-231 — that range is actually exitToHub + check() + resolve levels doc comment). Added check() explicitly. File is 266 lines, not 267. - MS-COMPLETION-OVERLAY #814 note: the daily-only gate for THIS live overlay is MinesweeperBoardView.swift:1110-1121, which gates on mode AND an actual win. LiveRouteFactory.swift:308 carries a near-identical mode == .daily line but belongs to the pushed .completion re-view route; the note now spells out the distinction so the next reader does not re-anchor to the wrong one. Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A navigation-contract audit of all 22 screen contracts found that the navigation implementation is healthy — the contract docs are what rotted. Both apps' drift was symmetric, so the mirror principle held in code; the gap was entirely documentation that stopped tracking as-built.
The contracts were written in #684 (2026-07-05). Since then #719 · #773 · #814 · #826 · #841 · #842 · #844 · #849 · #868 · #885 · #910 changed navigation without updating them.
What was stale
## STATScontract;HOMEgains the card + interaction row. It is not inHomeMode— the app layer injects it atGameHomeView.swift:80— so the contract now reflects that structureMinesweeperDailyOpenGuardView#842,MinesweeperDailyReplayLoaderView#841,MinesweeperFreshBoardLoaderView#910). Documented as tiers with their.checking/.loading/.failedvariantsDailyStripView(#826) added to element inventory + interactions; completed-day dots are tappable, soCOMPLETION-REVIEWentry points were correctedClosemissing from board-load-failedGC-DASHBOARD,GC-SIGNED-OUT-ALERTandSETTINGSGameRoot.swift:113-123, notMakeGameApp+Modifiers.swift(moved in #685)navigation-flows.mdroute enums.statsand.completion'sdayparameter;.leaveReady(#849/#868) recorded with a dated noteVerification
Every added or edited row was re-anchored against current source with
rg/sedbefore being written — audit-report line numbers were treated as stale by default. Sampled anchors confirmed: the STATS entry chain, all three MS loader state machines, the GC alert's new home, both apps'Close/Retryrows, both Practice CTAs, and the completion detent parity ([.medium, .large]). Markdown table structure checked by pipe-count scan.Docs only — no
.swifttouched.Deliberately not in this PR
REMINDER-DENIED— left untouched while the foreground-refresh gap it depends on was being verified. That turned out to be a real bug, fixed in fix(settings): re-poll reminder permission on foreground return #929; this contract should gain the foreground re-poll behavior once that merges.ATT-PRIMER— the audit flagged a suspected "primer never fires" bug. Investigated and dismissed:ATTPrimerSheetModifieris a real ViewModifier body with a@Bindableprojection over an@Observablecoordinator, so observation works correctly. No doc change, and deliberately no warning added for a non-issue.BoardLoaderView's.completedRedirectstate) is outside this PR's scope and awaits triage.🤖 Generated with Claude Code