test(ios): recover the E2E visibility search from a scroll that overshoots its target - #2883
Conversation
…hoots its target A controlled iOS scroll can still release with inertia when the host is loaded: the app misses the slow tail of the eased drag and UIKit flings with a mid-drag velocity (~420 pt/s measured), so one scroll down 0.75 moved content 719-852 pt instead of 439-505 pt and carried the one-row automation-longpress target past the viewport. The forward-only search then had nowhere to go (#2491). The search now follows three forward scrolls (2.25 viewports, unchanged) with three shorter reverse scrolls, whose travel plus a measured fling stays inside one viewport, and gives a surface the read reports as unsettled a bounded pause before re-reading it instead of re-reading at once.
Size Report
Startup median (7 runs, lower is better):
|
|
Adversarial review: clean. Two notes for later:
Merge order with #2864: whoever lands second maps only |
|
Reviewed at f6afa01. The change stays inside the two files behind the iOS I did not re-run the live iOS validation; I rely on the reported 30/30 on-device pass and the green smoke job. One question for later: when #2864 renames |
|
Summary
Fixes the
smoke:automation-inputflakeid="automation-longpress" did not become visible after scrolling(20 CI failures, 09-14..23; #2491).Mechanism (iOS 26.2 simulator, host CPU load): a controlled
scroll down 0.75(656 pt finger path) sometimes releases with inertia. Screen-recording frame tracking shows the eased drag, then a ~420 pt/s deceleration tail. Content moved 711–852 pt instead of 439–505 pt (6 of 80 scrolls under load). A fling can carry the one-row target past the viewport, and the forward-only search cannot recover.This is within the documented contract (ADR 0013,
scrollhelp: reduced momentum, no exact offset). Two runner release-tail variants failed: stationary tail samples changed nothing, and a creeping tail made every scroll fling. So the E2E search changes:scroll down 0.75(reach 2.25 viewports, unchanged), then 3×scroll up 0.5. A reverse step plus a measured fling (≤504 pt) stays inside the visible band.unsettledGestureread gets a 1 s pause before the re-read.2 files, test-only. #2864 renames
unsettledGesture, which touches one line here.Validation
At
f6afa0103b, with a 36-thread CPU load:assertAutomationInputpasses (24 on the behavior-equivalent parent, 6 on the head). One run hit the exact CI shape (unsettled probe, failed re-read, misses to the bottom). Two reverse scrolls recovered it.pnpm check:affected --runpassed.