devtrack icon indicating copy to clipboard operation
devtrack copied to clipboard

[FEAT] Add commit diff size trend — lines added/removed per week chart

Open Priyanshu-byte-coder opened this issue 6 months ago • 8 comments

Summary

Show a stacked area or bar chart of lines added vs. lines removed per week over the last 12 weeks, giving developers insight into codebase growth patterns.

Motivation

Commit count alone doesn't measure output. A week with 3 commits that add 2000 lines is very different from a week with 30 tiny typo fixes.

Acceptance Criteria

  • [ ] New chart widget or section within ContributionGraph (toggle option)
  • [ ] Data from GitHub Stats API: GET /repos/{owner}/{repo}/stats/code_frequency
  • [ ] Aggregated across user's top 3 repos
  • [ ] Chart: stacked bar with additions (green) and deletions (red) per week
  • [ ] Uses recharts BarChart with two data series
  • [ ] Last 12 weeks shown on X axis (week ending date)
  • [ ] Tooltip shows additions/deletions counts
  • [ ] Handles 202 response (GitHub is computing stats — show 'Computing stats...' state)
  • [ ] Uses CSS vars for colours

Files to Touch

  • New: src/components/DiffTrendChart.tsx
  • New: src/app/api/metrics/diff-trend/route.ts
  • src/app/dashboard/page.tsx

Priyanshu-byte-coder avatar May 16 '26 19:05 Priyanshu-byte-coder

Hi @Priyanshu-byte-coder I would like to work on this issue, please assign this issue to me under lable: gssoc:approved as well.

abdullahxyz85 avatar May 17 '26 02:05 abdullahxyz85

​"Hi! I am a GSSoC '26 contributor and I would love to take this up. I have my local environment ready and can start working on this immediately. I'll ensure clean code and deliver a prompt PR. Kindly assign it to me!"

CodeSparks45 avatar May 17 '26 10:05 CodeSparks45

Hi @Priyanshu-byte-coder I hope u are doing well. I am working on this issue and plz add the label , gssoc:approved , so that i can got contribution points, plz add this label.

abdullahxyz85 avatar May 17 '26 13:05 abdullahxyz85

Reassigning to @CodeSparks45 — this issue had no PR and no activity for over a month, so it's going to the next person who asked for it (first come, first served).

@CodeSparks45 it's yours: please open a PR within 7 days or it'll be released again. If you're no longer interested, just say so and I'll pass it on.

Priyanshu-byte-coder avatar Jul 29 '26 17:07 Priyanshu-byte-coder

Pass it

CodeSparks45 avatar Jul 30 '26 02:07 CodeSparks45

Hey @CodeSparks45 — this issue was assigned a while back with no recent activity. Unassigning so it's available for Hacktoberfest contributors. Still working on it? Comment and we'll reassign you.

Priyanshu-byte-coder avatar Oct 14 '26 18:10 Priyanshu-byte-coder

Assigned to @Priyanshu-byte-coder! You have 7 days to open a PR. No PR after 7 days = auto-unassigned so others can pick it up. Good luck!

github-actions[bot] avatar Oct 14 '26 18:10 github-actions[bot]

✅ Closed as completed!

If DevTrack has been useful, a ⭐ star on the repo helps the project grow and reach more developers.

github-actions[bot] avatar Nov 14 '26 16:11 github-actions[bot]