Skip to content

fix(dashboard): fetch real commit activity from weekly-summary API instead of hardcoded data - #3362

Open
nyxsky404 wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
nyxsky404:issue-3351
Open

fix(dashboard): fetch real commit activity from weekly-summary API instead of hardcoded data#3362
nyxsky404 wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
nyxsky404:issue-3351

Conversation

@nyxsky404

Copy link
Copy Markdown
Contributor

Summary

Replaced the hardcoded MOCK_TELEMETRY_DATA array in CommitActivityWidget with a useEffect fetch to /api/metrics/weekly-summary, which already returns real per-day commit counts (dailyCommits) for the authenticated user.

Changes

  • Removed MOCK_TELEMETRY_DATA constant.
  • Added useEffect to fetch /api/metrics/weekly-summary and map the dailyCommits response into the chart data format.
  • Added proper loading, error, and empty states so the widget never silently falls back to fake numbers.
  • Line additions/deletions display as 0 since the weekly-summary endpoint does not return per-day diff stats; this is honest rather than fabricated.

Fixes #3351

Copilot AI lite review requested due to automatic review settings August 4, 2026 20:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:design GSSoC type bonus: UI/design (+10 pts) type:performance GSSoC type bonus: performance (+15 pts) gssoc26 GSSoC 2026 contribution labels Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@nyxsky404

Copy link
Copy Markdown
Contributor Author

@Priyanshu-byte-coder Please review, repo is already stared by me

@github-actions github-actions Bot added type:devops GSSoC type bonus: devops (+15 pts) type:testing GSSoC type bonus: tests (+10 pts) labels Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) type:devops GSSoC type bonus: devops (+15 pts) type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Commit Activity Tracker displays fixed telemetry for every user

2 participants