mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 02:39:13 +00:00
A turn that straddles midnight (user typed at 23:58, assistant responded at 00:30) was bucketed and filtered inconsistently across call sites. parseSessionFile filtered entries by timestamp, producing orphan assistant calls that groupIntoTurns pushed as turns with empty timestamp. Some downstream code counted those (buildPeriodData summing project totals) and other code dropped them (renderStatusBar's empty-timestamp skip). The menubar showed today = $32 while the terminal status showed today = $27 for the same dataset; each was internally consistent but used a different turn-bucket rule. Fix both: parseSessionFile now builds all turns first, then filters each turn by its first assistant call timestamp (the moment cost was incurred). renderStatusBar buckets the same way. day-aggregator.ts already bucketed on assistant time, so it is now consistent too. Net effect: a turn is counted in the day the API call actually ran in. |
||
|---|---|---|
| .. | ||
| providers | ||
| bash-utils.ts | ||
| classifier.ts | ||
| cli-date.ts | ||
| cli.ts | ||
| compare-stats.ts | ||
| compare.tsx | ||
| config.ts | ||
| context-budget.ts | ||
| currency.ts | ||
| cursor-cache.ts | ||
| daily-cache.ts | ||
| dashboard.tsx | ||
| day-aggregator.ts | ||
| export.ts | ||
| format.ts | ||
| fs-utils.ts | ||
| menubar-installer.ts | ||
| menubar-json.ts | ||
| models.ts | ||
| optimize.ts | ||
| parser.ts | ||
| plan-usage.ts | ||
| plans.ts | ||
| sqlite.ts | ||
| types.ts | ||