Skip to content

feat(app-store): ASC-spec submission screenshots from snapshot harness — 17 PNGs, iPad gap closed (#311b) - #365

Merged
wei18 merged 2 commits into
mainfrom
feat/asc-screenshots-from-harness-311b
Jun 5, 2026
Merged

wei18 merged 2 commits into
mainfrom
feat/asc-screenshots-from-harness-311b

Conversation

@wei18

@wei18 wei18 commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Follow-up to #311 (preview-only). Per your direction: drive device+size FROM the snapshot tests → exact ASC pixel size + opaque = submission-ready (no upscale, no alpha-strip).

New ASCScreenshotRender harness + gated emit tests. 17 PNGs, ALL sips-verified opaque (hasAlpha:no) + exact: iPhone 6.9" 1290×2796, iPad 13" 2064×2752 (gap CLOSED — rendered fresh), Mac 2880×1800. 46–72KB each (real content). Harness compile-verified by subagent; emit + sips-verify run by Leader (emit denied at subagent layer). Regenerate: ASC_EMIT_SCREENSHOTS=1 swift test --filter ASCScreenshotEmitTests. Additive/test-only.

🤖 Generated with Claude Code

wei18 and others added 2 commits June 5, 2026 20:31
…ot harness (#311b)

Render the real SwiftUI screens through the existing NSHostingView harness at
EXACT App Store Connect device pixel sizes onto an OPAQUE theme background, so
the captured PNG IS a submission-ready screenshot — crisp/native, no upscale,
no alpha-strip. Supersedes the old symlink "preview" tree, whose own README gap
table admits its output is wrong-size + RGBA and ASC-rejected.

- ASCScreenshotRender (Sudoku + Minesweeper): manual-sized NSBitmapImageRep
  (pixelsWide/High = exact ASC pixels, rep.size = ASC points → implied scale),
  hasAlpha:false + ZStack-over-opaque-theme-background → no alpha channel.
  Profiles: iPhone 6.9" 1290x2796 (430x932@3x), iPad 13" 2064x2752
  (1032x1376@2x), Mac 2880x1800 (1440x900@2x).
- ASCScreenshotEmitTests: deterministic fixtures mirrored from the existing
  snapshot suites (no Date.now/RNG); writes real PNGs to
  docs/app-store/screenshots/<app>/<device>/<locale>/NN-screen.png. iPad
  rendered fresh — fixes the #311 iPad gap (Home + Board per app).
- Gated behind ASC_EMIT_SCREENSHOTS=1 (.enabled(if:)) so a normal `swift test`
  skips all emit tests and never rewrites committed assets. Additive/test-only;
  production rendering and existing baselines untouched.

Verified: both test targets build clean; gate confirmed (9 Sudoku + 8 MS emit
tests skip without the flag). CAVEAT: the emit run itself (ASC_EMIT_SCREENSHOTS=1)
is blocked by this environment's command-permission policy, so no PNGs are
committed and none were sips-verified here — regeneration command + verification
steps are documented in the impl-notes. Per the HONEST constraint, no blank/
wrong-size PNG was committed.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ot harness (#311b)

Renders the real SwiftUI screens at EXACT ASC device pixel sizes onto an opaque
background — the captured PNG IS submission-ready (no upscale, no alpha-strip),
per the user's direction to drive device+size from the snapshot tests.

17 PNGs, all verified opaque (hasAlpha:no) + exact dims via sips:
- iPhone 6.9": 1290×2796 (Sudoku Home/Daily/Board/Completion/Settings; MS Home/Daily/Board/Completion)
- iPad 13": 2064×2752 (Home+Board per app — rendered fresh, closes the #311 iPad gap)
- Mac: 2880×1800 (Sudoku Home/Board; MS Home/Daily)
Gated on ASC_EMIT_SCREENSHOTS=1 (normal swift test skips). Emitted by Leader.

Co-Authored-By: Claude Opus 4.8 <[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