Commit Graph

7 Commits

Author SHA1 Message Date
Pierre Martin
0e4ced5b1f feat: add vmux setup and vmux hook for Claude Code integration
- vmux setup: idempotently adds hooks to ~/.claude/settings.json
- vmux hook: receives Claude Code hook events via env vars and forwards to daemon
- Daemon handles "hook" action on Unix socket (no HTTP server needed)
- Hooks provide instant state detection (permission/question/idle)
2026-03-23 23:11:47 +01:00
Pierre Martin
fd246f046b feat(04-02): i3bar widget with per-session colors, workspace prefix, wait type and duration
- One i3bar block per session (individual colors: red/green/gray)
- Workspace prefix: 10-vmux[W], 3-auth[? 3m]
- Wait type markers:  permission, ? question, ! generic
- Wait duration: [ 30s], [? 3m], [? 1h15m]
- Standalone mode only (separate bar, no i3status wrapping)
- Removed isTerminal and i3status wrapping code
2026-03-23 23:04:37 +01:00
Pierre Martin
221a4447e2 feat(04-02): add vmux i3bar subcommand with i3status wrapping
- runI3Bar: standalone mode (polling 2s) and i3status wrapping mode
- i3bar protocol v1: header + infinite JSON array on stdout
- queryVmuxBlock: daemon offline fallback in gray
- CLI: vmux i3bar auto-detects i3status in PATH
- Stdout sync after each write to avoid buffering

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:30:30 +01:00
Pierre Martin
efbe31928e feat(04-01): integrate notifications and focus mode into daemon
- Notifier + FocusTimer fields in Daemon, initialized in NewDaemon
- processHookEvent notifies on Working -> Needs Input only (D-01)
- Focus mode suppresses notifications when active (D-05)
- FocusArgs in protocol, "focus" handler in daemon
- CLI "vmux focus <minutes>" command
- Tests for all notification transitions and focus handler
2026-03-23 21:26:02 +01:00
Pierre Martin
170790fcda feat(02-03): main.go subcommands + display enrichi avec workspace, label, duree
- main.go dispatch list/switch/label/stop/daemon via client socket
- DisplaySessionInfos affiche [ws:N], label entre guillemets, "depuis X min"
- formatDuration pour duree relative humaine (< 1 min, 3 min, 1 h 5 min)
- Daemon mode integre i3 + X11 avec degradation gracieuse
- Tests complets pour tous les champs optionnels du display
2026-03-23 17:54:18 +01:00
Pierre Martin
f1dcee0ae2 feat(01-02): add CLI display and main.go for vmux list
- DisplaySessions: colored output with state, cwd, branch, preview
- display_test.go: 5 tests covering color, noColor, empty, worktree, noBranch
- main.go: full pipeline FindClaudeProcesses -> FindSession -> DetectState -> Display
- Supports --no-color flag and NO_COLOR env var
- resolveWorktree via git rev-parse --show-toplevel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:30:55 +01:00
Pierre Martin
e7ced9c3a3 test(01-02): add failing tests then implement session + state
- TailReadJSONL: reverse-read JSONL without loading entire file
- FindSessionForProcess: match PID to most recent JSONL via EncodePath
- DetectState: heuristic based on last message stop_reason + tool name
- ExtractPreview: extract first 3 lines of last assistant text
- All 17 tests pass (session_test.go + state_test.go)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:29:19 +01:00