Commit Graph
37 Commits
Author SHA1 Message Date
arkonandClaude Opus 4.6 2b8a522cbd fix: add server-side crash breadcrumbs and remove --drop:console from build
The --drop:console esbuild flag was silently stripping all diagnostic
console.* calls from production builds, making crash investigation
impossible. Remove it temporarily for debugging.

Add server-side crash breadcrumb collection:
- Frontend writes breadcrumbs to localStorage AND POSTs to /api/crash-diag
- Server stores latest breadcrumbs in memory, readable via GET /api/crash-diag
- Granular breadcrumbs in selectSession: CACHE_WRITE, FETCH_START,
  FETCH_DONE, REWRITE, FOCUS, SELECT_DONE
- 2s heartbeat beacon so breadcrumbs survive tab freezes
- text/plain content-type parser for navigator.sendBeacon compatibility

Initial findings from breadcrumbs:
- Crash happens during selectSession() for sessions with large buffers
- Pattern: cached buffer exists from prior visit + live SSE data arriving
- Backend is always stable (0 crashes); this is a pure frontend issue

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-05 16:44:17 +01:00
Ark0NandClaude Opus 4.6 2ee9ad72e8 refactor: SSE event handlers, LLM context optimization, @fileoverview docs (#29)
* refactor: extract SSE event handlers into named class methods

Replace ~80 inline addListener closures in connectSSE() with a
declarative _SSE_HANDLER_MAP array that drives registration in a
single loop. Each handler is now a named _on* method on CodemanApp,
making them individually addressable for LLM navigation.

Add SSE_EVENTS constant object in constants.js to eliminate magic
event-type strings scattered across the frontend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: fix inaccuracies in CLAUDE.md

- Fix types barrel path: src/types.ts → src/types/index.ts
- Update app.js line count: ~12K → ~11.5K
- Correct route handler counts (113 → 111, per-group fixes)
- Add code style, ESM gotcha, env vars, route test, lifecycle log docs
- Add Node 22 CI note, test teardown timeout, port range

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add mobile screenshots and QR auth security writeup to README

Add 3 mobile screenshots (landing, idle, active) and expand the
mobile section with QR auth security design details and a
touch-optimized interface subsection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: bundle xterm-zerolag-input as vendor IIFE and add pre-commit hook

Build and postinstall now bundle the local xterm-zerolag-input package
as an IIFE at vendor/xterm-zerolag-input.js with global LocalEchoOverlay
shim. Add git pre-commit hook that runs prettier --check on staged .ts
files to catch format issues before CI.

Also bump constants.js and app.js cache-bust versions to 0.3.0 and add
tunnel upload URL display row in settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add cloudflared install support and interactive launch menu

- Add optional cloudflared dependency detection and installation
  across 6 distro families (macOS, Debian, Fedora, Arch, Alpine, SUSE)
- Add tunnel systemd service setup helper
- Replace post-install instructions with interactive launch menu
  (run now / systemd service / skip)
- Uninstall now cleans up both codeman-web and codeman-tunnel services

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: gitignore readme-preview.mjs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: WIP — SSE event constants, @fileoverview docs, CLAUDE.md compression

- Migrate broadcast() string literals → SseEvent.* typed constants
- Add @fileoverview with cross-domain references to all 13 type domain files
- Add @fileoverview to frontend JS modules (constants, mobile, voice, etc.)
- Add section dividers to route files for LLM scanability
- Compress CLAUDE.md: flat file list → domain table, fix counts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: optimize codebase for LLM context window efficiency

CLAUDE.md: 456 → 309 lines (32% reduction)
- Merge Commands into compact table, remove redundant bash block
- Convert Security section to dense table format
- Merge Performance + Resource Limits, Debugging + Troubleshooting
- Compress Tunnel, Memory Leak, Scripts, Screenshots sections
- Remove Key Patterns that duplicate @fileoverview in source files

Backend @fileoverview enhancements (10 priority files):
- session.ts: key methods, events, cross-domain refs
- respawn-controller.ts: state machine, idle detection layers
- ralph-tracker.ts: exports, circuit breaker, events
- ralph-loop.ts: lifecycle, persistence, events
- subagent-watcher.ts: watched patterns, teammate detection
- server.ts: coordination list, port interfaces
- state-store.ts: dual-file persistence, migration
- session-manager.ts: lifecycle methods, mutex guard
- hooks-config.ts: hook events list, categories
- sse-events.ts: category breakdown (~90 events, 17 categories)

Frontend app.js: add 6 section dividers, update @fileoverview line refs

Fix: escape glob `*/` in JSDoc that broke ESLint parser

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address PR #29 review bugs

- server.ts: replace hardcoded 'session:needsRefresh' with SseEvent constant
- install.sh: fix Alpine cloudflared install for non-root (download to tmpfile first)
- install.sh: replace Arch pacman (AUR-only) with direct binary download
- index.html: bump all 8 remaining cache-bust versions from v0.2.9 to v0.3.0
- mobile-handlers.js: fix @dependency annotation (keyboard-accessory.js, not constants.js)
- types/push.ts: fix layer number (4, not 5)
- subagent-watcher.ts: fix watched pattern path to include {session} segment
- constants.js: fix SSE_EVENTS count in @fileoverview (~73, not ~65)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 22:40:18 +01:00
480584de63 chore: project setup and tooling cleanup (#26)
* add project setup

* add tools to eslint

* remove contributing.md

* update claude md

* chore: simplify CI to single Node.js version (22)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* use node 20

* adjust formatting

* fix linting

* format

* fix layout

* fix: align CI node version to .nvmrc (22), remove redundant gotcha

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: arkon <arkon.85@hotmail.com>
2026-02-27 13:16:23 +01:00
arkonandClaude Opus 4.6 f699002cbf chore: bump version to 0.1654
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 01:07:03 +01:00
arkon 5f1f66bf60 chore: bump version to 0.1652 2026-02-27 00:34:38 +01:00
arkonandClaude Opus 4.6 c50ccbf8a8 chore: update screenshots to reflect Claudeman → Codeman rename
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:55:15 +01:00
arkonandClaude Opus 4.6 3795c45cc1 chore: rename Claudeman to Codeman
Full product rename across 109 files (~834 occurrences):
- Env vars: CLAUDEMAN_* → CODEMAN_*
- Data dirs: ~/.claudeman/ → ~/.codeman/, ~/claudeman-cases/ → ~/codeman-cases/
- tmux prefix: claudeman- → codeman-
- localStorage: claudeman-* → codeman-*
- Package/CLI: claudeman → codeman
- GitHub repo: Ark0N/Claudeman → Ark0N/Codeman
- systemd service: claudeman-web → codeman-web
- Class: ClaudemanApp → CodemanApp

Migration infrastructure for seamless transition:
- state-store.ts: auto-migrates data directories on startup
- tmux-manager.ts: dual-prefix detection (legacy claudeman- sessions)
- app.js: localStorage key migration (preserves old keys)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:44:34 +01:00
arkonandClaude Opus 4.6 475062f0af chore: bump version to 0.1636
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:07:16 +01:00
arkon 675cfeaf67 chore: bump version to 0.1603 2026-02-24 12:50:27 +01:00
arkon 5b882c448e chore: bump version to 0.1570 2026-02-20 06:09:28 +01:00
arkonandClaude Opus 4.6 cf0d9e7d83 chore: bump version to 0.1557
Lifecycle log window: draggable, resizable, wider (900px), hidden on mobile.
Fixed display toggle (block vs empty string).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 19:55:04 +01:00
arkon a3d45820a5 fix: subagent tracking not syncing to mobile — feature toggles wrongly in displayKeys 2026-02-18 18:19:46 +01:00
arkon a1924b91e3 chore: bump version to 0.1541 2026-02-18 18:14:13 +01:00
arkon 88422cab57 chore: bump version to 0.1538 2026-02-18 12:51:35 +01:00
arkonandClaude Opus 4.6 c548c2d6ee fix: mobile keyboard handlers killed on SSE reconnect — re-init after cleanup
handleInit() called KeyboardHandler.cleanup() and MobileDetection.cleanup()
on every SSE connect but never re-initialized them, breaking keyboard
scroll-into-view and the /init /clear accessory bar on mobile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 11:59:42 +01:00
arkon 50b17184ee chore: bump version to 0.1529 2026-02-18 07:28:15 +01:00
arkonandClaude Opus 4.6 a4e778c7c4 chore: bump version to 0.1486
feat: interactive teammate tmux pane windows with xterm.js terminals
feat: auto-cleanup teams/subagents/pane windows on session delete
fix: only show agent/teammate windows when matching Claudeman tab exists
fix: UTF-8 encoding in teammate pane terminal output (Uint8Array)
fix: standalone pane window cleanup via subagentParentMap lookup
fix: xterm.js dimensions crash with deferred init + null-safe dispose

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 13:44:07 +01:00
arkon 59a8f6bd7d chore: bump version to 0.1485 2026-02-12 11:35:10 +01:00
arkon 65f81667d0 chore: bump version to 0.1481 2026-02-12 10:29:57 +01:00
arkonandClaude Opus 4.5 dc0b9f0fb6 fix: capture script now properly spawns subagents
- Fix input submission: add \r and useScreen:true for reliable input
- Link to real codebase instead of empty test case
- Select correct session tab before sending input
- Filter subagents by session for accurate tracking
- Screenshots now show real subagent windows with activity
- Optimized GIF to 3.9MB (was 62MB)

Commit from flight QR118 in an Airbus A350-1000, stable connection thanks to Starlink!

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:16:02 +01:00
arkonandClaude Opus 4.5 cc7c188f1f feat: add subagent screenshot capture script and README images
- Add scripts/capture-subagent-screenshots.mjs for automated capture
- Creates real Claude sessions that spawn Task tool subagents
- Records video and converts to optimized GIF via FFmpeg
- Add subagent-spawn.png, subagent-demo.gif to docs/images
- Update README Live Agent Visualization with real screenshots
- Replace ASCII diagram with actual subagent window screenshots
- Add capture:subagents npm script
- Document both screenshot scripts in CLAUDE.md

Commit from flight QR118 in an Airbus A350-1000, stable connection thanks to Starlink!

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:35:18 +01:00
arkonandClaude Opus 4.5 d70e2d1d93 fix: mobile toolbar button sizing and accessory bar commands
- Fix Run Claude button being squeezed on mobile (use fit-content width)
- Remove Send button from accessory bar
- Add /init, /clear, /compact buttons with confirmation dialogs
- Center toolbar buttons instead of stretching

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 14:46:26 +01:00
arkon b655d2e29e fix: image watcher now uses relative path for subdirectory images
- Added relativePath field to ImageDetectedEvent
- Compute relative path from working directory in image-watcher
- Use relativePath in frontend URL (fixes 'Failed to load image' for subdirs)
- Minor CLAUDE.md improvements

chore: bump version to 0.1461
2026-01-31 14:32:20 +01:00
arkon 6123ce8ba9 chore: bump version to 0.1444 2026-01-31 04:44:46 +01:00
arkon 5b6dd078f1 chore: bump version to 0.1438 2026-01-30 17:20:53 +01:00
arkon f4612278ef chore: bump version to 0.1437 2026-01-30 14:14:45 +01:00
arkon 7dfd97df58 chore: bump version to 0.1434 2026-01-30 11:30:51 +01:00
arkonandClaude Opus 4.5 d040722d1d docs: clarify HTTP is fine for localhost, HTTPS only for remote
Localhost is treated as a secure context by browsers, so notifications
and all browser APIs work without HTTPS. Updated README, CLI help,
install script, and systemd service to default to HTTP.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:47:24 +01:00
arkonandClaude Opus 4.5 2e4d89496f fix: Ralph wizard uses file-based prompt to avoid screen escaping issues
- Add /api/sessions/:id/ralph-prompt/write endpoint to write prompt to @ralph_prompt.md
- Wizard now writes full prompt to file, then sends simple read command to Claude
- Fix session readiness check to wait for prompt character instead of notWorking flag
- Add E2E test infrastructure for ralph-loop workflow (port 3190)
- Add ralph-wizard-prod.mjs script for production testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 17:46:43 +01:00
arkonandClaude Opus 4.5 b896478ca6 fix: subagent tabs render to correct parent session after restart
- restoreSubagentWindowStates now discovers parent sessions before restoring
- closeSubagentWindow discovers parent before minimizing to prevent wrong tab
- Fixed async handling in subagent:completed event handler

chore: bump version to 0.1389

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 23:37: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 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 ad24020cdc feat: add real-time subagent visibility - monitor Claude Code background agents
- Add SubagentWatcher service that discovers and tails Claude Code's subagent
  transcript files (~/.claude/projects/.../subagents/agent-*.jsonl)
- Track tool calls, progress events, and messages in real-time via file watching
- Add SSE events for subagent:discovered, subagent:tool_call, subagent:progress,
  subagent:message, subagent:completed
- Add REST API endpoints: GET /api/subagents, /api/subagents/:id,
  /api/subagents/:id/transcript
- Add subagent panel in Monitor section showing active agents and their activity
- Add floating draggable windows that auto-open for each active agent
- Add standalone CLI tool: scripts/watch-subagents.ts for terminal monitoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:33:12 +01:00
arkonandClaude Opus 4.5 973358859f fix: prevent systemd from killing screen sessions on service restart
Default KillMode=control-group kills all processes in the cgroup,
including spawned GNU screen sessions. KillMode=process only kills
the node server, allowing screens to survive restarts and be
reattached via reconcileScreens().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:37:39 +01:00
arkonandClaude Opus 4.5 a2d4303300 feat: add systemd user service + slow down tab blink animations
- Add scripts/claudeman-web.service: respawning systemd user service
  for `claudeman web --https` (Restart=always, RestartSec=5)
- Slow tab blink animations: red 1s→2.5s, yellow 1.5s→3.5s
  with ease-in-out and reduced opacity for less aggressive feel

Install: symlink to ~/.config/systemd/user/, enable, start
Linger: loginctl enable-linger keeps it running after logout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 03:52:13 +01:00
arkonandClaude Opus 4.5 3a44cfda32 feat: add interactive screen session manager CLI tool
- New scripts/screen-manager.sh for managing claudeman screen sessions
- Interactive TUI with arrow key navigation (flicker-free)
- Commands: list, attach, kill, kill-all, info
- Reads from ~/.claudeman/screens.json (claudeman's authoritative source)
- Shows session name, running time, alive/dead status, mode
- Requires jq and screen packages
- Updated CLAUDE.md and README.md with documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:27:09 +01:00