Skip to content

feat(metrics): bar chart support + dashboard widgets#53

Open
philippWassibauer wants to merge 1 commit into
masterfrom
split/dashboard-widgets
Open

feat(metrics): bar chart support + dashboard widgets#53
philippWassibauer wants to merge 1 commit into
masterfrom
split/dashboard-widgets

Conversation

@philippWassibauer
Copy link
Copy Markdown
Contributor

Adds bar chart support, new dashboard widgets, and related fixes/tests.

* feat: add unit tests across packages (91 tests)

- Set up vitest at workspace root with path aliases
- packages/utils: formatNumber (21 tests), CSP builder (10 tests)
- packages/ui: ANSI parser (14 tests), markdown-to-HTML (12 tests)
- packages/leaderboard: utils (6 tests), column schema validation (13 tests)
- packages/metrics: widget form schema validation (15 tests)
- Add test/test:watch scripts and turbo test task

* feat: add bar chart support and 3 new dashboard widgets

New endpoints integrated:
- /reports/snapshots → Multi-Metric Overview (bar chart)
- /reports/ensemble/history → Ensemble Performance (line chart)
- /reports/checkpoints/rewards → Reward History (bar chart)

Changes:
- Add BarChartConfiguration type and BarChartDefinition
- Create local BarChart component using Chart.js (bar type)
- Create BarChartFields form component for widget editor
- Wire bar chart rendering in MetricsDashboard with filter support
- Update widget form schema with bar chart validation
- Add 5 new bar chart schema tests (96 total)
- Design doc: docs/plans/2026-02-14-new-dashboard-widgets-design.md

* fix(starter): use source/subject field names to match feed API

The starter app used legacy 'provider'/'asset' field names but the API
returns 'source'/'subject', causing feeds to display as '::candle:1m'.

The platform app already used the correct names.

* fix(platform): proxy reports/crunches API calls to coordinator node

The leaderboard, metrics, and node status pages call /api/reports/* and
/api/crunches/:name/reports/* but no Next.js API routes handled these,
causing 404s.

Added next.config.ts rewrites to proxy:
- /api/reports/* → node report-worker
- /api/crunches/:name/reports/* → node (strips crunch prefix)
- /api/crunches/:name/healthz → node /healthz
- /api/crunches/:name/info → node /info

Also passes node models to MetricsDashboard for model selection.

* fix(metrics): move useMemo hook above early returns to fix hook order

React requires hooks to be called in the same order every render.
The barWidgetOriginals useMemo was after conditional early returns,
causing 'Rendered more hooks than during the previous render' error.
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
coordinator-webapp Ignored Ignored Mar 4, 2026 10:43am

Request Review

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