codeburn/src
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
..
data Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
providers Fix per-provider data loss, history regression, and decode fragility (#362) 2026-05-20 04:16:48 -07:00
bash-utils.ts Strip ANSI escapes from bash commands across all providers 2026-05-02 20:59:24 -07:00
classifier.ts Fix one-shot rate detection for all non-Claude providers (#355) 2026-05-18 15:56:14 -07:00
cli-date.ts Reject invalid --format and --period values instead of silently falling back (#258) 2026-05-06 23:03:41 -07:00
cli.ts Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
codex-cache.ts Add per-file result cache for Codex provider 2026-04-30 16:43:41 -07:00
compare-stats.ts feat(compare): model comparison with planning rate fix 2026-04-19 08:34:49 -07:00
compare.tsx Quiet routine pricing warnings + menubar recovery from stuck-loading (#266) 2026-05-08 20:33:48 -07:00
config.ts Track multiple provider plans 2026-05-11 16:33:33 +03:00
context-budget.ts fix(context-budget): use bounded readSessionFile helper 2026-04-17 08:32:19 +02:00
currency.ts Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
cursor-cache.ts Cursor: per-project breakdown by workspace (closes per-project half of #196) (#296) 2026-05-10 15:35:57 -07:00
daily-cache.ts Store credential cache in file instead of keychain, use cache for per-provider menubar 2026-05-17 07:18:58 -07:00
dashboard.tsx Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
day-aggregator.ts fix: use local timezone for daily date bucketing instead of UTC 2026-04-19 03:18:38 -07:00
export.ts Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
format.ts Validator hardenings on the bug-hunt batch (#254) 2026-05-06 19:50:40 -07:00
fs-utils.ts Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
ink-win.ts Fix dashboard hang and ExperimentalWarning on Windows 2026-05-02 11:54:58 -07:00
main.ts Fix per-provider data loss, history regression, and decode fragility (#362) 2026-05-20 04:16:48 -07:00
menubar-installer.ts Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
menubar-json.ts Add Optimize tab, token display modes, daily budget alerts, and project drill-down (#349) 2026-05-18 14:51:15 -07:00
model-efficiency.ts feat(report): add per-model efficiency metrics 2026-05-05 23:36:59 -07:00
models-report.ts Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
models.ts Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
optimize.ts Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
parser.ts Fix one-shot rate detection for all non-Claude providers (#355) 2026-05-18 15:56:14 -07:00
plan-usage.ts Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
plans.ts Add claude-max-5x preset for $100/month tier 2026-04-24 15:47:59 +02:00
session-cache.ts fix: handle # compound-path separator in fingerprintFile (#358) 2026-05-19 04:21:17 -07:00
sqlite.ts Merge main into feat/multi-provider-plans, remove dead tautology 2026-05-16 10:42:03 -07:00
types.ts Fix one-shot rate detection for all non-Claude providers (#355) 2026-05-18 15:56:14 -07:00
yield.ts Validator hardenings on the bug-hunt batch (#254) 2026-05-06 19:50:40 -07:00