Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/command-surface/src/interaction/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,9 @@ const swipeCommandFacet = defineCommandFacet({
effect: 'write',
text: {
summary: 'Fling between coordinates',
searchHint: 'drag gesture',
searchHint: 'flick slide carousel page',
cliDetail:
'The first read after a swipe waits for two captures to agree. --no-post-gesture-stabilization skips that wait for a caller whose own polling verifies the screen.',
'A swipe never pauses on the start point, so it does not engage a hold-to-reorder handle -- use gesture drag @src @dst for a held move. The first read after a swipe waits for two captures to agree. --no-post-gesture-stabilization skips that wait for a caller whose own polling verifies the screen.',
},
metadata: metadata('swipe'),
run: (client, input) => client.interactions.swipe(input as SwipeOptions),
Expand Down Expand Up @@ -661,9 +661,9 @@ const gestureCommandFacet = defineCommandFacet({
effect: 'destructive',
text: {
summary: 'Run pan, fling, swipe, pinch, rotate, transform, tap, or drag gestures',
searchHint: 'multi-touch zoom',
searchHint: 'reorder zoom multi-touch',
cliDetail:
'Argument shapes: pan <x> <y> <dx> <dy> [durationMs], fling <up|down|left|right> <x> <y> [distance], swipe <left|right|left-edge|right-edge>, pinch <scale> [x] [y], rotate <degrees> [x] [y], transform <x> <y> <dx> <dy> <scale> <degrees> [durationMs], tap <x1> <y1> <x2> <y2> [... <x5> <y5>] [--hold-ms <ms>] [--count <n>] [--pause-ms <ms>], or drag <source-selector|pinned-ref> <destination-selector|pinned-ref> [sourceHoldMs] [moveMs] [destinationHoldMs]. For command plans, output only command lines. Android transform verification should use all app-observable effects, for example wait text "pan changed yes", wait text "pinch changed yes", and wait text "rotate changed yes", not exact transform values. gesture swipe accepts --no-post-gesture-stabilization to skip the stabilization wait before the next read, for a caller whose own polling verifies the screen.',
'Argument shapes: pan <x> <y> <dx> <dy> [durationMs], fling <up|down|left|right> <x> <y> [distance], swipe <left|right|left-edge|right-edge>, pinch <scale> [x] [y], rotate <degrees> [x] [y], transform <x> <y> <dx> <dy> <scale> <degrees> [durationMs], tap <x1> <y1> <x2> <y2> [... <x5> <y5>] [--hold-ms <ms>] [--count <n>] [--pause-ms <ms>], or drag <source-selector|pinned-ref> <destination-selector|pinned-ref> [sourceHoldMs] [moveMs] [destinationHoldMs]; drag holds the source down first (800 ms by default) before moving, which is what engages a reorder handle. For command plans, output only command lines. Android transform verification should use all app-observable effects, for example wait text "pan changed yes", wait text "pinch changed yes", and wait text "rotate changed yes", not exact transform values. gesture swipe accepts --no-post-gesture-stabilization to skip the stabilization wait before the next read, for a caller whose own polling verifies the screen.',
},
metadata: metadata('gesture'),
run: (client, input) =>
Expand Down
5 changes: 3 additions & 2 deletions packages/command-surface/src/interaction/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ const interactionCommandDescriptions = {
'Hold a UI target by snapshot ref, selector, or coordinates to open a context menu or perform another hold gesture. The durationMs input overrides the default hold duration.',
hover:
'Move the pointer over a UI target by snapshot ref, selector, or coordinates without pressing, to reveal hover-gated UI such as row toolbars or menus. Web only; touch platforms have no hover state. The settle option returns the UI diff revealed by the hover.',
swipe: 'Quick coordinate fling with optional repeat pattern.',
swipe:
'Quick coordinate fling with optional repeat pattern; the contact starts moving immediately, with no pause on the start point.',
focus:
'Move input focus to explicit screen coordinates without entering text. This command changes focus only and does not enter or replace text.',
type: 'Append text to the currently focused input. This requires an active input and preserves its existing text.',
Expand All @@ -83,7 +84,7 @@ const interactionCommandDescriptions = {
is: 'Check whether a selector satisfies a UI predicate such as visible, hidden, exists, absent, editable, selected, focused, or text. `absent` passes only when one readable, complete, settled, unscoped, full-depth accessibility capture has zero matches. This command checks the current condition without polling.',
find: 'Find by text/label/value/role/id and run action; the action defaults to click. The role locator matches snapshot kind vocabulary (button, text, text-field, switch, ...); pre-reconciliation leaf spellings (statictext, edittext, textview) stay accepted on the nodes that carried them during a deprecation window. The focus and type actions aim at a text field: the match or the field holding it, even beside other fields, or else the one enabled on-screen field inside the match. Several enabled on-screen fields inside the match refuse with AMBIGUOUS_MATCH and the field candidates, and a disabled target refuses with reason target_disabled. Web text boxes are not recognized as text fields.',
gesture:
'Perform a structured pan, fling, swipe, pinch, rotate, transform, tap, or drag gesture. Each gesture kind has its own inputs. A tap touches 2 to 5 points at once; count and pauseMs control repetition.',
'Perform a structured pan, fling, swipe, pinch, rotate, transform, tap, or drag gesture. Each gesture kind has its own inputs. A tap touches 2 to 5 points at once; count and pauseMs control repetition. A drag takes a source and a destination ref or selector and holds the source down for 800 ms by default before carrying it over, which is how a list item changes position or a drop target is hit.',
} as const;

type InteractionCommandName = keyof typeof interactionCommandDescriptions;
Expand Down
1 change: 1 addition & 0 deletions src/commands/schema/cli-help-gestures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Platform quirks:
tvOS coordinate pan and fling preserve only the dominant direction as a remote swipe; authored endpoints and duration are not preserved.
Gesture planning prefers the active-app frame; a backend without a gesture viewport resolver falls back to the visible snapshot union, which can be less accurate near edges.
Rare iOS accessibility gap: a row shown disabled/hittable:false where press reports success but no UI change, or a collapsed composite control with no child refs -- run snapshot -i --json, compute the target center from rects, press x y, then diff snapshot -i. Coordinates are fallback-only; document why you used them.
Drag to reorder or drop: gesture drag @e12 @e40 holds the source (800 ms by default; positional sourceHoldMs overrides it), moves, and releases on the destination. swipe and fling never hold, so they do not start a reorder.
On mobile, after scroll, swipe, or gesture swipe, the next read waits for two captures to agree; web and desktop targets do not wait. A caller whose own polling verifies the screen adds --no-post-gesture-stabilization to skip that wait; a directional scroll then also skips its movement check.

macOS:
Expand Down
Loading