Commit Graph
409 Commits
Author SHA1 Message Date
arkonandClaude Opus 4.5 b697bcfea2 chore: bump version to 0.1381
Add web UI keyboard shortcuts to CLAUDE.md.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 11:10:21 +01:00
arkonandClaude Opus 4.5 32e0d6126c fix: read subagent descriptions directly from parent transcript
Instead of timing-based correlation between terminal output and subagent
files, now reads the Task tool's description parameter directly from the
parent session's transcript. This provides 100% reliable mapping between
agent IDs and their short descriptions, fixing issues where multiple
agents spawned in quick succession would get the same window title.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 11:06:35 +01:00
arkonandClaude Opus 4.5 1c9a7dc077 chore: remove temporary respawn monitoring files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:51:55 +01:00
arkonandClaude Opus 4.5 cf470c9ad5 feat: use 24-hour time format for subagent activity timestamps
Bump version to 0.1379

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:46:34 +01:00
arkonandClaude Opus 4.5 fc940e153b fix: correct Task tool description extraction for subagent window titles
- Add parseTaskDescriptionsFromTerminalData() to parse raw terminal data in
  interactive sessions (not just one-shot mode)
- Strip ANSI codes before regex matching since terminal output has embedded
  codes like [1mExplore[0m
- Fix getTaskDescriptionForSubagent() to check ALL sessions with matching
  project hash (not just the first one found) since multiple sessions can
  share the same working directory
- Add tool_result event forwarding for subagent SSE broadcasts

The pattern Explore(Description) in terminal output is now correctly parsed
and used as the subagent window title instead of extracting from the prompt.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:42:04 +01:00
arkonandClaude Opus 4.5 f06240f4ef feat: use Task tool description for subagent window titles + auto-minimize completed
- Extract short description from TaskTracker (params.description) for subagent windows
- Correlate subagents with sessions by working directory and timing
- Auto-minimize subagent windows when agents complete
- Persist minimized/open window states to server for cross-browser sync
- Restore window states on reconnection/page reload
- New API: GET/PUT /api/subagent-window-states
- State file: ~/.claudeman/subagent-window-states.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 09:06:49 +01:00
arkonandClaude Opus 4.5 f95ffd12e2 chore: remove stale respawn monitoring files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 08:43:48 +01:00
arkonandClaude Opus 4.5 3f73a5f908 chore: remove non-functional subagent input feature
Subagents (Task tool background agents) are autonomous and cannot
receive input mid-execution. They complete and return results to
the parent session. Removed the input UI and API endpoint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 04:35:50 +01:00
arkonandClaude Opus 4.5 6187444118 fix: improve file-link-click tests with proper assertions and error handling
- Add unit tests for file path pattern matching (cmdPattern, extPattern, bashPattern)
- Add tests for invalid/unsafe path rejection
- Fix streaming test to create session when browser tests are skipped
- Fix SSE assertion: 'event:' → 'data:' (correct SSE format)
- Fix API response access: data.session.id → data.sessionId
- Improve error handling: re-throw errors after cleanup instead of swallowing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 04:35:14 +01:00
arkonandClaude Opus 4.5 7b2440a49d fix: improve install scripts robustness and edge cases
install.sh:
- Fix NodeSource GPG key overwrite issue (rm before dearmor)
- Fix systemd ExecStart missing node binary prefix
- Add SUSE/openSUSE support (zypper-based)
- Add local changes check before git reset --hard
- Add curl/wget detection with fallback support
- Use shallow clone (--depth 1) for faster install
- Update Node.js target to v22 (current LTS)
- Add CLAUDEMAN_NODE_VERSION env var for customization
- Add run_as_root/ensure_sudo helpers for consistent privilege handling
- Add cleanup trap with helpful failure message
- Add Windows detection with WSL guidance
- Fix PATH substring check (was using grep -qx incorrectly)
- Add stdin TTY check for non-interactive piped input
- Update Claude CLI install to official curl installer
- Add armv7 architecture support (Raspberry Pi)
- Quieter apt/dnf output with -qq flags

scripts/postinstall.js:
- Fix command detection for Windows (where vs command -v)
- Add Fedora/Arch/Alpine install instructions for screen
- Add Windows/WSL guidance
- Show Claude CLI path when found
- Refactor with clear sections and helper functions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 03:48:03 +01:00
arkonandClaude Opus 4.5 34e32ad999 feat: add universal install script for macOS & Linux
- Add install.sh with curl one-liner installation
- Supports macOS (Homebrew), Debian/Ubuntu (apt), Fedora (dnf), Arch (pacman), Alpine (apk)
- Auto-detects OS, architecture, and Linux distro
- Checks/installs Node.js 18+, GNU Screen, warns about Claude CLI
- Clones to ~/.claudeman/app, builds, adds to PATH
- Optional systemd service setup on Linux
- Add postinstall.js for npm install verification
- Update README with simplified installation section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 03:38:26 +01:00
arkonandClaude Opus 4.5 61436f3166 chore: bump version to 0.1376
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 03:34:56 +01:00
arkonandClaude Opus 4.5 1394926e3f style: add color styling for subagent window status badges
Add idle (yellow) and completed (blue) status colors to match the
minimized robot tab styling. Also use var(--green) for active status
for consistency with dropdown badges.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 03:28:08 +01:00
arkonandClaude Opus 4.5 e32ba17443 fix: prevent daily token stats from re-counting restored sessions
When sessions were restored after server restart, lastRecordedTokens
was not initialized, causing the periodic token recording to treat
the entire restored token count as new usage. This inflated daily
stats by re-counting tokens on every server restart.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 03:13:54 +01:00
arkonandClaude Opus 4.5 d7991e5738 chore: bump version to 0.1375
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 03:13:36 +01:00
arkonandClaude Opus 4.5 5ca4981ea8 fix: add 2-minute grace period for respawn after server restart
Prevents false idle detection when server is rebuilt/restarted.
Previously, restored respawn controllers would start immediately
and trigger after 30s of "no output" because the session wasn't
fully connected yet.

Now waits 2 minutes from server startup before activating restored
respawn controllers, giving sessions time to reconnect and stabilize.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 03:08:13 +01:00
arkonandClaude Opus 4.5 223ba078b9 fix: subagent dropdown clipped by contain:layout
The .session-tabs container has contain:layout which creates a new
containing block, breaking position:fixed on the dropdown. Fixed by
moving the dropdown to document.body when opened (portal pattern),
then moving it back when closed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 02:55:19 +01:00
arkonandClaude Opus 4.5 464c4c479d fix: subagent dropdown hidden by overflow:hidden parent
The dropdown was being clipped by .session-tabs overflow-y:auto.
Changed from position:absolute to position:fixed and calculate
position dynamically in JS using getBoundingClientRect().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 02:38:55 +01:00
arkonandClaude Opus 4.5 f9ffe17c3e fix: subagent dropdown hidden behind terminal
Add z-index to header so dropdown menus appear above the main
content/terminal area.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 02:27:12 +01:00
arkonandClaude Opus 4.5 565fc80f18 fix: compact respawn controller UI with filtered action log
- Restructure banner to 2-column layout (status left, log right)
- Row 1: state, confidence, cycles, timer, tokens
- Row 2: hook/AI check status, countdown timers (auto-hidden when empty)
- Remove ALL timer-cancel messages from action log
- Only log interesting events: commands, hooks, AI/plan verdicts
- Compact text: "✓ Idle (30s)" instead of verbose messages
- Smaller fonts and padding throughout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 02:21:34 +01:00
arkonandClaude Opus 4.5 2ea3011397 feat: add setting to show subagent windows for active tab only
Adds "Subagents for Active Tab Only" toggle in App Settings → Display:
- OFF (default): windows visible regardless of active tab (original behavior)
- ON: windows only visible when their parent tab is selected

Also improves parent session detection by checking active session first,
which fixes connection lines going to wrong tabs when multiple sessions
share the same working directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 01:17:57 +01:00
arkonandClaude Opus 4.5 9aa5973970 fix: rock-solid idle detection in respawn controller
- Add 300-char rolling window to catch working patterns split across PTY chunks
- Check completion message BEFORE working patterns (priority fix)
- Clear rolling window on completion message (transition point)
- Increase working pattern absence threshold from 3s to 8s
- Add Session.isWorking safety check before confirming idle
- Add 20+ more working patterns (Compiling, Building, Processing, etc.)
- Make AI idle checker prompt more conservative (err toward WORKING)
- Update documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 00:55:29 +01:00
arkonandClaude Opus 4.5 5b87a41aac chore: bump version to 0.1373
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 00:20:14 +01:00
arkonandClaude Opus 4.5 fbecbfb7cf feat: rename Active Tools to Project Insights panel
- Rename Active Tools panel to Project Insights with updated styling
- Make panel bigger (450x350px) and resizable with drag handle
- Add settings toggle in Display tab to enable/disable panel
- Close subagent windows when parent session is killed/closed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 00:15:11 +01:00
arkonandClaude Opus 4.5 ac7238dff2 feat: Matrix-style subagent console with glowing green terminal
Enter the Matrix. Subagent windows now feature a full cyberpunk
terminal aesthetic:

- Deep black (#0a0a0a) background
- Phosphor green (#00ff41) text with glow effect
- Tool names pulse with neon intensity
- Timestamps in muted matrix green
- Progress lines shimmer like digital rain

Your AI agents now look like they're hacking the mainframe.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 00:01:34 +01:00
arkonandClaude Opus 4.5 c4b737bc15 feat: matrix-style subagent connection lines + smart window layout
Subagent windows now visually connect to their parent session tabs with
glowing matrix-green lines that pulse with life. Windows automatically
arrange in a non-overlapping grid, and each shows its origin with a
clickable "from [session]" header.

Watch your AI agents spawn and dance across the screen, tethered to
their creators by neon threads of digital consciousness.

Changes:
- Matrix green (#00ff41) connection lines with glow effect
- Smart grid positioning prevents window overlap
- Smaller default window size (420x350) for better density
- Auto-sizing activity columns for cleaner logs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 23:55:53 +01:00
arkonandClaude Opus 4.5 23022b533d feat: add subagent window parent tab connection
- Show "from [session name]" header in subagent windows
- Add spawn animation from parent tab position
- Draw curved SVG connection lines from tabs to windows
- Update connection lines on drag, resize, minimize, close
- Fix API response parsing (data.data not data.subagents)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 23:41:59 +01:00
arkonandClaude Opus 4.5 5e08fb5a75 fix: lazy lookup for run summary tracker in respawn listeners
The run summary tracker wasn't tracking respawn events for restored
sessions because the tracker didn't exist when setupRespawnListeners
was called during session restoration. Changed to lazy lookup so
the tracker is retrieved each time an event fires.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:28:30 +01:00
arkonandClaude Opus 4.5 baffd0cf4c chore: bump version to 0.1369
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:24:51 +01:00
arkonandClaude Opus 4.5 12d9fd4cb2 chore: add data-session-id to summary icon for future enhancements
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:17:19 +01:00
arkonandClaude Opus 4.5 0c443f865a feat: add export functionality to Run Summary modal
- Export to JSON: Full data dump with all events and stats
- Export to Markdown: Formatted report with stats table and event timeline
- Downloads file directly to browser

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:14:29 +01:00
arkonandClaude Opus 4.5 de5ee8643c feat: implement DEC mode 2026 synchronized output to reduce terminal flicker
- Server wraps SSE terminal batches with DEC 2026 sync markers
- Client extracts and strips markers, writes atomically via RAF batching
- Native terminals (WezTerm, Kitty, etc.) get full sync support
- xterm.js web gets application-layer sync via marker extraction

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:09:45 +01:00
arkonandClaude Opus 4.5 b811c8dc80 feat: add Run Summary feature for session activity tracking
Implements a "what happened while you were away" view for sessions:
- Track significant events: session start/stop, respawn cycles, state changes,
  idle/working transitions, token milestones, auto-compact/clear, Ralph
  completions, AI check results, hook events, errors/warnings
- Stats dashboard: respawn cycles, peak tokens, active/idle time, issue counts
- Timeline view with color-coded severity and emoji icons
- Filter events by type (all/errors/warnings/respawn/idle)
- State stuck detection (warns when state unchanged for 10+ minutes)

Click the chart icon on any session tab to open the Run Summary modal.

Files:
- src/run-summary.ts: RunSummaryTracker class with event tracking
- src/types.ts: RunSummary, RunSummaryEvent types
- src/web/server.ts: Integration with session/respawn events, API endpoint
- src/web/public/: Modal UI, timeline rendering, filter controls
- docs/run-summary-plan.md: Implementation plan

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:05:28 +01:00
arkonandClaude Opus 4.5 8b0577d8aa chore: bump version to 0.1366
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 21:32:08 +01:00
arkonandClaude Opus 4.5 1ff1e300f6 feat: add hook-based idle detection for respawn controller
Implement multi-phase improvement to respawn controller's idle detection:

Phase 1 - Stop Hook Detection:
- Add signalStopHook() method - definitive signal when Claude finishes
- 3s confirmation timer to handle race conditions
- Skip AI check when hook received (100% confidence)

Phase 2 - idle_prompt Detection:
- Add signalIdlePrompt() method - fires after 60s+ of idle
- Immediately confirms idle (no confirmation timer needed)

Phase 3 - Transcript File Monitoring:
- New TranscriptWatcher class watches session JSONL files
- Detects: completion, tool execution, plan mode, errors
- Signals respawn controller for supporting detection

Web UI Updates:
- Hook indicator with purple styling and pulse animation
- Shows "Stop hook received" or "idle_prompt hook received"
- 100% confidence displayed with hook-confirmed style

This significantly improves idle detection reliability by using
definitive signals from Claude Code rather than parsing terminal output.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 21:29:35 +01:00
arkonandClaude Opus 4.5 ddc55b7697 fix: improve respawn action log visibility and retention
- Loosen filter to show AI check verdicts, detection confirmations
- Increase history from 20 to 50 entries
- Increase display height from 100px to 150px
- Fix subagents panel toggle icon (down when open)
- Increase subagents panel height when expanded

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 20:43:30 +01:00
arkonandClaude Opus 4.5 28fd933252 feat: add token usage statistics with daily tracking and stats modal
- Add TokenUsageEntry and TokenStats types for daily tracking
- Add state-store methods for recording and retrieving daily usage
- Add /api/token-stats endpoint with daily breakdown and totals
- Add token stats modal with summary cards, 7-day bar chart, and table
- Record tokens periodically (5min) and on session delete
- Make header tokens clickable to open stats modal
- Fix subagents panel toggle icon direction (down when open)
- Increase subagents panel height when expanded

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 20:36:04 +01:00
arkonandClaude Opus 4.5 74e8dd27dd fix: use Claude Opus pricing for cost estimation
- Input: $15/M tokens (was $3/M for Sonnet)
- Output: $75/M tokens (was $15/M for Sonnet)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 20:16:46 +01:00
arkonandClaude Opus 4.5 9d32fd594b feat: add token cost estimation and improve token formatting
- Format tokens: 1000k → 1m, 1450k → 1.45m, etc.
- Estimate cost using Claude Sonnet pricing ($3/M input, $15/M output)
- Show estimated cost in respawn banner and header
- More accurate than stored cost which doesn't update in interactive mode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 20:12:16 +01:00
arkonandClaude Opus 4.5 4eb361f204 ui: keep action log on right side, improve detection status readability
- Revert timers row to horizontal layout (timers left, action log right)
- Make detection status text more readable:
  - Larger font (0.75rem)
  - Better contrast (--text color)
  - Semi-bold weight
  - Subtle background pill

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 20:02:29 +01:00
arkonandClaude Opus 4.5 40df0748c5 ui: improve respawn controller layout and filter action log noise
- Stack timers row vertically (timers on top, action log below)
- Reduce action log height to 60px since it's now full width
- Filter action log to show only important entries:
  - Commands sent to console
  - Plan-check with action taken
  - Step completions
- Skip timer starts/cancels, detection updates, ai-check status

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 19:59:42 +01:00
arkonandClaude Opus 4.5 c6b16bf815 fix: subagent title extraction race condition
- Add 100ms debounce for new file detection to allow content to be written
- Add subagent:updated event for retroactive description updates
- Extract description in processEntry when first user message is processed
- Add extractDescriptionFromFile helper with retry in file change handler
- Update SubagentTranscriptEntry.content type to support string | array
- Add test coverage for subagent:updated event

Fixes 43% failure rate where subagents displayed raw IDs instead of descriptions
due to race condition when files were discovered before first line was written.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 19:49:58 +01:00
arkonandClaude Opus 4.5 87bdd9376c ui: make Subagents panel detachable and position on right side
- Move Subagents panel to right side (same as Monitor)
- Add detach/float functionality with drag support
- Add resize handle for detached mode
- Clean up duplicate CSS
- Bump version to 0.1358

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:33:43 +01:00
arkonandClaude Opus 4.5 dc1dc5844e ui: add JavaScript logic for standalone Subagents panel
- Add closeSubagentsPanel() and toggleSubagentsPanel() methods
- Add showSubagents setting to app settings
- Update applyMonitorVisibility() to handle subagents panel visibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:11:45 +01:00
arkonandClaude Opus 4.5 04e25b6b7d ui: separate Subagents panel from Monitor panel
- Move subagents view into its own independent panel
- Position subagents panel to the left of monitor panel
- Add collapsible/closeable behavior for subagents panel
- Add responsive stacking on small screens
- Simplify monitor panel (now just Screen Sessions + Background Tasks)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:11:14 +01:00
arkonandClaude Opus 4.5 0d22d19645 docs: improve CLAUDE.md structure and discoverability
- Move COM shorthand to prominent position after safety warning
- Add version sync note (must match package.json)
- Consolidate Key Files into 4 logical categories
- Clarify next available test port (3128)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:09:25 +01:00
arkonandClaude Opus 4.5 8094a756c6 feat: smart title extraction for subagent descriptions
- Condenses long prompts to ~45 chars while preserving meaning
- Removes filler words (the, a, please, I need you to, etc.)
- Cuts at natural boundaries (colons, dashes, commas)
- Falls back to word-boundary truncation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:56:31 +01:00
arkonandClaude Opus 4.5 953d9845ca fix: subagent description extraction for JSONL format
The JSONL files have message.content as a direct string, not an array
of content blocks. Now handles both formats correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:51:59 +01:00
arkonandClaude Opus 4.5 74bcede607 ui: add double-click to open subagent tracking window
Double-click on subagent items in the Subagents tab to open
the floating tracking window. Includes tooltip hint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:47:44 +01:00
arkonandClaude Opus 4.5 cec9608b66 ui: improve subagent window titles and readability
- Extract better titles from task description (first line/sentence)
- Make subagent window text white for better readability
- Expand monitor panel to 700px when subagents tab is active
- Add smooth width transition when switching tabs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:40:28 +01:00