Repository navigation
feat(gesture): hold a single-pointer pan at its origin with --hold-ms - #3907
zijinhuang24 wants to merge 1 commit into
Conversation
Long-press-then-drag UIs (reorderable lists, web pages with a long-press timer) lift an item only after the finger has held still. gesture pan moved from its first instant, and gesture drag needs selector or ref endpoints, so there was no way to drive such a UI by coordinates. gesture pan now takes --hold-ms (holdMs on the Node client and MCP) and plans the same stationary segment drag uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I reviewed db04d90 and found two defects and a missing live run. No checks are reported on this fork head yet, so CI is pending and likely waits for maintainer approval. There are no conflicts.
This is a device-facing change to the pan plan on every gesture backend, and the PR body says iOS Simulator evidence is still to come. Please run on an iOS simulator and an Android device or emulator against a long-press-to-reorder list. Not blocking, take or leave: pan Could this be simpler while keeping the Before merge, the held pan needs to route through the hold-preserving tier, config |
Summary
Single-pointer
gesture pantakes--hold-ms: the pointer holds still at the origin, then moves overdurationMs. Long-press-then-drag UIs (reorderable lists, web pages with a long-press timer) can then be driven by coordinates;gesture dragalready holds, but only between selector or ref endpoints. The plan reuses drag's stationary segment (withContactHolds), so every backend that plays plan samples holds; endpoint-only backends (tvOS remote, HarmonyOS) do not, as the docs say.agent-device gesture pan 200 420 0 240 600 --hold-ms 600client.interactions.pan({ x: 200, y: 420, dx: 0, dy: 240, durationMs: 600, holdMs: 600 })gesturewith{ kind: "pan", origin, delta, durationMs, holdMs }holdMs+durationMsis capped at 10000ms;--pointer-count 2with--hold-msis refused..adlines carry it as a recorded flag. 19 files changed, 218 insertions(+), 32 deletions(-).Context: zijinmedia/device-harness#149 (the harness patches 0.21.15's dist until this ships).
Validation
Tested SHA db04d90.
pnpm check:affected --run --head: format, lint, typecheck, layering, fallow, build passed; vitest-related failed only inhelp-conformance-sample-outputs,daemon-runtime-compositionanddaemon-client-startup-race, which fail the same way on base 72c051d on this host (macOS, Node 22.22). New unit tests cover input, normalization, plan samples, CLI, client and MCP schema.Draft: device-facing and not yet run live. iOS Simulator evidence will be added here.