authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-10-01 10:51:24-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-01 10:51:24-07:00
logce920f2ac893051bff2108c03346bd35340fd988
treedc3982159929a65b88c56b811c45da732c6e1b37
parent438af295fefdd04cc38629f902d7faa07cf39712
signature Signed by PGP key B5690EEEBB952194

chore(mobile): drive dev-menu suppression from the dev-client launch URL (#12049)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

2 files changed, 13 insertions(+), 23 deletions(-)

.agents/skills/test-t3-mobile/SKILL.md+3
...@@ -41,6 +41,9 @@ Start `vp run dev:client` from `apps/mobile`, or reuse a healthy Metro belonging...@@ -41,6 +41,9 @@ Start `vp run dev:client` from `apps/mobile`, or reuse a healthy Metro belonging
41to this checkout. Open its printed development-client URL with AgentDevice41to this checkout. Open its printed development-client URL with AgentDevice
42`open com.t3tools.t3code.dev <url>` and all returned target arguments.42`open com.t3tools.t3code.dev <url>` and all returned target arguments.
43The device must be able to reach both Metro and the isolated backend.43The device must be able to reach both Metro and the isolated backend.
44Append `&disableAutoLaunch=1&disableFab=1` to the development-client URL query
45when developer chrome would obscure screenshots or taps; the SDK 58 dev client
46applies these preferences before the app loads.
4447
45## Pair and verify48## Pair and verify
4649
scripts/mobile-showcase.ts+10-23
...@@ -34,6 +34,9 @@ const REPO_ROOT = NodePath.resolve(NodePath.dirname(NodeURL.fileURLToPath(import...@@ -34,6 +34,9 @@ const REPO_ROOT = NodePath.resolve(NodePath.dirname(NodeURL.fileURLToPath(import
34const MOBILE_ROOT = NodePath.join(REPO_ROOT, "apps/mobile");34const MOBILE_ROOT = NodePath.join(REPO_ROOT, "apps/mobile");
35const ANDROID_PACKAGE = "com.t3tools.t3code";35const ANDROID_PACKAGE = "com.t3tools.t3code";
36const APP_SCHEME = "t3code";36const APP_SCHEME = "t3code";
37// expo-dev-launcher reads these off the manifest URL and updates the dev menu
38// preferences before the app loads, keeping captures free of dev chrome.
39const DEV_CLIENT_LAUNCH_FLAGS = "disableOnboarding=1&disableFab=1&disableAutoLaunch=1";
37const IOS_READY_FILENAME = "T3ShowcaseReadyScene";40const IOS_READY_FILENAME = "T3ShowcaseReadyScene";
38const SERVER_HOST = "0.0.0.0";41const SERVER_HOST = "0.0.0.0";
39const IOS_SIMULATOR_ARCH = NodeProcess.arch === "arm64" ? "arm64" : "x86_64";42const IOS_SIMULATOR_ARCH = NodeProcess.arch === "arm64" ? "arm64" : "x86_64";
...@@ -1107,25 +1110,9 @@ async function captureIos(...@@ -1107,25 +1110,9 @@ async function captureIos(
1107 await runCommand("xcrun", ["simctl", "install", simulator.udid, appPath]);1110 await runCommand("xcrun", ["simctl", "install", simulator.udid, appPath]);
1108 }1111 }
11091112
1110 for (const [key, value] of [1113 // The dev-client launch URL carries the dev menu preferences (SDK 58), so
1111 ["EXDevMenuIsOnboardingFinished", "true"],1114 // nothing is written into the app container ahead of launch.
1112 ["EXDevMenuShowFloatingActionButton", "false"],1115 const metroUrl = `http://${metroHost}:${config.metroPort}?${DEV_CLIENT_LAUNCH_FLAGS}`;
1113 ["EXDevMenuShowsAtLaunch", "false"],
1114 ] as const) {
1115 await runCommand("xcrun", [
1116 "simctl",
1117 "spawn",
1118 simulator.udid,
1119 "defaults",
1120 "write",
1121 ANDROID_PACKAGE,
1122 key,
1123 "-bool",
1124 value,
1125 ]);
1126 }
1127
1128 const metroUrl = `http://${metroHost}:${config.metroPort}?disableOnboarding=1`;
1129 const scenePath = NodePath.join(1116 const scenePath = NodePath.join(
1130 await iosAppContainer(simulator.udid),1117 await iosAppContainer(simulator.udid),
1131 "Library/Caches/T3ShowcaseScene",1118 "Library/Caches/T3ShowcaseScene",
...@@ -1357,12 +1344,12 @@ async function writeAndroidShowcaseScene(serial: string, scene: ShowcaseScene):...@@ -1357,12 +1344,12 @@ async function writeAndroidShowcaseScene(serial: string, scene: ShowcaseScene):
1357 ]);1344 ]);
1358}1345}
13591346
1347// Gesture and key-command toggles have no launch-URL flag, so they still go
1348// through the preferences file; onboarding, auto-launch and the floating button
1349// come from DEV_CLIENT_LAUNCH_FLAGS on the launch URL.
1360async function prepareAndroidShowcaseApp(serial: string): Promise<void> {1350async function prepareAndroidShowcaseApp(serial: string): Promise<void> {
1361 const preferences = `<?xml version="1.0" encoding="utf-8" standalone="yes" ?>1351 const preferences = `<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
1362<map>1352<map>
1363 <boolean name="isOnboardingFinished" value="true" />
1364 <boolean name="showsAtLaunch" value="false" />
1365 <boolean name="showFab" value="false" />
1366 <boolean name="motionGestureEnabled" value="false" />1353 <boolean name="motionGestureEnabled" value="false" />
1367 <boolean name="touchGestureEnabled" value="false" />1354 <boolean name="touchGestureEnabled" value="false" />
1368 <boolean name="keyCommandsEnabled" value="false" />1355 <boolean name="keyCommandsEnabled" value="false" />
...@@ -1435,7 +1422,7 @@ async function captureAndroid(...@@ -1435,7 +1422,7 @@ async function captureAndroid(
1435 "-a",1422 "-a",
1436 "android.intent.action.VIEW",1423 "android.intent.action.VIEW",
1437 "-d",1424 "-d",
1438 `${APP_SCHEME}://expo-development-client/?url=${metroUrl}`,1425 `'${APP_SCHEME}://expo-development-client/?url=${metroUrl}&${DEV_CLIENT_LAUNCH_FLAGS}'`,
1439 "--es",1426 "--es",
1440 "showcasePairingUrl",1427 "showcasePairingUrl",
1441 encodeAndroidPairingUrls(pairingUrls),1428 encodeAndroidPairingUrls(pairingUrls),