Skip to content

Commit 4fd5d39

Browse files
committed
docs(gestures): make the migration sweep and MCP claim accurate
Re-review findings on 328bad8 (both migration-guide accuracy). The saved-script sweep matched only the five-argument `swipe` form; it missed timed `gesture fling`, timed `gesture swipe`, and `gesture rotate ... velocity`, so the repository-cleanliness step was incomplete. Provide one grep per retired form (number-or-`${VAR}` token), each verified to flag the removed shape and skip the valid one. The MCP section claimed the structured rejection carries the CLI's concrete replacement command. It does not: `readGesturePayload` and `assertNoRemovedSwipeInput` return a message that names the removed key and the replacement command (e.g. `gesture fling does not accept durationMs; use gesture pan for timed movement`) but not the fully-substituted coordinate rewrite, because the structured request carries no positional string to rewrite. Describe what the structured path actually returns.
1 parent d6612fe commit 4fd5d39

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

website/docs/docs/migrating-gestures.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ await device.interactions.swipe({ from: { x: 197, y: 650 }, to: { x: 197, y: 300
8686

8787
The `swipe`, `gesture` (`fling`, `swipe` kinds), and `gesture rotate` tool schemas no longer
8888
advertise `durationMs` or `velocity`, so an agent reading the schema will not produce the removed
89-
form. An agent that sends one anyway — from a cached schema or a memorized example — gets the same
90-
`INVALID_ARGS` message as the CLI, with the concrete replacement command in it.
89+
form. An agent that sends one anyway — from a cached schema or a memorized example — gets an
90+
`INVALID_ARGS` rejection that names the removed key and the command to use instead, for example
91+
`gesture fling does not accept durationMs; use gesture pan for timed movement`. This is the
92+
structured-input equivalent of the CLI error; it names the replacement command but, unlike the CLI
93+
and `.ad` messages, does not echo a fully-substituted rewrite, because the structured request
94+
carries no positional string to rewrite.
9195

9296
No MCP server configuration changes.
9397

@@ -119,10 +123,18 @@ swipe 206 650 206 300 --count 2 --pause-ms 200 --pattern one-way
119123
A duration held in a variable (`swipe 197 650 197 300 ${DURATION}`) is reported the same way — the
120124
preflight counts arguments, so it does not need the value.
121125

122-
To find every affected line across a suite:
126+
To find every affected line across a suite — one pattern per retired form, where a token is a
127+
number or a `${VAR}`:
123128

124129
```bash
130+
# swipe x1 y1 x2 y2 durationMs
125131
grep -rnE '\bswipe( +([-0-9.]+|\$\{[^}]*\})){5}' --include='*.ad' .
132+
# gesture fling <direction> x y distance durationMs
133+
grep -rnE '\bgesture +fling +[a-z]+( +([-0-9.]+|\$\{[^}]*\})){4}' --include='*.ad' .
134+
# gesture swipe <preset> durationMs
135+
grep -rnE '\bgesture +swipe +[a-z-]+ +([-0-9.]+|\$\{[^}]*\})' --include='*.ad' .
136+
# gesture rotate degrees x y velocity
137+
grep -rnE '\bgesture +rotate( +([-0-9.]+|\$\{[^}]*\})){4}' --include='*.ad' .
126138
```
127139

128140
Re-recording also produces a migrated script: the recorder writes the canonical form, so a fresh

0 commit comments

Comments
 (0)