* test(cost): show that Today presents a pre-midnight scan as today's spend Adds the regression tests alone, so CI records them failing against the unchanged cost presentation before the fix lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TyLjj3QgxCcyMUFLdNo5L8 * fix(cost): stop showing a pre-midnight scan as today's cost The provider cost summary's Today tile shows the CLI's sessionCostUSD, which is the total for the local day the cost scan ran. A snapshot scanned before midnight stays on screen after it: history scans run at most hourly, the provider tabs do not trigger one, and a failed refresh keeps the previous snapshot by design. That day's spend was presented as today's. CostResponse now keeps the scan's local date (scanDay, from updatedAt), privacy projection preserves it, and the pure CostPresentation.todayAmounts reports today's amounts as unknown when that date is before the live clock's. The tile then reads "Cost unavailable" and "Tokens unavailable" until a scan from today arrives. Snapshots without a usable updatedAt keep their amounts. Docs: usage guide cost summary bullet, cost-history contract, and an Unreleased Fixed entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TyLjj3QgxCcyMUFLdNo5L8 * refactor(cost): keep the range-match comment on its function The todayAmounts helper was inserted between snapshotMatchesRange and its doc comment, so that comment described the wrong function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FH68FN52tUdZCcBqB4BGNk --------- Co-authored-by: Claude <noreply@anthropic.com>
10 files changedLine totals unavailable