Skip to content

fix(ui): six design-audit findings across home, completion and daily - #928

Merged
wei18 merged 7 commits into
mainfrom
fix/design-audit-six-findings
Jul 21, 2026
Merged

wei18 merged 7 commits into
mainfrom
fix/design-audit-six-findings

Conversation

@wei18

@wei18 wei18 commented Jul 21, 2026 •

Copy link
Copy Markdown
Owner

Implements the six confirmed findings from a design audit of three screens (Home, Completion, Daily hub). All six were reviewed as before/after previews and signed off before implementation.

Each phase is its own commit, ordered lowest-risk first.

Change Scope
D2 exhausted-state Practice button gets .tint(accent.primary) — it had none, and there is no app-root tint fallback, so it rendered system blue Sudoku
C2 design-system.md CompletionView row synced to as-built (no Liquid Glass, no rank delta — the latter removed in #698) docs
H2 Home nav-card icons normalized to outline weight (trophy.fill→trophy, chart.bar.fill→chart.bar) both apps
H1 Leaderboard card gets arrow.up.forward instead of chevron.right — it presents the system Game Center modal, not an in-app push both apps
D1 new accent.celebratory token; both apps' streak flame repointed off status.warning both apps
C1 Completion hero border raised to full opacity to clear the WCAG 1.4.11 3:1 floor for non-text boundaries both apps

Why D1 needed a new token

The streak flame was borrowing status.warning, so a celebratory indicator and a failure warning rendered in the same ink on the same screen — the same misuse class as #767. AccentTokens is a struct, so the new field required updating all three construction sites (built-in/neutral theme, Sudoku, Minesweeper). The neutral theme deliberately reuses a gray rather than inventing a hue, so an un-injected subtree cannot imply a "neutral celebratory brand color" exists.

Per-app values differ on purpose: Minesweeper's own status.warning is already orange (#D9822B), so reusing Sudoku's #E0662E would have reintroduced exactly the confusion being fixed. MS uses a redder, darker #D4501F (~14° hue separation), verified visually in both modes.

Contrast measurements

Verification

  • swift test green: GameShellKit (32), MinesweeperKit (370), SudokuKit (Completion 3, Home/Daily 32).
  • 27 snapshot baselines re-recorded across all six fixes — 13 Sudoku-side (Completion 3 · DailyHub 5 · Home 5) and 14 Minesweeper-side (Completion 7 · Daily 2 · Home 5). Every fix that moves pixels moves baselines: C1 the Completion sets, H1/H2 the Home sets, D1 the Daily sets.
  • The Minesweeper Completion set (7) is the one worth calling out: C1 changes the shared CompletionScreen, so verifying only Sudoku would have shipped 7 red tests.
  • No new user-facing strings, so the 7-locale catalogs are untouched.

Out of scope

Two audit findings were deliberately excluded pending simulator/device verification: Home glassEffect empty-state borders (may be a headless-render artifact) and Completion VoiceOver not announcing the mistake count.

🤖 Generated with Claude Code

wei18 and others added 7 commits July 21, 2026 15:54
The exhausted-state primary CTA in DailyHubView was `.borderedProminent`
with no `.tint`, so it fell back to system blue while every other
prominent button in the repo (DigitPadView, PracticeHubView,
CompletionOverlayScaffold, PauseOverlayView) applies the app's warm
accent explicitly. Add `.tint(theme.accent.primary.resolved)` on the
button itself, matching the DigitPadView pattern; the sibling Cancel
button (.bordered) is untouched.

White-on-accent label ink clears 4.83:1 in light mode (0x5C7A4F),
already covered by the existing on-accent-ink WCAG guard test since
accent.primary itself is unchanged.

Re-recorded the DailyHub-iPhone-light-exhausted snapshot baseline;
eyeballed the diff — only the Practice button fill changes from
system blue to sage green, everything else pixel-identical.

Co-Authored-By: Claude Fable 5 <[email protected]>
The Liquid Glass usage table claimed CompletionView uses glass and shows
a rank delta. Neither is true as-built: the hero card is a plain filled
`surface.elevated` panel with a stroke border (CompletionScreen.swift:184),
and the rank/leaderboard content was removed in #698. Rewrite the row to
match the as-built time+mistakes hero. DailyHubView's row is untouched —
it genuinely uses .glassEffect.

Co-Authored-By: Claude Fable 5 <[email protected]>
Two of the five Home cards rendered filled SF Symbols while the other
three were outline, giving Leaderboard and Statistics disproportionate
visual weight. Both apps share this component (GameShellKit/HomeScreen +
GameAppKit/GameHomeView), so the fix lands once and applies to both:

- HomeMode.leaderboard: "trophy.fill" -> "trophy" (HomeScreen.swift)
- Statistics card: "chart.bar.fill" -> "chart.bar" (GameHomeView.swift)

Updated the two HomeScreenTests literal assertions that pinned the old
filled symbol name. Re-recorded all 10 affected Home snapshots (5 Sudoku
+ 5 Minesweeper, light/dark/iPad/Mac/resume variants) and eyeballed
each — only the Leaderboard and Statistics glyphs change weight;
everything else (layout, chevrons, other icons, spacing) is
pixel-identical to the prior baseline.

Co-Authored-By: Claude Fable 5 <[email protected]>
…vron

All five Home cards rendered the same `chevron.right`, promising in-app
push navigation — but Leaderboard presents the system Game Center modal
(GameHomeViewModel.swift:118-126: "not a stack push"), so the user
couldn't tell the difference before tapping.

Add `HomeMode.trailingSymbolName` (default "chevron.right", "arrow.up.forward"
for .leaderboard) and thread it through `HomeModeCard` as a new parameter
defaulting to "chevron.right" so the existing #844 Statistics call site
(which passes no trailing symbol) renders byte-identically. Only the
literal `Image(systemName: "chevron.right")` render site changes to read
the per-mode value. Layout (padding 16, minHeight 72, row geometry) is
untouched.

Re-recorded all 10 affected Home snapshots (5 Sudoku + 5 Minesweeper) and
eyeballed each — only the Leaderboard row's trailing glyph changes from
chevron to outward-arrow; the other four rows are pixel-identical.

Co-Authored-By: Claude Fable 5 <[email protected]>
…arning

The Daily streak flame borrowed `status.warning` for its ink, so a
celebratory "you're on a streak" signal rendered in the same color as
the app's failure/caution triangle on the same screen (#767 mode-toggle
misuse pattern, now hit a second time).

Add `celebratory: ThemeColor` to `AccentTokens` (a struct, not a
protocol, so this touches all three construction sites):
- Theme.swift NeutralTheme: reuses `primary`'s gray deliberately — this
  fallback theme is grayscale/system-derived on purpose and never
  renders real celebratory UI, so a distinct hue would misrepresent it
  as a real brand color.
- SudokuKit DefaultTheme: "charcoal orange" 0xE0662E light (user-approved
  candidate B from the audit preview) / 0xEB8F65 dark — the dark value
  lightens via the same HSL lift the difficulty.hard ramp uses, keeping
  roughly the same ~17deg hue gap from status.warning that the approved
  light value has.
- MinesweeperKit MinesweeperTheme: 0xD4501F light / 0xEB774C dark — must
  NOT reuse Sudoku's hex verbatim since MS's own warning is already
  orange (0xD9822B); this redder/darker variant separates by hue and
  lightness. Dark value lifted using MS's own warning ramp's dL/dS.
  Wrote a before/after preview (scratchpad/ms-celebratory-preview.html,
  not published) for user sign-off on this specific hex per the standing
  rule for visual changes.

Repointed both flame usages (DailyStripView.swift, MinesweeperDailyStripView.swift)
from `theme.status.warning` to `theme.accent.celebratory`. Left every
other `status.warning` use alone (BoardLoaderView, MinesweeperDailyHubView,
flag/mine cell tokens, ReminderDeniedExplainer) — those are genuine
warning semantics per the audit.

Verified via `swift test` (not just build) on GameShellKit, SudokuKit,
and MinesweeperKit — a struct field addition compiles against sources
but can still break test-target conformers. No test file constructs
`AccentTokens` directly, so no test-side fixes were needed. SudokuKit's
full-suite run hit the known local segfault flakiness (see
reference/sudokukit-full-suite-segfault-local.md); ran in batches
instead and confirmed full coverage green except the 6 expected/known
failures (4 flame snapshots here + the pre-existing unrelated
BannerSlotView dark-band failure that reproduces on a clean stash too).

Re-recorded 6 flame snapshots (4 Sudoku + 2 Minesweeper) and eyeballed
each — only the flame glyph's color changes; every other pixel
(checkmarks, streak dots, Failed badge, layout) is identical to the
prior baseline.

Co-Authored-By: Claude Fable 5 <[email protected]>
…trast floor

The hero card border sat at 0.14 opacity, measuring ~1.15-1.22:1 against
both the card fill and the page background — far below the WCAG 1.4.11
3:1 floor for non-text UI boundaries. Dropping the opacity modifier
clears 3:1 against both surfaces in both modes in both apps (worst case
MS light 3.10:1, best case MS dark 4.32:1). No new color tokens; reuses
text.tertiary. Shadow untouched.

Baselines re-recorded and visually confirmed: 3 Sudoku + 7 Minesweeper
Completion snapshots, border now visible without reading heavy.

Co-Authored-By: Claude Fable 5 <[email protected]>
…ory hex

The light value 0xD4501F has since been visually signed off against the
MS strip in both modes, so the note no longer reflects reality. The
rationale above it (why MS must not reuse Sudoku 0xE0662E) stays.

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 merged commit ec44b19 into main Jul 21, 2026
10 checks passed
@wei18
wei18 deleted the fix/design-audit-six-findings branch July 21, 2026 08:08
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.

1 participant