Skip to content

Add an activity calendar heatmap to the stats command#227

Open
jongio wants to merge 1 commit into
mainfrom
idea/stats-calendar
Open

Add an activity calendar heatmap to the stats command#227
jongio wants to merge 1 commit into
mainfrom
idea/stats-calendar

Conversation

@jongio

@jongio jongio commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a --calendar flag to dispatch stats that renders a GitHub-style contribution heatmap of sessions per day, so you can see when work happened and spot streaks and gaps.

Behavior

  • dispatch stats --calendar prints a seven-row weekday grid of shaded intensity blocks with a Less ... More legend.
  • Days are grouped by creation date (UTC); every day between the first and last active day is shown so gaps render as empty cells.
  • Intensity buckets (0-4) scale to the busiest day in the range.
  • The default text and JSON output are unchanged; the calendar is added only when --calendar is passed.
  • Honors the existing --repo, --branch, --since, and --until filters.

Changes

  • cmd/dispatch/stats.go: --calendar flag, buildActivityCalendar aggregation, intensityBucket, and grid rendering. The report gains an optional calendar field (omitted by default).
  • cmd/dispatch/main.go: documents the flag in usage.
  • Unit tests cover the date-to-per-day aggregation, intensity buckets, gap filling, and both text and JSON output paths.
  • README documents the stats command and the flag.

Closes #222

Adds a --calendar flag to 'dispatch stats' that renders a GitHub-style
contribution heatmap of sessions per day for the selected range. Days
are grouped into a seven-row weekday grid with shaded intensity blocks
and a legend. The default text and JSON output are unchanged; the
calendar is added only when --calendar is passed and honors the
existing --repo, --branch, --since, and --until filters.

Closes #222

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio jongio self-assigned this Jul 4, 2026
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idea Feature idea from the idea pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an activity calendar heatmap to the stats command

1 participant