fix(ios): establish the screen origin of a full-screen private AX root

Merged
GR
6h ago
+109-9

Summary

Since 0.21.37 (#4439), iOS simulator press @ref on a full-screen app fails with window-origin-unknown while the XCTest snapshot channel is penalized, e.g. right after a WKWebView loads a large page. The private AX fallback then declares its root derived, although on an iPhone that root is the screen at the origin (0,0,440,956). The refusal held for over 150 s.

privateAXSnapshotViewport now asks AXRuntime whether the target is the primary app filling the screen (the probe RunnerResolveSoleScreen uses; it walks no tree). A root exactly equal to that screen frame at the origin is reported. A placed iPad window (#4399), an offset root, or a swapped landscape root stays derived. Runner-side counterpart of #4514.

7 files: runner Swift/ObjC, a runner unit test, runner README, ADR 0004, changeset.

Validation

Head 586d58a76 on main 189570486. Live runs: base 26a8a1b30 against head 8cf07fa/2bd2643, which have the same runner code apart from a log line, iPhone 17 Pro Max simulator, iOS 26.5, gronxb/e2e-repro: reload the web view, snapshot -i, press @e2, four rounds.

basehead
rounds 2–4window-origin-unknown, no viewporttapped, viewport 440x956
counterTaps: 1Taps: 4 (3/3 runs)

The head runner logged PRIVATE_AX_SNAPSHOT_USED and CHANNEL_PENALIZED. e2e's locator.tap suite passes 2/2 on head.

  • testPrivateAXRootViewportReportsOnlyAFullScreenRootAtTheOrigin passes on the simulator. The iOS, macOS, and tvOS runner builds succeed. check:xctest-selection passed.
  • check:affected --run --head 586d58a76: passed, exactCommit. All 16 CI checks pass at 586d58a.
  • iPhone landscape and iPad full-screen / placed-window runs: see the PR comments.