Skip to content

Commit 91c25d8

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 <noreply@anthropic.com>
1 parent 02f50ce commit 91c25d8

2 files changed

Lines changed: 15 additions & 23 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Start `vp run dev:client` from `apps/mobile`, or reuse a healthy Metro belonging
4141
to this checkout. Open its printed development-client URL with AgentDevice
4242
`open com.t3tools.t3code.dev <url>` and all returned target arguments.
4343
The device must be able to reach both Metro and the isolated backend.
44+
Append `&disableAutoLaunch=1&disableFab=1` to the development-client URL query
45+
when developer chrome would obscure screenshots or taps; the SDK 58 dev client
46+
applies these preferences before the app loads.
4447

4548
## Pair and verify
4649

‎scripts/mobile-showcase.ts‎

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

968-
for (const [key, value] of [
969-
["EXDevMenuIsOnboardingFinished", "true"],
970-
["EXDevMenuShowFloatingActionButton", "false"],
971-
["EXDevMenuShowsAtLaunch", "false"],
972-
] as const) {
973-
await runCommand("xcrun", [
974-
"simctl",
975-
"spawn",
976-
simulator.udid,
977-
"defaults",
978-
"write",
979-
ANDROID_PACKAGE,
980-
key,
981-
"-bool",
982-
value,
983-
]);
984-
}
985-
986-
const metroUrl = `http://${metroHost}:${config.metroPort}?disableOnboarding=1`;
971+
// The dev-client launch URL carries the dev menu preferences (SDK 58), so
972+
// nothing is written into the app container ahead of launch.
973+
const metroUrl = `http://${metroHost}:${config.metroPort}?${DEV_CLIENT_LAUNCH_FLAGS}`;
987974
const scenePath = NodePath.join(
988975
await iosAppContainer(simulator.udid),
989976
"Library/Caches/T3ShowcaseScene",
@@ -1191,12 +1178,12 @@ async function writeAndroidShowcaseScene(serial: string, scene: ShowcaseScene):
11911178
]);
11921179
}
11931180

1181+
// Gesture and key-command toggles have no launch-URL flag, so they still go
1182+
// through the preferences file; onboarding, auto-launch and the floating button
1183+
// come from DEV_CLIENT_LAUNCH_FLAGS on the launch URL.
11941184
async function prepareAndroidShowcaseApp(serial: string): Promise<void> {
11951185
const preferences = `<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
11961186
<map>
1197-
<boolean name="isOnboardingFinished" value="true" />
1198-
<boolean name="showsAtLaunch" value="false" />
1199-
<boolean name="showFab" value="false" />
12001187
<boolean name="motionGestureEnabled" value="false" />
12011188
<boolean name="touchGestureEnabled" value="false" />
12021189
<boolean name="keyCommandsEnabled" value="false" />
@@ -1250,7 +1237,9 @@ async function captureAndroid(
12501237
await runAdb(serial, ["shell", "pm", "clear", ANDROID_PACKAGE]);
12511238
await prepareAndroidShowcaseApp(serial);
12521239
await runAdb(serial, ["reverse", `tcp:${config.metroPort}`, `tcp:${config.metroPort}`]);
1253-
const metroUrl = encodeURIComponent(`http://127.0.0.1:${config.metroPort}?disableOnboarding=1`);
1240+
const metroUrl = encodeURIComponent(
1241+
`http://127.0.0.1:${config.metroPort}?${DEV_CLIENT_LAUNCH_FLAGS}`,
1242+
);
12541243
const firstScene = capture.scenes[0] ?? "threads";
12551244
await runAdb(serial, [
12561245
"shell",

0 commit comments

Comments
 (0)