fix(ios): synthesize long presses and the gesture viewport on deep trees
Merged
TH
3d ago+340+340+012345678901234567890123456789-14-14-01234567890123456789
Summary
On deep React Native trees (heavy-feed fixture #3884, Bluesky), these iOS gestures failed after #3870:
longpressused XCTest's coordinate press. It retriedkAXErrorIllegalArgumentfor about 16 s, then threwpoint.x != INFINITY, which ended the runner test. On iOS,longPressand press-series hold steps are now synthesized like a tap. While the tree answers, XCTest's press is still the fallback.swipefailed with "Active app interaction viewport is unavailable".gestureViewportnow uses the synthesized context: the resolved window, or the sole screen on a one-screen iPhone.- The 8–30 s
scrollcame from the runner thatlongpresskilled.
6 runner Swift files, no wire fields.
Validation
Head 9f5cbc9ebd (main 5f6dfb3e6f merged).
- Live CLI runs on an iPhone 17 Pro simulator (iOS 27.0) reached
kind=coordinateLongPress … fallbackAttempted=falseand showed the effect in a snapshot. Covered: the automation-lab long-press canary (ref, x/y, selector, 2-stepsequence), the heavy feed (held post N), and a Safari Tabs UIKit context menu. Holds of 200/350 ms acted as taps; 650/1000 ms fired the long press. Details: https://github.com/callstack/agent-device/pull/3893#issuecomment-6337370101 - Heavy-feed suite (#3885), base
9935ef51c2vs844842171b, 3 rounds:longpress3/3 fail → 2197 ms;scroll down12808 → 924 ms;swipe3/3 fail → 1093 ms. - Runner unit tests: 44/44 on iPhone, 27/27 on iPad. Combined with #3894: 54/54 on both.
check:xctest-selectionpassed.check:affected --run --head 9f5cbc9ebdpassed (exactCommit: true).
Open: on iPad deep trees, long press still falls back to XCTest's press. back on the heavy feed is fixed in #3894.
🤖 Generated with Claude Code