Skip to content

Commit 584c932

Browse files
juliusmarmingecodex
andcommitted
fix(mobile): generate upload-ready store screenshots
Co-authored-by: codex <[email protected]>
1 parent 63bf6a2 commit 584c932

8 files changed

Lines changed: 502 additions & 71 deletions

File tree

‎.github/workflows/mobile-showcase-screenshots.yml‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ env:
2121

2222
jobs:
2323
ios:
24-
name: iPhone and iPad
24+
name: iPhone 6.9, iPhone 6.5, and iPad 13
2525
if: inputs.platform == 'all' || inputs.platform == 'ios'
2626
runs-on: blacksmith-12vcpu-macos-26
27-
timeout-minutes: 45
27+
timeout-minutes: 60
2828
steps:
2929
- name: Checkout
3030
uses: actions/checkout@v6
@@ -46,20 +46,23 @@ jobs:
4646
- name: Capture iOS showcase
4747
run: pnpm screenshots:mobile --platform ios
4848

49+
- name: Validate App Store Connect assets
50+
run: pnpm screenshots:mobile --platform ios --validate-only
51+
4952
- name: Upload iOS screenshots
5053
if: always()
5154
uses: actions/upload-artifact@v7
5255
with:
53-
name: app-store-screenshots-ios
54-
path: artifacts/app-store/screenshots/*.png
56+
name: app-store-connect-screenshots
57+
path: artifacts/app-store/screenshots/apple/
5558
if-no-files-found: warn
5659
retention-days: 14
5760

5861
android:
59-
name: Pixel phone and tablet
62+
name: Android phone, 7-inch tablet, and 10-inch tablet
6063
if: inputs.platform == 'all' || inputs.platform == 'android'
6164
runs-on: blacksmith-16vcpu-ubuntu-2404
62-
timeout-minutes: 45
65+
timeout-minutes: 60
6366
env:
6467
T3_SHOWCASE_ANDROID_ABI: x86_64
6568
steps:
@@ -109,11 +112,14 @@ jobs:
109112
disable-animations: false
110113
script: pnpm screenshots:mobile --platform android
111114

115+
- name: Validate Google Play assets
116+
run: pnpm screenshots:mobile --platform android --validate-only
117+
112118
- name: Upload Android screenshots
113119
if: always()
114120
uses: actions/upload-artifact@v7
115121
with:
116-
name: app-store-screenshots-android
117-
path: artifacts/app-store/screenshots/*.png
122+
name: google-play-screenshots
123+
path: artifacts/app-store/screenshots/google-play/
118124
if-no-files-found: warn
119125
retention-days: 14

‎docs/operations/mobile-app-store-screenshots.md‎

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ The command:
2828
4. Starts an isolated Metro server, builds the selected native apps, and boots each device.
2929
5. Pairs each clean app installation with Moonbase Terminal, Suspense Station, and Kernel Cabin.
3030
6. Navigates to the real application route for every requested scene.
31-
7. Normalizes appearance and status bars and writes exact-size PNGs to
32-
artifacts/app-store/screenshots/.
31+
7. Normalizes appearance and status bars, converts captures to 24-bit RGB PNGs without alpha, and
32+
validates dimensions, aspect ratio, file size, and screenshot count before succeeding.
33+
8. Writes store-ready folders beneath `artifacts/app-store/screenshots/` that can be uploaded
34+
directly to App Store Connect or Google Play Console.
3335

3436
The servers, Metro, temporary root directory, and devices started by the runner are cleaned up after
3537
capture. Pass `--keep-running` to retain them for inspection; the runner prints the base-directory
@@ -47,13 +49,30 @@ worktree cannot accidentally provide the bundle being photographed.
4749

4850
The default matrix is:
4951

50-
- iphone-6.9: iPhone 17 Pro Max
51-
- ipad-13: iPad Pro 13-inch (M5)
52-
- pixel: Pixel 10 Pro Android AVD
53-
- android-tablet: Pixel Android AVD rendered at an 800dp tablet viewport
54-
55-
Each device captures the thread, terminal, review, thread list, and environments scenes, for 20
56-
PNG files in the complete matrix.
52+
| Output folder | Capture target | Upload dimensions | Store slot |
53+
| ------------------------ | ------------------------- | ----------------- | ----------------------------------------- |
54+
| `apple/iphone-6.9/` | iPhone 17 Pro Max | 1320×2868 | App Store Connect iPhone 6.9-inch |
55+
| `apple/iphone-6.5/` | disposable iPhone 14 Plus | 1284×2778 | App Store Connect iPhone 6.5-inch |
56+
| `apple/ipad-13/` | iPad Pro 13-inch (M5) | 2064×2752 | App Store Connect iPad 13-inch |
57+
| `google-play/phone/` | Pixel AVD at 420 dpi | 1080×1920 | Google Play phone, portrait 9:16 |
58+
| `google-play/tablet-7/` | Pixel AVD at 600dp width | 1080×1920 | Google Play 7-inch tablet, portrait 9:16 |
59+
| `google-play/tablet-10/` | Pixel AVD at 800dp width | 1440×2560 | Google Play 10-inch tablet, portrait 9:16 |
60+
61+
Each target captures thread, terminal, review, thread list, and environments, producing 30 PNG
62+
files in a complete matrix. Five screenshots satisfy the configured Apple limit of 1–10, Google
63+
phone requirement of 2–8, and Google tablet recommendation/slot minimum of 4 with a maximum of 8.
64+
65+
The generated tree is deliberately aligned with the store upload fields:
66+
67+
artifacts/app-store/screenshots/
68+
├── apple/
69+
│ ├── iphone-6.9/{thread,terminal,review,threads,environments}.png
70+
│ ├── iphone-6.5/{thread,terminal,review,threads,environments}.png
71+
│ └── ipad-13/{thread,terminal,review,threads,environments}.png
72+
└── google-play/
73+
├── phone/{thread,terminal,review,threads,environments}.png
74+
├── tablet-7/{thread,terminal,review,threads,environments}.png
75+
└── tablet-10/{thread,terminal,review,threads,environments}.png
5776

5877
Edit [mobile-showcase.config.ts](../../scripts/mobile-showcase.config.ts) to change simulator or AVD
5978
names, light/dark appearance, scenes, output directory, capture delay, Android ABI, or viewport.
@@ -62,12 +81,13 @@ names, light/dark appearance, scenes, output directory, capture delay, Android A
6281

6382
Run the `Mobile Showcase Screenshots` workflow from GitHub's Actions tab and choose `all`, `ios`, or
6483
`android`. The default `all` dispatch runs iOS and Android concurrently: iPhone and iPad capture on a
65-
12-vCPU Blacksmith macOS runner, while Pixel phone and tablet capture on a 16-vCPU Blacksmith Linux
66-
runner with a KVM-accelerated x86_64 emulator.
84+
12-vCPU Blacksmith macOS runner, while Android phone, 7-inch tablet, and 10-inch tablet capture on a
85+
16-vCPU Blacksmith Linux runner with a KVM-accelerated x86_64 emulator.
6786

6887
Every job uploads its PNGs even when a later capture fails, which makes partial runs useful for
69-
diagnosis. Download `app-store-screenshots-ios` and `app-store-screenshots-android` from the workflow
70-
run's Artifacts section. Artifacts are retained for 14 days.
88+
diagnosis. Download `app-store-connect-screenshots` and `google-play-screenshots` from the workflow
89+
run's Artifacts section. Each job runs validation again immediately before upload. Artifacts are
90+
retained for 14 days.
7191

7292
The workflow uses the same checked-in device and scene matrix as local capture. Android remains
7393
ARM64 by default for local Apple Silicon development; CI sets `T3_SHOWCASE_ANDROID_ABI=x86_64` so the
@@ -93,6 +113,11 @@ List the matrix and flags:
93113

94114
pnpm screenshots:mobile --list
95115

116+
Validate existing files without starting Metro, servers, simulators, or emulators:
117+
118+
pnpm screenshots:mobile --validate-only
119+
pnpm screenshots:mobile --platform ios --validate-only
120+
96121
## Customize the seeded environment
97122

98123
- Project repository, thread projections, conversation, terminal transcript, and Git changes:
@@ -121,5 +146,7 @@ remote-first while the harness retains reliable loopback connections to its ephe
121146
- iOS: Xcode command-line tools, the configured simulator runtimes, and installed CocoaPods.
122147
- Android: ANDROID_HOME (or the default macOS SDK path), adb, emulator, and the configured AVD.
123148

124-
For store submission, keep generated PNGs unscaled. Configure device classes and Android viewport
125-
dimensions that match the exact upload slots.
149+
The harness is the source of truth for upload dimensions; do not resize its output. If store rules
150+
change, update the target's `storeAsset` specification. Capture fails when a PNG is the wrong size,
151+
has alpha, is not 8-bit RGB, exceeds the configured file-size limit, violates Google Play's 9:16
152+
shape/bounds, or leaves a full output set below its store minimum.

‎pnpm-lock.yaml‎

Lines changed: 20 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ overrides:
9292
yaml: "catalog:"
9393

9494
packageExtensions:
95+
"@clerk/expo@*":
96+
dependencies:
97+
"@expo/config-plugins": 56.0.9
9598
"@effect/vitest@*":
9699
dependencies:
97100
vite-plus: "catalog:"

0 commit comments

Comments
 (0)