Skip to content

fix: make daemon-down socket check reactive via polling state#1217

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

fix: make daemon-down socket check reactive via polling state#1217
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 the one-off ObservationStreamClient.socketExists() call during composition with a polled mutableStateOf that updates every 2s while disconnected/connecting
  • Ensures the UI properly transitions between "Device Disconnected" and "Restart MCP Daemon" when the daemon socket appears or disappears after the initial disconnect
  • Polling is gated to only run when disconnected/connecting — no overhead during normal connected operation

Test Plan

  • ./gradlew -p android :ide-plugin:build passes
  • Connect device, disconnect, then kill daemon — verify "Restart MCP Daemon" button appears within ~2s
  • While showing "Restart MCP Daemon", restart the daemon — verify button disappears within ~2s

Closes #1202

🤖 Generated with Claude Code

@kaeawc kaeawc enabled auto-merge (squash) February 9, 2026 03:45
Replace the one-off ObservationStreamClient.socketExists() call during
composition with a polled mutableStateOf that checks every 2 seconds
while disconnected/connecting. This ensures the UI transitions between
"Device Disconnected" and "Restart MCP Daemon" when the daemon socket
appears or disappears after the initial disconnect.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kaeawc kaeawc force-pushed the work/1202-ide-plugin--show--device-disconnected--w branch from f975849 to 5e9afc1 Compare February 9, 2026 03:58
@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-09T04:02:27.704Z

Tool Call Throughput

Sample Size: 50 iterations per tool
Total Duration: 11.29s
Average Throughput: 31.01 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.5ms 35.8ms 24.3ms 100%
tapOn 0.1ms 0.1ms 0.1ms 100%
inputText 58.3ms 69.0ms 60.6ms 100%

Slow Operations (1s+)

Tool P50 P95 Mean Success Status
launchApp 15.9ms 25.8ms 16.4ms 100%
installApp 0.0ms 0.1ms 0.0ms 100%

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

Generated at 2026-02-09T04:04:22.606Z

Startup Performance

MCP Server (stdio)

Mode Ready First Tool Call Heap Used
cold 522.0ms n/a 31.5MB
warm 518.0ms n/a 33.6MB

Device discovery: skipped (not run)

Daemon

Mode Spawn Ready Responsive Heap Used
cold 3.0ms 522.0ms 648.0ms 36.6MB
warm 3.0ms 521.0ms 645.0ms 36.6MB

Overall Status: ✅ PASSED

Generated at 2026-02-09T04:03:30Z

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-09T04:02:57.968Z

@kaeawc kaeawc merged commit 7bfc93a into main Feb 9, 2026
87 of 88 checks passed
@kaeawc kaeawc deleted the work/1202-ide-plugin--show--device-disconnected--w branch February 9, 2026 11:45
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