Skip to content

feat: add coding time by hour heatmap widget(most productive hours)#1677

Open
MaitrayeeK wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
MaitrayeeK:feat/productive-hours
Open

feat: add coding time by hour heatmap widget(most productive hours)#1677
MaitrayeeK wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
MaitrayeeK:feat/productive-hours

Conversation

@MaitrayeeK
Copy link
Copy Markdown
Contributor

Summary

Adds a new Most Productive Hours widget to the dashboard — a 24×7 heatmap
grid showing commit density by hour of day and day of week

Closes #1064

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup

Changes Made

  • src/app/api/metrics/productive-hours/route.ts — New API route. Fetches GitHub PushEvents for the last 90 days, groups commits by (dayOfWeek, hour) using the user's local timezone (passed as tz query param), and returns a flat 7×24 grid of { day, hour, avg } objects plus a peak cell.
  • src/components/ProductiveHoursWidget.tsx — New widget. Renders the grid with color-intensity cells, hover tooltip, 🔥 peak label, legend, and info tooltip on the title.
  • src/app/dashboard/page.tsx — Imports and places the new widget.

Screenshots (if UI change)

image

Checklist

  • Linked issue in summary
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Self-reviewed the diff
  • Added/updated tests if applicable

Accessibility Checklist

  • Proper keyboard navigation tested
  • Responsive UI verified
  • Accessibility labels added where needed

@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@MaitrayeeK 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.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:feature GSSoC type bonus: new feature labels May 30, 2026
@github-actions
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

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

This PR has merge conflicts with main. Please rebase your branch against the latest main and force-push to resolve. Run: git fetch upstream && git rebase upstream/main

@Priyanshu-byte-coder Priyanshu-byte-coder added gssoc:approved GSSoC: PR approved for scoring level2 GSSoC Level 2 - Medium complexity (25 points) labels May 31, 2026
@github-actions github-actions Bot added type:design GSSoC type bonus: UI/design (+10 pts) type:devops GSSoC type bonus: devops (+15 pts) type:docs GSSoC type bonus: documentation (+5 pts) type:testing GSSoC type bonus: tests (+10 pts) labels May 31, 2026
@MaitrayeeK
Copy link
Copy Markdown
Contributor Author

MaitrayeeK commented May 31, 2026

Conflict resolved. Please review and merge when you get a chance. Thanks!

The UI has changed slightly due to the recent updates. Attaching a screenshot for reference.

image

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

This PR has developed merge conflicts after recent merges to main. Please rebase onto the latest main branch, resolve all conflicts, and force-push. Once the PR is conflict-free it will be reviewed for merging.

@MaitrayeeK
Copy link
Copy Markdown
Contributor Author

Conflict resolved. Please review and merge. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level2 GSSoC Level 2 - Medium complexity (25 points) type:design GSSoC type bonus: UI/design (+10 pts) type:devops GSSoC type bonus: devops (+15 pts) type:docs GSSoC type bonus: documentation (+5 pts) type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add "coding time by hour" heatmap widget (most productive hours)

2 participants