Skip to content

feat: open link command, device location and timeout options - #327

Merged
finalerock44 merged 3 commits into
devfrom
feat/device-open-link-location-timeout
Nov 17, 2026
Merged

finalerock44 merged 3 commits into
devfrom
feat/device-open-link-location-timeout

Conversation

@finalerock44

Copy link
Copy Markdown
Contributor

What & why

Type of change

  • fix — bug fix
  • feat — new feature
  • perf — performance improvement
  • refactor — code change that's neither a fix nor a feature
  • docs — documentation only
  • chore / ci / build / test — tooling, no user-facing change
  • Breaking change (title has ! or PR notes a BREAKING CHANGE:)

Checklist

  • PR title follows the Conventional Commits format (see comment above)
  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • I have not bumped the version or edited CHANGELOG.md (the release workflow handles this)
  • I have signed the CLA (the bot will prompt on first contribution)
  • Docs / README.md / STYLE_GUIDE.md updated if behaviour or output changed

How to test

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.
@finalerock44 finalerock44 changed the title Feat/device open link location timeout feat: open link command, device location and timeout options Nov 17, 2026
@finalerock44 finalerock44 self-assigned this Nov 17, 2026
Comment thread src/commands/device.ts Resolved
@claude

claude Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Code review

Found 2 issues:

  1. With --sensitive, the open-link link still reaches telemetry in plain text. It is a positional argument, and scrubArgv only redacts the values of known flags. See the inline comment.

  2. The PR title Feat/device open link location timeout is not a Conventional Commit. CLAUDE.md says: "PRs are squash-merged, so the PR title becomes the commit and must be a Conventional Commit. The title ... is what the release reads to compute the next version and the changelog entry". The PR Title check will fail. A title like feat(device): add open-link, set-location and tap --timeout would pass.

dcd-cli/CLAUDE.md

Lines 58 to 60 in c523f9e

**`dcd mcp install [client]`** (`src/utils/mcp-install.ts`) adds the server to Claude Code (`claude mcp add --scope user`), VS Code (`code --add-mcp`), or Claude Desktop / Cursor (merges an entry into their JSON config, and refuses a file that isn't plain JSON rather than rewrite it). Entries always start dcd by **full path**, since desktop apps opened from the Dock don't read the shell rc that puts `~/.dcd/bin` on PATH: the standalone binary is `process.execPath`; an npm install is node (`stableNodePath`, the PATH entry rather than Homebrew's versioned Cellar path) plus `argv[1]` as started, not resolved. It refuses to run from source or from the npx cache. Note citty runs a parent's `run` **after** its subcommand, so `mcpCommand.run` returns early when a positional is present — without that, `dcd mcp install` would go on to start a server.
## Contributing

🤖 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.
@finalerock44
finalerock44 merged commit 7a20e48 into dev Nov 17, 2026
9 checks passed
@finalerock44
finalerock44 deleted the feat/device-open-link-location-timeout branch November 17, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant