Repository navigation
feat(gesture): hold before the move with gesture pan --hold-ms - #4767
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Two problems in bfcc9b8 need fixes before merge. First, gestureRuntimeTier sends a one-pointer pan to the Second, Could the change stay smaller? Keep the reused flag and For validation after the fix, please show that an endpoint-only backend refuses CI is unclear. I captured no failure log. 'Smoke Tests' follows 'Smoke Tests (ios)', which may be affected by the new reorder rows shifting the coordinates that the iOS replays use in GestureLab, but that is not proven. 'Runner Build (tvOS + visionOS)' looks unrelated because the diff touches no Swift. Please check the iOS smoke log before merge. Not blocking, take or leave: the new case in session-store.test.ts:583 passes on base, because The Android TV, Vega and web plan lowering were not traced; WebDriver iterates all samples, so it likely keeps the hold. |
This comment has been minimized.
This comment has been minimized.
|
Neither earlier finding is fixed at 27091ea. The only change since bfcc9b8 moves the GestureLab below the pan, multi-touch and multi-tap targets, which addresses the iOS smoke concern about shifting replay coordinates. The earlier review is here: #4767 (comment) gestureRuntimeTier still sends a one-pointer pan with Pan now reads The help sentence, the commands.md line and the MCP Validation is still missing. After the routing fix, please show CI passes. Before merge, the routing, config and docs fixes above need to land with the admission and parser tests. |
… only from explicit input Review fixes for #4767: - gestureRuntimeTier routes pan with holdMs > 0 to target-authored-drag, so endpoint-only plan lowering (Linux, HarmonyOS, macOS, tvOS) refuses the held pan with UNSUPPORTED_OPERATION and the drag hint before dispatch instead of silently dropping the hold. The drag-tier binding now forwards the pan keyboard-inclusive viewport read. Admission tests cover Linux and macOS desktop refusals; a handler test proves a held pan is admitted while the plan cell is unavailable, and the tier unit test pins plan vs drag routing. - A config/env holdMs no longer reaches gesture pan: the CLI parser strips it unless --hold-ms was typed, and the MCP config merge skips it for kind pan unless the tool call carries the field, so a press-oriented config default never makes a pan hold and a two-finger pan never fails for it. Parser and MCP tests cover config-only, explicit, and two-finger cases. - The gestures help topic and commands.md scope the pan --hold-ms line to the same platforms as gesture drag (Android touch devices and iOS/iPadOS). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This is ready at 2c85bd7, and everything from the earlier review (#4767 (comment)) is now fixed. Not blocking, and you can take or leave it: with a config Not blocking question: would applying the config All checks pass at 2c85bd7. Production code at this head is identical to the device-run commit 22774b3, so the iOS and Android canary in the PR body still applies, and the Step 0 evidence shows the gap this flag closes (hold-activated drag handles with no ref). Whether the WebDriver and Limrun providers keep the intermediate hold samples was not checked. |
This comment has been minimized.
This comment has been minimized.
Step 0 evidence showed hold-activated drags (reorder handles without an accessibility element, long-press-armed PanResponders) cannot be started by coordinate input: gesture drag only accepts @refs/selectors, and gesture pan moves immediately without a hold. gesture pan now accepts the existing --hold-ms flag (MCP holdMs) as a hold at the origin before the move, reusing the same contact-hold plan shape drag already produces, so no runner or backend changes are needed. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…yload Keeps the gesture reader under the fallow complexity threshold now that pan reads pointerCount, durationMs, and holdMs. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
The reorder list sat between the drag fixture and the pan/pinch/rotate/ fling target, shifting it down so the fixed-coordinate gesture replays (110 443 / 300 1237) landed on the reorder rows instead of the target. Moving the list and its canaries to the bottom of the card keeps every existing replay coordinate unchanged; verified on iOS and Android with the branch-built CLI. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
… only from explicit input Review fixes for #4767: - gestureRuntimeTier routes pan with holdMs > 0 to target-authored-drag, so endpoint-only plan lowering (Linux, HarmonyOS, macOS, tvOS) refuses the held pan with UNSUPPORTED_OPERATION and the drag hint before dispatch instead of silently dropping the hold. The drag-tier binding now forwards the pan keyboard-inclusive viewport read. Admission tests cover Linux and macOS desktop refusals; a handler test proves a held pan is admitted while the plan cell is unavailable, and the tier unit test pins plan vs drag routing. - A config/env holdMs no longer reaches gesture pan: the CLI parser strips it unless --hold-ms was typed, and the MCP config merge skips it for kind pan unless the tool call carries the field, so a press-oriented config default never makes a pan hold and a two-finger pan never fails for it. Parser and MCP tests cover config-only, explicit, and two-finger cases. - The gestures help topic and commands.md scope the pan --hold-ms line to the same platforms as gesture drag (Android touch devices and iOS/iPadOS). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…way admission test The MCP gesture holdMs description now names the platforms where the pan hold works (Android touch devices and iOS/iPadOS), matching gesture drag. A new admission test proves both routing directions on a Linux desktop: an unheld pan is admitted through the plan tier and binds, a held pan is refused with UNSUPPORTED_OPERATION and the drag hint before binding. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
A press-oriented config holdMs merged into every gesture kind's MCP input, so fling, swipe, pinch, rotate, transform and drag calls failed with the tap-and-pan-only error for a field the caller never sent. The config default now applies only to the kind that reads it (tap); pan still reads holdMs only from the tool call's own field. The MCP test gains a fling case: config holdMs + gesture fling merges no holdMs and the payload parses. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
e99d55e to
12d861a
Compare
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
* origin/main: feat(gesture): hold before the move with gesture pan --hold-ms (#4767) docs: clarify device verification and security proposals (#4805) fix(daemon-client): say that a hung daemon is stopped before ensureDaemon starts a new one (#4803) test: remove five timing races from CI (#4800) refactor(remote): save a remote script from memory with the local publisher (#4802) refactor(apple-runner): one RUNNER_ERROR_CODES row per runner error code with parity/docs gates (#4774) fix(android): require acknowledgements for test IME typing (#4722) feat(scroll): add scroll refresh for pull-to-refresh (#4770) refactor(host-kit): add request Scope and use it for the wait capture deadline (#4794) fix(android): let permission all change nothing on an app that declares no permissions (#4796) fix(cli): replace the CLI session and generated remote config instead of rewriting them in place (#4797) fix(host-kit): accept a group-writable script directory the user owns (#4799)
Summary
gesture pannow accepts the existing--hold-msflag (MCP inputholdMs) as a hold at the origin before the move starts:Step 0 evidence (below) showed a real gap: hold-activated drags — reorder handles with no accessibility element (no @ref), long-press-armed PanResponders, iOS Reminders edit-mode grips — cannot be started by coordinate input today, because
gesture dragonly accepts @refs/selectors andgesture panmoves immediately without a hold. The fix reuses the existing flag and the same contact-hold plan shapegesture dragalready produces, so no iOS/Android runner or backend changes were needed. 22 files changed: contracts (input/plan/normalization), command-surface, command-runtime, daemon replay, CLI/MCP metadata, docs, tests, plus a reorderable-list lab in the test app whose drag handle is a plain View with a hold-armed PanResponder.holdMsis single-pointer only (rejected with--pointer-count 2), capped soholdMs + durationMs <= 10000, and rejected for all other gesture kinds.Review fixes (at head
c74f7b7b63)Held pan is admitted through the target-authored-drag tier.
gestureRuntimeTiernow routesintent === 'pan' && holdMs > 0totarget-authored-drag, so endpoint-only plan lowering (Linux, HarmonyOS, macOS, tvOS) refuses the held pan withUNSUPPORTED_OPERATIONand the drag hint before dispatch instead of silently dropping the hold and reporting success. The drag-tier binding forwards the pan keyboard-inclusive viewport read. Thegestureshelp topic andcommands.mdnow scope the--hold-mspan line to the same platforms asgesture drag(Android touch devices and iOS/iPadOS). Evidence — admission unit tests (all passing):plus a tier unit test (
platform-runtime-operations.test.ts: held pan ->target-authored-drag, holdMs 0/absent ->plan) and a handler test proving a held pan is admitted while the plain plan cell is unavailable (interaction-gesture-viewport.test.ts).Pan reads
holdMsonly from explicit input. The CLI parser strips a config/env/remote-configholdMsforgesture panunless--hold-mswas typed (providedFlags), and the MCP config merge skips it forkind: 'pan'unless the tool call carries the field — so a press-oriented"holdMs": 300config no longer makes every pan hold and no longer fails two-finger pans.gesture tapkeeps the config default. Parser tests: config holdMs + pan -> no hold (and payload has no holdMs); explicit--hold-ms 800+ config -> 800; two-finger pan + config holdMs -> parses and dispatches with no holdMs and no error; tap + config holdMs -> 300. MCP test covers the same three cases throughresolveMcpConfigDefaults.Live re-verification at
c74f7b7b63(branch-built CLI, repacked test app; verbatim transcripts)iOS (iPhone Air simulator,
gesture panon the reorder handle of the lab's reorder list):Android (emulator agent-device-fieldreport-api37):
iOS smoke CI log at the fixed head
Run
44585385953, jobSmoke Tests (ios): 0##[error]lines;✓ 01-settings.ad 13.5s,✓ gesture-pan-duration.ad 6.21s. The new reorder rows did not shift any coordinate used by the committed replays (the lab sits below the gesture target; the pan-duration replay passes).Smoke TestsandSmoke Tests (macos)also SUCCESS.Fix index (file:line at
c74f7b7b63)pan && holdMs > 0 -> target-authored-drag:packages/contracts/src/platform-runtime-operations.ts:384; tests:packages/contracts/src/platform-runtime-operations.test.ts(held/unheld tier),packages/daemon/src/core/gesture-runtime-admission.test.ts(Linux/macOS refusal + two-way Linux admission test),packages/daemon/src/execution/interaction/internal/interaction-gesture-viewport.test.ts(held pan admitted while plan cell unavailable, records holdMs).src/cli/parser/args.ts:220,417(CLI strip) andsrc/mcp/tool-input-config.ts:42(MCP guard: config holdMs applies only to gesture tap); tests:src/cli/parser/__tests__/args-parse-interaction.test.ts(config+pan no hold, explicit --hold-ms wins, two-finger+config no error, tap keeps config),src/mcp/tool-input-config.test.ts(now including the fling case: config holdMs + fling merges no holdMs and the payload parses).src/commands/schema/cli-help-gestures.ts:25,website/docs/docs/commands.md:570,packages/command-surface/src/interaction/metadata.ts:245(MCPholdMsdescription); test:src/mcp/__tests__/command-tools-gesture-tap.test.ts.Step 0 evidence (installed CLI 0.21.36 = "today")
snapshot -i?gesture drag(refs)gesture pan(coords)swipeDecision: the gap is real (ref-less handles + hold activation), so the feature was built as
gesture pan --hold-ms.Validation
c74f7b7b63(brancht3/hold-drag-coordinate-support; device runs were executed at this headc74f7b7b63).vitest run packages/contracts/src/gesture-{input,normalization,plan}.test.ts packages/command-surface/src/interaction/gesture.test.ts packages/command-runtime/src/commands/interaction/runtime/gestures.test.ts packages/ad-script/src/internal/__tests__/script.test.ts packages/daemon/src/core/__tests__/session-store.test.ts src/cli/parser/__tests__/args-parse-interaction.test.ts src/mcp/__tests__/command-tools-gesture-tap.test.ts); cli-help tests 52 pass.pnpm buildgreen;pnpm formatclean. Fullunit-coresweep showed only load-sensitive daemon/host-kit timing flakes unrelated to this change (they pass in isolation).--hold-ms--hold-mspan 364 408 0 100 600--hold-ms 800: yespan (117,304) +186,0 500--hold-ms 800: yespan 388 283 0 -124 700--hold-ms 900: order changed (Scheduled | All | Today | Completed)pan 932 205 0 200 600--hold-ms 800: yespan 302 832 476 0 500--hold-ms 800: yespan 413 1650 509 0 700--hold-ms 1000: icons rearrangedpan 110 443 48 0 500-> "pan duration >=400ms"; Android fresh launchpan 300 1237 180 0 500+--pointer-count 2-> "two-pointer pan activations 1".gh pr checks.activateAfterLongPress(500)fixture on both platforms.🤖 Generated with Claude Code