- 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>
- Add real-time elapsed time counter for running agents
- Show nested tool activity (last 3 tools per agent)
- Add active agent count indicator
- Truncate long descriptions intelligently
- Update AgentEntry type to include tools array
- Hide agents section when empty
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add duration tracking for tool calls
- Smart path truncation showing parent/filename
- Color-code slow operations (>5s) in yellow
- Show tool count in header
- Detect error status from response
- Add startTs, endTs, duration fields to ToolEntry type
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ContextTracker class for accurate token estimation
- Track input/output token breakdown
- Calculate burn rate (tokens/minute)
- Add compaction warnings at 85% threshold
- Update ContextMeter to display health status, burn rate, and breakdown
- Add ContextHealth and ContextBreakdown types
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Real-time terminal HUD for Claude Code showing:
- Context usage meter
- Tool activity stream
- Subagent visualization
- MCP status indicators
- Todo list tracking
- Modified files
Built with React/Ink for terminal UI.
Supports tmux, iTerm2, Kitty, WezTerm, Zellij, Windows Terminal.