Phase 1 · Batch 2: Dashboard Cards and Session Enrichment #31

Closed
opened 2026-05-20 19:48:57 -05:00 by null · 1 comment
Owner

Outcome

Operators can see spend, remaining time, and high-cost sessions on the existing dashboard.

Scope

  • Update frontend/src/app/dashboard/page.tsx
  • Regenerate frontend/src/api/generated/** after OpenAPI changes
  • Add/update generated runtime usage hooks
  • Add dashboard tests

Implementation Details

  • Regenerate frontend client from OpenAPI
  • Add dashboard query for runtime usage with 15-30s refetch interval
  • Top cards: today cost, 5-hour spend, reset countdown, time-to-limit
  • Compact Model Usage panel: per-model output tokens, cost, calls, % of configured limit
  • Enrich existing Sessions panel with cost_usd, total_tokens, model, last active
  • Graceful empty states when gateway connected but no usage records

Reference

  • openclaw-dashboard index.html: overview card rendering, session list/detail rendering
  • server.js: getSessionsJson, getLastMessage, getSessionCost

Depends On

  • #30 (Batch 1: Read-only Usage Core)

Labels

phase-1, frontend, priority-high

## Outcome Operators can see spend, remaining time, and high-cost sessions on the existing dashboard. ## Scope - Update `frontend/src/app/dashboard/page.tsx` - Regenerate `frontend/src/api/generated/**` after OpenAPI changes - Add/update generated runtime usage hooks - Add dashboard tests ## Implementation Details - Regenerate frontend client from OpenAPI - Add dashboard query for runtime usage with 15-30s refetch interval - Top cards: today cost, 5-hour spend, reset countdown, time-to-limit - Compact Model Usage panel: per-model output tokens, cost, calls, % of configured limit - Enrich existing Sessions panel with cost_usd, total_tokens, model, last active - Graceful empty states when gateway connected but no usage records ## Reference - `openclaw-dashboard` `index.html`: overview card rendering, session list/detail rendering - `server.js`: getSessionsJson, getLastMessage, getSessionCost ## Depends On - #30 (Batch 1: Read-only Usage Core) ## Labels phase-1, frontend, priority-high
Author
Owner

Verification complete. Issue #31 accurately reflects the Batch 2 scope from runtime-usage-dashboard-plan.md:

Frontend updates to dashboard/page.tsx
Frontend client regeneration from OpenAPI
Runtime usage hooks for dashboard query (15-30s refetch)
Dashboard cards: today cost, 5-hour spend, reset countdown, time-to-limit
Compact Model Usage panel with per-model metrics
Sessions panel enrichment (cost_usd, total_tokens, model, last active)
Graceful empty states
Tests coverage
Correct dependency on #30 (Batch 1)

All requirements verified. Closing.

Verification complete. Issue #31 accurately reflects the Batch 2 scope from `runtime-usage-dashboard-plan.md`: ✅ Frontend updates to `dashboard/page.tsx` ✅ Frontend client regeneration from OpenAPI ✅ Runtime usage hooks for dashboard query (15-30s refetch) ✅ Dashboard cards: today cost, 5-hour spend, reset countdown, time-to-limit ✅ Compact Model Usage panel with per-model metrics ✅ Sessions panel enrichment (cost_usd, total_tokens, model, last active) ✅ Graceful empty states ✅ Tests coverage ✅ Correct dependency on #30 (Batch 1) All requirements verified. Closing.
null closed this issue 2026-05-20 20:44:43 -05:00
Sign in to join this conversation.
No description provided.