Repository navigation
Description
Context
Static-code UI/UX audit round (2026-07-11, read-only, color-semantics lens). Repo state: main @ 382eabd; re-verified against main @ ff4e010 on 2026-07-11 (same code).
Problem
The reveal/flag mode-switch button on the Minesweeper board tints itself with theme.status.warning.resolved when in flag mode. Flag mode is a normal, expected input mode — not a warning or degraded state. Reusing the warning token risks reading as "something is wrong with this mode," and design-system.md's color-token table reserves status.* tokens for success/warning/error signaling, not mode selection.
Evidence
Packages/MinesweeperKit/Sources/MinesweeperUI/MinesweeperBoardView.swift:612-628:
private var modeToggle: some View {
Button {
interactionMode = interactionMode == .reveal ? .flag : .reveal
Self.tapModeStore.save(Self.rawValue(for: interactionMode))
} label: {
Image(systemName: interactionMode == .flag ? "flag.fill" : "hand.tap.fill")
.font(.system(size: 20, weight: .semibold))
.frame(width: 44, height: 44)
}
.buttonStyle(.borderedProminent)
// swiftui-interaction-footguns: theme tint doesn't auto-propagate to
// system controls — apply `.tint` explicitly. Reveal reads with the
// app accent; flag switches to the warning tone so the two modes are
// color-distinct, not just icon-distinct.
.tint(interactionMode == .flag ? theme.status.warning.resolved : theme.accent.primary.resolved)The comment confirms this is a deliberate choice ("flag switches to the warning tone so the two modes are color-distinct") rather than an accident — but the token choice itself conflicts with the design system's own reserved-usage rule for status.*.
Impact
- A player switching to flag mode — a routine, frequent action in normal play — sees a color the rest of the app reserves for warnings/errors, which can read as "you did something wrong" rather than "you're in a different, equally valid mode."
status.warningloses its exclusivity as a signal for actual problem states once it's also used for ordinary mode selection, weakening the token's meaning everywhere else it appears.
Suggested fix
Switch the flag-mode tint to a second accent step (e.g. theme.accent.secondary if one exists) or accent.muted — something in the accent family that's still visually distinct from reveal mode's primary accent, without borrowing the warning token. Leaves status.warning free for its documented use (success/warning/error signaling only).
Acceptance criteria
- Flag mode's toggle button no longer uses
theme.status.warning(or anystatus.*token) for its tint. - Reveal and flag modes remain visually distinct via color (not just the icon swap already in place).
- No other call site in the codebase needs updating (confirm this is the only use of
status.warningfor mode-selection rather than an actual warning state — a quick grep forstatus.warningusage is worth a sanity check during implementation).
Source & dependencies
- From
meetings/2026-07-11_design-db-uiux-audit.md(finding N2, MINOR), local-only branchdocs/design-db-audit-and-specs, not yet pushed — this issue body is self-contained.
Activity
fix(minesweeper): thread the theme through Practice Hub (picker + CTA…
fix(ui): six design-audit findings across home, completion and daily (#…