Skip to content

Menubar Lifetime period should use full history and consistent adaptive cadence across CLI, macOS, and GNOME #389

@0monish

Description

@0monish

Summary

The Lifetime period needs to behave consistently across CodeBurn surfaces.

Right now, Lifetime support touches multiple layers:

  • CLI / dashboard period wiring
  • menubar JSON payload generation
  • macOS menubar rendering and status-period settings
  • GNOME menubar rendering and prefs/settings

This should be treated as one consistency issue: Lifetime must mean true all-time history everywhere, not a recent capped window, and long spans must render with an adaptive cadence that stays readable.

Problem

Without explicit cross-surface handling, Lifetime can drift in a few ways:

  • period selectors/settings may expose different options on different surfaces
  • menubar payload history may be trimmed too aggressively for desktop renderers
  • long history can be rendered with the wrong cadence
  • older years can disappear from desktop trend views
  • stats semantics can diverge from trend semantics
  • new menubar-specific settings can accidentally omit Lifetime even when the main popover supports it

Expected behavior

Lifetime should work the same way everywhere:

  • CLI and dashboard expose Lifetime as a first-class period
  • macOS menubar popover supports Lifetime
  • macOS menubar status-period setting also supports Lifetime
  • GNOME menubar supports Lifetime
  • Lifetime uses full available history, not a fixed recent cap
  • Lifetime trend cadence adapts by span:
    • monthly for <= 24 months
    • quarterly for <= 60 months
    • yearly for > 60 months
  • Lifetime stats remain all-time and match the full-history semantics

Why this matters

Lifetime is the only period users expect to be truly uncapped. If any surface trims it, labels it differently, or renders it with the wrong aggregation, the result is misleading rather than just inconvenient.

This is especially visible in desktop menubars, where dense daily bars across multi-year history are not readable and can hide older spend entirely.

Reproduction

  1. Use a dataset that spans multiple years.
  2. Open CodeBurn in:
    • CLI/dashboard
    • macOS menubar
    • GNOME menubar
  3. Compare Lifetime behavior across those surfaces.
  4. Check whether:
    • Lifetime is selectable everywhere it should be
    • older years are present in history
    • trend labels/cadence change appropriately
    • stats remain all-time
    • menubar-specific settings also allow Lifetime

Acceptance criteria

  • Lifetime is available across CLI, dashboard, macOS menubar, macOS menubar status settings, and GNOME menubar
  • menubar payload generation retains full daily history when needed for Lifetime
  • desktop renderers do adaptive aggregation:
    • monthly <= 24 months
    • quarterly <= 60 months
    • yearly > 60 months
  • Today can still use intraday buckets and 6 Months can still use weekly aggregation
  • Lifetime stats remain all-time
  • payload decoding remains backward-compatible where practical
  • automated regression coverage exists for:
    • CLI lifetime history retention
    • macOS lifetime cadence
    • macOS menubar status-period persistence including Lifetime
    • GNOME lifetime cadence

Suggested labels

  • bug
  • desktop
  • menubar
  • enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions