feat(client): let callers opt out of post-gesture stabilization
Summary
After a scroll or swipe, the daemon makes two checks: a directional scroll captures again to report movement, and the next capture waits until two reads agree. A caller that polls the tree itself needs neither. The daemon already skips both for postGestureStabilization: false, but the public client could not send it.
Add --no-post-gesture-stabilization to scroll, swipe, and gesture swipe. It is opt-in; other requests are unchanged. One key, postGestureStabilization, covers the CLI token, config, environment, Node option, batch step, and wire. Repository config rejects it, and recorded scripts do not carry it. MCP and AI SDK tools do not offer it.
await client.interactions.scroll({ direction: 'down', postGestureStabilization: false });
32 files: 14 source, 3 docs, 15 tests. No scope expansion.
Refs #1626
Validation
Tested head 3bae9ef77 on base 1846ef96d.
pnpm check:affected --run --head 3bae9ef77passed on Node 24.16.0 (exactCommit: true): 41 passed, 25 skipped as GitHub-authoritative or parked; CI decides those.- Scroll plus the next snapshot, option off and on, 36 rounds each, main
b42c7c265plus this head: iOS Simulator mean 1,285 vs 784 ms (-39%), Android emulator 854 vs 485 ms (-43%). - Risk: a caller with no wait of its own can read a tree captured mid-scroll.
- Not verified: Appium, physical devices, tests on the merge.
AI assistance and human review
AI was used to prepare these changes. Human-reviewed by @kdy1.
- Harness: Claude Code 2.1.309 (T3 Code)
- Model: claude-sonnet-5-5
- Reasoning Effort: max
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.