codeburn/mac/Sources/CodeBurnMenubar/Data
ozymandiashh 805d2ffa49
Some checks are pending
CI / semgrep (push) Waiting to run
feat(menubar): add Local/Combined usage toggle (#566) (#568)
Mirror the combined multi-device dashboard in the macOS menubar via a
Local/Combined scope toggle (Settings -> Display). Builds on the menubar-json
`--scope combined` contract.

- MenubarScope enum (.local default) persisted in UserDefaults; PayloadCacheKey
  gains a scope dimension so local and combined payloads cache separately.
- DataClient.fetch(scope:): a pure statusSubcommand builder appends
  `--scope combined` only for combined, forces `--provider all` (the CLI rejects
  combined with a provider/project/exclude filter), and coerces multi-day
  selections to local (the CLI rejects combined + --days).
- MenubarPayload decodes the optional `combined` block (per-device + totals);
  nil when absent (back-compat).
- The badge always stays on the local payload; the combined network pull lives
  on a separate cache key and falls back to local with a "Combined unavailable"
  indicator, so a slow/offline peer never blocks the badge.
- Hero shows combined totals + a per-device breakdown in Combined scope; the
  token metric stays input+output (cache excluded) to match local; the
  per-device daily-budget warning is suppressed for a multi-device total;
  selecting Combined resets the provider tab to All.

Tests run via `swift test` (CommandLineTools Testing.framework on the rpath, no
Xcode): scope persistence, argv (local/combined/provider-forcing/multi-day),
cache-key partition, badge-survives-combined-failure, combined decode, token
consistency, provider reset, budget suppression.
2026-06-28 22:01:01 +02:00
..
CapacityEstimator.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
ClaudeCredentialStore.swift fix(menubar): read Claude keychain via security CLI on silent refresh (#490) (#491) 2026-06-14 10:31:56 +02:00
ClaudeSubscriptionService.swift Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
CLIClaudeConfig.swift feat(menubar): configure CLAUDE_CONFIG_DIRS via Settings (#434) (#436) 2026-06-06 02:30:46 +02:00
CodexCredentialStore.swift fix(menubar): treat the CLI credential store as the source of truth 2026-05-31 05:01:19 -07:00
CodexSubscriptionService.swift fix(menubar): treat the CLI credential store as the source of truth 2026-05-31 05:01:19 -07:00
CodexUsage.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
DataClient.swift feat(menubar): add Local/Combined usage toggle (#566) (#568) 2026-06-28 22:01:01 +02:00
MenubarPayload.swift feat(menubar): add Local/Combined usage toggle (#566) (#568) 2026-06-28 22:01:01 +02:00
MenubarStatusCache.swift feat(menubar): drop launchd fetcher; GUI writes its own badge backstop 2026-05-30 13:35:07 -07:00
QuotaSummary.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
SubscriptionRefreshCadence.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
SubscriptionSnapshotStore.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
SubscriptionUsage.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
UpdateChecker.swift fix(menubar): re-check CLI version on every update cycle 2026-05-27 06:35:00 -07:00