Fix language chart empty-state crash#128
Conversation
|
Someone is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
👋 Hey @saurabhhhcodes, it looks like you didn't use our PR template! The section Please update your PR description to include all required sections so we can review this properly:
You can find the full template in CONTRIBUTING.md. Just edit your PR description and the |
|
👋 Hey @saurabhhhcodes, welcome to CommitPulse! 🎉 Thanks for opening your first pull request — this is a big deal and we appreciate the effort! While you wait for a review, please double-check:
A maintainer will review your PR shortly. Hang tight! 🚀 |
|
Small GSSoC label note: if this fix is accepted, could you please add |
|
Quick CI note: I checked the failing status after updating the PR template. The only visible failure is Vercel reporting
Please re-run/authorize the Vercel preview when convenient. |
|
npm run test is failing |
Description
Fixes #125.
This PR prevents the dashboard from crashing when
LanguageChartreceives an empty language array, which can happen for users with no public repo language data or sparse GitHub profiles. It adds a stable empty-state card that keeps the existingTop Languageslayout and adds regression coverage for both empty and populated data.Pillar
Visual Preview
No screenshot attached; this is a dashboard crash fix. Empty language data now renders the existing card with
No language data foundinstead of throwing onlanguages[0].Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter. N/A: no README change needed.Testing
npm run typecheck✅npm run lint -- components/dashboard/LanguageChart.tsx components/dashboard/LanguageChart.test.tsx✅npm run format:check -- components/dashboard/LanguageChart.tsx components/dashboard/LanguageChart.test.tsx✅git diff --check✅Local Environment Notes
ERR_DLOPEN_FAILED).next buildis blocked locally by the same macOS native SWC code-signature issue plus no globalnpmfallback path.