feat(dashboard): add commit time-of-day heatmap widget (#2118)#2128
Open
IshitaSingh0822 wants to merge 2 commits into
Open
feat(dashboard): add commit time-of-day heatmap widget (#2118)#2128IshitaSingh0822 wants to merge 2 commits into
IshitaSingh0822 wants to merge 2 commits into
Conversation
…k, and API routes
- Add GET /api/metrics/commit-times route returning 7x24 matrix - Add CommitHeatmap.tsx component with SVG grid, tooltip, peak stat - Register commit-heatmap-time widget in dashboard-layout.ts - Wire widget into CustomizableDashboard.tsx - Add commit-times TTL to metrics-cache.ts
|
@IshitaSingh0822 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):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a 7×24 commit time heatmap that visualizes when during the day/week a user codes most — similar to GitHub's contribution graph but showing time-of-day patterns instead of daily totals.
Closes #2118
Type of Change
Changes Made
GET /api/metrics/commit-timesroute that fetches commit timestamps from the last 90 days via GitHub Search API and returns a7×24matrix (commitTimes[dayOfWeek][hour] = count)src/components/CommitHeatmap.tsx— renders the 7-row × 24-column grid with green color scale, hover tooltip showing day + hour + commit count, and a "peak coding time" labelcommit-heatmap-timewidget insrc/lib/dashboard-layout.ts(type union, labels, default activity section)src/components/dashboard/CustomizableDashboard.tsx(span class + switch case)"commit-times"TTL entry tosrc/lib/metrics-cache.tsto fix TypeScript type errorHow to Test
/dashboardTuesday 3pm — 12 commitsstyle textScreenshots (if UI change)
Checklist
pnpm run lintpasses locallypnpm run type-check)Accessibility Checklist
aria-labelwith day, hour, and commit counttabIndex={0},onFocustooltip)role="status"andaria-busy="true"Additional Notes
This widget is distinct from the existing
ContributionHeatmap(issue #18) which is a date-based calendar. This is a time-pattern matrix showing when during the day/week you code, not how much on each date.