Skip to content

fix(scoring): correct "active days this year" copy#33

Open
jcgruesome wants to merge 1 commit into
Younesfdj:masterfrom
jcgruesome:fix/active-days-count
Open

fix(scoring): correct "active days this year" copy#33
jcgruesome wants to merge 1 commit into
Younesfdj:masterfrom
jcgruesome:fix/active-days-count

Conversation

@jcgruesome

Copy link
Copy Markdown

Summary

  • The GraphQL contributionsCollection query for recent stats has no from/to bounds, so GitHub returns a trailing 365-day window ending now — not the current calendar year.
  • UI copy labeled this "active days this year" / "contributions this year", which reads as wrong once the rolling window overlaps into the prior year (e.g. 189 active days shown on day 186 of the year).
  • Updated the copy in lib/scoring/playstyles.ts and lib/scoring/attributes.ts to accurately describe a rolling past-year window instead of the calendar year.

Test plan

  • npx vitest run — 107/107 passing
  • npx tsc --noEmit — clean
  • npx eslint . — 0 errors (12 pre-existing warnings, unrelated)
  • npx next build — succeeds

…indow

GitHub's contributionsCollection query has no from/to bounds, so it
returns a trailing 365-day window ending now, not the calendar year.
Labeling it "this year" let active_days_recent read higher than the
number of days elapsed in the current year.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant