- Rename inner-loop-tracker.ts → ralph-tracker.ts throughout codebase
- Add ralph-config.ts for parsing .claude/ralph-loop.local.md config
- Standardize API error responses using createErrorResponse()
- Add input validation for auto-compact/auto-clear thresholds
- Update UI labels to "Ralph / Todo Tracker" consistently
- Add 46 integration tests for Ralph tracking functionality
- Update test badge to 438 total tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extract <promise>PHRASE</promise> from CLAUDE.md on session start
- Configure inner loop tracker before first broadcast so UI shows phrase immediately
- More lenient bare phrase detection (triggers when loop is active)
- Auto-detect on session restoration from screens
- Add logging for auto-detection debugging
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove E2E Testing and Optimization Status sections that reference
internal .claude/ files not intended for public distribution.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add getFullScreenId() to get PID.screenName format for unambiguous attach
- Update DirectAttach.ts and index.tsx to use full screen IDs
- Remove TUI documentation from README (still in development)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
TUI now checks if web server is running on startup and offers to start
it in the background. Added new CLI options: --with-web (auto-start),
--no-web (skip check), -p (port).
TUI feature parity with web interface:
- Shell mode: press 'h' in cases view to start bash instead of Claude
- Multi-start: press 'm' to start 1-20 sessions at once
- Respawn toggle: Ctrl+R to enable/disable respawn on Claude sessions
- Session rename: API support via useSessionManager hook
Security fixes from previous analysis:
- Command injection prevention in screen-manager.ts
- Path traversal protection in server.ts
- Input validation for shell-interpolated values
Also fixes memory leak in session.ts (timer tracking) and flaky test
timeout in session-cleanup.test.ts.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update README badge from 339 to 355 passing tests
- Add templates to unit test list in test port allocation
- Update typecheck command to use npm script
- Add TUI components to key files table
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update README test badge to 273 passing (from 195)
- Add new unit test files to CLAUDE.md test list
- task-queue.ts, task.ts, ralph-loop.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- 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>
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>
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>
- 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>
- 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>
- 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>
The InnerLoopTracker is now disabled by default and auto-enables when
Ralph-related patterns are detected:
- /ralph-loop command
- <promise>PHRASE</promise> completion phrases
- TodoWrite tool usage
- Iteration patterns (Iteration 5/50, [5/50])
- Todo checkboxes (- [ ]/- [x]) or indicator icons
This reduces noise for sessions that don't use Ralph loops while
maintaining full functionality when loops are detected.
Changes:
- Add `enabled` property to InnerLoopState type
- Add enable()/disable() methods to InnerLoopTracker
- Implement shouldAutoEnable() for pattern detection
- Update frontend to show "Tracking" status when enabled
- Add CSS for tracking state indicator
- Update CLAUDE.md documentation
- Add comprehensive tests for auto-enable behavior
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add vitest port range note (3101-3108), shell mode PTY example, and
5 missing API endpoints (respawn/enable, inner-config, inner-state,
auto-compact, auto-clear).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move npm run dev gotcha outside code block for visibility
- Add test/ directory with descriptions for each test file
- Document SessionMode type ('claude' vs 'shell')
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the critical finding that text and Enter key must be sent
as separate screen -X stuff commands for Ink to process correctly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fixed respawn controller immediately sending commands when Claude
becomes idle, which prevented users from typing. Now waits for
idleTimeoutMs (default 10s) before triggering the respawn cycle.
- Removed Directory field from Session Options modal for cleaner UI
- Compacted CLAUDE.md documentation for better readability
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add quick reference table for commonly used API endpoints and clarify
that no linter is configured (use tsc --noEmit for type checking).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update CLAUDE.md:
- Add inner-loop-tracker.ts to architecture diagram
- Add InnerLoopTracker component description
- Add Inner Loop Tracking section with patterns and API
- Update SSE events list with inner loop events
- Update state persistence notes
Update README.md:
- Add Inner Loop Tracking to features list
- Add Inner Loop Tracking section with detection patterns, UI, and API
- Update State Files section with state-inner.json
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Kickstart Prompt:
- Remove Idle Timeout setting from respawn UI (uses 10s default)
- Add Kickstart Prompt field sent when /init doesn't trigger work
- New states: monitoring_init, sending_kickstart, waiting_kickstart
- Monitors 3s after /init to detect if Claude started working
Auto-Compact Context:
- Add auto-compact at 110k tokens (sends /compact with optional prompt)
- Preserves summarized context unlike /clear which wipes everything
- Optional focus prompt to guide what compact should preserve
- Blocks auto-clear while compacting to prevent conflicts
Also updates auto-clear default threshold from 100k to 140k tokens.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Make dev mode GOTCHA more prominent with warning emoji
- Add State Store Debouncing pattern documenting 100ms debounce
- Add dedicated E2E Testing section with quick test sequence
- Move E2E info from Notes to its own section
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add task-tracker.ts to architecture tree
- Document pre-compiled regex pattern convention for performance
- Update idle detection docs with hybrid indicator+timeout approach
- Add buffer limits table with all size constants
- Clarify test configuration (ports 3101-3108)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- killScreen now finds and kills all child processes before quitting screen
to prevent claude processes from becoming orphaned (the main bug)
- Add cleanupSession() method for comprehensive resource cleanup:
respawn controllers, timers, batches, event listeners, and sessions
- Fix /api/run endpoint to cleanup sessions after completion
- Fix /api/quick-start error path to cleanup on failure
- Add MAX_CONCURRENT_SESSIONS (50) limit to prevent unbounded growth
- Update CLAUDE.md with improved documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Redesign Run Claude button with purple gradient
- Redesign Run Shell button with dark green gradient
- Add + button to create new cases from toolbar
- Add Create Case modal for quick case creation
- Add Kill All modal with two options (tabs only vs full kill)
- Add CPU/Memory progress bars with color gradients
- Make monitor panel detachable as floating draggable window
- Monitor panel resizable when detached (min 350x250)
- Default CLAUDE.md template now uses /home/arkon/default/CLAUDE.md
- Streamline CLAUDE.md documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
GNU screen creates blank space at the top when initializing sessions.
This is now handled after attaching to the screen:
- Claude sessions: emit clearTerminal event after 100ms, client clears xterm
- Shell sessions: send 'clear' command after 100ms
Also updates CLAUDE.md with documentation of the fix.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document three endpoints that were in the code but missing from docs:
- GET /api/sessions/:id/output
- POST /api/sessions/:id/run
- POST /api/run
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add complete API endpoint listing organized by category
- Include request body formats for all endpoints
- Add key frontend files reference for easier navigation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Monitor panel now 500px wide and 80vh max height
- Removed Copy, Clear, Monitor, Kill buttons from toolbar
- Redesigned close session modal with cleaner options:
- "Remove Tab" keeps screen running
- "Kill Claude" terminates completely
- Auto-switch to new session when created
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Document different token tracking approaches for one-shot vs interactive modes
- Update PTY spawn mode examples to show --output-format stream-json flag
- Explain that interactive mode parses tokens from status line with 60/40 split estimate
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of showing "No background tasks" message, the section is now
completely hidden when there are no tasks, making the UI cleaner.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Make it explicit that `npm run dev` shows CLI help, not starts server.
Document the correct command: `npx tsx src/index.ts web`
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move font controls (A+/A-) to left of connection status
- Redesign tab count with stepper buttons (−/number/+)
- Remove respawn panel, integrate settings into session options modal
- Fix Monitor panel SSE handler (wrong element ID)
- Add screen wrapping support to Session class
- Add E2E testing skill using agent-browser
- Document testing approach in README.md and CLAUDE.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
README.md:
- Add multi-tab sessions, monitor panel, session restoration to features
- Update keyboard shortcuts (remove Ctrl+N, update descriptions)
- Document new UI features in Additional Features section
CLAUDE.md:
- Add screen-manager.ts to architecture diagram
- Add ScreenManager to key components section
- Update WebServer description with session restoration
- Add completed tasks for recent features
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All 6 tasks from the pending list have been implemented:
1. Settings gear icon with app settings modal
2. Confirmation dialog for session close
3. Default CLAUDE.md template path setting
4. GNU screen wrapping with Process Monitor panel
5. UI cleanup (respawn controls, directory width)
6. Terminal focus escape sequence filtering
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the centralized TypeScript interfaces in src/types.ts
including core state types, configuration types, and API error handling.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move respawn controls from toolbar to session options modal
- Remove unnecessary Mode label from session options (visible in tab)
- Increase directory input width from 200px to 350px
- Add RTL direction to directory display to show end of long paths
- Add respawn status indicator with stop/configure buttons in modal
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add session rename endpoint (PUT /api/sessions/:id/name)
- Add shell session endpoint (POST /api/sessions/:id/shell)
- Update session creation to include mode and name parameters
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix terminal welcome message to say "Run Claude" instead of "Quick Start"
- Fix Ctrl+Enter keyboard shortcut by using capture phase
- Auto-select default case and show directory on load
- Make gear icon larger (1rem) with rotation animation on hover
- Add right-click on session tabs for inline rename
- Update directory display when case selection changes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>