Repository navigation
feat(minesweeper): game-view Tier-2 polish + Mac side-rail (#298) - #316
Merged
Merged
Conversation
Add a horizontalSizeClass == .regular branch to MinesweeperBoardView so the Mac/iPad detail pane no longer renders the iPhone vertical stack. Mirrors Sudoku's BoardView.macLayout: centered + size-capped board (600pt square) on the left, a 260pt control rail on the right carrying the status bar + Reveal/Flag toggle (MS has no digit pad). Outer width capped at 900pt and centered. Compact (iPhone) layout extracted unchanged; spacing literal 12 preserved verbatim so the recorded covered-board snapshots don't churn. New Mac layout uses theme.spacing tokens. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…#298 #7 #8) #7: on a loss, surface every mine, not just the detonated cell. No engine accessor needed — the actor snapshot already carries the full cells array with isMine populated once mines are placed, so the renderer paints still- hidden mines from cell.isMine when status == .lost. Detonated cell keeps the bold mineHit red; surfaced mines use the soft mine fill. Correctly- flagged mines keep their flag glyph. The Completion overlay (#292) sits on top via the outer overlay, so the revealed board shows behind it. #8 (partial): swap the mine glyph burst.fill -> xmark.octagon.fill for a clearer hazard read. The covered-vs-revealed contrast raise + raised-tile bevel are deferred — they churn the covered-board snapshot baseline, which the sandbox can't re-record (see impl-notes). Co-Authored-By: Claude Opus 4.8 <[email protected]>
…#298 #10) Mirror Sudoku's BoardCellView AX. Each cell collapses into one element with a "Row R, Column C, <state>" label (1-based, state covers hidden/flagged/ N/empty/mine incl. the lost-mine surfacing), the .isButton trait, and a named Flag/Unflag accessibilityAction so VoiceOver users can flag without the long-press / right-click accelerators (which VO can't reach). Flag action is inert on revealed cells and once the board is terminal. Threads zero-based row/column into MinesweeperCellButton from the grid. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…op (refs #298 #9) The status bar drove its 1 Hz elapsed refresh via a TimelineView whose nested .task re-fired on every timeline tick (a .task re-fire footgun). Replace with Sudoku BoardView's pattern: a single .task(id:) on the body owning a `while !Task.isCancelled { if playing { refresh }; sleep(1) }` loop, cancelled automatically on disappear, keyed on the VM identity so Retry restarts it. Status bar is now a plain HStack reading the @observable snapshot. Non-visible; correctness/perf only. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…efs #298 #11) Migrate MinesweeperBoardView's outer .padding() to theme.spacing.medium (value-identical 16, no snapshot churn) and the new Mac layout to the spacing scale. The compact VStack(spacing: 12) literal is deferred — it's the only remaining spacing-scale literal and migrating it churns the covered-board snapshot baseline (sandbox can't re-record). Grid geometry constants (minCellSide, cellSpacing, cornerRadius) are tap-target/shape values, left as literals. Also seals the #298 impl-notes. Co-Authored-By: Claude Opus 4.8 <[email protected]>
6 tasks
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.
Refs #298 (the MS build-out's final game-view pass). Landed 5 of 6 items; 2 cosmetic items deferred to a Leader-local snapshot re-record.
sizeClass == .regular→ centered 600pt board + 260pt control rail (status + Reveal/Flag toggle), 900pt outer cap. Mirrors SudokuBoardView.macLayout. Compact iPhone layout + Tier-0 GeometryReader scaling unchanged.mineHit, others = softmine, flagged keep flag) from the snapshot'scell.isMine— no engine change, no mid-game leak..isButton+ named Flag/Unflag accessibility action..taskcleanup: replaced the nested-TimelineView-.task1 Hz hack with a single.task(id:)+ cancellation-checked ticker loop (no re-fire).burst.fill→xmark.octagon.fill; docs(design): backlog +1 — Android app via Swift SDK for Android #11 outer padding →theme.spacing.medium.Designer: Aligned · CR: APPROVE-WITH-NITS (no Blocker/High). Verified: Mac side-rail leaves the compact Tier-0 board byte-unchanged; reveal-all-mines fires only on loss;
.task(id:)ticker leak/re-fire-free; zero Sudoku changes; 71+75 tests green.Deferred (Leader-local re-record follow-up): #8 covered/revealed contrast + raised-tile bevel, #11 compact spacing token — both churn the iPhone-covered snapshot baseline. Plus the pre-existing
public import SwiftUI→internalin MinesweeperCellButton.🤖 Generated with Claude Code