Skip to content

fix: add per-widget error boundaries for dashboard widgets#1807

Closed
sakshiwankhade026-coder wants to merge 3 commits into
Priyanshu-byte-coder:mainfrom
sakshiwankhade026-coder:fix/dashboard-widget-error-boundaries
Closed

fix: add per-widget error boundaries for dashboard widgets#1807
sakshiwankhade026-coder wants to merge 3 commits into
Priyanshu-byte-coder:mainfrom
sakshiwankhade026-coder:fix/dashboard-widget-error-boundaries

Conversation

@sakshiwankhade026-coder
Copy link
Copy Markdown
Contributor

Summary

Fixes dashboard crash issue when any single widget API fails by adding per-widget error boundaries.

Closes #1671


Type of Change

  • Bug fix
  • UX improvement
  • Enhancement

Changes Made

  • Wrapped all dashboard widgets with WidgetErrorBoundary
    • ContributionGraph
    • PRMetrics
    • GoalTracker
    • StreakTracker
    • TopRepos
  • Updated fallback UI inside error boundary
  • Ensured failed widgets do not crash entire dashboard

Why this change is needed

Previously, if any one API request failed (GitHub rate limits, Supabase timeout, etc.), the entire dashboard would crash or show a blank screen.

Now each widget fails independently without affecting the rest of the dashboard.


How to Test

  1. Run npm run dev
  2. Open dashboard
  3. Simulate error:
    throw new Error("test");
  4. Verify:
    • Only one widget fails
    • Other widgets still render
    • Dashboard remains usable

Expected Behavior

  • No full dashboard crash
  • Independent widget failure handling
  • Fallback UI shown per widget

Fallback Message

Unable to load data — please try refreshing or try again later

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@sakshiwankhade026-coder 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:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature labels Jun 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

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

Closing: this PR mixes two unrelated concerns — adding WidgetErrorBoundary wrappers (the stated goal) and a large dashboard layout restructuring that moves widgets around, creates duplicate section IDs (two elements with id='streaks'), and leaves the file with broken structure (a dangling grid div where a closing section tag was removed). The WidgetErrorBoundary.tsx indentation is also broken. Please submit a focused PR that only adds error boundary wrappers to existing widgets without touching the layout.

@sakshiwankhade026-coder
Copy link
Copy Markdown
Contributor Author

Thank you for the review and feedback. I understand the concern about mixing layout changes with the error boundary implementation. I'll create a new focused PR that only adds WidgetErrorBoundary wrappers without modifying the dashboard layout or structure.

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:feature GSSoC type bonus: new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard crashes with blank UI when any single API route fails — add per-widget error boundaries

2 participants