Skip to content

Phase 2: activity graph data features (private count, ghost line, trend) - #269

Closed
KingRaver wants to merge 9 commits into
Ashutosh00710:mainfrom
KingRaver:feat/private-contributions
Closed

KingRaver wants to merge 9 commits into
Ashutosh00710:mainfrom
KingRaver:feat/private-contributions

Conversation

@KingRaver

Copy link
Copy Markdown

Summary

Implements plans/README.md Phase 2: Activity graph data features.

  • Fetches restrictedContributionsCount in the existing GraphQL query.
  • Opt-in "+N private" label for the selected window (show_private=true).
  • Opt-in year-over-year ghost line (compare=year): the same window one year earlier, fetched
    via an aliased userPrevious query in the same request.
  • Opt-in 7-day moving average trend line (trend=true), trailing average with a partial window
    for the first 6 days.
  • README Customization table rows for show_private, compare, and trend.

All new options are additive and off by default — existing SVG snapshots render byte-identical
when none are used.

Test plan

  • npm run build (tsc) — passes clean
  • npm run lint (eslint --fix) — passes clean
  • npm test — 27/28 pass. The one failure (Utilities Test › GET /graph with correct credential) is a pre-existing gap: that test hits the live GitHub API and needs a TOKEN
    env var (CI supplies it via secrets.TOKEN); it 401s locally without one. Same documented
    limitation as Phase 0 (see plans/README.md), unrelated to this change.
  • New __test__/activityGraphFeatures.test.ts covers query-option parsing, the
    movingAverage helper, the aliased GraphQL query shape, Fetcher.fetchContributions
    parsing of restrictedContributionsCount/previousYearContributions, and Card.buildGraph
    rendering (and correctly omitting) the overlay series and private label.
  • The restrictedContributionsCount field name and aliased-query syntax follow GitHub's
    documented GraphQL schema but haven't been smoke-tested against the live API locally
    (no TOKEN set in this environment).

🤖 Generated with Claude Code

KingRaver and others added 9 commits October 25, 2026 07:56
Lets callers set the line thickness (1-10, default 4) and point diameter
(1-30, default 10) of the activity graph. Values are parsed as finite
numbers and clamped, so non-numeric input falls back to the defaults and
never reaches the generated CSS. Omitting both params renders exactly as
before.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add optional line_width and point_size query params
…nt_size

ESLint 9 ignores the legacy .eslintrc.js, so `npm run lint` failed on main.
Replace it with an equivalent eslint.config.js (same rules, ignores and
Prettier setup, no new dependencies; drops interface-name-prefix, which no
longer exists in typescript-eslint v8) and remove the two unused catch
bindings in handlers.ts that it then reported.

Also add line_width and point_size to the README Customization table and
add plans/README.md, the phased plan for the profile cards work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oint-size

Phase 0: ESLint 9 flat config + document line_width/point_size
Silences the TS6 rootDir inference warning; matches tsc's existing
effective behavior since __tests__ in include never matched a real dir.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Seeded with an Unreleased section for the current branch's changes;
no prior changelog or tags existed to reconstruct history from.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This is merging immediately, not sitting pending, so date it as shipped.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…oint-size

chore(tsconfig): set explicit rootDir to ./src
…d line

Adds Phase 2's activity graph data features: restrictedContributionsCount
in the GraphQL query powering an opt-in "+N private" label, an opt-in
year-over-year ghost line fetched via an aliased query in the same
request, and an opt-in 7-day moving average trend line.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@KingRaver

Copy link
Copy Markdown
Author

Opened by mistake — this repo's gh defaulted to the fork parent. Closing; the intended PR is against KingRaver/github-readme-activity-graph.

@KingRaver KingRaver closed this Oct 27, 2026
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