feat: show device disconnected state in IDE plugin#1215
Conversation
Replace stale screenshot with context-aware placeholder when the observed device disconnects. Shows "Device Disconnected" text, a low-contrast reconnecting spinner when the socket exists, or a "Restart MCP Daemon" button when the daemon socket is missing. Clears all stale data (hierarchy, selection, performance metrics) on disconnect and resumes live data on reconnect. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e709d9ea18
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onElementHovered = { state.hoverElement(it) }, | ||
| showTapTargetIssues = state.showTapTargetIssues, | ||
| onToggleTapTargetIssues = { state.toggleTapTargetIssues() }, | ||
| connectionStatus = state.connectionStatus, | ||
| socketExists = ObservationStreamClient.socketExists(), | ||
| onRestartDaemon = onRestartDaemon, |
There was a problem hiding this comment.
Make daemon-down state reactive to socket changes
The UI’s daemon-down detection is computed by calling ObservationStreamClient.socketExists() directly during composition, but there’s no state/flow that will trigger recomposition when the socket file is created or removed. This means if the device disconnects first (so connectionStatus is already Disconnected) and the daemon is killed later, the socket can disappear without any recomposition, leaving the placeholder stuck in “Device Disconnected” with no “Restart MCP Daemon” button. To reliably reflect daemon state changes, the socket existence check needs to be driven by a stateful value (e.g., a flow/polling state) rather than a one-off read in composition.
Useful? React with 👍 / 👎.
MCP BenchmarksOverall Status: ✅ PASSED Context Thresholds
Overall Status: ✅ PASSED Generated at 2026-02-09T03:33:33.225Z Tool Call ThroughputSample Size: 50 iterations per tool Fast Operations (<100ms)
Medium Operations (100ms-1s)
Slow Operations (1s+)
Summary: 7/7 tools passed Generated at 2026-02-09T03:33:09.670Z Startup PerformanceMCP Server (stdio)
Device discovery: skipped (not run) Daemon
Overall Status: ✅ PASSED Generated at 2026-02-09T03:34:24Z NPM Unpacked Size
Package: @kaeawc/auto-mobile@0.0.10 Overall Status: ✅ PASSED Generated at 2026-02-09T03:32:52.932Z |
Summary
Test Plan
./gradlew -p android :ide-plugin:buildpassesCloses #1202
🤖 Generated with Claude Code