Skip to content

feat: add reusable widget error boundary#319

Open
akshaya988 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
akshaya988:feat/widget-error-boundary
Open

feat: add reusable widget error boundary#319
akshaya988 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
akshaya988:feat/widget-error-boundary

Conversation

@akshaya988
Copy link
Copy Markdown

Summary

Added a reusable WidgetErrorBoundary component and wrapped each dashboard widget individually to prevent the entire dashboard from crashing if a single widget fails.

Closes #164

Type of Change

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

Changes Made

  • Created reusable WidgetErrorBoundary.tsx
  • Wrapped dashboard widgets individually using error boundaries
  • Added fallback error UI for failed widgets
  • Added retry functionality to recover widgets
  • Added console.error logging for debugging
  • Prevented full dashboard crashes caused by widget failures
  • Created DashboardWidgets.tsx client wrapper component

How to Test

  1. Run the project using npm run dev
  2. Add throw new Error("Test widget crash"); inside any widget component
  3. Open /dashboard
  4. Verify only the broken widget shows fallback UI
  5. Verify other widgets continue functioning normally
  6. Click retry button to test recovery behavior

Screenshots (if UI change)

Add screenshots of:(No need)

  • Widget fallback UI
  • Dashboard still functioning while one widget crashes

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

@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

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

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your first PR on DevTrack! 🎉

A maintainer will review it within 48 hours. While you wait:

  • Make sure CI is passing (type-check + lint)
  • Double-check the PR description is filled out and the issue is linked
  • Feel free to ask questions in Discussions if you need help

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GOOD FIRST ISSUE] Add error boundary to each dashboard widget

1 participant