Skip to content

Commit da341f9

Browse files
chore(mobile): drive dev-menu suppression from the dev-client launch URL
expo-dev-launcher 58 reads disableFab=1 and disableAutoLaunch=1 off the manifest URL and updates the dev menu preferences before the app loads. The showcase screenshot harness used to write those preferences straight into the app container on both platforms; it now puts the flags on the launch URL instead, keeping only the gesture toggles that have no URL form. The mobile test skill mentions the flags for the same purpose. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent daa5230 commit da341f9

2 files changed

Lines changed: 13 additions & 24 deletions

File tree

‎.agents/skills/test-t3-mobile/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ After `ensure` succeeds, open the Metro URL:
108108
xcrun simctl openurl <simulator-udid> <printed-dev-client-url>
109109
```
110110

111-
Accept the iOS confirmation prompt and dismiss the developer menu when it obscures the app.
111+
Accept the iOS confirmation prompt. Append `&disableAutoLaunch=1&disableFab=1` to the URL's query when the developer menu or its floating button would get in the way of screenshots or taps; the dev client applies them before the app loads.
112112

113113
### Android launch
114114

‎scripts/mobile-showcase.ts‎

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ const REPO_ROOT = NodePath.resolve(NodePath.dirname(NodeURL.fileURLToPath(import
3535
const MOBILE_ROOT = NodePath.join(REPO_ROOT, "apps/mobile");
3636
const ANDROID_PACKAGE = "com.t3tools.t3code";
3737
const APP_SCHEME = "t3code";
38+
// expo-dev-launcher reads these off the manifest URL and updates the dev menu
39+
// preferences before the app loads, keeping captures free of dev chrome.
40+
const DEV_CLIENT_LAUNCH_FLAGS = "disableOnboarding=1&disableFab=1&disableAutoLaunch=1";
3841
const IOS_READY_FILENAME = "T3ShowcaseReadyScene";
3942
const SERVER_HOST = "0.0.0.0";
4043
const IOS_SIMULATOR_ARCH = NodeProcess.arch === "arm64" ? "arm64" : "x86_64";
@@ -978,25 +981,9 @@ async function captureIos(
978981
await runCommand("xcrun", ["simctl", "install", simulator.udid, appPath]);
979982
}
980983

981-
for (const [key, value] of [
982-
["EXDevMenuIsOnboardingFinished", "true"],
983-
["EXDevMenuShowFloatingActionButton", "false"],
984-
["EXDevMenuShowsAtLaunch", "false"],
985-
] as const) {
986-
await runCommand("xcrun", [
987-
"simctl",
988-
"spawn",
989-
simulator.udid,
990-
"defaults",
991-
"write",
992-
ANDROID_PACKAGE,
993-
key,
994-
"-bool",
995-
value,
996-
]);
997-
}
998-
999-
const metroUrl = `http://${metroHost}:${config.metroPort}?disableOnboarding=1`;
984+
// The dev-client launch URL carries the dev menu preferences (SDK 58), so
985+
// nothing is written into the app container ahead of launch.
986+
const metroUrl = `http://${metroHost}:${config.metroPort}?${DEV_CLIENT_LAUNCH_FLAGS}`;
1000987
const scenePath = NodePath.join(
1001988
await iosAppContainer(simulator.udid),
1002989
"Library/Caches/T3ShowcaseScene",
@@ -1204,12 +1191,12 @@ async function writeAndroidShowcaseScene(serial: string, scene: ShowcaseScene):
12041191
]);
12051192
}
12061193

1194+
// Gesture and key-command toggles have no launch-URL flag, so they still go
1195+
// through the preferences file; onboarding, auto-launch and the floating button
1196+
// come from DEV_CLIENT_LAUNCH_FLAGS on the launch URL.
12071197
async function prepareAndroidShowcaseApp(serial: string): Promise<void> {
12081198
const preferences = `<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
12091199
<map>
1210-
<boolean name="isOnboardingFinished" value="true" />
1211-
<boolean name="showsAtLaunch" value="false" />
1212-
<boolean name="showFab" value="false" />
12131200
<boolean name="motionGestureEnabled" value="false" />
12141201
<boolean name="touchGestureEnabled" value="false" />
12151202
<boolean name="keyCommandsEnabled" value="false" />
@@ -1263,7 +1250,9 @@ async function captureAndroid(
12631250
await runAdb(serial, ["shell", "pm", "clear", ANDROID_PACKAGE]);
12641251
await prepareAndroidShowcaseApp(serial);
12651252
await runAdb(serial, ["reverse", `tcp:${config.metroPort}`, `tcp:${config.metroPort}`]);
1266-
const metroUrl = encodeURIComponent(`http://127.0.0.1:${config.metroPort}?disableOnboarding=1`);
1253+
const metroUrl = encodeURIComponent(
1254+
`http://127.0.0.1:${config.metroPort}?${DEV_CLIENT_LAUNCH_FLAGS}`,
1255+
);
12671256
const firstScene = capture.scenes[0] ?? "threads";
12681257
await runAdb(serial, [
12691258
"shell",

0 commit comments

Comments
 (0)