Skip to content

feat: Add Claude Code session monitoring integration#970

Open
serrrfirat wants to merge 4 commits intoTheBoredTeam:devfrom
serrrfirat:feature/claude-code-integration
Open

feat: Add Claude Code session monitoring integration#970
serrrfirat wants to merge 4 commits intoTheBoredTeam:devfrom
serrrfirat:feature/claude-code-integration

Conversation

@serrrfirat
Copy link

Summary

  • Add Claude Code session monitoring to track active Claude Code terminal sessions
  • Add terminal session detection for iTerm2, Terminal.app, and Warp
  • Display real-time session stats including token usage, context, and tool activity

Test plan

  • Open a Claude Code session in iTerm2/Terminal/Warp
  • Verify session is detected and displayed in the notch
  • Check token and context stats update in real-time
  • Test with multiple simultaneous sessions

🤖 Generated with Claude Code

serrrfirat and others added 3 commits January 3, 2026 12:13
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>
@vlnd0
Copy link

vlnd0 commented Jan 12, 2026

Super cool

@LacombeLouis
Copy link

LacombeLouis commented Jan 13, 2026

Could we generalize this to opencode too?

@serrrfirat
Copy link
Author

I probably can yeah, need to take a look into it. but that can be another PR.

@vlnd0
Copy link

vlnd0 commented Jan 15, 2026

lets merge

@Ein-Tim
Copy link
Contributor

Ein-Tim commented Jan 15, 2026

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.

@itzsleepyy
Copy link

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.

@serrrfirat
Copy link
Author

I'm happy to open a PR when the extension support is there! Do we have an ETA for it?

@Alexander5015
Copy link
Member

Alexander5015 commented Jan 25, 2026

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.

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.

6 participants