Repository navigation
feat(nav): fixed sidebar Settings row on iPad regular / macOS per design.md §3.7 (#1041) - #1046
Merged
Merged
Conversation
…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]>
Owner
Author
T6 fresh-context acceptance — ACCEPTIndependent verification of head
Not verified by T6: SudokuKit full suite (PR reports the known local signal-11 flake, green in 4 |
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.
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,
GameShellKitstays zero-dependency.What changed
RootShellView(GameShellKit) gainssettingsRoute: Routeand hosts a.tabViewSidebarFooterrow (Label("Settings", systemImage: "gearshape"), a11ygame.sidebar.settings). Its action appendssettingsRouteto the selected tab's existingpath(tab)binding, guarded bylast != settingsRouteso a re-press on top of Settings no-ops.GameRootViewModel.pathBinding(for:), so the row andTabRootChrome'spush(_:)both land insetPath(_:for:persistJoin:). No second push path exists. (RootShellViewcannot call the VM directly — it is in the zero-dep shell.)GameConfig.settingsRoutethreadedMakeGameApp → GameRoot → RootShellView(GameRoot.swift diff: +7, none in refactor(nav): single pathBinding(for:) factory owned by GameRootViewModel (#1042) #1043'spath:region; rebased on 68b712f).RootShellViewGenericityTests+3 — push lands on the selected tab only / duplicate guard / stacks on top of a pushed board.docs/screen-contracts.mdSETTINGS 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:
.tabViewSidebarBottomBar.tabViewSidebarFooterFooter 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
swift testGameShellKitswift testGameAppKitswift testMinesweeperKitswift testSudokuKitswiftpm-testing-helpersignal 11 (pre-existing, unmodified-main flake) → re-run in 4--filterbatches: SudokuAppCompositionTests 58/12, SudokuPersistenceTests 24/5, `Resumeswiftlint --strict(changed files)mise run scan:l10nfullScreenCoverthere, 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.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 (seeRootShellView.swiftheader, #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
docs/screen-contracts.mdstill carries pre-feat(nav): 3-tab skeleton + per-tab path, retire HOME route, re-anchor ATT/resume-refresh/GC-entry contracts #1020 HOME-era wording in ~20 other places (header already marks it "partially superseded by 3.0"); only the SETTINGS entry-points line was re-anchored here.fullScreenCover(GameRoot.onPresentBoard); that is P1-8 (feat(board): full-bleed board + G4 two-group floating glass control cluster #1022) territory, flagged here only because it makes the sidebar-over-board case macOS-only.closes #1041
part of #1014
🤖 Generated with Claude Code