Expose Lifetime in CLI dashboard#416
Conversation
Files changed: - README.md \u2014 add lifetime CLI docs - src/cli-date.ts \u2014 add lifetime period type - src/daily-cache.ts \u2014 update cache retention comment - src/dashboard.tsx \u2014 add lifetime to dashboard UI - src/main.ts \u2014 add lifetime period support and menubar JSON generation - tests/cli-date.test.ts \u2014 add lifetime period tests - tests/cli-json-daily.test.ts \u2014 add lifetime data retention test Closes getagentseal#389 (CLI/dashboard surface)
ozymandiashh
left a comment
There was a problem hiding this comment.
Thanks — splitting the original #391 into surface-specific PRs was the right move, and a first-class lifetime period is a reasonable ask.
Status: needs a rebase before review/merge — it currently conflicts with main. This PR's base is from 2026-05-27, and the CLI/dashboard surface it touches has been reworked substantially since:
src/dashboard.tsx,src/cli-date.ts,src/daily-cache.ts,src/main.ts— e.g. #533/#534 (usage-by-device + in-dashboard discovery), #573 (instant dashboard load, default to today), #582 (mobile-responsive web dashboard), #592 (per-session context token tree across CLI/TUI/dashboard).
It's not superseded — lifetime is still absent as a period on main — but the plumbing (period parsing in cli-date.ts, the daily-cache window, and the dashboard.tsx period UI) has moved enough that the change needs to be re-applied against the current code rather than merged as-is.
Before a full review:
- Rebase onto current
mainand re-wire thelifetimeperiod through the currentcli-date.ts/daily-cache.ts/dashboard.tsx. - Confirm this still coordinates with the sibling menubar/GNOME PRs from the #391 split (period names/semantics consistent across surfaces).
- Refresh
tests/cli-date.test.ts/tests/cli-json-daily.test.tsagainst the rebased behavior.
Once it's rebased and CI is green I'll do the full adversarial pass. Thanks for keeping the split reviewer-friendly.
Summary
lifetimeas a first-class CLI/dashboard period in the interactivereportflowallaligned with the existing 6-month aggregate instead of turning Lifetime into a settings-only replacement--period lifetimeFiles Changed
README.md— add lifetime CLI docs and update dashboard shortcutssrc/cli-date.ts— add lifetime period type and date range logicsrc/daily-cache.ts— update cache retention comment for lifetime semanticssrc/dashboard.tsx— add lifetime to dashboard period picker (key 6) and rendering logicsrc/main.ts— add lifetime period support to report/optimize/compare/models/yield commands, plus menubar JSON generationtests/cli-date.test.ts— add lifetime period round-trip and date range teststests/cli-json-daily.test.ts— add lifetime period regression test for older sessions beyond 6-month cache windowPeriod Semantics
allremains the boundedLast 6 monthsperiod.lifetimeis the uncapped all-time period.Testing
npm testpassesnpm run buildsucceedsScreenshot / Terminal Output
Related issue:
#389