perf(ios-runner): tap a simulator through touchscreen HID, not XCTest synthesis

Merged
TH
4h ago
+253-25

Summary

On an iOS Simulator, a synthesized tap is now one touchscreen HID contact sent from inside the simulator (down, 50 ms hold, lift). XCTest synthesis spent ~280 ms of round trip per tap. The XCTest record runs only when HID cannot be prepared (nothing sent). A contact that fails after touch-down answers SYNTHESIZED_GESTURE_OUTCOME_UNKNOWN. Physical devices are unchanged. ADR 0011 amended.

Before / after

pnpm perf, iPhone 17 Pro, iOS 27.0, daemon median ms, base 7c6ef4a2ed:

stepbasehead
press {ref}30887
press id=…448231
press --count 2827357
press {ref} --settle796973

7 SDK presses: 3.70 → 2.11 s; with --settle 6.89 → 7.22 s.

Settle lab (right/8, base → head): increment 8 → 8, delay-500 8 → 0, two-stage 0 → 1, others 0 → 0. Settle's first capture now lands ~220 ms earlier (recorded in the ADR).

Validation

  • Cross-app, main vs head, iPhone 17 Pro and iPad Pro 13" (iOS 27.0), portrait and landscape-left: fixture, Bluesky, HelloApp, Settings, Contacts, Calendar, Reminders. 333 presses, same result on both builds; all 333 took the HID route. Daemon median per press 367–586 → 143–348 ms.
  • Tap-contact and tap-stub runner unit tests pass locally.
  • Open: should --settle defer its first capture after an HID tap?

🤖 Generated with Claude Code


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