Description
Add a row of stats cards at the top of the homepage showing aggregate run and pipeline counts. Below the cards, display a horizontal status bar visualizing the run status breakdown.
Depends on: TangleML/tangle#177
Stats cards
| Card |
Value |
Click action |
| Total Runs |
total_runs |
Show all runs (no filter) |
| Active |
RUNNING + PENDING + QUEUED |
Filter to active runs |
| Succeeded |
SUCCEEDED count |
Filter to succeeded runs |
| Failed |
FAILED + SYSTEM_ERROR count |
Filter to failed runs |
| Cancelled |
CANCELLED count |
Filter to cancelled runs |
| Pipelines |
total_pipelines |
Switch to Pipelines tab |
Behavior
- Stats reflect the currently active filters — if the user filters by date range or "created by me", the stats cards update to match
- Clicking a card adds/toggles that status filter on top of any existing filters (date range, user, etc.)
- Active/selected card is visually highlighted
- Cards show loading skeletons while stats are fetching
- Stats auto-refresh every 60s (matching backend cache TTL)
- Use existing status color scheme (green=succeeded, red=failed, blue=running, etc.)
- Horizontal status bar below cards shows proportional breakdown
Integration with filters
The stats endpoint (GET /api/pipeline_runs/stats) accepts the same filter_query as the list endpoint. When the user applies filters (date range, created_by, pipeline name, annotations), the frontend should pass those same filters to the stats endpoint so the cards reflect the filtered dataset.
Reusable existing code
src/utils/executionStatus.ts — status grouping logic, color mappings, priority ordering
src/components/shared/Status/TaskStatusBar.tsx — segmented bar visualization pattern
Relevant files to modify
src/routes/Home/Home.tsx — add stats section above tabs
src/components/Home/RunSection/RunSection.tsx — accept filter from parent via search params
Description
Add a row of stats cards at the top of the homepage showing aggregate run and pipeline counts. Below the cards, display a horizontal status bar visualizing the run status breakdown.
Depends on: TangleML/tangle#177
Stats cards
total_runsRUNNING+PENDING+QUEUEDSUCCEEDEDcountFAILED+SYSTEM_ERRORcountCANCELLEDcounttotal_pipelinesBehavior
Integration with filters
The stats endpoint (
GET /api/pipeline_runs/stats) accepts the samefilter_queryas the list endpoint. When the user applies filters (date range, created_by, pipeline name, annotations), the frontend should pass those same filters to the stats endpoint so the cards reflect the filtered dataset.Reusable existing code
src/utils/executionStatus.ts— status grouping logic, color mappings, priority orderingsrc/components/shared/Status/TaskStatusBar.tsx— segmented bar visualization patternRelevant files to modify
src/routes/Home/Home.tsx— add stats section above tabssrc/components/Home/RunSection/RunSection.tsx— accept filter from parent via search params