Skip to content

Chart starts at GitHub account creation date, not first actual contribution #119

Description

@2u841r

Problem

The chart's timeline starts at the user's GitHub account createdAt date (src/lib/cache.ts, monthlyWindows(createdAt, now)), not at the date of their first actual contribution.

For accounts created well before real activity began (e.g. signed up 2021, started actually committing/contributing in 2023), this produces a long flat/empty stretch at the start of the chart instead of the chart beginning where activity actually starts.

Suggested fix

Either:

  • Trim leading empty months from the rendered chart (skip months before the first non-zero contribution), or
  • Detect first real contribution date (e.g. from the earliest non-empty month in the GraphQL data) and use that as the window start instead of account createdAt.

Where to look

  • src/lib/cache.ts around line 207-208 (createdAt / monthlyWindows)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions