Skip to content

chore(polish): follow-ups from #780/#783 review — spacing token, MotionGate consistency, dark-mode contrast check #786

Closed

Description

@wei18

Context

Three small non-blocking follow-ups surfaced by the independent review of PR #780 (tap-mode readability, merged) and PR #783 (design-system micro-animations, merged). None affect behavior today; each keeps a convention from eroding.

Items

  • fix(minesweeper): tap-mode toggle readability + status.warning tint (#767) #780 follow-up — spacing literal: MinesweeperBoardView.swift modeToggle uses .padding(.horizontal, 12) as a hard-coded literal. Same file otherwise uses theme.spacing.*; docs/designs/design-system.md (Spacing section) requires @ScaledMetric-wrapped tokens. Note SpacingTokens exposes 4/8/16/24/32 but no 12 — either add a semantic 12 token or snap to 8/16.
  • feat: implement design-system.md's four micro-animations, gated on reduce-motion #783 follow-up — MotionGate consistency: error pulse in SudokuKit/.../BoardCellView.swift gates reduce-motion via a hand-written guard !reduceMotion instead of the shared MotionGate helper (GameShellKit/Sources/GameShellUI/Motion/MotionGate.swift). Functionally correct, but route it through MotionGate so future animations don't copy the ungated-guard pattern.
  • Contrast check (pre-existing, made explicit by fix(minesweeper): tap-mode toggle readability + status.warning tint (#767) #780): modeToggle reveal state renders .foregroundStyle(.white) on theme.accent.primary — in dark mode that is white on 0x9BB87E (light sage). Verify AA contrast; if it fails, use theme.text.* inverse token per the design-system contrast table.

Acceptance

All three checkboxes done; swift test --filter MinesweeperUITests and SudokuKit UI suites green; any snapshot re-records limited to affected board/completion suites.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    audit
    on Jul 12, 2026
  2. wei18 commented on Jul 13, 2026

    @wei18
    OwnerAuthor

    Re-audit 2026-07-13 (main@2609995) addenda for this issue's checklist:

    • MotionGate consistency: confirmed still open — BoardCellView.swift:54 error-pulse remains a hand-written guard newValue, !reduceMotion while lines 125/131 in the same file use MotionGate. Additionally found two sites with no reduce-motion handling at all (same class, previously untracked): Packages/AppMonetizationKit/Sources/MonetizationUI/BannerSlotView.swift:261,267 and ToastView.swift:151 — zero references to accessibilityReduceMotion in either file.
    • Dark-mode contrast: half-fixed by fix(minesweeper): tap-mode toggle readability + status.warning tint (#767) #780 — flag-mode text now theme.text.primary ✅, but reveal-mode still renders .white over theme.accent.primary dark (0x7FAFCF), ≈2.3:1, fails AA 4.5:1.
    • Spacing token: unchanged (e.g. MinesweeperBoardView.swift:633 literal .padding(.horizontal, 12)).
  3. wei18 commented on Jul 13, 2026

    @wei18
    OwnerAuthor

    🔒 Claiming: this issue is being worked on now (session 2026-07-13, Leader + dispatched Developer). Scope: all three checklist items in one PR — spacing token, MotionGate routing, dark-mode contrast verification. Will post the contrast verdict here before changing any color. Other agents: please don't pick this up concurrently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions