Activity Heatmap
The activity heatmap displays your daily message activity in a GitHub-style contribution graph.Implementation
The heatmap is implemented insrc/components/activity-heatmap.tsx:26 and renders data from the StatsCache type:
Visual Design
The heatmap uses a five-level color scale based on message intensity:- No activity:
bg-[#1a1a1a](dark background) - Low activity (0-25%):
bg-gray-700 - Medium-low (25-50%):
bg-gray-500 - Medium-high (50-75%):
bg-gray-300 - High activity (75-100%):
bg-white
Interactive Features
Hovering over any day displays a tooltip with:- Full date (formatted as “Weekday, Month Day, Year”)
- Message count for that day
- Positioned dynamically above the cell
src/components/activity-heatmap.tsx:85):
Data Structure
The heatmap consumes theDailyActivity type from src/lib/types.ts:36:
Sessions by Hour
The hourly breakdown chart shows when you’re most active throughout the day.Implementation
Located insrc/components/hour-chart.tsx:14, this component creates a 24-hour bar chart:
Hour Data Collection
Session hours are tracked in theStatsCache.hourCounts object, which maps hour strings (“0” through “23”) to session counts.
Visualization
The chart displays:- X-axis: Hours from 00:00 to 23:00 (showing every other hour for readability)
- Y-axis: Number of sessions started during that hour
- Bars: Light gray (
#e5e7eb) with rounded tops
Project Breakdown
Shows which projects consume most of your coding time.Implementation
Fromsrc/components/project-breakdown.tsx:14, this component aggregates session data by project:
Features
- Displays top 10 projects by time spent
- Shows total minutes per project
- Truncates long project names (>15 chars) with ”..” suffix
- Horizontal bar chart sorted by duration
Tooltip Information
Hovering over a project bar shows the exact time spent in minutes.Project names are extracted from the last segment of the project path. For example,
/Users/me/code/my-app becomes “my-app”.Layout and Navigation
All activity tracking components are displayed in the “Activity” tab of the dashboard (src/components/dashboard.tsx:156):
- Mobile: Single column
- Desktop (lg breakpoint): Two columns for hour chart and project breakdown
Related Features
- Session Explorer - Drill down into individual sessions
- Tool Usage - See which tools you use during active hours
- Model Analytics - Track daily token usage patterns