codeburn/app/renderer/lib
Resham Joshi dbd93fee51
app,dash: render pre-history days as no data, not a currency zero (#765)
* fix(app,dash): render pre-history days as no data, not a currency zero

Days before the first recorded day in history.daily were painted as a real
0.00/0 calls in the daily activity heatmap and the daily spend charts. That
zero is unknown, not measured, so those cells and bars now read "No data
recorded" instead of a currency zero. Genuinely idle days within recorded
history stay as real zeros.

- app: heatmap cells, the daily spend bars, and the daily-by-model columns
  get a distinct no-data style plus a "No data recorded" hover for days before
  the first recorded day.
- dash: the granular line chart drops buckets before the first recorded day so
  no flat zero line is drawn before any history exists.
- data-start is derived in the UI layer from history.daily; payload shape is
  unchanged.

Verified: app vitest 418 pass (7 new for the no-data behavior); app, dash, and
root typecheck clean; dash and app renderer vite builds succeed.

* no-data: cap guard, timezone-free dash trim, StackedBars aria

Three hardening fixes from adversarial review of the no-data rendering:

dataStartKey returns null at the payload's 365-entry history cap, where
the oldest retained entry is no longer the true data start; classifying
past it would label real aged-out history as no data on long custom
ranges. Documented that the install-to-first-use gap reading as no data
is literally accurate: nothing was recorded then either.

The dash granular chart now trims leading zero-only buckets by value
instead of comparing bucket timestamps against date keys, so producer
and viewer timezone skew can never drop a real first-day bucket, and an
all-zero series lands in the established empty state.

StackedBars no-data columns expose their state via aria-label, not only
a title on a non-focusable div.
2026-07-20 08:03:24 -07:00
..
budget.ts feat(app): daily budget alert (USD or token cap) 2026-07-16 03:16:07 -07:00
build.ts fix: hydration completeness markers, cold-only splash, honest switching, prefetch 2026-07-16 14:05:11 -07:00
format.test.ts fix(app): real currency conversion, provider ids in picker, yield provider scoping 2026-07-16 01:36:59 -07:00
format.ts fix(app): real currency conversion, provider ids in picker, yield provider scoping 2026-07-16 01:36:59 -07:00
ipc.ts feat(app): T8 integration + cleanup — single refresh, ⌘-nav, shared error/format/period/series, README 2026-07-10 19:35:41 -07:00
modelSeries.ts polish(app): shared empty states, type ladder, AA contrast, honest affordances, a11y semantics 2026-07-16 02:27:41 -07:00
motion.test.tsx polish(app): consistency review nits 2026-07-16 05:11:10 -07:00
motion.ts feat(app): motion layer (gsap) — count-ups, chart grow-in, section fade, skeletons, toasts 2026-07-16 04:39:09 -07:00
pageVisibility.test.ts fix(app): zero background work when hidden; currency applies instantly 2026-07-16 18:41:28 -07:00
pageVisibility.ts fix(app): zero background work when hidden; currency applies instantly 2026-07-16 18:41:28 -07:00
period.test.ts app,dash: render pre-history days as no data, not a currency zero (#765) 2026-07-20 08:03:24 -07:00
period.ts app,dash: render pre-history days as no data, not a currency zero (#765) 2026-07-20 08:03:24 -07:00
refreshCadence.test.ts fix(app): zero background work when hidden; currency applies instantly 2026-07-16 18:41:28 -07:00
refreshCadence.tsx fix(app): zero background work when hidden; currency applies instantly 2026-07-16 18:41:28 -07:00
testMatchMedia.ts polish(app): consistency review nits 2026-07-16 05:11:10 -07:00
toast.ts feat(app): motion layer (gsap) — count-ups, chart grow-in, section fade, skeletons, toasts 2026-07-16 04:39:09 -07:00
types.ts fix(clients): display CLI-computed values verbatim, align period windows across app/dash/menubar 2026-07-20 06:26:15 -07:00