Skip to content

Commit 87dbd70

Browse files
thymikeeclaude
andauthored
docs(interaction): state that click and press report dispatch, not landing (#3355)
* docs(interaction): state that click and press report dispatch, not landing (#3335) Click and press help and the commands guide now say success means the tap was dispatched, and name --verify, --settle, and wait as the ways to confirm it landed. Both tap-outcome waivers in the guarantee matrix track #3335 instead of the closed #1081 umbrella. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(interaction): describe click and press success without assuming a tap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d71441e commit 87dbd70

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎packages/contracts/src/interaction-guarantees.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ export type InteractionPathContract = {
150150

151151
const GAPS_UMBRELLA_ISSUE = 'https://github.com/callstack/agent-device/issues/1081';
152152
const PARENT_OWNED_TOUCH_POINT_GAP_ISSUE = 'https://github.com/callstack/agent-device/issues/1718';
153+
const TAP_OUTCOME_NOT_OBSERVED_GAP_ISSUE = 'https://github.com/callstack/agent-device/issues/3335';
153154

154155
// Every path shares the SAME cell by construction: response payloads have one
155156
// construction site (ADR 0011 Layer 2), and the hand-rolled-literal guard test
@@ -166,7 +167,7 @@ const TAP_OUTCOME_NOT_OBSERVED_GAP: GuaranteeEnforcement = {
166167
kind: 'waived',
167168
reason:
168169
'gap: the response reports the dispatch only; only opt-in --verify/--settle capture post-action evidence into it. The deferred marks set after dispatch (Android snapshot freshness after press/click, post-gesture stabilization when the request sets postGestureStabilization) are judged by the next capture, never in this response, and the iOS ambiguous-failure corroboration reconsiders only a thrown runner error.',
169-
trackingIssue: GAPS_UMBRELLA_ISSUE,
170+
trackingIssue: TAP_OUTCOME_NOT_OBSERVED_GAP_ISSUE,
170171
};
171172

172173
// Both Maestro-compatible fast paths (src/daemon/interaction/internal/interaction-touch-direct-ios.ts)
@@ -190,7 +191,7 @@ const DIRECT_IOS_OUTCOME_NOT_OBSERVED_GAP: GuaranteeEnforcement = {
190191
kind: 'waived',
191192
reason:
192193
"gap: this replay-only route observes no outcome beyond the runner's own report; --verify/--settle do not apply here (see the inapplicable cells on this row), and the shared ambiguous-failure corroboration only reconsiders a thrown error, never a successful dispatch.",
193-
trackingIssue: GAPS_UMBRELLA_ISSUE,
194+
trackingIssue: TAP_OUTCOME_NOT_OBSERVED_GAP_ISSUE,
194195
};
195196

196197
// The two runtime tree paths (selector and ref resolution) run the SAME shared

‎src/commands/interaction/metadata.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ const FIND_ACTION_VALUES = [
5757

5858
const interactionCommandDescriptions = {
5959
click:
60-
'Activate a UI target by snapshot ref, selector, or coordinates. Prefer a ref or selector after a snapshot; use coordinates only when semantic targeting is unavailable. This can change app state; use settle or verify to confirm the result without a follow-up snapshot.',
60+
'Activate a UI target by snapshot ref, selector, or coordinates. Prefer a ref or selector after a snapshot; use coordinates only when semantic targeting is unavailable. This can change app state. Success means the click was dispatched, not that it landed: use settle or verify to confirm the result without a follow-up snapshot, or wait for the expected screen.',
6161
press:
62-
'Short-press a UI target by snapshot ref, selector, or coordinates. Use longpress instead when the target requires a context-menu or hold gesture.',
62+
'Short-press a UI target by snapshot ref, selector, or coordinates. Use longpress instead when the target requires a context-menu or hold gesture. Success means the press was dispatched, not that it landed: use settle or verify to confirm the result, or wait for the expected screen.',
6363
fill: 'Replace text in a UI input selected by snapshot ref, selector, or coordinates. Pass an empty text to clear the field. Inspect unconfirmed evidence and assert the expected value or resulting screen before continuing. Prefer refs or selectors after snapshot; use recordAs to keep sensitive text out of a recorded replay while sending it to the live app.',
6464
longpress:
6565
'Hold a UI target by snapshot ref, selector, or coordinates to open a context menu or perform another hold gesture. Set durationMs when the default hold duration is unsuitable.',

‎website/docs/docs/commands.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ agent-device gesture transform 200 420 80 -40 2 35 700 # combined pan, zoom, and
464464
```
465465
466466
`fill` clears then types. `type` does not clear.
467+
A successful `click` or `press` means the action was sent to the target where the command found it, whether that is a tap, a mouse click, or an accessibility action. It does not confirm that the action reached that element or changed the screen. When your next step depends on it, add `--verify` to learn whether the screen changed (`changedFromBefore`), add `--settle` to get the diff once the UI goes quiet, or follow with `wait <selector>` for the screen you expect.
467468
When an interaction fails, see [Retry after a failed command](#retry-after-a-failed-command) before you retry.
468469
`type` accepts text only. Do not pass `@ref` to `type`; use `fill @ref "text"` to target a field directly, or `press @ref` then `type "text"` to append in the focused field.
469470
If `type` reports `TEXT_INPUT_NOT_FOCUSED`, focus a visible text input and retry; when accessibility does not expose the input, use a coordinate focus command before typing.

0 commit comments

Comments
 (0)