Skip to content

feat: show device disconnected state in IDE plugin#1215

Merged
kaeawc merged 1 commit intomainfrom
work/1202-ide-plugin--show--device-disconnected--w
Feb 9, 2026
Merged

feat: show device disconnected state in IDE plugin#1215
kaeawc merged 1 commit intomainfrom
work/1202-ide-plugin--show--device-disconnected--w

Conversation

@kaeawc
Copy link
Owner

@kaeawc kaeawc commented Feb 9, 2026

Summary

  • Replace stale screenshot with context-aware "Device Disconnected" placeholder when the observed device disconnects
  • Show a low-contrast reconnecting spinner when the socket file exists, or a "Restart MCP Daemon" button when the daemon is down
  • Clear all stale data (view hierarchy, selection, performance metrics) on disconnect and resume live data on reconnect

Test Plan

  • ./gradlew -p android :ide-plugin:build passes
  • Connect a device in Real mode, observe layout, then disconnect — verify screenshot area shows "Device Disconnected", hierarchy panel clears, performance metrics clear
  • Kill the daemon — verify "Restart MCP Daemon" button appears; clicking navigates to device panel
  • Verify Fake mode is unaffected

Closes #1202

🤖 Generated with Claude Code

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>
@kaeawc kaeawc enabled auto-merge (squash) February 9, 2026 03:30
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines 188 to +193
onElementHovered = { state.hoverElement(it) },
showTapTargetIssues = state.showTapTargetIssues,
onToggleTapTargetIssues = { state.toggleTapTargetIssues() },
connectionStatus = state.connectionStatus,
socketExists = ObservationStreamClient.socketExists(),
onRestartDaemon = onRestartDaemon,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

MCP Benchmarks

Overall Status: ✅ PASSED
Status by Benchmark: Context Thresholds: ✅ | Tool Call Throughput: ✅ | Startup: ✅ | NPM Unpacked Size: ✅

Context Thresholds

Category Actual Threshold Usage Status
Tools 10,989 14,000 78%
Resources 440 1,000 44%
Resource Templates 1,563 2,000 78%
Total 12,992 17,000 76%

Overall Status: ✅ PASSED

Generated at 2026-02-09T03:33:33.225Z

Tool Call Throughput

Sample Size: 50 iterations per tool
Total Duration: 8.75s
Average Throughput: 39.99 ops/second

Fast Operations (<100ms)

Tool P50 P95 Mean Success Status
listDevices 0.0ms 0.0ms 0.0ms 100%
pressButton 0.1ms 0.2ms 0.1ms 100%

Medium Operations (100ms-1s)

Tool P50 P95 Mean Success Status
observe 22.7ms 33.5ms 24.6ms 100%
tapOn 0.1ms 0.1ms 0.1ms 100%
inputText 58.7ms 69.5ms 60.8ms 100%

Slow Operations (1s+)

Tool P50 P95 Mean Success Status
launchApp 16.0ms 25.2ms 16.6ms 100%
installApp 0.0ms 0.0ms 0.0ms 100%

Summary: 7/7 tools passed
Overall Status: ✅ PASSED

Generated at 2026-02-09T03:33:09.670Z

Startup Performance

MCP Server (stdio)

Mode Ready First Tool Call Heap Used
cold 538.0ms n/a 32.3MB
warm 526.0ms n/a 33.6MB

Device discovery: skipped (not run)

Daemon

Mode Spawn Ready Responsive Heap Used
cold 3.0ms 549.0ms 725.0ms 36.6MB
warm 3.0ms 565.0ms 707.0ms 36.7MB

Overall Status: ✅ PASSED

Generated at 2026-02-09T03:34:24Z

NPM Unpacked Size

Metric Actual Threshold Usage Status
Unpacked Size 12.4MB 30.0MB 41%

Package: @kaeawc/auto-mobile@0.0.10
Tarball Size: 2.7MB

Overall Status: ✅ PASSED

Generated at 2026-02-09T03:32:52.932Z

@kaeawc kaeawc merged commit 34b47c6 into main Feb 9, 2026
46 checks passed
@kaeawc kaeawc deleted the work/1202-ide-plugin--show--device-disconnected--w branch February 9, 2026 03:44
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.

IDE plugin: show 'Device Disconnected' when observed device becomes unavailable

1 participant