codeburn/mac/Sources/CodeBurnMenubar/Data
Resham Joshi 0f55a446da
Fix per-provider data loss, history regression, and decode fragility (#362)
* Fix per-provider data loss, division-by-zero, and decode fragility

- Per-provider multi-day queries only merged cost/calls from cache,
  dropping categories/models/sessions/tokens. Remove broken cache
  shortcut and always do full parse for per-provider periods.
- Remove per-provider daily history double-counting from overlapping
  cache + live data.
- Guard maxCost against zero in ActivitySection and ModelsSection to
  prevent NaN in bar width calculations.
- Use offset-based ForEach ID in BarTooltipCard to avoid duplicate
  model name collisions.
- Make cacheHitPercent, topActivities, topModels, providers use
  decodeIfPresent for backward compat with older CLI versions.
- Skip currency switch when FX rate fetch fails with no cache,
  preventing rate/symbol desync.
- Use readSessionFile in Gemini parser for 128MB size cap.
- Truncate Codex userMessage to 500 chars like other providers.

* Restore cache-backed trend history for provider-filtered views

The previous commit removed the broken per-provider cache shortcut but
also dropped cache-backed daily history, causing provider-filtered views
to lose trend data outside the selected period range.

Use allCacheDays for historical days (cost/calls per provider is accurate
in cache) and today's entry from the full parse. No overlap since cache
ends at yesterday.
2026-05-20 04:16:48 -07:00
..
CapacityEstimator.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
ClaudeCredentialStore.swift Fix menubar per-provider performance (24s → 2s) and session cache safety (#344) 2026-05-17 13:54:38 -07:00
ClaudeSubscriptionService.swift Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
CodexCredentialStore.swift Fix menubar per-provider performance (24s → 2s) and session cache safety (#344) 2026-05-17 13:54:38 -07:00
CodexSubscriptionService.swift Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
CodexUsage.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
DataClient.swift Fix menubar stuck loading with non-blocking pipe I/O and watchdog 2026-05-09 14:27:48 -07:00
MenubarPayload.swift Fix per-provider data loss, history regression, and decode fragility (#362) 2026-05-20 04:16:48 -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 Harden menubar refresh and installer 2026-05-14 18:32:15 -07:00