From eb484d869a34558714929088a76cdc60280ad6ca Mon Sep 17 00:00:00 2001 From: finalerock44 Date: Thu, 12 Nov 2026 11:14:29 +0000 Subject: [PATCH] docs(agent-devices): hide the keyboard before inspect when an app's own fields go missing Some apps, seen with React Native apps on Android that slide an input bar up above the keyboard, report those views with clipped accessibility bounds while the keyboard is open. They are then missing from inspect even with all, while the screenshot still shows them. Say so on the MCP tools, CLI, REST and skill pages and in the OpenAPI description, with the workaround: hide the keyboard, then inspect again. --- api/device-sessions.md | 2 +- cli/dcd-device.md | 2 ++ mcp/agent-devices-skill.md | 4 ++-- mcp/agent-devices-tools.md | 2 ++ public/openapi.yaml | 5 +++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/api/device-sessions.md b/api/device-sessions.md index 7c68e0c..80df63d 100644 --- a/api/device-sessions.md +++ b/api/device-sessions.md @@ -23,7 +23,7 @@ A session is named by its `id` (for example `brave-teal-otter`) in every path. E | `POST /device/sessions/:id/actions` | One action: `tap` (`x`/`y` percent, `text` or `id`), `type` (`text`, and `sensitive: true` to keep it secret), `swipe` (`direction`: `up`, `down`, `left` or `right`, or `from`/`to` points in percent), `press_key` (`key`: `back`, `home`, `enter`, `backspace`, `tab`, `volume_up`, `volume_down`, `lock` or `power`) | | `POST /device/sessions/:id/run` | Run Maestro: `{ "yaml": "..." }` for one flow, or `{ "flowUploadId": "...", "flow"?: "..." }` for a [flow bundle](#flow-bundles). `env` passes [secrets and variables](#secrets). Waits up to 110 s, or `waitSeconds` (0 to 300), then answers `running` with a `command_id`. A failed run's result includes `screen_text`, the app's visible text after the failure | | `GET /device/sessions/:id/commands/:commandId` | The status and result of a `run` that answered `running`. `?waitSeconds=` (0 to 300) waits for it to finish instead of answering at once | -| `GET /device/sessions/:id/inspect` | The screen as compact JSON. The on-screen keyboard and the System UI are left out unless you add `?all=true` | +| `GET /device/sessions/:id/inspect` | The screen as compact JSON. The on-screen keyboard and the System UI are left out unless you add `?all=true`. Some apps also drop their own fields from the tree while a keyboard is open, and `all` cannot bring them back: hide the keyboard first (`run` with `- hideKeyboard`), then inspect again | | `GET /device/sessions/:id/screenshot` | The screen as it is now, as a JPEG data URL. `fresh` is `false` when no new frame came within 3 s, so this is the latest there is | | `GET /device/sessions/:id/logs` | The installed app's recent device log lines. `lines` (default 200, at most 2000), `level` (`warning` or `error`) and `grep` (any case) narrow them. The answer stops at 24 KB, with `truncated: true` when older lines were left out | diff --git a/cli/dcd-device.md b/cli/dcd-device.md index 94539a4..1fdcd20 100644 --- a/cli/dcd-device.md +++ b/cli/dcd-device.md @@ -91,6 +91,8 @@ Launch an app: the installed one, or a bundle id or package name. `--clear-state The screen as compact JSON: each element with its text, id, accessibility label or hint, any state (checked, selected, focused or disabled), and its bounds. Use these to target `tapOn` in a flow. The on-screen keyboard's keys and the System UI (the status and navigation bars) are left out; `--all` lists them too. +While a keyboard is open, some apps report their own fields and buttons with clipped accessibility bounds, so they are missing from `inspect` even with `--all`, while the screenshot still shows them. Seen with React Native apps on Android that slide an input bar up above the keyboard. Hide the keyboard first, with a flow that runs `- hideKeyboard`, then inspect again. Typing does not need the keyboard on screen. + ## `dcd device screenshot [id]` Save a screenshot. `-o ` sets where (default `./-