fix(ios): read a full-screen app's snapshot viewport from its root snapshot

GR
1h ago
+134-19

Summary

On a full-screen iOS app with a heavy screen, a tap right after a snapshot fails with RUNNER_BUSY. The tree tier read the viewport through a live app.windows resolution. Each of its reads snapshots the whole app again. On a 3,000-link WKWebView they took 7.4 s. That overran the 1 s slice, discarded the finished tree, and left main-thread work that refused the next tap.

A full-screen window at the origin (the #4573 rule, now one predicate) now takes its viewport from the root snapshot. Snapshot frames are in window content space. So placed iPad windows, offset windows, landscape, lit panels, and non-iOS keep the live read.

5 files: runner Swift, two runner tests, runner README.

Validation

Head 4836a661b on main 945b1f0d0. iPhone 17 Pro simulator, iOS 26.5, gronxb/e2e-repro ./repro.sh:

mainhead
passes1/44/4
snapshot_viewport abandoned40
RUNNER_BUSY taps30
  • The new runner test fails on main (1 live window read) and passes on head.
  • Full iOS runner suite at eddad1abc: 748 tests run. The 5 failing landscape tests fail identically on main (the host app does not rotate).
  • iOS, macOS, and tvOS builds pass. check:xctest-selection passes.
  • check:affected --run --head 4836a661b: only unit fails, on eager-closure-budgets (Android). It fails on main too.
  • Not run live: iPad placed window and landscape. A pure test covers both.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.