codeburn/src
iamtoruk b491a1f590 fix: bucket turns by assistant timestamp, filter at turn level
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.
2026-04-21 04:40:44 -07:00
..
providers fix(cursor-agent): drop unused SessionSource fields reintroduced by revert 2026-04-21 04:23:20 -07:00
bash-utils.ts feat: add Pi provider for tracking Pi agent sessions 2026-04-16 01:54:42 -07:00
classifier.ts chore: normalize Pi tool names via toolNameMap 2026-04-16 01:57:39 -07:00
cli-date.ts feat(report): add --from/--to date range filtering and avgCostPerSession (#80) 2026-04-18 15:11:33 -07:00
cli.ts fix(plan): resolve type errors in plan summary and isActivePlan guard 2026-04-21 04:20:55 -07:00
compare-stats.ts feat(compare): model comparison with planning rate fix 2026-04-19 08:34:49 -07:00
compare.tsx fix: preserve view on period switch and auto-refresh 2026-04-19 13:34:30 -07:00
config.ts fix(config): restore catch-all in readConfig to prevent CLI crash on malformed config 2026-04-21 04:20:55 -07:00
context-budget.ts fix(context-budget): use bounded readSessionFile helper 2026-04-17 08:32:19 +02:00
currency.ts feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
cursor-cache.ts fix: final review cleanup 2026-04-15 05:35:11 -07:00
daily-cache.ts Fix daily cache gap fill using UTC instead of local time 2026-04-19 04:23:17 -07:00
dashboard.tsx fix(plan): scope TUI plan row to billing period, use currency-aware formatting 2026-04-21 04:20:54 -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 fix: pricing accuracy, stream leak, CSV injection hardening 2026-04-21 04:20:46 -07:00
format.ts fix: bucket turns by assistant timestamp, filter at turn level 2026-04-21 04:40:44 -07:00
fs-utils.ts fix: pricing accuracy, stream leak, CSV injection hardening 2026-04-21 04:20:46 -07:00
menubar-installer.ts chore: point repo URLs at getagentseal org (#97) 2026-04-18 14:55:44 -07:00
menubar-json.ts feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
models.ts fix: pricing accuracy, stream leak, CSV injection hardening 2026-04-21 04:20:46 -07:00
optimize.ts Merge pull request #68 from lfl1337/fix/remove-claudeignore-references 2026-04-17 14:20:50 +02:00
parser.ts fix: bucket turns by assistant timestamp, filter at turn level 2026-04-21 04:40:44 -07:00
plan-usage.ts fix(plan): resolve type errors in plan summary and isActivePlan guard 2026-04-21 04:20:55 -07:00
plans.ts feat(plan): subscription plan tracking with usage progress bar 2026-04-21 04:20:50 -07:00
sqlite.ts fix(sqlite): load node:sqlite in ESM runtime 2026-04-19 05:27:05 +00:00
types.ts feat: multi-provider support (Codex + provider plugin system) 2026-04-14 04:32:09 -07:00