perf(daemon): skip post-gesture stabilization after a scroll --until that never moved

Merged
TH
1d ago
+186-3

Summary

A scroll that reports passes: 0 sent no gesture. It now keeps the session's deferred outcome as it was before the command and marks nothing new. The dispatcher holds the record before the ADR 0014 seam. dispatchedGesture reads the typed passes field. The deferred-outcome owner restores a recheck baseline that the seam retired. A pending stabilize record survives on its own. A scroll that moved still arms stabilization.

Nightly perf logs (4 samples): an --until on a target that was already visible armed stabilization. The next iOS press then polled to stale_accept with about 13 captures, warned "scroll produced no visible change", and cost about 3 s.

Help and client-api.md now qualify the post-scroll wait.

Before / after

Android provider scenario, a zero-pass --until followed by snapshot: 2 captures before, 1 after. A scroll that moved still takes 2 captures.

The iOS provider scenario runs press, a zero-pass --until, and a press on a moving target. The second press rechecks and taps the settled rect.

A live iOS Simulator run is recorded in a PR comment.

Validation

pnpm exec vitest run --project provider-integration test/integration/provider-scenarios/scroll-until.test.ts test/integration/provider-scenarios/press-selector-resolution.test.ts passes. src/commands/schema/cli-help-topics.test.ts passes. CI owns the remaining gates.

Follow-up: #5227.

🤖 Generated with Claude Code


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