/stats graph displays 12-month period while local history defaults to 30-day retention

Resolved 💬 2 comments Opened Dec 19, 2025 by shostako Closed Jan 1, 2026

<img width="629" height="371" alt="Image" src="https://github.com/user-attachments/assets/3fe5a519-ff5d-4b4f-b81d-9e3e725e5cf9" />

Problem

The /stats command displays a GitHub-style contribution graph spanning 12 months (Dec → Jan → ... → Dec), but the local conversation history (~/.claude/projects/) defaults to 30-day retention via cleanupPeriodDays.

This creates a misleading visualization where:

  • Only ~1 month of data appears on the right edge
  • The remaining ~11 months are filled with empty dots
  • The stats footer even acknowledges this: "Stats from the last 39 days"

Screenshot

<!-- Screenshot will be added -->

Current Behavior

The graph always shows a full year regardless of available data, resulting in mostly empty visualizations for users who haven't modified the default retention period.

Suggested Improvement

Consider one of these approaches:

  1. Match graph period to cleanupPeriodDays: Default to 30-day graph, extend only if user has configured longer retention
  2. Add period selector: Allow users to toggle between "30 days", "90 days", "1 year" views
  3. Auto-scale: Detect actual data range and scale the graph accordingly

Environment

  • Claude Code version: v2.0.72
  • OS: Windows (WSL)

Additional Context

The GitHub contribution graph works because GitHub retains a full year of data. Adopting the same UI pattern without matching data retention creates a UX inconsistency.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗