Skip to content

Commit a5fdeec

Browse files
thymikeeclaude
andcommitted
docs(ios): name the back runner codes in full and state the real wait before the swipe
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 0a28d1b commit a5fdeec

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎packages/apple-runner/src/runner-contract.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,11 @@ export const NO_TEXT_INPUT_AT_POINT_RUNNER_CODE = 'NO_TEXT_INPUT_AT_POINT';
333333
export const TEXT_INPUT_PROBE_UNAVAILABLE_RUNNER_CODE = 'TEXT_INPUT_PROBE_UNAVAILABLE';
334334

335335
/**
336-
* The runner codes for an iOS `back` swipe. NO_CHANGE: the swipe was sent and the screen did not
337-
* change. UNVERIFIED: the swipe was sent but the screen kept changing before it or could not be
338-
* sampled after it. Both ran the swipe, so they stay `unknown`. NOT_DISPATCHED: the swipe was
339-
* refused before any touch went down. UNSUPPORTED_PLATFORM: the platform has no back gesture
340-
* (visionOS), so nothing ran.
336+
* The runner codes for an iOS `back` swipe. BACK_SWIPE_NO_CHANGE: the swipe was sent and the screen
337+
* did not change. BACK_SWIPE_UNVERIFIED: the swipe was sent but the screen kept changing before it
338+
* or could not be sampled after it. Both ran the swipe, so they stay `unknown`.
339+
* BACK_SWIPE_NOT_DISPATCHED: the swipe was refused before any touch went down.
340+
* BACK_UNSUPPORTED_PLATFORM: the platform has no back gesture (visionOS), so nothing ran.
341341
*/
342342
const BACK_SWIPE_NO_CHANGE_RUNNER_CODE = 'BACK_SWIPE_NO_CHANGE';
343343
const BACK_SWIPE_UNVERIFIED_RUNNER_CODE = 'BACK_SWIPE_UNVERIFIED';

‎website/docs/docs/commands.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ iOS Simulator launch behavior:
124124
Back, orientation, and hardware buttons:
125125

126126
- `back` uses app-owned back navigation: the back keyevent on Android, the visible back control on macOS, and the Siri Remote Menu button on tvOS. `--in-app` names this default explicitly.
127-
- On iOS, `back` is the left-edge back swipe, with or without `--in-app` or `--system`. It succeeds only when the app's screen, drawn as a 48×96 grayscale grid with its top 7 rows left out (in portrait, the status bar and Dynamic Island band, whether the status bar is shown or hidden; in landscape the iPhone status bar is hidden and the Dynamic Island sits at a side edge, outside those rows), differs in more than 1% of the remaining cells by more than 24 of 256 levels. A small spinner usually stays under that; a larger animation can still count as a change. The change counted is the one between the sample taken immediately before the swipe and the one taken about 0.25 s after it, so a screen that changes on its own inside that gap, after it looked still, can be misread as a back navigation; verify with `snapshot` when the screen has auto-advancing content. It waits up to about a second for the screen to stop changing before it swipes.
127+
- On iOS, `back` is the left-edge back swipe, with or without `--in-app` or `--system`. It succeeds only when the app's screen, drawn as a 48×96 grayscale grid with its top 7 rows left out (in portrait, the status bar and Dynamic Island band, whether the status bar is shown or hidden; in landscape the iPhone status bar is hidden and the Dynamic Island sits at a side edge, outside those rows), differs in more than 1% of the remaining cells by more than 24 of 256 levels. A small spinner usually stays under that; a larger animation can still count as a change. The change counted is the one between the sample taken immediately before the swipe and the one taken about 0.25 s after it, so a screen that changes on its own inside that gap, after it looked still, can be misread as a back navigation; verify with `snapshot` when the screen has auto-advancing content. Before it swipes, it waits for the screen to stop changing: up to 8 samples 0.25 s apart, about 1.75 s plus capture time, so roughly 2 s.
128128
- `reason: back_swipe_no_change`: the swipe was sent and the screen did not change. Press the visible back or close control.
129129
- `reason: back_swipe_unverified`: the swipe may or may not have navigated, because the screen kept changing before the swipe, the swipe took longer than the screen had been still, or the screen could not be sampled after it. Check with `snapshot`.
130130
- `reason: back_swipe_not_dispatched`: the swipe was refused before any touch went down, so nothing reached the device.

0 commit comments

Comments
 (0)