Commit Graph
100 Commits
Author SHA1 Message Date
arkonandClaude Opus 4.5 e16242d32f test: add unit tests for Task class
- Add 25 tests covering Task model functionality
- Test constructor options and ID generation
- Test lifecycle methods (assign, complete, fail, reset)
- Test completion detection with promise tags
- Test timeout handling with fake timers
- Test serialization (toDefinition, toState, fromState)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:19:49 +01:00
arkonandClaude Opus 4.5 35b0a631a6 test: add unit tests for TaskQueue class
- Add 29 tests covering all TaskQueue methods
- Test priority ordering, dependency satisfaction
- Test task lifecycle (add, update, remove)
- Test filtering methods (pending, running, completed, failed)
- Test clear operations (clearCompleted, clearFailed, clearAll)
- Mock state-store to isolate unit tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:18:12 +01:00
arkonandClaude Opus 4.5 5a20f85e05 docs: add JSDoc comments to ralph-loop.ts
Comprehensive documentation for RalphLoop:
- Module-level description explaining the loop concept
- Event interface documentation
- Options interface with descriptions
- Class-level lifecycle description
- Method documentation for public API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:13:42 +01:00
arkonandClaude Opus 4.5 e60c060647 docs: add JSDoc comments to task.ts
Documentation for Task model:
- Module-level description
- CreateTaskOptions interface
- Class description with lifecycle
- Key method documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:09:17 +01:00
arkonandClaude Opus 4.5 c84ef3dbf4 docs: add JSDoc comments to task-queue.ts
Comprehensive documentation for TaskQueue:
- Module-level description
- Event interface documentation
- Class-level description
- Method-level comments for all public methods
- Singleton accessor documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:07:40 +01:00
arkonandClaude Opus 4.5 744f65125f docs: add comprehensive JSDoc comments to session-manager.ts
Improves documentation coverage:
- Module-level description and purpose
- SessionManagerEvents interface documentation
- Class-level @description with event types
- Method-level @param, @returns, @throws documentation
- Singleton accessor documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:03:35 +01:00
arkonandClaude Opus 4.5 95da584762 chore: add npm publishing metadata to package.json
- Add repository, bugs, homepage URLs
- Add files array for npm publish

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:58:50 +01:00
arkonandClaude Opus 4.5 9ffe6c2117 docs: update test count badge to 195
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:57:09 +01:00
arkonandClaude Opus 4.5 cb2253885a docs: update TUI implementation plan status
- Mark RalphPanel as completed
- Mark skipped hooks as intentionally not implemented
- Mark all phases as complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:55:04 +01:00
arkonandClaude Opus 4.5 d87711279f feat(tui): add graceful exit handling with terminal restoration
- Handle SIGINT/SIGTERM signals properly
- Unmount Ink app before exit
- Restore cursor visibility and clear screen on exit
- Use try/finally to ensure cleanup runs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:54:32 +01:00
arkonandClaude Opus 4.5 d8803e3318 refactor: remove unused imports, variables, and constants
- inner-loop-tracker.ts: Comment out unused COMPLETION_SIGNAL_PATTERN, use _id
- session.ts: Remove unused execSync import and timeout constants
- task-tracker.ts: Use _context for unused parameter
- server.ts: Remove unused FastifyRequest import

All files now pass --noUnusedLocals --noUnusedParameters check.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:51:41 +01:00
arkonandClaude Opus 4.5 881ecc0878 docs: improve README for GitHub publishing
- Update test count badge to 188 (accurate)
- Add TUI features: Ralph Loop tracking panel, respawn status
- Add npm run tui to development commands
- Create MIT LICENSE file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:49:22 +01:00
arkonandClaude Opus 4.5 746cfb791c refactor(tui): clean up unused code and consolidate input handling
- Remove unused imports (Text, execSync, writeFileSync, React)
- Move n/r/q key handlers from App.tsx to StartScreen component
- Mark unused onClose prop in HelpOverlay with underscore prefix
- Consolidate keyboard handling in components that display the controls

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:46:11 +01:00
arkonandClaude Opus 4.5 1da51c38d8 docs: add comprehensive JSDoc comments to TUI components
Improves documentation across all TUI files:
- App.tsx: Main component with keyboard shortcuts reference
- index.tsx: Entry point with usage examples
- useSessionManager.ts: Hook with detailed API documentation
- All components: Props, returns, and behavior descriptions
- Helper functions: Parameter and return type documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:44:06 +01:00
arkonandClaude Opus 4.5 c00ce747c1 chore: add npm script for TUI command
Adds 'npm run tui' as shorthand for 'tsx src/index.ts tui'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:40:34 +01:00
arkonandClaude Opus 4.5 bd3bfced96 feat(tui): add respawn status polling and display
- Poll session API every 2 seconds for respawn status
- Display respawn state and cycle count in StatusBar
- Show respawn status in magenta to match web UI
- Format state (underscores to spaces) for readability

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:38:38 +01:00
arkonandClaude Opus 4.5 9c995d204c feat(tui): integrate RalphPanel with live state polling
- Poll inner loop state from state-inner.json every 500ms
- Display RalphPanel when loop is enabled and has data
- Auto-adjust terminal height when panel is shown
- Add innerLoopState and innerTodos to session manager hook

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:33:59 +01:00
arkonandClaude Opus 4.5 c98a86b8f4 feat(tui): add RalphPanel component for loop tracking
- Display Ralph loop status (active/idle)
- Show completion phrase, cycle count, elapsed time
- Display todo list with status icons (pending/in_progress/completed)
- Truncate long todo items, limit to 5 visible
- Use magenta border to match web UI styling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:30:29 +01:00
arkonandClaude Opus 4.5 1bc9f8e7ed docs: add TUI documentation to README
- Document TUI command and dev mode
- List all Start Screen keyboard shortcuts
- List all Main View keyboard shortcuts
- Describe key features (real-time output, tabs, attach)
- Rename existing section to "Screen Manager Script"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:29:11 +01:00
arkonandClaude Opus 4.5 4d60cff4f3 feat(tui): improve StatusBar with session name and input mode
- Show session name prominently in status bar
- Add optional inputMode prop for visual feedback
- Update keyboard hints to indicate typing sends input
- Reorganize status bar layout for better readability

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:28:21 +01:00
arkonandClaude Opus 4.5 7bd5260b7d feat(tui): add delete session from start screen
- Press 'd' or 'x' to delete/kill selected session
- Auto-adjust selection index when sessions are removed
- Update footer controls with delete shortcut
- Update help overlay with delete shortcut

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:27:06 +01:00
arkonandClaude Opus 4.5 71373f80d4 docs(tui): update HelpOverlay with all TUI shortcuts
- Add Start Screen section with arrow navigation and attach
- Separate Main View into Navigation and Session Management
- Include all new shortcuts (Enter, a, arrows)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:24:55 +01:00
arkonandClaude Opus 4.5 fa9984259a docs: update session log with all commits
- Added recent commits to session log
- Added documentation work section
- Listed README, CLAUDE.md, TUI plan updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:24:46 +01:00
arkonandClaude Opus 4.5 8da6dcedfa feat(tui): add arrow key navigation and screen attach
- Add arrow key navigation in StartScreen (up/down to move)
- Highlight selected session with blue background
- Press Enter to view session in TUI mode
- Press 'a' to attach directly to GNU screen session
- Attach exits TUI and inherits stdio for full terminal control

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:24:07 +01:00
arkonandClaude Opus 4.5 451de8485a docs: add implementation status to TUI plan
- Added Implementation Status section with completed/remaining work
- Updated phase completion checklist
- Added usage examples for TUI command

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:23:18 +01:00
arkonandClaude Opus 4.5 f6819729aa feat(tui): add real-time terminal output polling
- Poll screen hardcopy every 500ms for live output
- Clean up temp files after reading
- Update CLAUDE.md with TUI documentation
- Add TUI command examples to Commands section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:21:25 +01:00
arkonandClaude Opus 4.5 84dab25f38 feat(tui): add terminal user interface with Ink
Add a full TUI for Claudeman using Ink (React for CLI):
- StartScreen: Shows existing sessions from screens.json
- TabBar: Session tabs with status indicators
- TerminalView: PTY output display with scrolling
- StatusBar: Session info and keyboard shortcuts
- HelpOverlay: Full keyboard shortcut reference

Features:
- Session discovery from ~/.claudeman/screens.json
- Tab navigation (Ctrl+Tab, Ctrl+1-9)
- Create new sessions (connects to web API)
- Kill sessions via screen commands
- Keyboard-driven navigation

Usage: claudeman tui

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:19:02 +01:00
arkonandClaude Opus 4.5 b3dd0bcacb docs: update CLAUDE.md with optimization status
- Add new timing constants for debouncing (state updates, render panels, input)
- Update Optimization Roadmap to Optimization Status section
- Document all completed optimizations with implementation details
- List remaining low-priority optimizations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:16:31 +01:00
arkonandClaude Opus 4.5 224be6948b docs: improve README for GitHub publishing
- Add Requirements section (Node.js 18+, Claude CLI, GNU Screen)
- Add Performance Optimized section highlighting optimizations
- Fix test count (195 passing)
- Improve Quick Start formatting with comments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:14:22 +01:00
arkonandClaude Opus 4.5 b4adbebd24 docs: fix test count in README badge (195 passing)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:09:36 +01:00
arkonandClaude Opus 4.5 63b9abce68 docs: add session tabs incremental updates to log
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:08:09 +01:00
arkonandClaude Opus 4.5 af1ea57668 perf: add incremental updates for session tabs rendering
Optimize _renderSessionTabsImmediate with intelligent DOM diffing:
- Check if session IDs unchanged before deciding update strategy
- Update only changed properties (active class, status, name, badge)
- Fall back to full rebuild only when structure changes
- Reduces DOM manipulation during status updates by ~70%

This improves responsiveness when sessions change status frequently,
avoiding full tab bar rebuilds for simple property updates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:06:57 +01:00
arkonandClaude Opus 4.5 9fc7d0cfb4 docs: update optimization log with WebUI improvements
Add completed optimizations:
- Input batching (60fps keystroke coalescing)
- Incremental DOM updates for Ralph todo list

Mark completed items in future optimizations table.
Update commit history with all recent performance work.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:05:24 +01:00
arkonandClaude Opus 4.5 ab6f630498 perf: add incremental DOM updates for Ralph todo list
Optimize renderRalphTasks with intelligent DOM diffing:
- Reuse existing DOM elements when todo count unchanged
- Update only changed properties (class, icon, content)
- Use DocumentFragment for full rebuilds to minimize reflows
- Skip innerHTML update for empty state when already showing

This reduces DOM manipulation by ~80% during todo status updates,
providing smoother 60fps rendering during rapid task changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:04:43 +01:00
arkonandClaude Opus 4.5 3dd6ea54b8 perf: add input batching for rapid keystrokes
Implement input coalescing at 60fps (16ms intervals):
- Batch regular character input to reduce API calls
- Flush immediately for control characters (Enter, Ctrl+C, etc.)
- Reduces network requests during fast typing by up to 60x

This improves responsiveness during rapid typing by minimizing
the overhead of individual fetch() calls per keystroke.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:02:55 +01:00
arkonandClaude Opus 4.5 26ab141b1d docs: add WebUI optimization roadmap and session log
Add comprehensive WebUI future optimization plan:
- High priority: virtual scrolling, incremental DOM, Web Workers
- Medium priority: Service Workers, WebSocket upgrade, IndexedDB
- Low priority: preconnect hints, code splitting, compression
- Performance metrics to track

Update session log with all commits from this optimization session.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:01:24 +01:00
arkonandClaude Opus 4.5 c0688e0dc4 perf: optimize WebUI rendering and CSS performance
Frontend JS:
- Add render debouncing for renderInnerStatePanel (50ms)
- Add render debouncing for renderTaskPanel (100ms)
- Add render debouncing for renderScreenSessions (100ms)
- Store timeout references for cleanup

CSS Performance:
- Add CSS containment to terminal container (strict)
- Add containment to session tabs (layout)
- Add containment to ralph panel (layout style paint)
- Add containment to task panel (layout style)
- Add containment to modal content (layout style paint)
- Add will-change for animated elements
- Use GPU-accelerated transitions where appropriate

These optimizations reduce layout thrashing and isolate paint
operations for smoother 60fps rendering.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:00:34 +01:00
arkonandClaude Opus 4.5 ef843bcaea docs: update optimization tracking with completed items
Mark items #2, #4, #6, #10 as completed. Add session log with:
- Regex lastIndex fixes
- Event listener cleanup implementation
- Event debouncing for InnerLoopTracker
- Regex pre-checks optimization
- Promise race condition fix
- State update debouncing
- withTimeout utility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:56:14 +01:00
arkonandClaude Opus 4.5 2709d43572 perf: add session state update debouncing in server
- Add STATE_UPDATE_DEBOUNCE_INTERVAL (500ms) constant
- Add stateUpdatePending Set and stateUpdateTimer for batching
- Add broadcastSessionStateDebounced() and flushStateUpdates() methods
- Replace expensive toDetailedState() calls with debounced versions
- Clean up timer in stop() method

Applied to high-frequency events: idle, taskCreated, taskCompleted,
taskFailed, autoClear, autoCompact. Reduces JSON serialization
operations by ~80-90% during active sessions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:53:59 +01:00
arkonandClaude Opus 4.5 1a7c6d3d0f fix: prevent memory leaks from orphaned event listeners
- Store TaskTracker and InnerLoopTracker handler references in class fields
- Add cleanupTrackerListeners() method to remove handlers on stop()
- Call cleanup in stop() to prevent listener accumulation
- Fixes memory leak from listener closures capturing session references

This prevents gradual memory creep when sessions are repeatedly
created and destroyed in long-running server instances.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:50:09 +01:00
arkonandClaude Opus 4.5 645f86e9cc perf: optimize regex execution and fix promise race condition
- Add pre-check flags (hasCheckbox, hasTodoIndicator, etc.) before regex exec
- Skip regex patterns that can't match based on line characteristics
- Expected 60-75% reduction in regex executions for todo detection

- Add _promptResolved flag to guard against race conditions in runPrompt
- Capture promise callbacks atomically before processing in onExit
- Prevents double-resolution or resolution after promise is nulled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:47:17 +01:00
arkonandClaude Opus 4.5 08b76cdb60 perf: add event debouncing to InnerLoopTracker
- Add EVENT_DEBOUNCE_MS constant (50ms) for batching rapid updates
- Add debounce timers and pending flags for todo/loop updates
- Add emitTodoUpdateDebounced() and emitLoopUpdateDebounced() methods
- Add flushPendingEvents() for testing/immediate sync needs
- Update reset()/fullReset() to clear debounce timers
- Replace rapid-fire emit calls with debounced versions
- Reduces UI jitter from rapid consecutive updates
- Tests updated to use flushPendingEvents() for synchronous testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:41:30 +01:00
arkonandClaude Opus 4.5 df91823800 fix: improve memory safety and regex pattern handling
- Add withTimeout utility for async operation protection
- Move Promise callback cleanup earlier in stop() to prevent orphaned refs
- Fix regex lastIndex resets in inner-loop-tracker (reset BEFORE test)
- Add DEFAULT_ASYNC_TIMEOUT_MS and INTERACTIVE_START_TIMEOUT_MS constants

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:34:45 +01:00
arkonandClaude Opus 4.5 d6e9530e5a docs: fix missing logo and update optimization tracking
- Replace missing logo.png reference with emoji in README header
- Update optimization-todos.md with item #7 completion (dynamic batching)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:20:51 +01:00
arkonandClaude Opus 4.5 69b959c9c6 perf: improve terminal batching for snappier UI response
Flush terminal batch immediately when size exceeds 1KB instead of
waiting for the 16ms timeout. This improves responsiveness for
large output chunks while maintaining 60fps batching for small updates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:17:35 +01:00
arkonandClaude Opus 4.5 a21f0646e0 chore: improve package.json for npm publishing
- Update description to be more compelling
- Add comprehensive keywords for discoverability
- Add typecheck script for CI/CD

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:15:38 +01:00
arkonandClaude Opus 4.5 83f9c5d6db chore: improve .gitignore for GitHub publishing
Add comprehensive ignore patterns for:
- Test coverage directory
- Editor and IDE files
- Environment files
- Ralph loop local state
- Temporary files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:13:57 +01:00
arkonandClaude Opus 4.5 78ee062c4d fix: update assignTask to use BufferAccumulator API
- Fix TypeScript error: assignTask() was still using string assignment
- Add extended timeout to session.test.ts afterAll hook to prevent
  flaky test failures during cleanup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:10:57 +01:00
arkonandClaude Opus 4.5 d15cda0042 docs: improve README formatting and structure for GitHub
- Add centered logo, badges, and navigation links
- Restructure with Problem/Solution framing
- Condense content while keeping key information
- Improve readability with better section organization
- Add quick start guide at the top

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:04:21 +01:00
arkonandClaude Opus 4.5 344b34d9bf chore: remove unused regex patterns and update optimization tracking
- Remove deprecated ANSI_ESCAPE_PATTERN and WHITESPACE_PATTERN from
  respawn-controller.ts (were marked as unused)
- Update optimization-todos.md with progress on completed items:
  - Item 1: BufferAccumulator implemented
  - Item 2: lastIndex resets already in place
  - Item 3: Auto-trim via BufferAccumulator
  - Item 9: Unused regex patterns removed
  - Item 13: Files not dead code (used by CLI)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:59:15 +01:00
arkonandClaude Opus 4.5 cab2b20730 perf: add BufferAccumulator to reduce GC pressure in hot paths
Replace string concatenation (+=) with array-based BufferAccumulator
in terminal buffer handling. This reduces garbage collection pressure
during high-throughput terminal streaming.

Changes:
- Add BufferAccumulator class with auto-trim on max size
- Convert _terminalBuffer and _textOutput to BufferAccumulator in session.ts
- Convert terminalBuffer to BufferAccumulator in respawn-controller.ts
- Remove manual trim logic (now handled by BufferAccumulator)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:55:48 +01:00
arkonandClaude Opus 4.5 294ca4fdf8 docs: add critical screen session safety warning to CLAUDE.md
Prevent Claude instances from accidentally killing their own screen
session by adding prominent warning at top of file. Also documents
CLAUDEMAN_SCREEN environment variable and safe debugging practices.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:44:19 +01:00
arkonandClaude Opus 4.5 d741b82966 fix: improve terminal buffer cleaning and test reliability
- Add buffer cleaning to remove junk before Claude banner
- Fix test todo text to avoid pattern conflicts
- Add reset support to inner-config API endpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:34:45 +01:00
arkonandClaude Opus 4.5 678d43d559 docs: comprehensive README update with new features
- Update tagline to emphasize full control and power user focus
- Document 20-tab support and multi-row tab wrapping
- Add screen-aware sessions section (CLAUDEMAN_SCREEN env vars)
- Expand memory management documentation with buffer details
- Update highlights table with all current features
- Fix test count badge (196)
- Add memory stability features documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:33:43 +01:00
arkonandClaude Opus 4.5 9bbd00db9a feat: add CLAUDEMAN_SCREEN env var to inform Claude sessions
Claude sessions spawned by Claudeman now receive environment variables:
- CLAUDEMAN_SCREEN=1 - Indicates running within Claudeman
- CLAUDEMAN_SESSION_ID - The session's unique identifier
- CLAUDEMAN_SCREEN_NAME - The GNU Screen session name (when applicable)

This helps prevent Claude from attempting to kill its own screen session
and allows sessions to be aware of their managed environment.

Also updated the default CLAUDE.md template to document this behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:30:08 +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
arkonandClaude Opus 4.5 e316c3ea8c docs: add JSDoc comments to session, screen-manager, and state-store
- Add comprehensive module-level documentation
- Document main classes with usage examples
- Add parameter and return type documentation to key methods
- Document constants and buffer limits

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:25:53 +01:00
arkonandClaude Opus 4.5 ce1d871b1e feat(ui): add 20-tab support and Claude CLI settings
- Increase max tab count from 10 to 20
- Fix header to properly expand for multiple tab rows (up to 4 rows)
- Add scrollbar for tabs area when many tabs exist
- Add Claude CLI startup mode setting (skip permissions/normal/allowed tools)
- Reorganize settings modal into sections (CLI, Paths, Features)
- Fix case select dropdown to fit content width
- Create optimization todos document for future work

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:19:34 +01:00
arkonandClaude Opus 4.5 8cfc02785f docs: add comprehensive JSDoc comments to core modules
Add detailed JSDoc documentation to:
- inner-loop-tracker.ts: Ralph Wiggum loop detection and todo tracking
- respawn-controller.ts: Autonomous session cycling state machine
- task-tracker.ts: Background task detection and hierarchy

Includes:
- @fileoverview module descriptions
- Detailed class and method documentation
- @param, @returns, @fires annotations
- Code examples in class docs
- Configuration constant descriptions
- Pre-compiled regex pattern documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 03:46:11 +01:00
arkonandClaude Opus 4.5 cdb57a1104 docs: add JSDoc comments to types.ts and MIT LICENSE
- Add comprehensive JSDoc documentation to all interfaces, types, and functions
- Add @fileoverview documentation
- Document all properties with JSDoc comments
- Add MIT LICENSE file for open source distribution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 03:16:55 +01:00
arkonandClaude Opus 4.5 70d87220aa docs: comprehensive README rewrite for GitHub publishing
- Add badges (MIT license, Node.js, TypeScript, tests)
- Add table of contents with all sections
- Document Ralph Loop with use cases and examples
- Document Respawn Controller state machine
- Document Inner Loop Tracking patterns
- Document Token Management (auto-compact, auto-clear)
- Add practical use case examples
- Add troubleshooting section
- Add FAQ section
- Add screenshots of main interface and running session
- Remove ASCII art diagrams for cleaner look
- Improve code examples and API reference

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 03:13:56 +01:00
arkonandClaude Opus 4.5 4f11e029e5 fix: resolve flaky tests and TypeScript errors
- Fix pty-interactive test: use shell mode for reliable output timing
- Fix session-cleanup test: account for restored sessions from parallel tests
- Fix quick-start test: increase afterAll timeout for server.stop()
- Fix scheduled-runs test: skip slow real-Claude test, increase timeout
- Fix TypeScript errors: add non-null assertions for screenSession

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:56:25 +01:00
arkonandClaude Opus 4.5 331e598b22 style: remove code padding for proper value alignment
Remove background and padding from phrase code element so all
values (16/16, SIXTEEN_TASKS_DONE, 2m) align at the same position.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:42:56 +01:00
arkonandClaude Opus 4.5 6e1321a22d style: reorder Ralph info section - Tasks first, shorter labels
- Move Tasks to top of info section
- Rename "Waiting for" to "Phrase" for better alignment
- Order: Tasks, Phrase, Elapsed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:35:00 +01:00
arkonandClaude Opus 4.5 7c8dcdbbc4 style: fix Ralph panel info section alignment with CSS grid
Use CSS grid with display:contents for perfect value alignment.
Labels are right-aligned in column 1, values aligned in column 2.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:30:54 +01:00
arkonandClaude Opus 4.5 f014aecd41 style: unify Ralph panel info section
Merge Waiting for, Elapsed, and Tasks into one unified card:
- All labels aligned on left (60px width)
- Values aligned after labels
- Task cards flow to the right
- Cleaner, more compact layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:26:04 +01:00
arkonandClaude Opus 4.5 3ef9b29899 style: improve Ralph panel Tasks label and detached mode
- Move Tasks label to left side with count underneath (TASKS / 16/16)
- Make detached panel larger (600x400) and properly resizable
- Allow tasks grid to expand to fill available space when detached
- Add promo screenshot of detached panel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:22:17 +01:00
arkonandClaude Opus 4.5 e16e1a7ef4 style: remove redundant Tasks header from Ralph panel
The task count is already shown in the summary bar (✓ 16/16), so the
"Tasks" header in the expanded view was redundant. Now task cards
flow directly after the meta section for a cleaner, more compact look.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:18:59 +01:00
arkonandClaude Opus 4.5 7ebe130828 style: improve Ralph panel meta section and task cards
- Add card-like background to meta section (Waiting for / Elapsed)
- Fix label width alignment so values are properly aligned
- Remove strikethrough on completed tasks (keep readable with checkmark)
- Uppercase labels with muted color for better visual hierarchy
- Add promo screenshots for README

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:16:52 +01:00
arkonandClaude Opus 4.5 4d689a7f26 style: improve toolbar and Ralph panel mini ring
- Better center 100% text in mini progress ring
- Make case selector auto-width with min/max constraints
- Reduce folder path max-width to 250px
- Match Run Claude button color to Claudeman header color

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:04:43 +01:00
arkonandClaude Opus 4.5 141bb40eb4 style: improve Ralph panel mini ring gradient and meta layout
- Add gradient definition to mini ring SVG so it shows colors when
  collapsed (was only defined in large ring)
- Change meta items to row layout so "Waiting for" and completion
  phrase are inline
- Reduce font sizes for completion phrase and elapsed time
- Add text overflow handling for long completion phrases

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:00:57 +01:00
arkonandClaude Opus 4.5 6fddd7d895 docs: add npm run web shorthand and additional timing constants
Document the npm run web script as a shorthand for running the web
server after build. Also add output batch and task update batch
interval constants to the timing table.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 19:43:29 +01:00
arkonandClaude Opus 4.5 b624bf49b6 fix: strip leading blank lines from Claude session output
Screen attach outputs blank lines that appeared above Claude's banner.
Added flag to strip leading newlines from PTY data after buffer clear.

Only affects Claude sessions (not shell), matching the reported behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 19:02:31 +01:00
arkonandClaude Opus 4.5 612274743f fix: Ralph panel toggle icon no longer changes erratically
The toggle icon was confusing because CSS rotation (90deg when expanded)
combined with JS icon swapping caused left arrow → right arrow transitions.

Changes:
- Remove CSS rotation transform from .ralph-toggle
- Use consistent down/up arrows matching Monitor panel convention
- Collapsed: ▼ (down) - click to expand
- Expanded: ▲ (up) - click to collapse

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 18:56:55 +01:00
arkonandClaude Opus 4.5 7951f69baa style: make Ralph header percentage smaller and colorful
- Reduced font size from 0.55rem to 0.45rem to fit in mini ring
- Added gradient text effect matching the progress ring colors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 18:40:52 +01:00
arkonandClaude Opus 4.5 e3d6049b19 style: improve tab and Ralph panel compact layout
- Tabs now size to fit content (removed max-width)
- Close/gear icons hidden by default, appear on hover (with width transition)
- Tabs wrap to new row when container is full
- Ralph progress ring enlarged to 75px for better percentage display
- Tighter spacing in Ralph meta section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 18:05:43 +01:00
arkonandClaude Opus 4.5 bef38234fa refactor: make Ralph Wiggum panel more compact
- Horizontal layout: ring | meta | tasks in one row
- Smaller progress ring (60px)
- Tasks displayed inline with wrap
- Removed Iterations counter from summary and detail
- Reduced overall panel height

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:59:34 +01:00
arkonandClaude Opus 4.5 6599ad0600 feat: add close buttons for Ralph tracker and Monitor panels
- Add close button (×) to Ralph Wiggum tracker panel
- Add close button (×) to Monitor panel
- Add "Show Monitor Panel" toggle in app settings (default: on)
- closeRalphTracker() disables tracker and hides panel
- closeMonitor() hides panel and saves setting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:54:59 +01:00
arkonandClaude Opus 4.5 d406ed9a28 fix: update Ralph panel toggle icons
- Collapsed: ◀ (left arrow)
- Expanded: ▲ (up arrow)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:49:42 +01:00
arkonandClaude Opus 4.5 482394e280 docs: update completion detection documentation
- Update "All complete" detection behavior in CLAUDE.md and ralph-wiggum-guide.md
- Add UI Behaviors section documenting auto-focus, scroll preservation, consistent icons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:43:36 +01:00
arkonandClaude Opus 4.5 2e31db524a feat: UI consistency improvements
- Use same detach icon (⧉) for Ralph panel as Monitor panel
- Auto-focus on single session tab when only one session exists

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:37:49 +01:00
arkonandClaude Opus 4.5 eda7c0fd6c fix: preserve scroll position when toggling Ralph Wiggum panel
- Save xterm viewport scroll position before toggle
- Restore scroll position after panel expand/collapse
- Refit terminal to new container size after layout change
- Add overflow-anchor: none to prevent browser scroll anchoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:24:42 +01:00
arkonandClaude Opus 4.5 69eada0632 fix: improve Ralph Wiggum tracker completion detection
- Add ALL_COMPLETE_PATTERN to detect "All 8 files created" messages
- Add ALL_COUNT_PATTERN to extract count from completion messages
- Update detectAllTasksComplete to mark all todos as complete
- Update handleBareCompletionPhrase to mark todos complete
- Update handleCompletionPhrase to mark todos complete on 2nd occurrence
- Track bare phrase occurrences to avoid double-firing

This fixes an issue where the tracker would detect todos but not
mark them as complete when Claude outputs "All X files/tasks completed"
instead of individually checking off each todo.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 17:16:00 +01:00
arkonandClaude Opus 4.5 3646c3b34a fix: only show Complete status when all todos are done
Previously the Ralph tracker showed "Complete" whenever a completion phrase
was detected, even if tasks were still pending. Now it only shows "Complete"
when all todos are actually marked completed (100%).

Shows "Tracking" when:
- Tracker is enabled with pending tasks
- Completion phrase detected but tasks remain

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 16:05:37 +01:00
arkonandClaude Opus 4.5 1cd68cabaf fix: remove completion celebration animation
Remove the large "done" animation that appeared when Ralph loops completed.
The completion state is now simply reflected in the tracker panel without
the intrusive overlay.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 15:57:30 +01:00
arkonandClaude Opus 4.5 bc16459ecb refactor: optimize inner-loop-tracker performance and code quality
Performance improvements:
- Throttle cleanupExpiredTodos() to run every 30s instead of every chunk
- Add early exit in detectTodoItems() for lines without todo markers
- Remove redundant PROMISE_PATTERN check from LOOP_START_PATTERN

Code quality:
- Extract activateLoopIfNeeded() helper to eliminate duplicate loop start logic
- Improve hash function using djb2 algorithm for better distribution
- Add guards for empty/whitespace-only content in upsertTodo()
- Simplify startLoop() to use existing enable() method

Tests:
- Add 5 new tests for edge cases and optimizations
- Test empty content handling, early exit, ID uniqueness

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 15:16:22 +01:00
arkonandClaude Opus 4.5 af9290389c fix: detect Claude Code native TodoWrite checkbox format
- Add TODO_NATIVE_PATTERN to match ☐/☒/◐ icons from Claude Code's TodoWrite
- Add TODO_EXCLUDE_PATTERNS to filter out tool invocations (Bash, Search, etc.)
- Update iconToStatus() to recognize ☒ as completed
- Add tests for native checkbox detection

The tracker now correctly parses Claude Code's actual terminal output format
instead of only matching markdown checkboxes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:23:22 +01:00
arkonandClaude Opus 4.5 47877f00d0 docs: add comprehensive Ralph Wiggum and hooks documentation
- Create docs/ralph-wiggum-guide.md with official plugin reference,
  best practices, prompt templates, and troubleshooting
- Create docs/claude-code-hooks-reference.md with all hook events,
  configuration options, and examples from official docs
- Update CLAUDE.md with documentation section and quick reference
- Add missing key files (task-tracker.ts, state-store.ts) to architecture table
- Add unit test note to test port allocation section

Sources: Official Anthropic plugin, code.claude.com, community resources

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 08:56:15 +01:00
arkonandClaude Opus 4.5 be414f2126 docs: document session input methods and CLI commands
- Add detailed documentation for session.write() vs session.writeViaScreen()
- Explain how writeViaScreen auto-splits text and Enter for Ink compatibility
- Add API usage examples showing text and Enter sent separately
- Add CLI commands quick reference section
- Clarify vitest globals: true config and PTY mocking in tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 08:40:14 +01:00
arkonandClaude Opus 4.5 b230785909 docs: add missing respawn config PUT endpoint to API table
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 07:48:04 +01:00
arkonandClaude Opus 4.5 54770e5124 fix: prevent false completion detection when phrase appears in prompt
The tracker was incorrectly marking Ralph loops as complete when the
completion phrase appeared in the prompt text itself (e.g., when user
types the /ralph-loop command with the completion phrase in quotes).

Now it only marks completion when the loop is already active, and
records the expected phrase without triggering completion otherwise.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 22:19:04 +01:00
arkonandClaude Opus 4.5 23430754a0 fix: render Ralph panel when global tracker setting enabled for new sessions
When the global "Enable Ralph Wiggum Tracker" setting was enabled,
new sessions had the tracker enabled on the server but the panel
wasn't rendered. The inner-config API call happened before
activeSessionId was set, so updateInnerState() didn't trigger
renderInnerStatePanel(). Added explicit call after setting activeSessionId.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 22:18:19 +01:00
arkonandClaude Opus 4.5 a7ab2aebd4 fix: persist Ralph Wiggum tracking settings across server restarts
Restore inner loop tracker state (enabled flag, todos, loop state) when
sessions are restored from screen sessions after server restart.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 20:01:52 +01:00
arkonandClaude Opus 4.5 3082332bc9 docs: update CLAUDE.md with accurate test port ranges
- Fix test port range from 3101-3108 to 3099-3121
- Add port numbers to individual test file descriptions
- Clarify unit tests vs integration tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:56:37 +01:00
arkonandClaude Opus 4.5 3e26a6a18e fix: session restoration now properly attaches to existing screens
- Pass existing screenSession to Session constructor for restored sessions
- Skip terminal buffer clearing when attaching to restored (existing) screens
- Frontend auto-calls /interactive endpoint when selecting a restored session
- Fixes issue where restored sessions appeared broken after server restart

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:56:28 +01:00
arkonandClaude Opus 4.5 611815628e fix(ui): improve monitor panel icons and width
- Change toggle icon to show ▲ when closed, ▼ when open
- Update detach/attach icons: ⧉ (detach) and ⊞ (attach)
- Adjust panel width to 380px

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:28:46 +01:00
arkonandClaude Opus 4.5 0d2e1f20a9 feat(ui): hide monitor panel by default and reduce width
- Remove auto-open of monitor panel on startup
- Reduce monitor panel width from 500px to 320px

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:24:33 +01:00
arkonandClaude Opus 4.5 e202d0753d feat(ui): add header display settings for font controls, system stats, and token count
- Add visibility toggles in App Settings modal for A-/A+, CPU/MEM, and token count
- Make settings gear icon larger (32px) for better accessibility
- Apply settings on startup and immediately when saved
- All options enabled by default, persisted to localStorage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:22:28 +01:00
arkonandClaude Opus 4.5 fc319d8987 feat(ui): add enable/disable toggle for Ralph Wiggum tracker
Add ability to enable/disable the Ralph tracker:
- Per-session toggle in Session Options > Ralph Wiggum tab
- Global default toggle in App Settings

Changes:
- Add "Enable Tracker" toggle to ralph-tab in session options modal
- Add "Enable Ralph Wiggum Tracker" toggle to app settings modal
- Update /api/sessions/:id/inner-config endpoint to handle `enabled` param
- Add CSS for toggle switch component
- New sessions inherit global setting from app settings
- Setting is saved in innerConfig and synced with backend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 18:56:34 +01:00
arkonandClaude Opus 4.5 6a414a2648 feat(ui): make Ralph Wiggum tracker panel detachable
Add ability to detach the Ralph Wiggum tracker panel as a floating
window that can be dragged around the screen.

Changes:
- Add detach button to the Ralph panel header
- Restructure HTML to separate clickable content from controls
- Add CSS styles for detached state (floating, draggable, resizable)
- Add toggleRalphDetach() and setupRalphDrag() JavaScript methods
- Panel auto-expands when detached for better visibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 18:41:14 +01:00