feat: Add Claude Code session monitoring integration#970
feat: Add Claude Code session monitoring integration#970serrrfirat wants to merge 4 commits intoTheBoredTeam:devfrom
Conversation
Adds real-time Claude Code session monitoring to boringNotch: Features: - Multi-session monitoring with per-session state tracking - Session status dots (green=active, orange=needs permission, gray=idle) - Token usage tracking with context window percentage - Permission detection with visual indicator - Tap session dot to focus IDE - Settings panel to toggle feature Implementation: - ClaudeCodeManager watches ~/.claude/ide/*.lock for sessions - File watchers parse JSONL logs for real-time updates - Supports Cursor, VS Code, Windsurf, Zed New files: - boringNotch/components/ClaudeCode/*.swift (6 UI components) - boringNotch/managers/ClaudeCodeManager.swift - boringNotch/models/ClaudeCodeModels.swift Modified files: - ContentView.swift (compact view integration) - SettingsView.swift (settings panel) - TabSelectionView.swift (Claude tab) - generic.swift (.claudeCode enum case) - Constants.swift (2 Defaults keys) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extends session detection beyond IDE integrations to also detect Claude Code sessions running in terminal apps (Warp, iTerm2, Terminal.app). Changes: - Refactor ClaudeSession to support both IDE and terminal sessions - Add ClaudeSessionLockFile Codable wrapper for lock file parsing - Add scanForTerminalSessions() to detect activity in ~/.claude/projects/ - Use 5-minute activity window for terminal session detection - Update focusIDE() to handle terminal apps (Warp, iTerm2, Terminal) - Update tooltip to show "(Terminal)" vs "(IDE Name)" - Add failed session tracking to suppress repeated log spam Terminal sessions are detected by scanning ~/.claude/projects/ for recent JSONL file modifications, excluding workspaces already tracked via IDE lock files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Super cool |
|
Could we generalize this to opencode too? |
|
I probably can yeah, need to take a look into it. but that can be another PR. |
|
lets merge |
|
The changes in this PR were neither reviewed nor approved, not even did the maintainers give any feedback that this is a feature they want to implement. Please be patient. |
|
I can see this more likely being implemented when extensions support comes through. Instead of it becoming a 'default' for everyone and bloating the app in some cases. |
|
I'm happy to open a PR when the extension support is there! Do we have an ETA for it? |
It’s tricky. Right now I’m working on a UI rewrite to make it easier to add extensions. There’s a lot of rigid logic tied to the “live activity” system, which is currently built only for music to occupy the notch when closed and has hard-coded notification support (sneak peek, HUD, and battery inline views). That logic also needs to be properly separated from the default notification style. Tabs are fairly well abstracted already afaik, but they still need some refinement. The home view also needs work so it can act as a more general container for different views and extensions. Once that’s done, the backend and frontend work for extensions shouldn’t be too difficult, and @itzsleepyy already has some of that groundwork in place. I’m also open to PRs related to the UI rewrite. Progress has been a bit slow since I’m balancing it alongside bug fixes. |
Summary
Test plan
🤖 Generated with Claude Code