feat: add activity ring chart with 24-segment SVG arc visualization #475
feat: add activity ring chart with 24-segment SVG arc visualization #475devendra-w wants to merge 7 commits into
Conversation
|
@devendra-w is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
@Priyanshu-byte-coder PR is ready for the check and can be cleanly merged. Please do add a difficulty label to this issue. Thankyou! |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Good feature — four fixes before merge:
-
Missing EOF newlines on three new files:
src/app/api/metrics/contributions/daily/route.tssrc/app/api/metrics/contributions/hourly/route.tssrc/components/ActivityRingChart.tsx
-
Hardcoded color —
ActivityRingChart.tsxerror state usestext-red-400. Replace withtext-[var(--destructive)]. -
withMetricsCachenot used on new API routes — all other metric routes cache responses. Add caching to/hourlyand/dailyconsistent with the rest of the codebase. -
Server timezone —
date.getHours()on the server gives UTC hours, not user's local hours. Worth a code comment so future contributors don't assume it's timezone-aware.
… daily routes, add timezone comment
…a-w/devtrack into feat/activity-ring-chart
|
Hi @Priyanshu-byte-coder! I've addressed all the requested changes:
Regarding the E2E / Playwright smoke tests failure it appears to be a JWT_SESSION_ERROR decryption issue in the CI environment and is unrelated to this PR's changes. All 7 other checks are passing including Build, Lint, Type check, and Dependency audit. |
Summary
Adds a circular 24-segment activity ring chart that visualizes commit frequency by hour of day, replacing the previous 4-block radar chart approach.
Closes #228
Type of Change
Changes Made
src/app/api/metrics/contributions/hourly/route.ts— new endpoint that fetches commits and groups them by local hour (0–23)src/components/ActivityRingChart.tsx— custom SVG arc chart with 24 segments, hover tooltips, peak hour highlight, and mount animation that respectsprefers-reduced-motionHow to Test
/dashboardScreenshots (if UI change)
Checklist
npm run lintpasses locally