codeburn icon indicating copy to clipboard operation
codeburn copied to clipboard

Expose Lifetime in CLI dashboard

Open 0monish opened this issue 6 months ago • 0 comments

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 lifetime as a first-class CLI/dashboard period in the interactive report flow
  • keep CLI/dashboard all aligned 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 shortcuts
  • src/cli-date.ts — add lifetime period type and date range logic
  • src/daily-cache.ts — update cache retention comment for lifetime semantics
  • src/dashboard.tsx — add lifetime to dashboard period picker (key 6) and rendering logic
  • src/main.ts — add lifetime period support to report/optimize/compare/models/yield commands, plus menubar JSON generation
  • tests/cli-date.test.ts — add lifetime period round-trip and date range tests
  • tests/cli-json-daily.test.ts — add lifetime period regression test for older sessions beyond 6-month cache window

Period Semantics

  • all remains the bounded Last 6 months period.
  • lifetime is 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 test passes
  • [x] npm run build succeeds

Screenshot / Terminal Output

Surface State Before After
CLI / dashboard Lifetime-selected dashboard image image

Related issue: #389

0monish avatar May 29 '26 20:05 0monish