Skip to content

fix(home): statistics entry follows the mode-card format - #857

Merged
wei18 merged 1 commit into
mainfrom
fix/844-stats-mode-card
Jul 17, 2026
Merged

wei18 merged 1 commit into
mainfrom
fix/844-stats-mode-card

Conversation

@wei18

@wei18 wei18 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

What

Closes #844 (owner report: Statistics 按鈕的 UI 沒有跟隨該頁其他按鈕格式) — the Home Statistics entry now renders as the same mode-card format as Daily/Practice/Leaderboard/Settings, in both apps.

Shape

  • HomeModeCard generalized (mode: → symbolName/titleKey/subtitleKey — pure signature refactor, four existing callers pass identical values; no per-mode tint existed to lose).
  • HomeSecondaryEntryLink deleted (zero live references).
  • New GameConfig.statsSubtitleKey threaded through GameAppKit; both apps set "Wins / times / averages" (L10n ×7 locales ×2 catalogs, fixture synced).
  • Placement unchanged: still the 5th entry below the grid; only the FORMAT changed (frame dumps prove y-position identical). Bonus: the old flat row was flush to the screen edges — the card now aligns to the grid's 16pt inset, fixing a latent misalignment.

Review

Dual CR, both APPROVE (mechanical 10/10; adversarial verified the four cards' pixels unchanged, iPad full-bleed-two-column row intentional-and-clean, a11y parity with existing card behavior, clean merge-tree vs current main). One low-sev note for the #479 scaffold author (blank subtitle line if a future game forgets statsSubtitleKey) — recorded on #479.

Verification

GameShellKit 28/28 · GameAppKit 43/43 · SudokuKit Home 23/23 · MinesweeperKit 324/324 --no-parallel (pre-#841 base; merge-tree clean vs 45d2aae+) · scan:l10n green · swiftlint --strict clean · 10 Home baseline pairs re-recorded, zero unrelated churn.

🤖 Generated with Claude Code

Owner override of #773's flat-row adjudication: Statistics rendered as a
lighter-weight HomeSecondaryEntryLink (gray icon, no subtitle, no card
background) while the four modes render as full HomeModeCard cards. Promote
Statistics to the same HomeModeCard component (themed icon tint, bold title,
new subtitle "Wins / times / averages", chevron), threaded via a new
GameConfig.statsSubtitleKey through GameHomeViewModel into GameHomeView.
Position stays the 5th entry below the 4-card grid; only the visual format
changed.

HomeModeCard generalized to take explicit symbolName/titleKey/subtitleKey
instead of a HomeMode case, since Statistics isn't one of the four canonical
modes. HomeSecondaryEntryLink deleted (no other consumers). L10n: new key
added to both catalogs, all 7 locales. Home snapshot baselines re-recorded
in both apps (approved design change).

Closes #844

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 enabled auto-merge (squash) July 17, 2026 03:50
@wei18
wei18 merged commit 589af4e into main Jul 17, 2026
5 checks passed
@wei18
wei18 deleted the fix/844-stats-mode-card branch July 17, 2026 03:50
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(home): Statistics entry must follow the mode-card format (Daily/Practice/Leaderboard/Settings)

1 participant