Skip to content

Add spend visualizations to the OSS dashboard - #1

Merged
calebjohn24 merged 2 commits into
mainfrom
dashboard-spend-charts
Jul 20, 2026
Merged

Add spend visualizations to the OSS dashboard#1
calebjohn24 merged 2 commits into
mainfrom
dashboard-spend-charts

Conversation

@calebjohn24

Copy link
Copy Markdown
Contributor

Adds engaging, colorblind-safe spend charts across the OSS dashboard so spend by function, model, and provider is visual rather than table-only.

What's new

  • Validated categorical palette (palette.js) — 8-hue order checked against the light card surface (worst adjacent CVD ΔE 8.9 ≥ 8 target, normal-vision ΔE 19.6 ≥ 15 floor); slot 5 is the brand emerald. Assigned in fixed order; a 9th category folds into a neutral gray.
  • DonutChart — spend composition by provider/model with center total and a labelled legend.
  • HBarChart — ranked single-hue spend leaderboard (color tracks magnitude, never rank) with an "other" fold.
  • BarChart — now uses the shared palette, adds 2px stacked-segment gaps and richer per-segment tooltips.
  • Views — Overview gains a provider donut + top-function/top-model leaderboards; Models gains a provider donut + model leaderboard; Routes and Functions gain leaderboards.
  • Mock — provider/module/route totals now roll up from the underlying model/function items, so every view reconciles to the same window total.

Verification

  • npm run build passes.
  • Verified live in the browser with mock data across Overview / Models / Functions / Routes.

Note: this branch also carries the earlier local "Restyle dashboard to match the metergraph brand" commit that hadn't been pushed; it may need a rebase onto the latest main.

🤖 Generated with Claude Code

calebjohn24 and others added 2 commits July 20, 2026 12:11
Light paper theme with the shared brand tokens (Space Grotesk +
JetBrains Mono, emerald/amber accents, dot grid, wordmark, favicon),
and a light-background categorical palette for the cost charts.
Add validated, colorblind-safe spend charts across the dashboard:

- palette.js: 8-hue categorical series palette validated against the light
  card surface (worst adjacent CVD ΔE 8.9, normal-vision ΔE 19.6); slot 5 is
  the brand emerald. Assigned in fixed order, folding a 9th category to gray.
- DonutChart: spend composition by provider/model with center total + legend.
- HBarChart: ranked single-hue spend leaderboard (color tracks magnitude,
  not rank) with an "other" fold.
- BarChart: reuse the shared palette, add 2px stacked-segment gaps and
  richer per-segment tooltips.
- Overview: provider donut + top-function/top-model leaderboards.
- Models: provider donut + model leaderboard. Routes/Functions: leaderboards.
- mock: roll provider/module/route totals up from the underlying model/
  function items so every view reconciles to the same window total.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@calebjohn24
calebjohn24 merged commit 3681dbc into main Jul 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant