Skip to content

Index/dashboard KPI paints 0 during cold load instead of a loading state #48

Description

@rubenvdlinde

Observed

Live e2e on the spectr virtual app (2026-07-28, manifest 2.4.0), first dashboard load after login:

  • The Tenders stats-block rendered 0 tenders
  • "Tenders published per month" rendered an empty chart — bare 0–6 y-axis, no x-axis labels, no series

Reloading the same URL showed the true values: 226,709 tenders and a full 13-month series.

Why it matters

The tile paints a wrong value rather than a skeleton/spinner while the count resolves. Against a 226k-row external register the count is genuinely slow (seconds), so a user reading the dashboard in that window sees an authoritative-looking "0 tenders" — indistinguishable from "the pipeline is broken". This is the failure mode that made a dead sync look healthy elsewhere in this project.

Expected

While the aggregate is in flight, the widget should render a loading state (or retain the previous value), and only display a numeric result once the request resolves. Same for the chart: distinguish "no data yet" from "loaded, genuinely empty".

Repro

  1. http://localhost:8080/apps/openbuild/builder/spectr/ immediately after login
  2. Observe Tenders KPI = 0 and the empty chart
  3. Reload → correct values

Register spectr-live (external DBAL over a 226k-row table) makes the window wide enough to see reliably.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions