Skip to content

fix: resolve bugs, optimize performance, and add new commands - #1

Merged
rhc98 merged 4 commits into
mainfrom
claude/complete-remaining-todos-RuTeh
Mar 26, 2026
Merged

rhc98 merged 4 commits into
mainfrom
claude/complete-remaining-todos-RuTeh

Conversation

@rhc98

@rhc98 rhc98 commented Mar 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

claude added 4 commits March 26, 2026 10:45
Bug fixes:
- Fix logOneline hash parsing to handle variable-length abbreviated hashes
- Fix Math.max spread overflow in aggregators for large datasets
- Replace process.exit(1) with thrown errors for better testability
- Add XSS defense-in-depth escaping in HTML template
- Add error handling for file writes and browser open in report

Performance:
- Optimize search.ts: N+1 git calls → single listTree on latest commit
- Optimize stats.ts: same optimization, eliminating per-hash subprocess spawning

Code quality:
- Refactor quick.ts: extract common helper, reduce 84 lines → 35 lines
- Strengthen weak test assertions in aggregators and diff tests

New commands:
- `cost` - Analyze estimated API costs with breakdown and top sessions
- `show <hash>` - View detailed info for a single checkpoint
- `summary` - Show daily work summary grouped by date

Tests:
- Add tests for quick.ts, csv.ts, html-template.ts, cost.ts, show.ts, summary.ts
- Add logOneline longer hash test and negative delta diff test
- 92 → 106 tests, all passing

https://claude.ai/code/session_012CJWK738LEWi7o9XtoQnWQ
New commands:
- `hotspots` - Identify files that attract repeated AI modifications,
  ranked by session count with date range and avg AI contribution
- `timeline` - Terminal ASCII activity heatmap with streak tracking,
  shows activity over N weeks with colored block characters
- `export <hash>` - Extract checkpoint files to local directory or
  generate a consolidated markdown summary (--format md)

All three commands support --branch, --since, --until, --json filters.

Tests: 106 → 122 tests, all passing (18 test files)

https://claude.ai/code/session_012CJWK738LEWi7o9XtoQnWQ
Replace single hardcoded pricing with a model pricing table covering
8 Claude models (Opus 4/4.5/4.6, Sonnet 4/4.5/4.6, Haiku 3.5/4.5).

- Add MODEL_PRICING record and getModelPricing() helper in constants.ts
- Add --model flag to cost command (default: sonnet-4.5)
- Display model name and per-1K unit prices in cost output
- Maintain backwards compatibility via PRICING re-export
- Add tests for model pricing lookup and cross-model cost comparison

126 tests passing.

https://claude.ai/code/session_012CJWK738LEWi7o9XtoQnWQ
@rhc98
rhc98 merged commit 1cd8615 into main Mar 26, 2026
4 checks passed
@rhc98
rhc98 deleted the claude/complete-remaining-todos-RuTeh branch March 26, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants