The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): capture folded and unfolded Duo store screenshots (#23849)
Julius Marminge committed
Oct 22, 2026 at 15:18 UTC
ff31a2a62b6b56e877b3b6baa6c901f10d603060
5 files changed
+113
-56
.github/workflows/mobile-showcase-screenshots.yml
+4
-1
@@ -43,7 +43,7 @@ env:
43
44
jobs:
45
ios:
46
- name: iPhone 6.9, iPhone 6.5, and iPad 13
46
+ name: iPhone, iPhone Duo, and iPad 13
47
if: inputs.platform == 'all' || inputs.platform == 'ios'
48
runs-on: blacksmith-12vcpu-macos-26
49
# Capturing every palette multiplies the device matrix by six, and only the
@@ -87,6 +87,9 @@ jobs:
87
brew install cameroncooke/axe/axe
88
axe --version
89
90
+ - name: Install foldable simulator controls
91
+ run: npm install --global agent-device@0.21.25
92
+
93
- name: Capture iOS showcase
94
run: pnpm screenshots:mobile --platform ios --appearance "${{ inputs.appearance }}" --theme "${{ inputs.theme }}"
95
apps/mobile/src/features/showcase/ShowcaseCaptureCoordinator.tsx
+27
-40
@@ -1,13 +1,8 @@
1
import { useEffect, useRef, useState, useSyncExternalStore } from "react";
2
import { Keyboard, View } from "react-native";
3
-import {
4
- CommonActions,
5
- type NavigationState,
6
- type PartialState,
7
- StackActions,
8
- useNavigation,
9
-} from "@react-navigation/native";
3
+import { CommonActions, StackActions, useNavigation } from "@react-navigation/native";
4
import { AsyncResult } from "effect/reactivity";
5
+import { requireOptionalNativeModule } from "expo";
6
7
import { useConnectionController } from "../connection/useConnectionController";
8
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
@@ -42,8 +37,6 @@ import { stageShowcaseAgentActivity } from "./stageShowcaseAgentActivity";
37
const SHOWCASE_ENABLED = process.env.EXPO_PUBLIC_SHOWCASE === "1";
38
const SHOWCASE_THREAD_ID = "remote-command-center";
39
45
-type ShowcaseResetRoute = PartialState<NavigationState>["routes"][number];
46
-
40
function sceneFromPathname(pathname: string): ShowcaseScene | null {
41
const routePath = pathname.split(/[?#]/u, 1)[0] ?? pathname;
42
if (routePath === "/settings" || routePath.endsWith("/settings/environments")) {
@@ -63,6 +56,18 @@ export function ShowcaseCaptureCoordinator(props: { readonly pathname: string })
56
57
function EnabledShowcaseCaptureCoordinator(props: { readonly pathname: string }) {
58
const navigation = useNavigation();
59
+ useEffect(() => {
60
+ const menu = requireOptionalNativeModule<{
61
+ closeMenu(): void;
62
+ setToolsButtonVisible(visible: boolean): void;
63
+ }>("ExpoDevMenu");
64
+ // The dev menu can open after bundle loading and block orientation requests.
65
+ const timer = setInterval(() => {
66
+ menu?.closeMenu();
67
+ menu?.setToolsButtonVisible(false);
68
+ }, 1_000);
69
+ return () => clearInterval(timer);
70
+ }, []);
71
const { connectPairingUrl } = useConnectionController();
72
const {
73
isReady: appearancePreferencesReady,
@@ -237,40 +242,22 @@ function EnabledShowcaseCaptureCoordinator(props: { readonly pathname: string })
242
navigation.dispatch(CommonActions.reset({ index: 0, routes: [{ name: "Home" }] }));
243
return;
244
}
240
- const routes: ShowcaseResetRoute[] = [{ name: "Home" }];
245
if (requestedScene === "environments") {
242
- routes.push({
243
- name: "SettingsSheet",
244
- state: {
245
- index: 0,
246
- routes: [
247
- {
248
- name: "SettingsContent",
249
- state: {
250
- index: 1,
251
- routes: [{ name: "Settings" }, { name: "SettingsEnvironments" }],
252
- },
253
- },
254
- ],
255
- },
256
- });
246
+ navigation.dispatch(
247
+ CommonActions.navigate("SettingsSheet", {
248
+ screen: "SettingsContent",
249
+ params: { screen: "SettingsEnvironments" },
250
+ }),
251
+ );
252
+ } else if (requestedScene === "terminal") {
253
+ navigation.dispatch(
254
+ CommonActions.navigate("ThreadTerminal", { ...params, terminalId: "term-1" }),
255
+ );
256
+ } else if (requestedScene === "review") {
257
+ navigation.dispatch(CommonActions.navigate("ThreadReview", params));
258
} else {
258
- routes.push({ name: "Thread", params });
259
- if (requestedScene === "terminal") {
260
- routes.push({
261
- name: "ThreadTerminal",
262
- params: { ...params, terminalId: "term-1" },
263
- });
264
- } else if (requestedScene === "review") {
265
- routes.push({ name: "ThreadReview", params });
266
- }
259
+ navigation.dispatch(CommonActions.navigate("Thread", params));
260
}
268
- navigation.dispatch(
269
- CommonActions.reset({
270
- index: routes.length - 1,
271
- routes,
272
- }),
273
- );
261
}, [hasFixture, navigation, requestedScene, scene, showcaseThread]);
262
263
useEffect(() => {
docs/operations/mobile-app-store-screenshots.md
+24
-13
@@ -52,8 +52,8 @@ verify process ownership. Concurrent screenshot harnesses in different worktrees
52
collide or attach to the wrong Metro process.
53
54
Every configured device defaults to dark appearance and the `t3-code` palette, so plain
55
-`pnpm screenshots:mobile` produces 35 dark PNGs. Pass `--appearance light`, `--appearance dark`, or
56
-`--appearance both` to override the configured appearance; `both` produces 70 PNGs.
55
+`pnpm screenshots:mobile` produces 45 dark PNGs. Pass `--appearance light`, `--appearance dark`, or
56
+`--appearance both` to override the configured appearance; `both` produces 90 PNGs.
57
58
Pass `--theme <id>` (repeatable) or `--theme all` to capture the app's other palettes: `t3-code`,
59
`t3-chat`, `grove`, `ocean`, `ember`, and `iris`. The runner hands the palette to the app as a launch
@@ -63,18 +63,26 @@ multiplies the run by six; only the native build is shared.
63
64
The default matrix is:
65
66
-| Output folder | Capture target | Upload dimensions | Store slot |
67
-| ------------------------------------- | ---------------------------- | ----------------- | ----------------------------------------- |
68
-| `apple/iphone-6.9/dark/t3-code/` | disposable iPhone 17 Pro Max | 1320×2868 | App Store Connect iPhone 6.9-inch |
69
-| `apple/iphone-6.5/dark/t3-code/` | disposable iPhone 14 Plus | 1284×2778 | App Store Connect iPhone 6.5-inch |
70
-| `apple/ipad-13/dark/t3-code/` | iPad Pro 13-inch (M5) | 2752×2064 | App Store Connect iPad 13-inch, landscape |
71
-| `google-play/phone/dark/t3-code/` | Pixel AVD at 420 dpi | 1080×1920 | Google Play phone, portrait 9:16 |
72
-| `google-play/tablet-7/dark/t3-code/` | Pixel AVD at 600dp width | 1080×1920 | Google Play 7-inch tablet, portrait 9:16 |
73
-| `google-play/tablet-10/dark/t3-code/` | Pixel AVD at 800dp width | 1440×2560 | Google Play 10-inch tablet, portrait 9:16 |
74
-
75
-Each target captures thread, terminal, review, thread list, and environments, and every target but
76
-the iPad also captures agent activity. Each palette folder's five or six screenshots satisfy the configured Apple limit of 1–10, Google
66
+| Output folder | Capture target | Upload dimensions | Store slot |
67
+| --------------------------------------- | ------------------------------ | ----------------- | ----------------------------------------- |
68
+| `apple/iphone-6.9/dark/t3-code/` | disposable iPhone 17 Pro Max | 1320×2868 | App Store Connect iPhone 6.9-inch |
69
+| `apple/iphone-6.5/dark/t3-code/` | disposable iPhone 14 Plus | 1284×2778 | App Store Connect iPhone 6.5-inch |
70
+| `apple/iphone-duo-closed/dark/t3-code/` | iPhone Duo, folded portrait | 1398×2034 | App Store Connect iPhone Duo |
71
+| `apple/iphone-duo-open/dark/t3-code/` | iPhone Duo, unfolded landscape | 2853×2007 | App Store Connect iPhone Duo |
72
+| `apple/ipad-13/dark/t3-code/` | iPad Pro 13-inch (M5) | 2752×2064 | App Store Connect iPad 13-inch, landscape |
73
+| `google-play/phone/dark/t3-code/` | Pixel AVD at 420 dpi | 1080×1920 | Google Play phone, portrait 9:16 |
74
+| `google-play/tablet-7/dark/t3-code/` | Pixel AVD at 600dp width | 1080×1920 | Google Play 7-inch tablet, portrait 9:16 |
75
+| `google-play/tablet-10/dark/t3-code/` | Pixel AVD at 800dp width | 1440×2560 | Google Play 10-inch tablet, portrait 9:16 |
76
+
77
+Each target captures thread, terminal, review, thread list, and environments, and every target except
78
+the iPad and Duo also captures agent activity. Each palette folder's five or six screenshots satisfy the configured Apple limit of 1–10, Google
79
phone requirement of 2–8, and Google tablet recommendation/slot minimum of 4 with a maximum of 8.
80
+The two Duo folders each contain five scenes and upload to the same iPhone Duo slot (ten images
81
+total). They omit agent activity to stay within that shared limit. Duo capture requires
82
+an installed iOS runtime that supports iPhone Duo and `agent-device` on PATH, or
83
+`AGENT_DEVICE_PATH` pointing to its executable; it sets and verifies the
84
+simulator fold pose before launching the app.
85
+
86
Every palette gets its own leaf folder so one upload slot never mixes themes and each folder keeps a
87
store-legal screenshot count.
88
@@ -93,6 +101,8 @@ The generated tree is deliberately aligned with the store upload fields:
101
├── apple/
102
│ ├── iphone-6.9/dark/t3-code/{thread,terminal,review,threads,environments,agent-activity}.png
103
│ ├── iphone-6.5/dark/t3-code/{thread,terminal,review,threads,environments,agent-activity}.png
104
+ │ ├── iphone-duo-closed/dark/t3-code/{thread,terminal,review,threads,environments}.png
105
+ │ ├── iphone-duo-open/dark/t3-code/{thread,terminal,review,threads,environments}.png
106
│ └── ipad-13/dark/t3-code/{thread,terminal,review,threads,environments}.png
107
└── google-play/
108
├── phone/dark/t3-code/{thread,terminal,review,threads,environments,agent-activity}.png
@@ -131,6 +141,7 @@ debug APK matches its accelerated emulator.
141
142
Capture one scene or device:
143
144
+ pnpm screenshots:mobile --device iphone-duo-closed --device iphone-duo-open
145
pnpm screenshots:mobile --device iphone-6.9 --scene thread
146
pnpm screenshots:mobile --platform android --scene review
147
scripts/mobile-showcase.config.ts
+21
@@ -33,6 +33,7 @@ export interface ShowcaseIosDevice {
33
readonly appearance: ShowcaseAppearance;
34
readonly theme: ShowcaseTheme;
35
readonly orientation?: "portrait" | "landscape";
36
+ readonly fold?: "closed" | "open";
37
readonly scenes: ReadonlyArray<ShowcaseScene>;
38
readonly storeAsset: ShowcaseStoreAssetSpec;
39
}
@@ -117,6 +118,26 @@ const config: ShowcaseConfig = {
118
maximumUploadCount: 10,
119
},
120
},
121
+ ...(["closed", "open"] as const).map((fold): ShowcaseIosDevice => ({
122
+ id: `iphone-duo-${fold}`,
123
+ platform: "ios",
124
+ simulator: `T3 Showcase iPhone Duo ${fold}`,
125
+ simulatorDeviceType: "com.apple.CoreSimulator.SimDeviceType.iPhone-Duo",
126
+ appearance: "dark",
127
+ theme: DEFAULT_SHOWCASE_THEME,
128
+ orientation: fold === "closed" ? "portrait" : "landscape",
129
+ fold,
130
+ // Both poses share one ten-image App Store slot.
131
+ scenes: ["thread", "terminal", "review", "threads", "environments"],
132
+ storeAsset: {
133
+ store: "apple",
134
+ directory: `apple/iphone-duo-${fold}`,
135
+ width: fold === "closed" ? 1398 : 2853,
136
+ height: fold === "closed" ? 2034 : 2007,
137
+ minimumUploadCount: 1,
138
+ maximumUploadCount: 5,
139
+ },
140
+ })),
141
{
142
id: "ipad-13",
143
platform: "ios",
scripts/mobile-showcase.ts
+37
-2
@@ -1089,6 +1089,23 @@ async function captureIos(
1089
if (capture.device.orientation === "landscape") {
1090
await ensureIosFullScreenAppsMode(simulator.udid);
1091
}
1092
+ if (capture.device.fold) {
1093
+ const command = NodeProcess.env.AGENT_DEVICE_PATH ?? "agent-device";
1094
+ const target = [
1095
+ "--platform",
1096
+ "ios",
1097
+ "--udid",
1098
+ simulator.udid,
1099
+ "--session",
1100
+ `showcase-${simulator.udid}`,
1101
+ ];
1102
+ await runCommand(command, ["open", ...target]);
1103
+ try {
1104
+ await runCommand(command, ["fold", capture.device.fold, ...target]);
1105
+ } finally {
1106
+ await runCommand(command, ["close", ...target]);
1107
+ }
1108
+ }
1109
await normalizeIosSimulator(capture.appearance, simulator.udid);
1110
if (appPath) {
1111
await runCommand("xcrun", ["simctl", "uninstall", simulator.udid, ANDROID_PACKAGE]).catch(
@@ -1164,14 +1181,21 @@ async function captureIos(
1181
showcaseCaptureDirectory(outputDirectory, capture),
1182
`${scene}.png`,
1183
);
1167
- await runCommand("xcrun", ["simctl", "io", simulator.udid, "screenshot", destination]);
1184
+ await runCommand("xcrun", [
1185
+ "simctl",
1186
+ "io",
1187
+ simulator.udid,
1188
+ "screenshot",
1189
+ ...(capture.device.fold ? ["--display", capture.device.fold === "closed" ? "1" : "3"] : []),
1190
+ destination,
1191
+ ]);
1192
if (capture.device.orientation === "landscape") {
1193
// A headless simulator keeps its display portrait while the rotated app
1194
// renders sideways inside it; with Simulator.app attached the display
1195
// itself rotates. Only post-rotate the former.
1196
const { width, height } = readPngDimensions(await NodeFSP.readFile(destination));
1197
if (height > width) {
1174
- await runCommand("sips", ["--rotate", "270", destination]);
1198
+ await runCommand("sips", ["--rotate", capture.device.fold ? "90" : "270", destination]);
1199
}
1200
}
1201
if (scene === "agent-activity") await unlockIosSimulator(simulator.udid);
@@ -1533,6 +1557,17 @@ async function main(): Promise<void> {
1557
showcaseServers.push(server);
1558
await waitForPort(port, `${environment.label} server`);
1559
await seedShowcaseEnvironment({ baseDir, projectIds: environment.projectIds });
1560
+ // Legacy fixture threads are imported into V2 during server startup.
1561
+ await stopProcess(server);
1562
+ const seededServer = startShowcaseServer(
1563
+ baseDir,
1564
+ workspaceRoot,
1565
+ port,
1566
+ shellPath,
1567
+ labelProbeDirectory,
1568
+ );
1569
+ showcaseServers.push(seededServer);
1570
+ await waitForPort(port, `${environment.label} seeded server`);
1571
// The server begins listening before the ServerEnvironment layer
1572
// persists the environment id, so poll rather than read once.
1573
const environmentId = await waitForFileContent(