Skip to content

feat: a pause before pointerDown delays that finger in device.io.gesture - #553

Draft
vijaysharm wants to merge 1 commit into
mobile-next:mainfrom
vijaysharm:feat/gesture-finger-start
Draft

vijaysharm wants to merge 1 commit into
mobile-next:mainfrom
vijaysharm:feat/gesture-finger-start

Conversation

@vijaysharm

Copy link
Copy Markdown

Depends on mobile-next/devicekit-ios#110, which adds start to the agent's device.io.gesture. Draft until that ships and agentVersionIOS is bumped.

Summary

device.io.gesture could tap only once per gesture, because every finger touched down at t=0. With VoiceOver on (#552) that means nothing can be activated: VoiceOver's double tap, split tap and Magic Tap all need a second touch that starts later.

A pause before a finger's pointerDown now delays that finger's touch-down, the W3C meaning of a pause in a pointer's sequence. It is sent to the agent as the finger's start. A double tap is a second finger that pauses until the first has lifted; skills/mobilecli/reference.md has the example.

Risk surface

  • A pause anywhere else behaves as before. A pause after a finger's pointerDown, or after its pointerUp, still extends the previous action, so pinch and drag-and-drop sequences are unchanged.
  • Android refuses a delayed finger with "not supported on Android yet". The device server presses every finger at time zero, and would otherwise turn a double tap into a two-finger tap. Supporting it there means reworking Gestures.replay, which I couldn't test without an Android device.
  • start is omitted from the agent request when unset, so existing gestures send the same JSON as before.

Test plan

  • go test ./... -race (new tests: a pre-down pause becomes start, a post-up pause still extends the release, start stays out of the JSON when unset, Android refuses a delayed finger)
  • go fmt ./... leaves no diff; golangci-lint v2.13.1 adds no new findings

Behavior verification (real iPhone 13, iOS 27.0.1, with the mobile-next/devicekit-ios#110 agent)

Sent as device.io.gesture through mobilecli server start.

  • VoiceOver off. Double tap on Calculator's 7 → 77
  • VoiceOver on. Double tap activates the focused 7; split tap enters 8; Magic Tap starts and stops the stopwatch; triple tap opens a home screen icon's context menu
  • device.io.pinch and device.io.swipe still work
  • Android: not run (no device); covered by the unit test for the refusal

🤖 Generated with Claude Code

Every finger touched down at t=0, so a gesture could tap only once and
VoiceOver's double tap (activate), split tap and Magic Tap couldn't be
sent. A pause before a finger's pointerDown now becomes that finger's
start on the agent, so a second finger can tap after the first lifts.

Android's device server still presses every finger at once, so a
delayed finger is refused there rather than silently becoming a
multi-finger tap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant