Skip to content

chore(polish): dark banner seam, ms settings tint parity, sudoku pause a11y id (#688 items 2/5a/5b) - #725

Merged
wei18 merged 1 commit into
mainfrom
chore/688-p3-mechanical
Jul 7, 2026
Merged

wei18 merged 1 commit into
mainfrom
chore/688-p3-mechanical

Conversation

@wei18

@wei18 wei18 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Refs #688 (the three mechanical items; items 1/3 are recorded won't-fixes, item 4 → #716, the loader trap → #719 — issue stays open only as the batch tracker).

What (9 files, +63/−21)

  • Item 2 — MS dark-mode banner seam: BannerSlotView default background → .clear; the three call sites (shared GameHomeView, MS board, Sudoku board) now pass theme.surface.background instead of surface.placeholder, so the empty/loading slot blends into the page. Sim-verified: dark MS Home/Daily/Board bottom band gone (uniform pixels), light mode unaffected. Remove-Ads users render EmptyView — no visual change for them.
  • Item 5a — MS Settings tint parity: .accentColor → theme.accent.primary.resolved (4 call sites), line-symmetric with Sudoku's SettingsView; stale "MS has no theme tokens" comments in 3 SettingsKit files corrected (comment-only).
  • Item 5b — Sudoku pause a11y id: sudoku.board.pauseToggle added, symmetric with MS's existing minesweeper.board.pauseToggle; no existing E2E reference needed syncing.

Verification

  • SudokuKit 265/265 · MinesweeperKit 184/184 (--no-parallel) · SettingsKit 31/31 · snapshots all passed, none recorded
  • swiftlint --strict on all changed files: 0 violations; rebased onto c7cd01a cleanly
  • Dark/light sim screenshots in session scratchpad (pixel-sampled uniform backgrounds)

Review

Dual-model review (sonnet + haiku): haiku zero findings; sonnet approve with one recorded discovery — no snapshot in the repo ever renders the banner slot background (every Home/Board fixture seeds hasPurchasedRemoveAds: true → EmptyView), a pre-existing coverage gap now absorbed into #723's acceptance (its reserve-height fix needs an ads-enabled fixture anyway). Sonnet's trivial import-style nit (internal import explicitness) applied inline.

🤖 Generated with Claude Code

P3 mechanical batch from the 2026-07-05 UX audit:
- item 2: BannerSlotView's default/placeholder background reads as a
  mismatched seam against custom page backgrounds in dark mode. Default
  now .clear; GameHomeView/MinesweeperBoardView/BoardView pass
  theme.surface.background instead of the "card" placeholder tone.
- item 5a: MinesweeperKit's SettingsView tinted rows with .accentColor
  ("MS has no theme tokens yet") even though MinesweeperTheme has shipped
  real accent tokens since #278 Phase 2; now resolves
  theme.accent.primary.resolved, matching Sudoku. Updated stale
  .accentColor references in shared SettingsKit doc comments to match.
- item 5b: Sudoku's board pause button gets an .accessibilityIdentifier
  ("sudoku.board.pauseToggle"), matching MS's existing pauseToggle hook.

refs #688

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 enabled auto-merge (squash) July 7, 2026 08:25
@wei18
wei18 merged commit 5277dd9 into main Jul 7, 2026
4 checks passed
@wei18
wei18 deleted the chore/688-p3-mechanical branch July 7, 2026 08:26
wei18 added a commit that referenced this pull request Jul 8, 2026
#729)

Owner-observed bug: on the Sudoku game screen the board frame shrank
when the AdMob banner appeared - a mid-game layout jump. The shared
BannerSlotView only entered layout after the async AdGate resolution
landed, so every screen reflowed when the slot materialized.

Fix (shared MonetizationUI/MonetizationCore, both apps):
- AdGate gains a synchronous session hint (lastKnownShouldShowBanner,
  Mutex-backed, nonisolated) recording the latest shouldShowBanner
  resolution; recordBannerDismissed/recordPurchase eagerly flip it to
  false. The decision logic itself is unchanged (split into
  resolveShouldShowBanner).
- BannerSlotView seeds its show/hide state from that hint at init, so
  any slot mounted after the gate has resolved once (Board entered
  from Home, hubs, Settings) reserves its 50pt from the very first
  layout; ad load only fills the already-reserved rect. Gate-denied
  (Remove Ads / dismissed today) still collapses to EmptyView, and the
  pre-first-resolution cold-launch default is unchanged - so all
  existing purchased-state snapshot baselines stay byte-identical.

Coverage:
- AdGateLayoutHintTests: 6 unit tests pinning the hint lifecycle.
- First ads-enabled (hasPurchasedRemoveAds: false) snapshot fixtures
  in the repo (per the #725 review note): Sudoku BoardViewBannerTests
  + MinesweeperBoardSnapshotTests, light + dark, unloaded spinner slot
  reserved at 50pt. All pre-existing baselines pass unchanged.
- Sim-verified on iPhone 17 Pro: board frame identical before/after
  the test ad loads (row-1 cell y=137.75, toolbar y=542 in both).

Closes #723

Co-authored-by: Claude Fable 5 <[email protected]>
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