codeburn/tests/sharing
ozymandiashh 61eb5fbca5
fix: scope cache read/write to the selected period (web + devices CLI) (#583) (#586)
The dashboard Cache read/write cards and the `codeburn devices` summarizer
summed the full 365-day history.daily backfill instead of the selected period,
so shorter windows over-counted (today ~197x on real data). Every other metric
already reads the period-scoped `current` block.

buildMenubarPayload now emits period-scoped cacheReadTokens/cacheWriteTokens on
`current` (from PeriodData, alongside inputTokens/outputTokens); the web cards
(single + combined views) and summarizeOneDevice read those instead of reducing
history.daily. The trend chart still uses history.daily. Older peers that omit
the fields fall back to 0 (web) or the windowed daily sum (CLI).

Adds regression tests for both surfaces.
2026-07-01 15:53:44 +02:00
..
approve.test.ts feat(sharing): securely combine usage across your own devices (#532) 2026-06-20 16:24:53 +02:00
connect-timeout.test.ts perf(web): instant dashboard load, default to today, fast-fail offline peers (#573) 2026-06-29 04:21:36 +02:00
host.test.ts fix: scope cache read/write to the selected period (web + devices CLI) (#583) (#586) 2026-07-01 15:53:44 +02:00
pairing.test.ts feat(web): in-dashboard device discovery, share-from-browser, redesign + hardening (#534) 2026-06-20 19:02:03 +02:00
sanitize.test.ts feat(sharing): securely combine usage across your own devices (#532) 2026-06-20 16:24:53 +02:00
transport.test.ts fix(web): reject invalid dashboard periods without exiting (#554) 2026-06-28 19:35:46 +02:00