Repository navigation
feat(device): inspect --all, element state, and screen text on a failed run - #273
Merged
Merged
Conversation
…ed run `dcd device inspect` now leaves out the on-screen keyboard and System UI by default (the API does this), says when a keyboard is open and how many elements it left out, and `--all` shows them. Elements show checked, selected, focused and disabled. A failed `dcd device run` prints the app's visible text after the failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Matches API changes to the device session endpoints.
dcd device inspect— the API now leaves out on-screen keyboard keys and System UI (status and navigation bars) by default. The command prints a note when a keyboard is open and says how many elements were left out. The new--allflag sends?all=trueto include them.checked,selected,focusedanddisabledwhen the API reports them, so you can write state assertions such asassertVisible: { text: "English", selected: true }.dcd device run— when the API returnsresult.screen_text, the command prints it under "On screen after the failure". This explains a near miss without a screenshot, for example when the app says "centre" and the flow expected "center".dcd mcp— no change needed. The bridge proxies the hosted tool schemas, so the newinspect_screenallinput passes through.All of these work with older APIs: the new fields are optional, and an older API ignores
?all=true.Test plan
pnpm typecheck,pnpm lint(no new warnings),pnpm test:unit(494 passing)inspect --allURL,formatElementstate,screen_textprinting🤖 Generated with Claude Code