Description
The dashboard overview crashes on load when the Total Lines Committed KPI is rendered.
GET /dash/lines/total returns a JSON object { "linesCommitted": <number> }, but the UI treated the response as a bare number. That object was passed through buildDashboardKpis into KpiCard, which then tried to render it inside Typography. React throws because objects are not valid children.
Error (console):
Objects are not valid as a React child (found: object with keys {linesCommitted}).
If you meant to render a collection of children, use an array instead.
Root cause: Type/usage mismatch in useLinesTotal (number vs { linesCommitted: number }) and useDashboardData using linesTotalQuery.data ?? 0 without reading .linesCommitted.
Affected code path: useLinesTotal → useDashboardData → buildDashboardKpis → DashboardOverview → KpiCard
Steps to Reproduce
- Open the app and go to the Dashboard page (overview with KPI cards).
- Ensure the dashboard loads data from
/dash/lines/total (default when the API is reachable).
- Wait for KPI cards to render.
Expected Behavior
- The Total Lines Committed KPI shows a formatted number (e.g.
12,345).
- The dashboard loads without errors.
Actual Behavior
- The page crashes with a React render error.
- The error references an object with key
linesCommitted.
- Other KPIs may render briefly; the crash occurs when the lines-total KPI value is rendered.
Additional Context
API response shape:
{ "linesCommitted": 12345 }

Description
The dashboard overview crashes on load when the Total Lines Committed KPI is rendered.
GET /dash/lines/totalreturns a JSON object{ "linesCommitted": <number> }, but the UI treated the response as a barenumber. That object was passed throughbuildDashboardKpisintoKpiCard, which then tried to render it insideTypography. React throws because objects are not valid children.Error (console):
Root cause: Type/usage mismatch in
useLinesTotal(numbervs{ linesCommitted: number }) anduseDashboardDatausinglinesTotalQuery.data ?? 0without reading.linesCommitted.Affected code path:
useLinesTotal→useDashboardData→buildDashboardKpis→DashboardOverview→KpiCardSteps to Reproduce
/dash/lines/total(default when the API is reachable).Expected Behavior
12,345).Actual Behavior
linesCommitted.Additional Context
API response shape:
{ "linesCommitted": 12345 }