refactor: split Dashboard.tsx (~1225 lines) into tab components #13

Closed
opened 2026-05-11 09:27:56 +02:00 by dries · 0 comments
Owner

Dashboard.tsx contains the layout shell plus three conceptually separate tab bodies in a single 1225-line file. Split into:

  • StatsTab.tsx — the Stats tab body (currently ~lines 314-450)
  • UsageTab.tsx — the Usage tab body with hourly/activity charts
  • ProjectsTab.tsx — the Projects tab body

Dashboard.tsx keeps the outer layout, tab navigation, and shared state (project scope picker, date range).

Each tab component receives the data it needs via props; shared chart helpers (HourlyTokensChart, HeatmapChart) move to a co-located charts/ subfolder.

Dashboard.tsx contains the layout shell plus three conceptually separate tab bodies in a single 1225-line file. Split into: - StatsTab.tsx — the Stats tab body (currently ~lines 314-450) - UsageTab.tsx — the Usage tab body with hourly/activity charts - ProjectsTab.tsx — the Projects tab body Dashboard.tsx keeps the outer layout, tab navigation, and shared state (project scope picker, date range). Each tab component receives the data it needs via props; shared chart helpers (HourlyTokensChart, HeatmapChart) move to a co-located charts/ subfolder.
dries closed this issue 2026-05-12 12:34:23 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dries/ocman#13
No description provided.