- Test for filename-only tool targets
- Test for long tool target truncation
- Test for empty tool targets
Coverage: 93.92% (215 tests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cover the previously uncovered formatDuration branch for durations >= 1 hour (lines 17-19).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add StatusBar.test.tsx with tests for truncatePath helper
- Add ToolStream edge case tests for path truncation
- Coverage improved to 93.64% (210 tests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add context-tracker tests for uncovered methods
- Simplify logger tests (DEBUG branch is environmental)
- Coverage improved to 92.83%
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add CLAUDE_HUD_DEBUG=1 as the recommended debug method with examples
and description of what the debug output includes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ErrorBoundary tests for error rendering
- Add usage-reader tests for invalidate() and edge cases
- Add event-reader tests for getLastEventTime() and switchFifo()
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add CLAUDE_HUD_DEBUG=1 documentation
- Add lint & typecheck commands to development section
- Remove Git Status section (component was deleted)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- TodoList, Sparkline, AgentList (+ AgentItem), StatusBar, ContextInfo
- Move truncatePath function outside StatusBar component body
All components now use memo to prevent unnecessary re-renders.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The GitHub Actions workflow requires the 'workflow' OAuth scope
to push. Saving the file locally for later addition.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Wrap ContextMeter, ToolStream, CostDisplay with React.memo
- Move helper functions outside component bodies
- Move STATUS_COLORS constant outside ContextMeter
These changes reduce re-renders when parent state changes
but props to child components remain the same.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add logger.test.ts with method verification tests
- Add ContextInfo.test.tsx with 8 UI tests
- Add useElapsedTime.test.ts with formatDuration tests
- Expand stats-reader.test.ts with StatsReader class tests
- Export formatDuration from useElapsedTime for testability
Coverage: 82.15% → 90.29% (31 new tests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Agent tools array now populates correctly when subagents run
- Tools are tracked per-agent and limited to last 5
- Excludes Task tool itself from tracking
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Lint, typecheck, and test on push/PR to main
- Validate plugin structure (plugin.json, hooks.json, scripts)
- Build verification
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 6 - Polish & Features:
- Add CostTracker integration to useHudState hook
- Create CostDisplay component showing model, tokens, and estimated cost
- Track input/output tokens from tool calls and user prompts
- Detect model from transcript for accurate pricing
- Format costs and token counts for readability
- Add 6 new tests for CostDisplay component
All 152 tests passing, lint clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 5 - Architecture Refactor:
- Create useHudState hook for all event processing and state management
- Create useElapsedTime hook for session timer
- Reduce app.tsx from 329 lines to 136 lines (59% reduction)
- App component now focused purely on rendering
- Follows ADR 001: Custom hooks + useReducer pattern
- All state logic now testable independently
All 146 tests passing, lint clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 4 - Context System Rewrite:
- Create UnifiedContextTracker that combines transcript reading and estimation
- Eliminates dual-source flickering by making transcript the single source of truth
- Only reads transcript on Stop events (when Claude finishes responding)
- Falls back to estimation when transcript isn't available
- Removes 5-second polling interval that caused context jumps
- Maintains burn rate calculation from token history
- Tracks compaction events from PreCompact hook
- Add comprehensive tests for unified tracker (13 new tests)
All 146 tests passing, lint clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 3 Foundation:
- Add ESLint with TypeScript, React, React Hooks, and Prettier config
- Add Prettier with project-standard settings
- Set up Husky pre-commit hooks with lint-staged
- Fix all ESLint errors and warnings in codebase
- Format all files with Prettier
- Fix type errors in usage-reader.test.ts
All 133 tests passing, lint clean, builds successfully.
Note: GitHub Actions CI workflow saved locally but requires
manual push with workflow scope or direct upload to GitHub.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The test was deleting the temp directory immediately after unmount,
but the EventReader had pending reconnection timers that would fire
and try to access the deleted FIFO.
Fix:
- Move cleanup to afterEach hook
- Add sleep delays to allow timers to clear
- Wrap cleanup in try/catch to ignore errors
All 133 tests now pass with 0 errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tracks all changes being made during the architecture overhaul.
Users can read this to understand what's changing and why.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Research covers:
- Claude Code plugin best practices from Anthropic
- TUI design principles from lazygit, btop, and awesome-tuis
- Ink/React terminal UI performance patterns
- Current architecture problems analysis
- Architecture recommendations
Key findings:
- Event-driven over polling for real-time updates
- Use <Static> component for stable UI sections
- Custom hooks + useReducer for state management
- Keep bash hooks minimal, move logic to TypeScript
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Surface real data from Claude Code internals instead of estimates:
- Add settings-reader.ts: Parse ~/.claude/settings.json for model, plugins, MCP
- Add stats-reader.ts: Parse ~/.claude/stats-cache.json for real token counts
- Add context-detector.ts: Detect global and project CLAUDE.md files
- Add StatusBar component: Show model, idle state, plugin/MCP counts, cwd
- Add ContextInfo component: Display loaded context files
- Enhance ContextMeter: Show real token data (today's usage, cache stats)
- Enhance McpStatus: Renamed to Connections, shows MCP servers AND plugins
Version corrected from 2.0.0 to 0.1.0 (proper semver for early development)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 7 - Final release:
- Bump version to 2.0.0 in package.json and plugin.json
- Add comprehensive CHANGELOG.md documenting all v2 features
- 90 tests passing
- Plugin validation passing
- All documentation updated
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 6 of v2 upgrade:
- Add GitStatus component showing current branch
- Display ahead/behind commit counts
- Show staged, modified, and untracked file counts
- Auto-refresh git status every 30 seconds
- Uses cwd from hook events for accurate git info
- Update README to document git status feature
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 5 of v2 upgrade:
- Add detailed architecture overview with data flow diagram
- Document key components (EventReader, ContextTracker, CostTracker)
- Add guide for adding new panels
- Add guide for adding new hooks
- Include PR checklist and code style guidelines
- List contribution areas (features, improvements, testing, docs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 4 of v2 upgrade:
- Add event-parser.test.ts with edge cases for all event types
- Add Sparkline.test.tsx for component testing
- Add ink-testing-library for component tests
- Test malformed JSON, unicode, long paths, special characters
- 65 tests total, all passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 3 of v2 upgrade:
- Add comprehensive TROUBLESHOOTING.md
- Add verify-install.sh script for checking installation
- Update README with new features and troubleshooting section
- Document all 8 hook events
- Add verification instructions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 2 of v2 upgrade:
- Token sparkline visualization showing usage history
- Cost estimation panel with input/output breakdown
- Session status bar with idle indicator
- Last user prompt preview
- Add comprehensive tests for CostTracker
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 1 of v2 upgrade:
- Add PreToolUse hook for true "running" state before tool execution
- Add UserPromptSubmit hook to track user prompts and idle state
- Add Stop hook for idle detection when Claude finishes responding
- Add PreCompact hook to track context compaction events
- Enrich capture-event.sh with permission_mode, transcript_path, cwd
- Add CostTracker for session cost estimation
- Add SessionInfo type for tracking session state
- Show idle indicator (💤/⚡) and permission mode in header
- Show cost estimate when significant
- Show compaction count warning
- Show last user prompt preview
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update tui/package.json to 1.0.0
- Update plugin.json to 1.0.0
- All 18 tests passing
- TypeScript strict mode verified
- No console.log statements
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add vitest and @testing-library/react
- Create vitest.config.ts
- Add test scripts to package.json
- Write comprehensive tests for ContextTracker:
- Token estimation
- Event processing
- Health status calculation
- Reset functionality
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add node fallback when bun is unavailable
- Better command availability checking
- Support macOS Terminal.app (Apple_Terminal)
- Add xterm support for Linux desktops
- Adjust tmux split width to 50 for better fit
- Reduce WezTerm/Windows Terminal split to 25%
- Improve error handling with && return 0 pattern
- Add LOG_FILE variable for cleaner code
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ErrorBoundary component to gracefully handle component crashes
- Improve EventReader with connection status tracking
- Add exponential backoff for reconnection attempts
- Show connection status indicator in HUD header (●/◐/○/✗)
- Check FIFO existence before connecting
- Wrap all HUD sections in error boundaries
- Widen HUD to 48 chars for better content fit
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>