Repository navigation
feat: open link command, device location and timeout options - #327
Merged
Merged
Conversation
Three additions to `dcd device`, for the device session API's new actions. `dcd device open-link [id] <url>` opens a link on the device as tapping it would: a deep link into an app, or a web link in the app that claims it or the browser. `--sensitive` keeps a link that carries a token out of the timeline and out of what the command prints. `dcd device set-location [id] --latitude <n> --longitude <n>` sets the device's GPS position in decimal degrees. South and west are negative. `dcd device tap --text|--rid ... --timeout <seconds>` says how long to wait for the element before the tap fails (0 to 60; 0 looks once). Without it the device waits 17 seconds, as before. A lone positional with a colon is the link, not a session id, as a lone key is for `press-key`. Usage errors answer inside the --json envelope and call nothing.
Contributor
Code reviewFound 2 issues:
Lines 58 to 60 in c523f9e 🤖 Generated with Claude Code |
Telemetry records the argv of every command, with the values of a few flags redacted by name. `dcd device open-link` takes its link as a positional, which no flag name marks, so a link sent with `--sensitive` was kept out of the terminal and the session's timeline and still sent to telemetry in full, token included. `scrubArgv` now redacts everything after `device open-link` that is not a flag, and the value of any flag there but the API URL: with or without `--sensitive`, since a sign-in link is a credential whether or not the caller marked it. The session id goes with it, and a link too malformed to send is not kept either. The subcommand is found by name anywhere after `device`, so a flag's value in between cannot hide it. `dcd device type --text` had the same hole: `--text` was never in the list, so a typed password or code went to telemetry even with `--sensitive`. It is redacted for `device type`; `device tap --text`, an element's label, is kept.
Merged
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.
What & why
Type of change
fix— bug fixfeat— new featureperf— performance improvementrefactor— code change that's neither a fix nor a featuredocs— documentation onlychore/ci/build/test— tooling, no user-facing change!or PR notes aBREAKING CHANGE:)Checklist
pnpm lintpassespnpm typecheckpassespnpm buildpassesCHANGELOG.md(the release workflow handles this)README.md/STYLE_GUIDE.mdupdated if behaviour or output changedHow to test