Skip to content

Feature request: toggle panel headline between cost and tokens #305

@MARUCIE

Description

@MARUCIE

Problem

The menubar popover's headline number is currency-only. In the screenshot below the user sees $442.72 (Today) and $226.51 / $164.24 / … in the Activity rows, but cannot flip the same panel to show token totals as the primary metric without leaving the popover and running codeburn today --format=json | jq on the CLI.

For users on Claude Max / ChatGPT Pro flat-rate plans, the cost number is largely informational — what they actually want to monitor at-a-glance is token consumption (rate-limit headroom), not dollars.

Evidence (v0.9.7 on macOS 14+)

Verified by inspecting the installed bundle and CLI:

  • codeburn currency [code] switches currency (USD/EUR/GBP/CNY etc. via api.frankfurter.app), NOT cost↔tokens. Strings present in CodeBurnMenubar binary: SupportedCurrency, setCurrencyCode:, _currency, currencySymbol, savingsUSD.
  • defaults read org.agentseal.codeburn-menubar exposes only 4 keys, all housekeeping (UpdateChecker.lastCheckDate, UpdateChecker.latestVersion, codeburn.loginItemRegistered, codeburn.starBannerDismissed). No displayMode / headlineMetric / showTokens key.
  • CLI has no config subcommand and no --unit flag on today / report. codeburn --help top-level commands: report status today month export menubar currency model-alias plan optimize compare yield.
  • Binary does contain an InsightMode symbol, suggesting the data layer can already produce both views — only the user-facing toggle is missing.

So the data is already computed (inputTokens / cacheReadTokens / cacheWriteTokens / effectiveTokens fields are in the JSON payload) — the gap is purely UI exposure in the popover.

Tokens are partially visible already, but inconsistently

  • Inside the Trend tab the chart Y-axis IS tokens (Last 19 days 267.7M tokens, Avg/day 14.1M tok, Peak 52.1M tok, Yesterday 12.7M tok).
  • But the popover headline (Today $442.72), the Activity rows (Coding $226.51), and the menubar status-icon number are all currency-only.

This split forces the user to mentally translate between two metrics on the same panel.

Proposal

Add a single toggle that flips headline + Activity rows + menubar status icon between Cost and Tokens. Three placement options, in order of preference:

  1. Tab next to Trend / Forecast / Pulse / Stats → e.g. Cost | Tokens segmented control at panel top. Same affordance as the existing tab strip, zero new visual vocabulary.
  2. Right of the $ USD button in the footer → e.g. $ USD becomes $ USD ⇄ Tokens cycler. Keeps unit-related controls grouped, but conflates "currency" with "metric" semantically.
  3. CLI-only firstcodeburn config set menubar.headline tokens (persist to ~/.config/codeburn/config.json), menubar reads on next refresh. Lowest UI risk, fastest to ship.

Either way the underlying InsightMode enum probably already supports it — this is a UI-surface change, not a data-layer change.

Related

Environment

  • CodeBurn v0.9.7 (CLI + Menubar app)
  • macOS 14+, M3 Max

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