Skip to content

fix: resume observation stream on screen on/off#1198

Merged
kaeawc merged 2 commits intomainfrom
testlatest
Feb 8, 2026
Merged

fix: resume observation stream on screen on/off#1198
kaeawc merged 2 commits intomainfrom
testlatest

Conversation

@kaeawc
Copy link
Owner

@kaeawc kaeawc commented Feb 8, 2026

Summary

  • Add BroadcastReceiver for ACTION_SCREEN_ON/ACTION_SCREEN_OFF in the accessibility service to trigger immediate hierarchy extraction when the screen state changes
  • Fixes the observation stream going silent when the device screen turns off (Android suppresses accessibility events for inactive displays) and not resuming until a user interaction generates an event
  • Includes IDE plugin startup optimizations: socket fast-path, parallel port scanning, and async diagnostics

Test plan

  • ./gradlew -p android :accessibility-service:assembleDebug compiles (verified)
  • Connect device, start observe stream, turn screen off → IDE receives final hierarchy with accessibilityServiceIncomplete: true
  • Turn screen back on → IDE immediately receives fresh hierarchy without needing user interaction

🤖 Generated with Claude Code

kaeawc and others added 2 commits February 8, 2026 13:44
…t scanning, and async diagnostics

Eliminate redundant subprocess spawns in McpProcessDetector by caching
isListeningOnSocket result and adding a fast-path that checks for socket
file existence before invoking lsof. Parallelize DefaultPortScanner
commands with async/awaitAll and skip ss on macOS to avoid 2s timeout.
Move DiagnosticsDashboard system checks off the UI thread into a
LaunchedEffect with Dispatchers.IO and increase the refresh interval
from 2s to 30s. Extract ProcessRunner, SocketFileChecker,
PortCommandRunner, and PlatformInfo interfaces to enable unit testing
without real subprocesses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The accessibility service observation stream stops sending updates when
the device screen turns off because Android suppresses accessibility
events for inactive displays. Register a BroadcastReceiver for
ACTION_SCREEN_ON/OFF that triggers immediate hierarchy extraction so
the push stream resumes on screen wake and sends a final snapshot on
screen off.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kaeawc kaeawc enabled auto-merge (squash) February 8, 2026 21:07
@github-actions
Copy link

github-actions bot commented Feb 8, 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-08T21:07:43.841Z

Tool Call Throughput

Sample Size: 50 iterations per tool
Total Duration: 11.15s
Average Throughput: 31.40 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 32.4ms 24.0ms 100%
tapOn 0.1ms 0.1ms 0.1ms 100%
inputText 57.3ms 68.6ms 59.6ms 100%

Slow Operations (1s+)

Tool P50 P95 Mean Success Status
launchApp 15.8ms 25.8ms 16.6ms 100%
installApp 0.0ms 0.0ms 0.0ms 100%

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

Generated at 2026-02-08T21:08:11.013Z

Startup Performance

MCP Server (stdio)

Mode Ready First Tool Call Heap Used
cold 531.0ms n/a 33.6MB
warm 523.0ms n/a 33.6MB

Device discovery: skipped (not run)

Daemon

Mode Spawn Ready Responsive Heap Used
cold 2.0ms 537.0ms 666.0ms 36.6MB
warm 2.0ms 529.0ms 657.0ms 36.6MB

Overall Status: ✅ PASSED

Generated at 2026-02-08T21:07:50Z

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-08T21:07:45.157Z

@kaeawc kaeawc merged commit 55366a7 into main Feb 8, 2026
46 checks passed
@kaeawc kaeawc deleted the testlatest branch February 8, 2026 21:21
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