Skip to content

fix(cate.usage): stop calling the widest bucket "all time" - #23

Merged
Anton-Horn merged 1 commit into
mainfrom
fix/usage-retained-window
Jul 21, 2026
Merged

fix(cate.usage): stop calling the widest bucket "all time"#23
Anton-Horn merged 1 commit into
mainfrom
fix/usage-retained-window

Conversation

@Anton-Horn

Copy link
Copy Markdown
Contributor

The "All time" tile was never all time. Claude Code deletes its own transcripts past cleanupPeriodDays (30 by default), so ccusage only sees whatever survived. On my machine the oldest transcript is exactly 30 days old, which is why the tile showed $4.7k all time next to $4.3k this month despite months of heavy use.

  • Summary.allTime -> Summary.retained, so the type name stops implying it too
  • new UsageReport.coverageStart: earliest day with usage on disk, null when empty
  • tile now reads "Since Jun 21", with a hover explaining the window and why older data is gone
  • README + manifest copy updated

Tests: 35/35, typecheck and build clean.

Not fixed here: cost is still LiteLLM list price on token counts, not actual subscription spend, and the offline pricing fallback is off by ~99% on new models.

Claude Code deletes transcripts past cleanupPeriodDays (30 by default), so
ccusage only ever sees the retained window. The panel was summing that and
labelling it "All time", which reads as lifetime spend when it is really the
last 30 days.

Rename Summary.allTime to Summary.retained, add UsageReport.coverageStart
(earliest day with usage on disk), and label the tile "Since <date>". Hover
explains the window and why older data is gone.
@Anton-Horn
Anton-Horn merged commit e0e0a92 into main Jul 21, 2026
20 checks passed
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.

1 participant