Skip to content

feat(nav): fixed sidebar Settings row on iPad regular / macOS per design.md §3.7 (#1041) - #1046

Merged
wei18 merged 2 commits into
mainfrom
session/stoic-shrike-kxlp
Aug 27, 2026
Merged

wei18 merged 2 commits into
mainfrom
session/stoic-shrike-kxlp

Conversation

@wei18

@wei18 wei18 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

design.md §3.7 specifies Settings on iPad regular / macOS as gear + a fixed sidebar item; #1038 (#1020) shipped only the gear. This lands the fixed item in the shared shell only — zero per-app code, GameShellKit stays zero-dependency.

What changed

  • RootShellView (GameShellKit) gains settingsRoute: Route and hosts a .tabViewSidebarFooter row (Label("Settings", systemImage: "gearshape"), a11y game.sidebar.settings). Its action appends settingsRoute to the selected tab's existing path(tab) binding, guarded by last != settingsRoute so a re-press on top of Settings no-ops.
  • Same push channel as the gear: after refactor(nav): single pathBinding(for:) factory owned by GameRootViewModel (#1042) #1043 the host binding is GameRootViewModel.pathBinding(for:), so the row and TabRootChrome's push(_:) both land in setPath(_:for:persistJoin:). No second push path exists. (RootShellView cannot call the VM directly — it is in the zero-dep shell.)
  • GameConfig.settingsRoute threaded MakeGameApp → GameRoot → RootShellView (GameRoot.swift diff: +7, none in refactor(nav): single pathBinding(for:) factory owned by GameRootViewModel (#1042) #1043's path: region; rebased on 68b712f).
  • Tests: RootShellViewGenericityTests +3 — push lands on the selected tab only / duplicate guard / stacks on top of a pushed board.
  • Docs in-PR: design.md §3.7 implementation note; docs/screen-contracts.md SETTINGS entry points re-anchored (gear + sidebar row, a11y ids).

Spike evidence (why footer, not bottom bar)

Throwaway swiftc app, iPad Pro 11 M5 / iPadOS 26.5, idb-driven, onAppear/onDisappear log:

Variant Renders in expanded sidebar Tappable Hidden in iPad tab-bar mode / iPhone
.tabViewSidebarBottomBar yes (detached, pinned bottom) no — 15+ taps inert while native tab rows in the same overlay fire yes
.tabViewSidebarFooter yes (inline 4th row) yes yes

Footer tap with Today→board(1)→board(2) pushed → Settings stacks on top, board(1) never re-fires (no stack reset), back/back unwinds cleanly; second tap produces no new settings onAppear. Tab highlight unchanged, sidebar stays open. Finding: the gear renders only at a tab root, so on iPad/macOS the sidebar row is the only Settings entry once a board is pushed.

Verification

Gate Result
swift test GameShellKit 47 tests / 11 suites passed (rebased head)
swift test GameAppKit 83 tests / 17 suites passed (rebased head)
swift test MinesweeperKit 364 tests / 62 suites passed
swift test SudokuKit full-suite run hit the known local swiftpm-testing-helper signal 11 (pre-existing, unmodified-main flake) → re-run in 4 --filter batches: SudokuAppCompositionTests 58/12, SudokuPersistenceTests 24/5, `Resume
swiftlint --strict (changed files) 0 violations
mise run scan:l10n passed — "Settings" already exists in both app catalogs with 7 locales; no new key
Snapshot baselines untouched (`git status
Code review sonnet APPROVE-WITH-NITS (nit applied: leaf-route comment on the guard) · haiku APPROVE
iPad idb interactive proof (regular width, both apps) PASS on both apps — iPad Pro 11 M5 / iOS 26.5, launched via XCUITest hold-open + idb (26 Sudoku / 17 Minesweeper screenshots, Leader spot-checked). Per app: sidebar expanded shows Today/Practice/Progress + Settings row ✅ · row pushes Settings into the selected tab (Today, then Practice — highlight + back-button label follow the tab) ✅ · gear disappears once off the tab root ✅ · re-press with Settings on top → no second push, one Back returns to root (a11y node count unchanged) ✅ · gear-then-row → no duplicate ✅ · sidebar collapsed to tab-bar mode → row gone, gear present ✅. "Settings on top of a pushed board" and "row inert under pause" are N/A on iPad: the board is a fullScreenCover there, so no shell chrome (sidebar toggle / gear / row) exists in the a11y tree while a board is up (0 of 108 nodes) — that scenario only exists on macOS, where the board is a plain push; covered by the spike (plain push, no stack reset) + sidebarSettingsRowStacksOnTopOfPushedBoard, on-device macOS via #1039.
macOS Unconfirmed — one attempt of the committed test_pauseOverlayLocksShellOnMac_1019 (xcodebuild test -scheme Sudoku-E2E -destination platform=macOS) died before any test code ran: Failed to initialize for UI testing … Timed out while enabling automation mode — the same dev-Mac automation-mode/TCC handshake failure tracked in #1039, not the app. The footer modifier reads no board-time state (see RootShellView.swift header, #1041 section), so by construction it cannot trip the macOS body-re-run unmount (#1020 rule 2); on-device macOS proof rides #1039.

Not covered / follow-ups

closes #1041
part of #1014

🤖 Generated with Claude Code

wei18 and others added 2 commits August 27, 2026 11:25
…ign.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]>
… 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]>
@wei18

wei18 commented Aug 27, 2026

Copy link
Copy Markdown
Owner Author

T6 fresh-context acceptance — ACCEPT

Independent verification of head b7fbfc18 (base 68b712f7) in a detached worktree at that commit (removed afterwards). Verdict: ACCEPT, 12/12.

# Check Result
1 Diff scope = 6 files, zero per-app changes (git diff 68b712f7...b7fbfc18 --stat; -- App/ empty) PASS
2 RootShellView uses .tabViewSidebarFooter, a11y game.sidebar.settings, last != settingsRoute guard; no new .disabled / preference observer / coordinator read in body PASS
3 GameShellKit Package.swift still dependencies: [] PASS
4 GameRoot.swift diff = 7 settingsRoute lines only; pathBinding(for:) line untouched PASS
5 swift test GameShellKit 47/11 suites · GameAppKit 83/17 suites (incl. the 3 new sidebarSettingsRow* tests) PASS
6 swiftlint --strict on the 4 changed .swift files → 0 violations PASS
7 Negative test: guard line commented out → 2 of 3 sidebarSettingsRow* tests FAIL ([.board, .settings, .settings], [.settings, .settings, .settings]) — tests genuinely guard the contract; reverted PASS
8 Settings key present with 7 locales in both App/*/Resources/Localizable.xcstrings PASS
9 design.md §3.7 implementation note + screen-contracts SETTINGS entry points accurate; file languages preserved PASS
10 Reported numbers match (47 / 83); MinesweeperKit spot-run 364/62 passed PASS
11 PR title ^[a-z0-9], body ends closes #1041 / part of #1014 / 🤖, both commits carry the Co-Authored-By trailer PASS
12 `rg TODO FIXME

Not verified by T6: SudokuKit full suite (PR reports the known local signal-11 flake, green in 4 --filter batches); macOS on-device interaction (→ #1039); the iPad idb screenshots were not re-driven (Leader spot-checked); CR verdicts not re-run.

@wei18
wei18 merged commit b03039d into main Aug 27, 2026
6 checks passed
@wei18
wei18 deleted the session/stoic-shrike-kxlp branch August 27, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(nav): iPad/macOS Settings as a fixed sidebar item per design.md §3.7 (#1020 follow-up)

1 participant