codeburn
codeburn copied to clipboard
Expose Lifetime in CLI dashboard
Note: This PR is part of a reviewer-friendly split of the original PR #391 (24 files). The monolithic PR was split into three surface-specific PRs: CLI/dashboard (this PR), macOS menubar, and GNOME extension.
Summary
- expose
lifetimeas a first-class CLI/dashboard period in the interactivereportflow - keep CLI/dashboard
allaligned with the existing 6-month aggregate instead of turning Lifetime into a settings-only replacement - add regression coverage for Lifetime date ranges and for older sessions appearing under
--period lifetime
Files 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 window
Period Semantics
allremains the boundedLast 6 monthsperiod.lifetimeis the uncapped all-time period.- The two periods are intentionally different, not contradictory.
Testing
- [x] I have tested this locally against real data (not just unit tests)
- [x]
npm testpasses - [x]
npm run buildsucceeds
Screenshot / Terminal Output
| Surface | State | Before | After |
|---|---|---|---|
| CLI / dashboard | Lifetime-selected dashboard |
Related issue: #389