How dioneldaf/claude-panel works
Claude Panel is a Windows desktop widget that turns Claude Code session activity into per-session status lights, notifications, and panel presence behavior. The main flow combines registry scans with optional hook events, reduces them to session states, publishes snapshots to the interface, and reacts to session-count changes. Separate branches cover hook installation and repair, saved preferences and sign-in launch, plus the panel’s mini mode, dragging, and mascot animations. Some runtime wiring is documented rather than shown in the excerpts; those links are marked unverified.
Main entry points: engine.rs Runtime engine · main.ts Panel interface · hooks.rs Hook management · registry.rs Session registry
Components 25
Session monitoring
- Session registry
crates/cpanel-core/src/registry.rs - Hook forwarder
crates/cpanel-hook/src/main.rs - Hook events
crates/cpanel-core/src/hook_event.rs
State and alerts
- Session reducer
crates/cpanel-core/src/reducer.rs - Session model
crates/cpanel-core/src/model.rs - Notification policy
crates/cpanel-core/src/notify.rs - Sound policy
crates/cpanel-core/src/sound.rs
Desktop runtime
- Runtime engine
src-tauri/src/engine.rs - OS probe
src-tauri/src/probe.rs - Presence policy
src-tauri/src/policy.rs
Panel interface
- Panel interface
src/main.ts - View helpers
src/model.ts - Presence animation
src/presence.ts - Pixel mascot
src/mascot.ts - Drag effects
src/drag.ts - Spring physics
src/physics.ts
Hooks and preferences
- Hook management
src-tauri/src/hooks.rs - Hook settings
crates/cpanel-core/src/settings.rs - Hook repair state
crates/cpanel-core/src/hookstate.rs - CLI actions
src-tauri/src/cli.rs - UI preferences
src-tauri/src/persist.rs - Sign-in launch
src-tauri/src/autostart.rs
Other components
- Claude Code
- Windows desktop
- Panel user
Connections 27
- Claude Code → Session registry: writes sessions
README.md - Claude Code → Hook forwarder: runs hooks
README.md - Hook forwarder → Hook events: sends datagrams
README.md - Session registry → Runtime engine: scans sessions
src-tauri/src/engine.rs - Hook events → Runtime engine: receives events
src-tauri/src/engine.rs - Runtime engine → Session reducer: reduces activity
src-tauri/src/engine.rs - Session reducer → Session model: builds views
crates/cpanel-core/src/reducer.rs - Runtime engine → Notification policy: checks transitions
src-tauri/src/engine.rs - Runtime engine → Sound policy: selects cue
src-tauri/src/engine.rs - Runtime engine → OS probe: uses OS probe
src-tauri/src/engine.rs - Runtime engine → Presence policy: observes presence
src-tauri/src/engine.rs - Runtime engine → Panel interface: publishes snapshots
- Panel interface → View helpers: renders states
src/main.ts - Panel interface → Presence animation: plays phases
src/presence.ts - Panel interface → Pixel mascot: sets mood
src/main.ts - Panel interface → Drag effects: handles dragging
src/main.ts - Drag effects → Spring physics: uses springs
src/drag.ts - Panel user → Panel interface: views and controls
README.md - Panel user → Hook management: manages hooks
README.md - CLI actions → Hook management: runs actions
src-tauri/src/cli.rs - Hook management → Hook settings: installs entries
src-tauri/src/hooks.rs - Hook management → Hook repair state: tracks installs
src-tauri/src/hooks.rs - Runtime engine → Hook management: repairs hooks
src-tauri/src/engine.rs - Panel user → UI preferences: changes settings
README.md - UI preferences → Sign-in launch: stores launch choice
- Sign-in launch → Windows desktop: registers sign-in
README.md - Runtime engine → Windows desktop: shows notifications
README.md