Repository navigation
fix(ui): six design-audit findings across home, completion and daily - #928
Merged
Merged
Conversation
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]>
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.
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.
Practicebutton gets.tint(accent.primary)— it had none, and there is no app-root tint fallback, so it rendered system bluedesign-system.mdCompletionView row synced to as-built (no Liquid Glass, no rank delta — the latter removed in #698)trophy.fill→trophy,chart.bar.fill→chart.bar)arrow.up.forwardinstead ofchevron.right— it presents the system Game Center modal, not an in-app pushaccent.celebratorytoken; both apps' streak flame repointed offstatus.warningWhy 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.AccentTokensis 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.warningis already orange (#D9822B), so reusing Sudoku's#E0662Ewould have reintroduced exactly the confusion being fixed. MS uses a redder, darker#D4501F(~14° hue separation), verified visually in both modes.Contrast measurements
#007AFFmeasured 4.02:1, below this repo's own on-accent ink contract (≥4.5:1, chore(polish): follow-ups from #780/#783 review — spacing token, MotionGate consistency, dark-mode contrast check #786/fix(a11y): dark-mode white-on-accent AA failures beyond #786 — DigitPad armed digit, completion/pause prominent buttons, mine glyph #797). Onaccent.primary#5C7A4Fit is 4.81:1, so this fix also closes a pre-existing contract violation.0.14opacity measured ~1.15–1.22:1. Intermediate values do not help (0.45 → 1.67:1, 0.80 → 2.69:1); full opacity clears 3:1 on both surfaces in both modes in both apps (worst case MS light 3.10:1, best case MS dark 4.32:1). Accepted tradeoff: margins now read tighter. The token-level root fix stays tracked in design(completion): completion card blends into the background — designer UX recheck #846.Verification
swift testgreen: GameShellKit (32), MinesweeperKit (370), SudokuKit (Completion 3, Home/Daily 32).CompletionScreen, so verifying only Sudoku would have shipped 7 red tests.Out of scope
Two audit findings were deliberately excluded pending simulator/device verification: Home
glassEffectempty-state borders (may be a headless-render artifact) and Completion VoiceOver not announcing the mistake count.🤖 Generated with Claude Code