Skip to content

Expose Lifetime in CLI dashboard#416

Open
0monish wants to merge 2 commits into
getagentseal:mainfrom
0monish:split/cli-dashboard-lifetime
Open

Expose Lifetime in CLI dashboard#416
0monish wants to merge 2 commits into
getagentseal:mainfrom
0monish:split/cli-dashboard-lifetime

Conversation

@0monish

@0monish 0monish commented May 29, 2026

Copy link
Copy Markdown

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

  • I have tested this locally against real data (not just unit tests)
  • npm test passes
  • npm run build succeeds

Screenshot / Terminal Output

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

Related issue: #389

0monish and others added 2 commits May 30, 2026 01:43
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 ozymandiashh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Rebase onto current main and re-wire the lifetime period through the current cli-date.ts / daily-cache.ts / dashboard.tsx.
  2. Confirm this still coordinates with the sibling menubar/GNOME PRs from the #391 split (period names/semantics consistent across surfaces).
  3. Refresh tests/cli-date.test.ts / tests/cli-json-daily.test.ts against 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.

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.

2 participants