Repository navigation
Replies: 3 comments
|
bumping this with where things stand on current main:
smallest version i'd propose: keep the cache for a year plus slack (368 days in my build) and add a "1 year" period. no new UI beyond the extra period option. i've been running exactly that locally for a few weeks. would a maintainer accept that scope? if even that's too much, raising retention alone (so the data survives for a later UI) would already help. |
|
Opened #28111 for the retention-only half of this: an opt-in It deliberately adds no period, view or default change, so the broader 1-year / all-time view requested here stays open for maintainers to decide on separately. |
|
I'd like to pick up the view half of this, building on #28111 for retention. Proposed scope: one All time option after 90 days in the existing period toggle (and in the narrow-width select), with a keyboard shortcut like the other periods. The chart starts at the first day with usage instead of rendering empty years, and date labels gain the year once the range crosses a calendar year. No other UI changes. Without retention set to unlimited, All time can only show what's still on disk or in the cache, so the range starts where the history actually begins rather than implying it's complete. Is this direction OK to open a PR for? |
Uh oh!
There was an error while loading. Please reload this page.
Problem
Usage tops out at 90 days (
WINDOW_OPTIONSinapps/web/src/components/usage/usageShortcuts.ts), and the server prunes its scan cache at the same horizon (CACHE_RETENTION_DAYS = 90inapps/server/src/usage/UsageService.ts).That cache is currently the only long-term record for Claude usage: Claude Code deletes transcripts after 30 days by default, and T3 keeps showing that usage only because the scan cache retained it. After 90 days it is pruned too, so there's no way to see a year of spend, compare quarters, or answer "what did this project cost since I started".
Some of us keep transcripts on purpose (
cleanupPeriodDays, or syncing agent history from several machines onto the server), so the raw data is often there. The UI just can't reach it.Proposal
sinceDay; this is mostly the options list plus bucketing (weekly or monthly buckets past 90 days keep the chart and payload small).CACHE_RETENTION_DAYSfollow the longest offered window.Why it fits
Happy to send a PR if this direction is welcome.
All reactions