Repository navigation
test(uitest): enable -uitest-route on macOS + board:<difficulty> key for minesweeper - #1037
Merged
Merged
Conversation
…y for Minesweeper `UITestRouteModifier` was `#if os(iOS)`; on macOS the detail column binds the same `path` array (GameShellUI.NavigationStackHost), so the DEBUG-only deep-link hook now applies on every platform. Minesweeper's `uitestRoute(for:)` gains `board:<beginner|intermediate|expert>` → `.board(difficulty:, seed: 0x5EED_B1, mode: .practice)` so a macOS measurement / E2E run reaches a sized practice board in one launch with ZERO synthetic clicks. Why: #1026 B-1 needed macOS board frames; XCUITest coordinate clicks are delivered to whatever window is frontmost and landed in the owner's foreground app while the game window sat behind it. A launch hook removes the click path entirely. Sudoku is not mirrored: its `AppRoute.board(puzzleId:)` is not constructible from a difficulty (puzzle-id/generator shape), and its near-win hooks already cover its board E2E. part of #1026 Co-Authored-By: Claude Fable 5 <[email protected]>
This was referenced Aug 25, 2026
wei18
added a commit
that referenced
this pull request
Aug 26, 2026
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]>
wei18
added a commit
that referenced
this pull request
Aug 26, 2026
…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 26, 2026
…ME (#1020) (#1038) * feat(nav): shared 3-tab sidebarAdaptable shell + per-tab paths, retire 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]> * wip(nav): checkpoint stage B in-flight work for session handoff (#1020) 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]> * feat(nav): migrate Sudoku onto the 3-tab shell, cut AppRoute to 3 cases (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]> * feat(nav): shared Settings gear on every tab root (#1020) 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]> * feat(nav): migrate Minesweeper onto the 3-tab shell, cut AppRoute to 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]> * docs: re-tag screen-contracts + game-factory skill for the 3-tab shell (#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]> * chore(tests): drop dangling NavigationStackHost mentions from SettingsKit 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]> * docs(screen-contracts): re-anchor ATT-PRIMER entry point to the Today tab (C-33, #1020) part of #1014 Co-Authored-By: Claude Fable 5 <[email protected]> * fix(nav): single Today banner, C-33 host test, open-gate Today fixtures (#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]> * fix(nav): host the hoisted overlay in a leaf observer so macOS keeps 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]> * test(shell): drive boardModalOverlay's onChange re-registration in place (#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]> * fix(store): re-point the 01-home ASC slots to the Today baselines, regenerate 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]> * docs(nav): align B-4 status, hoist/lock wording, and uitest-route comments 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]> --------- 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.
What
UITestRouteModifier: drop the#if os(iOS)guard — the DEBUG-only-uitest-routedeep-link now applies on every platform (macOS detail column binds the samepath, seeGameShellUI.NavigationStackHost).uitestRoute(for:): new keyboard:<beginner|intermediate|expert>→.board(difficulty:, seed: 0x5EED_B1, mode: .practice)— one launch, zero synthetic clicks, lands on a sized practice board.MinesweeperUITestsdeclaresMinesweeperEnginedirectly (review finding: was riding transitive visibility).practiceregression.Why
#1026 B-1 needs macOS board frames. XCUITest coordinate clicks go to whatever window is frontmost and landed in the owner's foreground app while the game window sat behind it (see the B-1 verdict comment). A launch hook removes the click path entirely; the measurement probe stays a throwaway test, not committed.
Sudoku not mirrored:
AppRoute.board(puzzleId:)is not constructible from a difficulty; its near-win hooks already cover its board E2E.Verification
swift test --package-path Packages/MinesweeperKit --filter MinesweeperAppCompositionTests→ 11 tests passedswift test --package-path Packages/GameAppKit→ 56 tests passed (fresh-context acceptance)swift buildGameAppKit + SudokuKit → completeswiftlint --stricton the 4 changed files → 0 violationspart of #1026
🤖 Generated with Claude Code