Files
ai-agent/backend/conversations.py
Gabriel Vidal f90d9d27ff feat(dashboards): activity dashboard — contribution graph + 5-minute agent histogram
A third dashboard answering *when* the agents ran, next to the existing "what
they cost" pages:

- a GitHub-style contribution graph, a cell per day, intensity = conversations
  started, quartile-stepped so one outlier day can't flatten the rest;
- the selected day as stacked columns, one per 5-minute slot, a segment per
  model — the shape of a session day and where agents overlapped;
- per-model totals: runs, working time, tokens, cost.

Both charts are wider than a phone by design and scroll inside their own
container, so the page stays a single mobile-first column.

The per-turn work rides along with the existing parse: `ParserState` now stamps
each summary with `activeBins` (model id -> the 5-minute bins that run produced
a turn in), so `activity.py` rolls the whole archive up without re-reading a
transcript. Bins are epoch-absolute UTC and the caller passes its `tzOffset`, so
local days survive a DST change. PARSER_VERSION 25 -> 26 re-parses the archive
once to backfill.

Model hues move to the validated categorical palette: the existing 500 steps in
light, 600 in dark (which is what puts every hue inside the darker surface's
lightness band), plus qwen. Both sets pass the band / chroma / CVD-separation /
normal-vision checks; the light set sits just under 3:1 contrast, which the
panels' table twins cover.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 21:08:52 +02:00

68 KiB