Skip to content

feat: Global stats dashboard #80

Description

@sagarsrc

Scope

backend, frontend

What do you want?

Aggregate statistics across all sessions to show global usage patterns and totals.

Backend:

  • API endpoint for global metrics (/api/stats or /api/metrics/global)
  • Aggregate totals: total tokens, total cost, total sessions, total time
  • Time-series data: daily/weekly/monthly trends
  • Top tools used across all sessions
  • Average session duration, tokens per session

Frontend:

  • Global stats view/page in dashboard
  • Charts: usage over time, cost trends, tool distribution
  • Summary cards: lifetime totals
  • Date range filters (last 7 days, 30 days, all time)
  • Comparison view (this week vs last week)

Metrics to track:

  • Total tokens (input/output/cache)
  • Total cost
  • Total sessions
  • Total time spent
  • Tool usage breakdown
  • Model usage breakdown

Why?

Users want to see their overall AI usage patterns beyond individual sessions. Global stats help track spending, identify trends, and understand long-term productivity with Claude Code.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status
Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions