Skip to content

feat(devices): show devices in an interactive card - #39

Open
grabbou wants to merge 1 commit into
feat/claude-desktopfrom
feat/devices-card
Open

grabbou wants to merge 1 commit into
feat/claude-desktopfrom
feat/devices-card

Conversation

@grabbou

@grabbou grabbou commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #34. Closes #32.

Asking Mobile Dev to list devices now shows an interactive card instead of a model-written table. mobile_show_devices replaces mobile_choose_devices as the one user-facing device tool.

CleanShot 2026-10-24 at 10 52 02@2x
  • Listing (no selectionMode): one card with every simulator, emulator and physical device. Running devices come first, then physical devices with their connection state, then stopped devices grouped by OS version (collapsible, with a filter once there are more than 8). Each row has Boot or Stop, and checked devices go to chat with their IDs. The text result is a one-line summary so the model doesn't repeat the list. Hosts without app cards get the list as text.
  • Choosing (selectionMode + message): Codex gets the native form as before, and the card then shows only the result. Claude Desktop gets the card with a Use button; the call returns immediately and tells the model to wait for the reply in chat. Hosts with neither return an error, so the model asks in chat.
  • devices is now optional. If omitted, the tool discovers devices itself. If one source fails (no Android SDK, older Xcode), the others are still listed with a note. The form shows at most 20 devices, running ones first.
  • Server instructions, the skill and the docs now point list and show requests at this tool. The list tools remain for the model's own lookups.

Telemetry: adds a devices UI surface (readiness, ui.devices.process, ui.devices.message_ack, device-count gauges, boot/stop/send counters). The existing device_picker.* metrics keep their names and gain a fixed mode attribute (form / card / browse) and a rendered outcome. docs/telemetry.md covers the change in what prepare measures. No device names, IDs or chat text are sent.

Assumption: a host that advertises native forms is treated as able to show app cards, because Codex may not advertise the standard MCP Apps extension.

Testing:

  • 809 of 811 tests pass, plus new device tests for browse, card and no-UI hosts. The failing http-runtime socket QoS test fails the same way on the base branch.
  • The build and the MCP tool budget check pass.
  • I loaded the built card in a fake MCP Apps host and checked browse, Boot (the Android ID changed from AVD name to serial), multi-select and send, choose mode, the filter, and the form-result view.
  • Not yet tried live in Claude Desktop or Codex.

🤖 Generated with Claude Code

Replace mobile_choose_devices with mobile_show_devices, the one
user-facing device tool. Without selectionMode it lists every simulator,
emulator and physical device in an inline card with Boot/Stop and a Use
button that sends the selection to chat. With selectionMode it uses the
native Codex form when available, the card elsewhere, and asks in chat
on hosts with neither. Candidate devices are optional and discovered
when omitted. Card results return a short summary so the model does not
repeat the list.

Adds the devices telemetry surface and a mode attribute on the existing
device_picker metrics.

Closes #32

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grabbou
grabbou added this pull request to stack #41 October 24, 2026 09:09
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