Stats: Add Needs attention / stale-data StatCard as a system health signal #36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Stats page has cards for Total, Active, Delivered, Parsers, Events, and Uptime — but no card for "Stalled". In the live instance, 8 out of 10 active shipments are stalled. The stall count is the most actionable health indicator in the system, yet it's invisible on Stats.
Implementation
File:
frontend/src/pages/Stats.tsxImport
AlertTrianglefrom lucide-react (add to existing import line).The
Shipmenttype infrontend/src/lib/api.tsalready hasstalled?: boolean— confirm the list endpoint returns this field. If not, the backend/api/shipmentsroute must includestalledin the response. Checkdb.pylist_shipmentsfunction to confirm.Acceptance criteria
Brand identity alignment
The brand brief says the dashboard should prioritize shipments requiring attention and data staleness. A
Stalledcard should be reframed in Trackbox language asNeeds attention,Delivery may be delayed, orCarrier data unavailabledepending on available semantics.Brand-compliant implementation notes
No new carrier eventsorSync failuresso the metric is actionable.Additional acceptance criteria
Stalledas the only label.Migrated from GitHub issue #15: https://github.com/bullitt186/trackbox/issues/15
Original author: @bullitt186
Original created: 2026-06-27T13:24:31Z
Original labels: ux
Stats: Add 'Stalled' StatCard — it's the most important system health signalto Stats: Add Needs attention / stale-data StatCard as a system health signalImplemented in commit
bd6b0e7. Added a 'Needs attention' StatCard with the AlertTriangle icon showing the count of active stalled shipments (activeShipments.filter(s => s.stalled).length). The card usestext-amber-500color when count > 0, neutral otherwise. Sub-label reads 'Stalled or no new events'. The card only renders when count > 0 to avoid visual noise when everything is healthy.