Skip to content

test(minesweeper): record macOS Board snapshot baseline - #982

Merged
wei18 merged 1 commit into
mainfrom
test/minesweeper-mac-board-baseline
Aug 3, 2026
Merged

wei18 merged 1 commit into
mainfrom
test/minesweeper-mac-board-baseline

Conversation

@wei18

@wei18 wei18 commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Minesweeper had macOS snapshot baselines only for Home / Daily / Stats — no Board. The Board is the highest-content-fill macOS screen and is planned as the hero frame for the macOS App Store screenshots; this was the last piece missing before that submission can proceed.
  • Extends MinesweeperBoardRevealedSnapshotTests with snapshotFlagged_Mac_light / snapshotFlagged_Mac_dark, reusing the existing flagged fixture (revealed 1-8 neighbor-count cells + 3 placed flags, no loss state) at SnapshotLayouts.mac (900×600pt → 1800×1200px), mirroring the light/dark pairing already used for MS's Home and Daily mac baselines.
  • Fixture choice mirrors the reasoning that picked flagged as the iPhone board screenshot ("Flag, reveal, solve.") — it's the only board state showing both revealed numbers and flags in progress, with nothing clock- or locale-derived.

Test plan

  • swift test --package-path Packages/MinesweeperKit --filter MinesweeperBoardRevealedSnapshotTests — 8/8 passed (2 new Mac tests green against recorded baselines)
  • swift test --package-path Packages/MinesweeperKit (full suite) — 375/375 passed
  • swiftlint lint --strict on the touched file — 0 violations
  • Recorded PNGs eyeballed at full resolution (1800×1200): both show the 9×9 beginner board with numbered 1–8 revealed cells, 3 placed flags, and the status bar / Reveal-mode toggle, in light and dark appearance

🤖 Generated with Claude Code

Minesweeper had no macOS Board snapshot — only Home/Daily/Stats. The
Board is the highest-content-fill macOS screen (per the Sudoku Mac
Board precedent) and is the planned hero frame for the macOS App
Store screenshots. Extend the existing `flagged` fixture (revealed
1-8 numbers + placed flags, no loss state) to light/dark Mac
variants, mirroring the Home/Daily mac pairing.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@wei18
wei18 merged commit cd8d816 into main Aug 3, 2026
5 checks passed
@wei18
wei18 deleted the test/minesweeper-mac-board-baseline branch August 3, 2026 09:42
wei18 added a commit that referenced this pull request Aug 4, 2026
The three numbers were cited across 29 comment/doc sites but no such
issues exist; every annotation describes work done in this PR itself, so
they now cite the PR number. #982 references verified real and kept.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
wei18 added a commit that referenced this pull request Aug 4, 2026
… fixes (#984)

* feat(store): add macOS APP_DESKTOP screenshots, fix completion/settings claim accuracy

Adds the macOS arm (2880x1800, 16:10) to build-ascspec-screenshots.py: a
copy-left/window-right layout (Mac chrome, never-upscale content crop) for
Sudoku Board/Home/Settings and Minesweeper Board/Home/Stats, data-driven via
the same SLOTS/COPY tables as the iPhone/iPad arms so slot names double as
the copy lookup key.

While auditing captions against their frames for this work, found and fixed
three defects, scoped narrowly so no already-uploaded iPhone/iPad slot other
than 04-completion changes a pixel:

- 04-completion (both apps, iPhone+iPad): subhead/chip claimed a "ranked"
  leaderboard slice that was deleted in #698 and has never rendered since
  v2.6. Rewritten to name only what the card shows (time, mistake count).
  Same fixture had real dead space above a bottom-anchored card that
  detect_content_bottom() (vertical-only) couldn't reach; added
  detect_content_bbox() (4-side) and a crop_all_sides path, capped at 1:1
  scale, used only for this slot.
- Sudoku 05-settings (iPhone+iPad+mac): "Zero tracking. No third-party
  SDKs." directly contradicted PrivacyInfo.xcprivacy (NSPrivacyTracking =
  true, 8 declared AdMob domains). Rewritten to sell only true, visible
  claims (languages, ads-removal purchase, Game Center) with zero
  privacy/tracking claim.
- Sudoku Settings snapshot fixture showed "Version 1.0.0" (shipping is
  2.6.0) because the test host never passed appVersion; live app is
  unaffected (reads CFBundleShortVersionString from Bundle.main). Fixed
  the fixture and re-recorded the 7 affected Settings baselines.

New/rewritten English copy is held to `en` only pending approval and an
ai-translated-localization pass (PENDING_TRANSLATION_SLOTS) — 30/42 mac
frames and all 4 completion/2 settings fixes are generated; the other 6
locales per pending slot are untouched until translated.

Also corrects two stale doc/comment claims caught in the same sweep: a
"Leaderboard screen" slot that no longer exists in the generator, and a
comment claiming Minesweeper has a 05-settings slot (it never has).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix(store): kinsoku-safe mac wrap + metric line-stacking, complete pending l10n

The ja mac Settings screenshot showed 「一」 overdrawn by a stray circle:
`_mac_wrap_text`'s grapheme fallback orphaned the headline's trailing 「。」
onto its own line, and `build_mac_asc_image`'s line-stacking measured ink
bbox height (near-zero for a punctuation-only line), so the subhead block
started too high and the orphaned 。 overlapped 一.

- `_apply_kinsoku()`: a line may never start with closing punctuation
  (。、.,!?…」』)】》〉!?,.;:) — pull the offending character(s) back
  onto the previous line, letting it overflow by that character's own
  advance. Wired into `_mac_wrap_text` only; the iPhone/iPad `wrap_text`
  path is untouched (no current iPhone/iPad headline/subhead hits this
  edge case, and touching it would reflow ja "02-daily", outside this
  fix's allowed scope).
- `build_mac_asc_image` line stacking now advances by a fixed per-font
  metric (`font.getmetrics()` ascent+descent) instead of a per-line ink
  bbox, so a low-ink line can no longer collapse into the next line.
- Minesweeper mac th "06-stats" headline still broke mid-word
  (บันทึกเวลาที่ดีที่สุ|ดทุกครั้ง) after the kinsoku fix — Thai carries no
  spaces, so the wrapper's word-split never had a break point. Rephrased
  to "เวลาที่ดีที่สุด บันทึกไว้ทุกครั้ง" (space at the natural phrase
  boundary, mirroring the two-clause "Every best time, saved.").

Also completes the ai-translated-localization pass predecessor work-in-
progress had reached: sudoku "04-completion"/"05-settings" and minesweeper
"04-completion"/"06-stats" now carry accuracy-fixed copy (no false
ranking/tracking claims) across all 7 locales; PENDING_TRANSLATION_SLOTS
is now empty. Full regen: 168/168 verified. iOS-frame scope confirmed
unchanged outside "04-completion" + Sudoku "05-settings".

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix(store): restore the "included" wording lost in the checkout-recovery

The PNG-transcription recovery of the copy table reverted the en settings
subhead to "built in.", reintroducing the orphaned-word wrap the wording
change existed to fix. Caught by a byte-exact spot-check against the
pre-accident greps; 10 of 11 strings matched, this one did not.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix(docs): replace fabricated forward issue refs #985-987 with #984

The three numbers were cited across 29 comment/doc sites but no such
issues exist; every annotation describes work done in this PR itself, so
they now cite the PR number. #982 references verified real and kept.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix(store): translate the completion callout chips in all 7 locales

CR blocker on #984: the CALLOUTS table still carried the pre-rewrite
"timed & ranked" chip text in the 6 non-en locales, and the present keys
meant the en fallback never fired, so 24 completion frames rendered the
false claim the PR exists to remove. All 12 strings now use the rewritten
wording, vocabulary lifted verbatim from the same slot's already-approved
COPY subhead translations.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs(store): update the translation-status note the callout fix made stale

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[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