feat(gestures): add settle to swipe and gesture

TH
15h ago
+498-94

Summary

Closes #4571. Add opt-in --settle to swipe and supported gesture actions across CLI, SDK, and MCP. The quiet wait starts after the final successful repetition and compares against the last observed tree. Plain gestures keep their capture budget. Gesture timeouts use the existing settle-capable daemon recovery policy.

Before / after

agent-device swipe 200 550 200 250 --count 3 --settle --json

Base refuses the flag. Head keeps the completed action result if the observation fails. When a settle diff issues refs, it includes their generation.

Validation

  • At 06c26989b4, pnpm check:affected --run --head HEAD passed at the exact commit (run-AEDA1F). The routed regression reproduces the false action failure before the fix.
  • Live at 0e198907d0 on iOS 27.0 and Android 17. With matched 500 ms quiet windows, median no-effect iOS fling time fell from 4,975 ms and 16 tree reads on c0b1d7a4a8 to 2,235 ms and five reads (eight trials per arm). Changing pan returned usable refs on both targets. Repeated swipes retained stabilization.
  • The current-surface fix has routed coverage. Split View exit and sheet dismissal still need live evidence.

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