Skip to content

Commit 49af7b3

Browse files
committed
docs(snapshot): document the viewport a snapshot publishes (#3182)
`--json` consumers now read the box the rects are measured in off the response instead of inferring one from the largest rect on screen. commands.md names each producer's answer, the absence rule, and the separation from content-safe gesture bounds.
1 parent cbf00f4 commit 49af7b3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎website/docs/docs/commands.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,13 @@ agent-device get attrs @e1
411411
last: footers, tab bars, items after a long list, even when on screen. The snapshot carries a
412412
warning that says so; navigate or scroll so fewer elements render and re-run, and use
413413
`screenshot` as visual truth for the rest.
414+
- `viewport: { width, height }` names the box the node rects are measured in, in the same coordinate
415+
space and orientation as the rects beside it, so a consumer scales and clips against the screen it
416+
was shown instead of inferring one from the largest rect on screen. Which surface it names is the
417+
producer's answer: the app window on iOS (so iPad Split View and a foldable panel do not inflate
418+
it), the measured screen on Android and Apple TV, the browser viewport on web. It is absent when
419+
the producer measured no box — a bare provider tree, a desktop capture with no single window —
420+
and never reported as a zero. It is the full size only; content-safe gesture bounds are separate.
414421
- `--scope <text|@ref>` returns the subtree of the first node in document order whose label, value,
415422
or identifier contains the scope text (case-insensitive) and whose subtree still has content in
416423
the requested projection, re-rooted at depth 0; no match returns an empty snapshot rather than the

0 commit comments

Comments
 (0)