diff --git a/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TypeExecution.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TypeExecution.swift index b849b2fecd..d147b64a35 100644 --- a/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TypeExecution.swift +++ b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TypeExecution.swift @@ -162,7 +162,7 @@ extension RunnerTests { code: RunnerPassThroughErrorCode.textEntryMismatch, message: "text entry read-back did not match the requested text", hint: textEntryMode == .replacement - ? "The app may have formatted, filtered, or consumed the entry. Inspect the field or resulting screen before retrying. If it needs correction, retry fill with the full text and --delay-ms \(TextEntryTiming.recoveryDelayMilliseconds)." + ? Self.replacementMismatchHint(observedText: textResult.observedText) : nil ) ) @@ -203,6 +203,16 @@ extension RunnerTests { return Response(ok: true, data: data) } + /// A field that reads back empty after the text was typed never received it. The usual cause is + /// an overlay, such as a sheet or a development menu, that took the focus tap and the typing. + static func replacementMismatchHint(observedText: String?) -> String { + let retry = "If it needs correction, retry fill with the full text and --delay-ms \(TextEntryTiming.recoveryDelayMilliseconds)." + if observedText?.isEmpty == true { + return "The field read back empty, so the tap may have landed on an overlay above it, such as a sheet or a development menu. Run snapshot -i and close the overlay before retrying. \(retry)" + } + return "The app may have formatted, filtered, or consumed the entry. Inspect the field or resulting screen before retrying. \(retry)" + } + /// The refusal of a coordinate `fill` whose point identified no text input, answered before the /// focus tap is dispatched so nothing runs. Without an input at the point the synthesized /// replacement has no element to bind to, so its clear and its typed text would reach the app-level diff --git a/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+TextEntryConfirmationTests.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+TextEntryConfirmationTests.swift index b3749e1f02..e8fbab0062 100644 --- a/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+TextEntryConfirmationTests.swift +++ b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+TextEntryConfirmationTests.swift @@ -41,6 +41,13 @@ extension RunnerTests { } } + func testReplacementMismatchHintNamesAnOverlayOnlyForAnEmptyReadBack() { + XCTAssertTrue(Self.replacementMismatchHint(observedText: "").contains("overlay")) + XCTAssertFalse(Self.replacementMismatchHint(observedText: "ada").contains("overlay")) + XCTAssertFalse(Self.replacementMismatchHint(observedText: nil).contains("overlay")) + XCTAssertTrue(Self.replacementMismatchHint(observedText: "").contains("--delay-ms")) + } + func testReplacementDisclosesNonLiteralValuesWithoutInferringCorrectness() { let cases: [(String, String, String)] = [ ("", "000629177", "00 062 91 77"), diff --git a/packages/capture-kit/src/react-native-overlay-expo-dev-menu.test.ts b/packages/capture-kit/src/react-native-overlay-expo-dev-menu.test.ts new file mode 100644 index 0000000000..413e534fb8 --- /dev/null +++ b/packages/capture-kit/src/react-native-overlay-expo-dev-menu.test.ts @@ -0,0 +1,69 @@ +import { describe, expect, test } from 'vitest'; +import type { SnapshotNode } from '@agent-device/kernel/snapshot'; +import { formatReactNativeOverlayWarning } from './react-native-overlay.ts'; + +function nodes(specs: Array>): SnapshotNode[] { + return specs.map((spec, index) => ({ index, ...spec }) as SnapshotNode); +} + +/** iPhone 17 Pro simulator, `snapshot -i`: the test app's form under the Expo dev menu, trimmed. */ +const IOS_MENU = nodes([ + { type: 'Application', label: 'Agent Device Tester' }, + { type: 'TextField', label: 'Email' }, + { type: 'StaticText', label: 'Agent Device Tester' }, + { type: 'Button', label: 'Close' }, + { type: 'StaticText', label: 'Runtime version: exposdk:58.0.0' }, + { type: 'Button', label: 'Reload' }, + { type: 'Button', label: 'Go home' }, +]); + +/** Pixel 9 emulator, full `snapshot` of an Expo dev-client app under the dev menu, trimmed. */ +const ANDROID_MENU = nodes([ + { type: 'android.widget.TextView', label: 'Lab (Dev)' }, + { type: 'android.widget.TextView', label: 'Runtime version: 3.5.0' }, + { type: 'android.view.View', label: 'Close' }, + { type: 'android.view.View', label: 'Reload' }, + { type: 'android.widget.TextView', label: 'Reload' }, + { type: 'android.view.View', label: 'Home' }, + { type: 'android.widget.TextView', label: 'Go home' }, +]); + +/** The same Android menu in `snapshot -i`, which drops the header text. */ +const ANDROID_INTERACTIVE_MENU = ANDROID_MENU.filter( + (node) => !node.label?.startsWith('Runtime version') && node.label !== 'Lab (Dev)', +); + +const DEV_MENU_HINT = /Expo dev menu looks open[\s\S]*Close[\s\S]*disableAutoLaunch=1/; + +describe('the Expo dev menu hint', () => { + test.each([ + ['the iOS simulator capture', IOS_MENU], + ['the Android full capture', ANDROID_MENU], + [ + 'an SDK version line beside Go home only', + nodes([{ label: 'SDK version: 58.0.0' }, { label: 'Go home' }]), + ], + [ + 'the version line carried as a value', + nodes([{ value: 'Runtime version: 1.0.0' }, { label: 'Reload' }]), + ], + ])('names the menu and its Close for %s', (_name, captured) => { + expect(formatReactNativeOverlayWarning(captured)).toMatch(DEV_MENU_HINT); + }); + + test.each([ + ["Android's interactive capture, which drops the version line", ANDROID_INTERACTIVE_MENU], + [ + 'a version line with no Reload or Go home', + nodes([{ label: 'Runtime version: 1.0.0' }, { label: 'Close' }]), + ], + ['an app Reload with no version line', nodes([{ label: 'Reload' }, { label: 'Close' }])], + [ + 'a version line that only mentions the words', + nodes([{ label: 'See the runtime version: below' }, { label: 'Reload' }]), + ], + ['a version line with no value', nodes([{ label: 'Runtime version:' }, { label: 'Reload' }])], + ])('stays quiet for %s', (_name, captured) => { + expect(formatReactNativeOverlayWarning(captured)).toBeUndefined(); + }); +}); diff --git a/packages/capture-kit/src/react-native-overlay.ts b/packages/capture-kit/src/react-native-overlay.ts index cb31eef7f5..7411cea9be 100644 --- a/packages/capture-kit/src/react-native-overlay.ts +++ b/packages/capture-kit/src/react-native-overlay.ts @@ -68,10 +68,19 @@ const FOOTER_LANDSCAPE_SIDE_INSET_MAX_DP = 80; */ const FOOTER_MIN_COLUMNS_WITHOUT_SURFACE = 3; +const EXPO_DEV_MENU_VERSION_PATTERN = /^(?:runtime|sdk) version: \S/; +const EXPO_DEV_MENU_ACTION_LABELS = new Set(['reload', 'go home']); + export function formatReactNativeOverlayWarning( nodes: SnapshotNode[], surface?: ReactNativeOverlaySurface, ): string | undefined { + if (showsExpoDevMenuText(nodes)) { + return [ + 'Hint: The Expo dev menu looks open. It takes every tap until it closes, so press its Close button first.', + "When you launch the app with your own expo-development-client URL, add disableAutoLaunch=1 to it, or turn off the menu's show-at-launch setting.", + ].join('\n'); + } const overlay = analyzeReactNativeOverlay(nodes, surface); if (!overlay.detected) return undefined; return [ @@ -270,6 +279,22 @@ function isSafeCollapsedWarningCoordinateFallback( } /** Reads every text a node carries, lowercased, against a label classifier. */ +/** + * The Expo dev menu's header line and one of its first actions, read as text only: the menu's + * layout differs by platform, capture and Expo release. Android's interactive capture drops the + * header line, so only its full snapshot carries both. + */ +function showsExpoDevMenuText(nodes: readonly SnapshotNode[]): boolean { + return ( + nodes.some((node) => + nodeHasMatchingLabel(node, (label) => EXPO_DEV_MENU_VERSION_PATTERN.test(label)), + ) && + nodes.some((node) => + nodeHasMatchingLabel(node, (label) => EXPO_DEV_MENU_ACTION_LABELS.has(label)), + ) + ); +} + function nodeHasMatchingLabel( node: ReactNativeOverlayNode, matches: (label: string) => boolean, diff --git a/packages/command-surface/src/management/app.ts b/packages/command-surface/src/management/app.ts index d5d0e17209..2657ade0fc 100644 --- a/packages/command-surface/src/management/app.ts +++ b/packages/command-surface/src/management/app.ts @@ -217,7 +217,7 @@ export const openCommandFacet = defineCommandFacet({ summary: 'Open an app, deep link or URL, save replays', searchHint: 'relaunch', cliDetail: - 'Use --platform to bind URL/deep-link opens to the target platform. For local or Limrun iOS simulator initial stdout/stderr, put --launch-console on this open command, for example agent-device open "Agent Device Tester" --platform ios --launch-console artifacts/launch-console.log. Expo Go/dev-client shells accept host + URL, for example agent-device open "Expo Go" exp://127.0.0.1:8081 --platform ios. macOS also supports --surface app|frontmost-app|desktop|menubar. --metro-host/--metro-port/--bundle-url choose the app\'s Metro server and save that address for later metro reload calls in the same session. A fresh open without Metro hints clears an older same-name binding; close also clears it. --launch-url supplies the app\'s launch URL; it does not select the reload server. A later open without these flags applies the hints and launch URL again only when it opens the same app; it opens another app without them. An open that passes hints for another app also removes the earlier hints from the app an earlier open applied them to. On an iOS simulator without --launch-url, open connects a detected Expo development client through its expo-development-client URL. The app must declare a single exp+ scheme that no other installed app owns. If detection is inconclusive, the app opens normally. Bare React Native apps receive their server settings before launch. On an iOS simulator, when --launch-url raises an "Open in ?" prompt that keeps open from seeing the app, open accepts it if the URL scheme belongs to the session app (data.launchConfirmation: "accepted"); if the scheme belongs to another installed app, the prompt stays on screen and open fails with details.reason launch_confirmation_foreign_app; if the scheme owner cannot be resolved because no single installed app owns it or the lookup failed, the prompt stays on screen and open returns with data.launchConfirmation: "unanswered", launchConfirmationReason url-owner-unresolved, and a warning; a prompt that is seen but not recognized is reported the same way with launchConfirmationReason alert-unrecognized and its own warning; for url-owner-unresolved, answer the prompt with alert accept; for alert-unrecognized, read the alert with alert get first, because it can be the app\'s own alert (such as a permission prompt) rather than the launch confirmation, and answer with alert accept only when it is the launch confirmation; when agent-device cannot read whether a prompt is up at all (the alert read, the accept, or the runner itself failed, including after a re-hand of the URL), open stays green, reports no launchConfirmation plus data.launchConfirmationProbeFailure naming the failed step (alert-read, alert-accept, or runner), and appends a warning that says to check with alert get. The prompt is read whenever open cannot see the app afterwards, including on a slow host where the app\'s target discovery fails on its own deadline. When an accept leaves the app provably not running, open hands the same URL over once more and reads again; still not running, it fails with details.reason launch_confirmation_unanswered. When the runner reports its main-thread timeout for the accept and the prompt is still up, open presses Open again, but only when the time the open request has left covers a whole press and the read that checks it. A recognized prompt still visible after a failed accept, or once that time is gone, also fails with this reason, even if the app is running behind it; answer it with alert accept or alert dismiss. A simulator openurl that CoreSimulator never answers fails within 20s with details.reason ios-simulator-openurl-timeout. The prompt is recognized by the OS\'s own wording of its title and buttons in the Simulator\'s preferred languages; when the runner cannot read that wording, the prompt stays on screen as alert-unrecognized. A prompt that appears after open has already seen the app is not answered; use alert accept. A device another session is holding refuses at once; add --wait to block up to that budget for it and only then fail with DEVICE_IN_USE naming the owning session. On HarmonyOS, open reads the foreground app for up to 5s after dispatch. When the launched app never holds it, open succeeds with a warning that names open-not-foreground with the app that held the foreground, or that no mission is foreground; unlock and run the open again. A budget whose every read fails names open-foreground-probe-unreadable instead and claims nothing; check the connection. With --foreground, it fails with details.reason open-not-foreground or open-foreground-probe-unreadable.', + 'Use --platform to bind URL/deep-link opens to the target platform. For local or Limrun iOS simulator initial stdout/stderr, put --launch-console on this open command, for example agent-device open "Agent Device Tester" --platform ios --launch-console artifacts/launch-console.log. Expo Go/dev-client shells accept host + URL, for example agent-device open "Expo Go" exp://127.0.0.1:8081 --platform ios. macOS also supports --surface app|frontmost-app|desktop|menubar. --metro-host/--metro-port/--bundle-url choose the app\'s Metro server and save that address for later metro reload calls in the same session. A fresh open without Metro hints clears an older same-name binding; close also clears it. --launch-url supplies the app\'s launch URL; it does not select the reload server. A later open without these flags applies the hints and launch URL again only when it opens the same app; it opens another app without them. An open that passes hints for another app also removes the earlier hints from the app an earlier open applied them to. On an iOS simulator without --launch-url, open connects a detected Expo development client through its expo-development-client URL, with disableAutoLaunch=1 so the dev menu stays closed at launch; Expo also saves that as the app\'s show-at-launch setting. The app must declare a single exp+ scheme that no other installed app owns. If detection is inconclusive, the app opens normally. Bare React Native apps receive their server settings before launch. On an iOS simulator, when --launch-url raises an "Open in ?" prompt that keeps open from seeing the app, open accepts it if the URL scheme belongs to the session app (data.launchConfirmation: "accepted"); if the scheme belongs to another installed app, the prompt stays on screen and open fails with details.reason launch_confirmation_foreign_app; if the scheme owner cannot be resolved because no single installed app owns it or the lookup failed, the prompt stays on screen and open returns with data.launchConfirmation: "unanswered", launchConfirmationReason url-owner-unresolved, and a warning; a prompt that is seen but not recognized is reported the same way with launchConfirmationReason alert-unrecognized and its own warning; for url-owner-unresolved, answer the prompt with alert accept; for alert-unrecognized, read the alert with alert get first, because it can be the app\'s own alert (such as a permission prompt) rather than the launch confirmation, and answer with alert accept only when it is the launch confirmation; when agent-device cannot read whether a prompt is up at all (the alert read, the accept, or the runner itself failed, including after a re-hand of the URL), open stays green, reports no launchConfirmation plus data.launchConfirmationProbeFailure naming the failed step (alert-read, alert-accept, or runner), and appends a warning that says to check with alert get. The prompt is read whenever open cannot see the app afterwards, including on a slow host where the app\'s target discovery fails on its own deadline. When an accept leaves the app provably not running, open hands the same URL over once more and reads again; still not running, it fails with details.reason launch_confirmation_unanswered. When the runner reports its main-thread timeout for the accept and the prompt is still up, open presses Open again, but only when the time the open request has left covers a whole press and the read that checks it. A recognized prompt still visible after a failed accept, or once that time is gone, also fails with this reason, even if the app is running behind it; answer it with alert accept or alert dismiss. A simulator openurl that CoreSimulator never answers fails within 20s with details.reason ios-simulator-openurl-timeout. The prompt is recognized by the OS\'s own wording of its title and buttons in the Simulator\'s preferred languages; when the runner cannot read that wording, the prompt stays on screen as alert-unrecognized. A prompt that appears after open has already seen the app is not answered; use alert accept. A device another session is holding refuses at once; add --wait to block up to that budget for it and only then fail with DEVICE_IN_USE naming the owning session. On HarmonyOS, open reads the foreground app for up to 5s after dispatch. When the launched app never holds it, open succeeds with a warning that names open-not-foreground with the app that held the foreground, or that no mission is foreground; unlock and run the open again. A budget whose every read fails names open-foreground-probe-unreadable instead and claims nothing; check the connection. With --foreground, it fails with details.reason open-not-foreground or open-foreground-probe-unreadable.', mcpDetail: "metroHost, metroPort, and bundleUrl choose the app's Metro server and save its address for later reloads. launchUrl selects the app's launch URL and does not select the reload server. A later open without hints applies them again only when it opens the same app; it opens another app without them. An open that passes hints for another app also removes the earlier hints from the app an earlier open applied them to. A fresh open without Metro hints clears an older same-name binding; close also clears it.", }, diff --git a/packages/platform-apple/src/expo-dev-client-launch.test.ts b/packages/platform-apple/src/expo-dev-client-launch.test.ts index a70642c910..6d027c557e 100644 --- a/packages/platform-apple/src/expo-dev-client-launch.test.ts +++ b/packages/platform-apple/src/expo-dev-client-launch.test.ts @@ -33,12 +33,12 @@ test.each([ [ 'an http server', undefined, - 'exp+dev-slug://expo-development-client/?url=http%3A%2F%2F127.0.0.1%3A8085', + 'exp+dev-slug://expo-development-client/?url=http%3A%2F%2F127.0.0.1%3A8085&disableAutoLaunch=1', ], [ 'an https server', 'https://metro.example.test', - 'exp+dev-slug://expo-development-client/?url=https%3A%2F%2Fmetro.example.test', + 'exp+dev-slug://expo-development-client/?url=https%3A%2F%2Fmetro.example.test&disableAutoLaunch=1', ], ])('points an expo-dev-client at %s', async (_name, bundleUrl, expected) => { resolveScheme.mockResolvedValue('exp+dev-slug'); @@ -59,7 +59,7 @@ test('points at the server origin of a bundle URL, not at the bundle itself', as }); await expect(resolveExpoDevClientLaunchUrl(SIMULATOR, input)).resolves.toBe( - 'exp+dev-slug://expo-development-client/?url=http%3A%2F%2F10.0.0.5%3A8090', + 'exp+dev-slug://expo-development-client/?url=http%3A%2F%2F10.0.0.5%3A8090&disableAutoLaunch=1', ); }); @@ -70,7 +70,7 @@ test('keeps a single pair of brackets around an IPv6 bundle URL host', async () }); await expect(resolveExpoDevClientLaunchUrl(SIMULATOR, input)).resolves.toBe( - 'exp+dev-slug://expo-development-client/?url=http%3A%2F%2F%5B%3A%3A1%5D%3A8090', + 'exp+dev-slug://expo-development-client/?url=http%3A%2F%2F%5B%3A%3A1%5D%3A8090&disableAutoLaunch=1', ); }); @@ -87,6 +87,15 @@ test('keeps the server mount when opening a path-prefixed Expo bundle', async () expect(new URL(launchUrl!).searchParams.get('url')).toBe('https://metro.example.test/tenant-42'); }); +test('asks the dev client to keep its menu closed, beside the server URL rather than inside it', async () => { + resolveScheme.mockResolvedValue('exp+dev-slug'); + + const launchUrl = new URL((await resolveExpoDevClientLaunchUrl(SIMULATOR, openInput()))!); + + expect(launchUrl.searchParams.get('disableAutoLaunch')).toBe('1'); + expect(launchUrl.searchParams.get('url')).toBe('http://127.0.0.1:8085'); +}); + test.each([ ['a bare React Native app', openInput(), undefined], [ diff --git a/packages/platform-apple/src/expo-dev-client-launch.ts b/packages/platform-apple/src/expo-dev-client-launch.ts index 945789a144..b1af78d800 100644 --- a/packages/platform-apple/src/expo-dev-client-launch.ts +++ b/packages/platform-apple/src/expo-dev-client-launch.ts @@ -29,7 +29,10 @@ export async function resolveExpoDevClientLaunchUrl( if (isRequestCanceledError(error)) throw error; return undefined; } - return scheme - ? `${scheme}://expo-development-client/?url=${encodeURIComponent(serverUrl.toString().replace(/\/+$/, ''))}` - : undefined; + if (!scheme) return undefined; + const url = encodeURIComponent(serverUrl.toString().replace(/\/+$/, '')); + // `disableAutoLaunch=1` keeps the dev menu from opening over the app at launch. Expo documents it + // next to `url` for every SDK, and it also turns off the app's saved show-at-launch setting: + // https://docs.expo.dev/develop/development-builds/development-workflows/ + return `${scheme}://expo-development-client/?url=${url}&disableAutoLaunch=1`; } diff --git a/src/commands/schema/cli-help-react-native.ts b/src/commands/schema/cli-help-react-native.ts index 79b123d7bc..bd6e64a745 100644 --- a/src/commands/schema/cli-help-react-native.ts +++ b/src/commands/schema/cli-help-react-native.ts @@ -33,6 +33,7 @@ React Native dev loop: Overlays and busy RN UIs: If snapshot reports a React Native warning/error overlay, handle it before interacting with the app: run agent-device react-native dismiss-overlay. The command sends the safe LogBox/RedBox action and verifies the overlay is gone with a fresh post-dismiss snapshot -i. + If snapshot reports that the Expo dev menu looks open, press its Close button before acting on the app. open on an iOS simulator launches a detected development client with disableAutoLaunch=1, which keeps the menu closed; add it yourself to a launch URL you pass. If the command reports the overlay is still visible, use screenshot --overlay-refs for visual evidence and report the overlay instead of pressing warning/error text manually. Do not manually press warning/error text bodies, collapsed banner bodies, full-screen warning parents, or broad LogBox/RedBox refs. The dismiss-overlay command owns the narrow LogBox/RedBox targeting policy. Report the overlay in the final summary. Use screenshot --overlay-refs before dismissing only if visual evidence is required. diff --git a/src/commands/schema/cli-help-workflows.ts b/src/commands/schema/cli-help-workflows.ts index e0885a2181..d6d48e601b 100644 --- a/src/commands/schema/cli-help-workflows.ts +++ b/src/commands/schema/cli-help-workflows.ts @@ -191,7 +191,7 @@ Text-entry quirks: Local iOS fill reuses focus when the current command identifies the target input and reads its keyboard focus. Readable focused inputs use select-all/delete with read-back before any fallback caret tap. Masked inputs, such as secure fields, that show nothing or a placeholder that is not a mask are not cleared; other masked inputs get deletes with read-back before any fallback caret tap. Masked text the deletes can't reach that shows as many bullets as the placeholder reads as cleared, so the new text is typed next to it. iOS Allow Paste cannot be exercised under XCUITest; prefill with clipboard write "some text" instead and test the system prompt manually. Android Gboard handwriting/stylus UI can capture text in an IME-owned input instead of the app field. If fill reports that input was captured by the keyboard/IME, use the diagnostic targetInput/actualInput details, inspect keyboard status/get if needed, and switch or disable handwriting outside the command plan before retrying. Do not keep retrying fill/type against the same field while the IME owns focus. If the exact target changes but app-owned formatting prevents raw equality, fill succeeds with verification: "unconfirmed" plus target-bound requested/before/after evidence; inspect that evidence instead of retrying the same mutation. - iOS accessibility-driven fill types the replacement once and never clears and retypes a read-back mismatch. Exact settled text confirms the entry. Nonempty replacements wait until the confirmation deadline before reporting TEXT_ENTRY_MISMATCH. A value containing only characters in order from the post-clear value plus the request fails with TEXT_ENTRY_MISMATCH, including plain dropped characters and unchanged values; legitimate trimming or masks can also hit this limit ("5" into "$0.00" displaying "$0.05"). Other settled values return verification: "unconfirmed" with requested/before/after/target evidence, including grouping ("00 062 91 77" for "000629177"), currency ("$10.00" for "1000"), and OTP summaries. Missing, reordered, duplicated or stale text can also be unconfirmed, so assert the expected value with a value selector, get/is, or the resulting screen before continuing. For single-line fills ending in a submit key, any non-matching value observed on the same target succeeds unverified, including partial or cleared text; this exception skips dropped-character checks because the submit may change the field. Assert the resulting screen. Multiline fields compare newlines as content. Unreadable or removed fields remain unverified. The coordinate-driven fill route still requires an exact match. After TEXT_ENTRY_MISMATCH, inspect the field and retry fill only if it needs correction, using the --delay-ms value from the error hint. + iOS accessibility-driven fill types the replacement once and never clears and retypes a read-back mismatch. Exact settled text confirms the entry. Nonempty replacements wait until the confirmation deadline before reporting TEXT_ENTRY_MISMATCH. A value containing only characters in order from the post-clear value plus the request fails with TEXT_ENTRY_MISMATCH, including plain dropped characters and unchanged values; legitimate trimming or masks can also hit this limit ("5" into "$0.00" displaying "$0.05"). Other settled values return verification: "unconfirmed" with requested/before/after/target evidence, including grouping ("00 062 91 77" for "000629177"), currency ("$10.00" for "1000"), and OTP summaries. Missing, reordered, duplicated or stale text can also be unconfirmed, so assert the expected value with a value selector, get/is, or the resulting screen before continuing. For single-line fills ending in a submit key, any non-matching value observed on the same target succeeds unverified, including partial or cleared text; this exception skips dropped-character checks because the submit may change the field. Assert the resulting screen. Multiline fields compare newlines as content. Unreadable or removed fields remain unverified. The coordinate-driven fill route still requires an exact match. After TEXT_ENTRY_MISMATCH, inspect the field and retry fill only if it needs correction, using the --delay-ms value from the error hint. When the field reads back empty, the hint names an overlay that may have taken the tap; close it before retrying. React Native internals: If the question is about React component props, state, hooks, the component tree, performance, render causes, slow components, or rerenders, use help react-devtools instead of inferring from screenshots or logs.`, diff --git a/src/core/interactors/limrun-ios-files.test.ts b/src/core/interactors/limrun-ios-files.test.ts index bb2e7410ea..e8718dc088 100644 --- a/src/core/interactors/limrun-ios-files.test.ts +++ b/src/core/interactors/limrun-ios-files.test.ts @@ -172,7 +172,7 @@ test('binary installed metadata uses shared Expo launch hints and explicit URL p expect(vi.mocked(f.session.client.simctl).mock.calls.map(([args]) => args)).toContainEqual([ 'openurl', 'booted', - 'exp+example://expo-development-client/?url=http%3A%2F%2Flocalhost%3A8081', + 'exp+example://expo-development-client/?url=http%3A%2F%2Flocalhost%3A8081&disableAutoLaunch=1', ]); await lifecycle.openApplication({ ...input, runtimeLaunchUrl: 'custom://explicit' }); const urls = vi