Commit Graph

102 Commits

Author SHA1 Message Date
Jarrod Watts
c8f46cfa3f feat(v2): enhanced config display with separate counters
- Split config counting: CLAUDE.md, rules, MCPs, hooks
- Display distinct icons for each config type (📄 📜 🔌 🪝)
- Read hooks count from settings.json
- Remove ralph-loop local config file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 17:38:26 +11:00
Jarrod Watts
9672eea781 docs: update README and CLAUDE.md for v2 statusline
- Rewrite README for statusline architecture
- Update CLAUDE.md with new data flow and structure
- Remove obsolete v1 docs (TROUBLESHOOTING, CONTRIBUTING, etc.)
- Clean up .husky/pre-commit for new structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 14:29:58 +11:00
Jarrod Watts
26a3e984e4 feat(v2): statusline architecture - Phase 1 complete
Major rewrite from split-pane TUI to multi-line statusline:

- Remove hooks/, tui/, scripts/ directories
- Add new src/ structure with TypeScript
- Implement stdin JSON parser (native model/context data)
- Implement transcript JSONL parser (tools, agents, todos)
- Implement render system with 4 lines:
  - Session: model, context bar, rules, MCPs, duration
  - Tools: running + completed with counts
  - Agents: type, model, description, elapsed
  - Todos: current task with progress
- Add context warning thresholds (70%, 85%, 95%)
- Show context breakdown at high usage
- Update plugin.json with statusLine config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 14:28:25 +11:00
Jarrod Watts
c94b88e9d9 chore: v1 final state before statusline rewrite
Committing all outstanding v1 changes before the major architecture
rewrite to statusline-based approach.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 14:24:45 +11:00
Jarrod Watts
c108c232ad fix(context): detect new transcript content by size, not just mtime
The transcript staleness check only used mtime, causing missed updates
when filesystem timestamp granularity prevented mtime changes during
rapid writes (e.g., after auto-compaction).

Now checks both mtime AND file size - if either indicates new content,
we read. This fixes the HUD staying at high context % after compaction.

Also fixes:
- Flaky test due to mtime granularity (added delay + utimes)
- Test fixture path resolution (use __dirname)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 13:04:31 +11:00
Jarrod Watts
daa812eed6 feat(logging): enable production error logging to file
- Errors always logged to ~/.claude/hud/logs/hud.log
- Debug/warn still gated behind CLAUDE_HUD_DEBUG=1
- Add log rotation at 1MB
- Add close() method for clean shutdown
- Tests updated for new close method

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:51:46 +11:00
Jarrod Watts
8c05564049 fix(validation): improve schema validation error messages
- Separate validation checks for tool, input, and response fields
- Add specific error messages indicating expected types
- Add tests for explicit null values and malformed field errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:50:01 +11:00
Jarrod Watts
b436b88156 feat(observability): add parse error counter to HUD state
- Add parseErrorCount to HudState interface
- Add 'parseError' action to increment counter on parse failures
- Display parse error count in StatusBar when > 0
- Provides visibility into event parsing issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:46:32 +11:00
Jarrod Watts
ea8c55cdb8 fix(store): use Promise-based lock for refreshEnvironment
- Replace boolean flag with Promise-based lock pattern
- Prevents race condition when multiple callers invoke refresh
- Concurrent calls now properly await the same Promise

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:44:53 +11:00
Jarrod Watts
2e85c4f5c9 fix(scripts): prevent FIFO creation race condition
- Use atomic mkfifo with fallback check in capture-event.sh
- Only remove non-pipe files before mkfifo (preserve existing pipes)
- Set explicit permissions (600) on new FIFOs
- Improve pgrep pattern to avoid false matches in session-start.sh

Prevents silent data loss when multiple events fire simultaneously.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:44:03 +11:00
Jarrod Watts
fbd0a07c48 refactor: centralize magic numbers into constants.ts
- Create lib/constants.ts with all configurable values
- Update cost-tracker, unified-context-tracker, hud-reducer
- Update event-reader with reconnect constants
- Update hud-event with line preview constant
- Improves maintainability and makes tuning easier

Constants include: token estimation, display limits, intervals,
thresholds, and truncation lengths.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:43:04 +11:00
Jarrod Watts
6dd9226823 fix(cost): make pricing configurable with staleness warning
- Add PricingConfig interface with lastUpdated timestamp
- Add isPricingStale() helper (90 day threshold)
- Add setPricing() method to CostTracker for config overrides
- Add pricingStale flag to CostEstimate type
- Show warning icon in CostDisplay when pricing is stale
- Allow pricing override via ~/.claude/hud/config.json
- Add comprehensive tests for pricing logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:39:54 +11:00
Jarrod Watts
012997d6eb fix(types): add activeForm field to TodoItem interface
- Add optional activeForm field to TodoItem type
- Update TodoList component to display activeForm when in_progress
- Add tests for activeForm display behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:37:40 +11:00
Jarrod Watts
0ba98d3e37 docs: add GitHub issue templates
- Bug report template with environment details
- Feature request template
- Issue config with links

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:19:41 +11:00
Jarrod Watts
36b2a09210 docs: add project documentation and improve robustness
- Add ARCHITECTURE.md, FAQ.md, LLM.md documentation
- Add LICENSE (MIT), CODE_OF_CONDUCT.md, PR template
- Add .editorconfig for consistent formatting
- Add check.sh script for validation
- Fix ESLint errors in hud-config.ts and settings-reader.ts
- Various test and component improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:17:50 +11:00
Jarrod Watts
4b166e5e94 test: include schema version in reducer events 2026-01-03 10:27:54 +11:00
Jarrod Watts
ff55afa90b docs: add security policy details 2026-01-03 10:25:46 +11:00
Jarrod Watts
cfe153fbae ci: add release automation and matrix 2026-01-03 10:25:17 +11:00
Jarrod Watts
3257ffb456 refactor: add safe mode and render throttling 2026-01-03 10:24:45 +11:00
Jarrod Watts
e2ed327006 feat: add hud event schema v1 2026-01-03 10:23:30 +11:00
Jarrod Watts
cf80758302 docs: add hud config and replay tooling 2026-01-03 10:05:07 +11:00
Jarrod Watts
71f4a534db refactor: centralize hud state and rendering 2026-01-03 10:02:52 +11:00
Jarrod Watts
08becd1bfd feat: validate hud events 2026-01-03 09:58:02 +11:00
Jarrod Watts
e74d22d73c ci: Add GitHub Actions workflow for automated testing
- Runs lint, typecheck, test, and build on push/PR to main
- Validates plugin structure (plugin.json, hooks.json, scripts)
- Uses Bun for fast CI execution

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:48:07 +11:00
Jarrod Watts
a8a4b829bf docs: Update CHANGELOG with accurate stats
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:44:45 +11:00
Jarrod Watts
da16d3e5cd refactor: Remove unused ContextState interface
ContextState was defined but never used - it was a redundant
subset of ContextHealth.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:43:13 +11:00
Jarrod Watts
9bb3aba7b5 chore: Bump version to 2.0.11
- Dead code cleanup removed 1,138 lines
- Test coverage improved to 94.43%

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:34:56 +11:00
Jarrod Watts
8d8a8bb174 refactor: Remove unused legacy reader files
Removed transcript-reader.ts, stats-reader.ts, and usage-reader.ts
along with their test files. These were superseded by
UnifiedContextTracker which handles transcript reading directly.

Removed 6 files, ~700 lines of dead code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:34:27 +11:00
Jarrod Watts
85d543de46 refactor: Remove unused legacy ContextTracker
The ContextTracker class in context-tracker.ts was superseded by
UnifiedContextTracker and was only used in its own test file.
This removes dead code and duplicate interface definitions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:33:13 +11:00
Jarrod Watts
8e58ac0830 docs: Update CHANGELOG with version sync fix
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:25:27 +11:00
Jarrod Watts
2cb4c153a5 fix: Sync plugin.json version with package.json
Updates plugin.json version from 0.1.0 to 2.0.10 to match TUI package.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:24:33 +11:00
Jarrod Watts
ff4a4da6e5 chore: Bump version to 2.0.10, update changelog
- Remove accidental gitignore entry for CI workflow
- Update CHANGELOG with CI addition note
- Bump version to 2.0.10

Note: GitHub Actions workflow created but requires workflow scope to push.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:24:00 +11:00
Jarrod Watts
b62a7c4d4d docs: Update CHANGELOG with README fix
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:22:13 +11:00
Jarrod Watts
2dbc450519 docs: Remove broken screenshot reference from README
The screenshot.png file doesn't exist, causing a broken image in the README.
Removed the reference until a screenshot is captured.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:21:23 +11:00
Jarrod Watts
67550c7cef chore: Bump version to 2.0.9
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:08:05 +11:00
Jarrod Watts
278e7b68f3 perf: Add React.memo to SessionStats component
Wrap SessionStats in React.memo for consistency with other components
and to prevent unnecessary re-renders from parent prop changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:07:49 +11:00
Jarrod Watts
02af1b2b0e chore: Bump version to 2.0.8
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:05:13 +11:00
Jarrod Watts
38cc7bc8bf refactor: Remove dead code and improve ToolStream coverage
- Remove unreachable condition in truncatePath function
- Add tests for edge cases: long filenames, paths without slashes
- ToolStream now at 100% line coverage
- Overall coverage improved to 94.25%

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:04:58 +11:00
Jarrod Watts
402dc57af9 chore: Bump version to 2.0.7
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:02:52 +11:00
Jarrod Watts
4eb0fbb175 refactor: Add React.memo to remaining components and fix ErrorBoundary logging
- Add React.memo to McpStatus and ModifiedFiles for consistency
- Fix ErrorBoundary componentDidCatch to log errors via logger

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:02:30 +11:00
Jarrod Watts
37ee0d76d6 docs: Bump version to 2.0.6
Documentation improvements in this release.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:57:42 +11:00
Jarrod Watts
b138025632 docs: Update CONTRIBUTING.md for v2.0 architecture
- Add coverage, lint, typecheck, format commands to setup
- Update project structure with new files (hooks/, CostDisplay, StatusBar, etc.)
- Document useHudState as central state management
- Document UnifiedContextTracker for real + estimated tokens
- Update "Adding a New Panel" guide with memo, useHudState, tests
- Add Code Style section with quality tools and pre-commit hooks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:57:03 +11:00
Jarrod Watts
82e8d992e4 docs: Update CHANGELOG and bump version to 2.0.5
Test coverage increased to 94.00% (229 tests).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:53:44 +11:00
Jarrod Watts
36ecbe9892 test: Add ContextMeter tests
- Test context header and percentage display
- Test compact warning visibility
- Test token number formatting (k, M suffixes)
- Test progress bar rendering
- Test sparkline with usage label

Coverage: 94.00% (229 tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:53:24 +11:00
Jarrod Watts
a926131729 test: Add settings-reader edge case tests
- Test for invalid JSON handling
- Test for missing optional fields

Coverage: 93.92% (220 tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:52:35 +11:00
Jarrod Watts
fc19cd8cef docs: Update CHANGELOG and bump version to 2.0.4
Test coverage increased to 93.92% (218 tests).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:51:52 +11:00
Jarrod Watts
c33f9a33e8 test: Add context-detector edge case tests
- Test for settings.json without permissions field
- Test for undefined cwd
- Test for cwd without context files

Coverage: 93.92% (218 tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:51:27 +11:00
Jarrod Watts
73b870531f chore: Add ci.yml to gitignore 2026-01-03 07:50:44 +11:00
Jarrod Watts
63f5ae41b0 chore: Remove CI workflow file 2026-01-03 07:50:39 +11:00
Jarrod Watts
2142dd0229 test: Add AgentList edge case tests
- 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>
2026-01-03 07:50:33 +11:00