Integrate logcat for launching Android emulators/devices#18
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis change introduces a logcat dialog feature for viewing live Android device and emulator logs. It adds a new dialog component with log streaming, dynamic filtering, keyboard navigation, and helper utilities for log parsing. The feature is integrated into the device list with a keyboard shortcut (L key). Changes
Sequence DiagramsequenceDiagram
actor User
participant DeviceList as DeviceList Component
participant App as SimUtil App
participant LogcatDialog as Logcat Dialog
participant ADB as ADB Process
participant UI as Logcat UI
User->>DeviceList: Press L key on running device
DeviceList->>App: onDeviceLogcatRequested(device)
App->>LogcatDialog: showLogcatDialog(context, device, adbPath)
LogcatDialog->>ADB: spawn adb logcat -s <device_id>
ADB-->>LogcatDialog: stdout stream (log lines)
LogcatDialog->>LogcatDialog: Parse each line (level, format)
LogcatDialog->>LogcatDialog: Buffer in sliding window
LogcatDialog->>UI: Render filtered logs
UI-->>User: Display log output
User->>UI: Press / to filter
UI->>UI: Show LogcatFilterBar
User->>UI: Type filter pattern
UI->>LogcatDialog: Apply filter
LogcatDialog->>LogcatDialog: lineMatchesFilter(line, filter)
LogcatDialog->>UI: Update filtered view
User->>UI: Press Escape or click close
LogcatDialog->>ADB: Kill process
LogcatDialog->>LogcatDialog: Dispose resources
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
This PR will add logcat for launching Android devices/emulators
Screen.Recording.2026-04-05.at.00.50.13.mov
Type of Change
Summary by CodeRabbit
/to filter,↑/↓to navigate,ato toggle auto-scroll,cto clear logs,oto open detected file paths)lon a running device to launch the logcat viewer