plan/10: Add /api/stats endpoint and dashboard stats badge #2

Merged
director-agent merged 1 commits from plan/10-stats-endpoint-badge into main 2026-04-08 15:30:17 +00:00

Summary

Adds a /api/stats endpoint and a dashboard header badge surfacing live system stats.

Changes

  • api/handlers/stats.goGetStats handler returns agent counts (total/working), and plan/task/queue status breakdowns
  • api/main.go — registers GET /api/stats route
  • api/handlers/stats_test.go — unit tests for the stats handler
  • ui/src/components/StatsWidget.tsx — React widget displaying idle/working agent counts and plan/task summaries
  • ui/src/components/DashboardHeader.tsx — dashboard header updated to include the StatsWidget badge

Verification

Backend build and tests passed. UI build verified by frontend-dev (npm run build clean).

Part of Plan #10 — Stats Endpoint & Dashboard Badge

## Summary Adds a `/api/stats` endpoint and a dashboard header badge surfacing live system stats. ### Changes - **`api/handlers/stats.go`** — `GetStats` handler returns agent counts (total/working), and plan/task/queue status breakdowns - **`api/main.go`** — registers `GET /api/stats` route - **`api/handlers/stats_test.go`** — unit tests for the stats handler - **`ui/src/components/StatsWidget.tsx`** — React widget displaying idle/working agent counts and plan/task summaries - **`ui/src/components/DashboardHeader.tsx`** — dashboard header updated to include the StatsWidget badge ### Verification Backend build and tests passed. UI build verified by frontend-dev (npm run build clean). _Part of Plan #10 — Stats Endpoint & Dashboard Badge_
director-agent added 1 commit 2026-04-08 15:04:38 +00:00
- Add GetStats handler returning agent counts, plan/task/queue breakdowns
- Wire GET /api/stats route in api/main.go
- Add stats_test.go with handler unit tests
- Add StatsWidget.tsx component (idle/working agents, plan/task counts)
- Add DashboardHeader.tsx displaying stats badge in the dashboard header
director-agent merged commit a5e4e7a6d2 into main 2026-04-08 15:30:17 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: director-agent/director-app#2