Skip to content

fix(minesweeper): thread the theme through Practice Hub (picker + CTA + text) - #787

Merged
wei18 merged 1 commit into
mainfrom
worktree-impl-765
Jul 12, 2026
Merged

wei18 merged 1 commit into
mainfrom
worktree-impl-765

Conversation

@wei18

@wei18 wei18 commented Jul 12, 2026

Copy link
Copy Markdown
Owner

What

Audit finding #765: MinesweeperPracticeHubView had zero theme.* references — system-blue CTA, untinted picker, .primary/.secondary text. Now mirrors Sudoku's PracticeHubView reference shape: @Environment(\.theme), themed shell background/header, text tokens, and one difficulty-derived tint (difficulty.easy/medium/hard) shared by the segmented picker and the Start CTA.

No snapshot baselines exist for this view (deliberately deferred per its test file header) — visual verification via a temporary record-mode snapshot (light/Beginner slate-blue, dark/Expert rose), removed after eyeballing; the diff is one source file (+24/−3).

Sibling audit finding #767 required no work — already fixed by PR #780.

Verification

  • MinesweeperKit full suite 240/240; swift build clean; swiftlint --strict 0 violations
  • Under the 50-LOC / sensitive-dir CR threshold — Leader review applied

Closes #765

🤖 Generated with Claude Code

… + text)

MinesweeperPracticeHubView carried zero theme.* references — the
difficulty picker took the system tint, the Start CTA rendered system
blue, and text used .primary/.secondary. The one screen where a new MS
player picks a difficulty had no brand/difficulty color identity, unlike
Sudoku's PracticeHubView (audit finding #765).

Mirrors Sudoku's reference shape exactly: @Environment(\.theme),
surface.background + text.primary threaded into PracticeHubShellView,
text tokens on the card labels, and one difficulty-derived tint
(beginner/intermediate/expert -> difficulty.easy/medium/hard per
MinesweeperTheme's own mapping) shared by the segmented picker and the
CTA so the two stay visually linked.

No snapshot baselines exist for this view (deliberately deferred per the
test file's header), so no re-records; visual verification via a
temporary record-mode snapshot, eyeballed in light/Beginner (slate-blue
picker+CTA on blueprint-paper background) and dark/Expert (rose picker+
CTA on dark surface), then removed — working tree carries only this one
source change.

Verification: MinesweeperKit full suite 240/240; swift build clean;
swiftlint --strict 0 violations. (Sibling audit finding #767 needed no
work — already fixed by PR #780.)

Closes #765

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 enabled auto-merge (squash) July 12, 2026 14:27
@wei18
wei18 merged commit 2609995 into main Jul 12, 2026
4 checks passed
@wei18
wei18 deleted the worktree-impl-765 branch July 12, 2026 14:27
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.

fix(minesweeper): Practice Hub ignores the theme environment (system-blue CTA, no difficulty colors)

1 participant