Skip to content

feat(dashboard): add error boundary with Try Again button (#2250)#2532

Open
mallya-m wants to merge 1 commit into
Umbrella-io:mainfrom
mallya-m:feat/error-boundary-dashboard-2250
Open

feat(dashboard): add error boundary with Try Again button (#2250)#2532
mallya-m wants to merge 1 commit into
Umbrella-io:mainfrom
mallya-m:feat/error-boundary-dashboard-2250

Conversation

@mallya-m

@mallya-m mallya-m commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Creates src/app/dashboard/error.tsx as a Next.js App Router error boundary so any dashboard widget crash shows a friendly fallback UI instead of a blank page.

Related issue

Closes #2250

Changes made

  • Created src/app/dashboard/error.tsx following Next.js App Router error boundary convention
  • Friendly error message styled with var(--card), var(--foreground), var(--accent) to match dashboard theme
  • "Try Again" button calls reset() to retry rendering
  • Error logged via console.error in useEffect for debugging
  • role="alert" and aria-live="assertive" for screen reader accessibility
  • Keyboard-focusable button with focus ring and aria-label

How to test

  1. Temporarily add throw new Error("test") inside any dashboard widget
  2. Navigate to /dashboard
  3. Instead of blank page, the error boundary UI appears with "Try Again" button
  4. Click "Try Again" — page retries rendering

Screenshots

image

Checklist

  • Linked the related issue above
  • Self-reviewed my own diff
  • Uses console.error intentionally for debugging
  • npm run type-check passes (7 pre-existing upstream errors unrelated to this change)
  • Follows Next.js App Router error.tsx conventions exactly
  • Styled with CSS variables matching dashboard theme
  • Accessible — role="alert", aria-live, keyboard focusable button with aria-label

@github-actions github-actions Bot added type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) gssoc26 GSSoC 2026 contribution labels Jun 17, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Umbrella-io — 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

@mallya-m

Copy link
Copy Markdown
Contributor Author

@Priyanshu-byte-coder PR is up!

Created src/app/dashboard/error.tsx using Next.js App Router error boundary conventions. Any widget crash now shows a friendly "Something went wrong" message with a "Try Again" button that calls reset().
Styled with var(--card) and var(--accent) to match the existing dashboard. Error logged to console.error for debugging. Fully accessible with role="alert" and keyboard-focusable button.

Closes #2250
Could you please add:- level:intermediate quality:clean gssoc:approved
Ready to Merge !

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 type:performance GSSoC type bonus: performance (+15 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GOOD FIRST ISSUE] Add error boundary to Dashboard route

1 participant