Skip to content

feat: default period Today across surfaces, falling back to 7d when today is empty #1111

Closed

Description

@iamtoruk

Every surface currently defaults to the last 7 days. Proposal (from Resham): default to Today — the cheapest possible range (with the #1107 mtime floor, a handful of files) — and fall back to 7 days only when today has no data yet.

Behavior

  • codeburn (TUI), desktop app, web dashboard: open on Today. If the today-scoped parse finds zero sessions, switch to 7d automatically (one visible state change, not a flicker — decide period before first paint where possible: the today-scoped parse IS the probe, it costs almost nothing).
  • Menubar already leads with today — unchanged.
  • Explicit flags/periods (-p week, keys 1-6, app period picker) always win; this only changes the unset default.

Why

Notes

  • Docs (codeburn.app quickstart says 'last 7 days') and README need the same-line update when this ships.
  • Payload/menubar contracts untouched; TUI period keys unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions