Skip to content

Add an Error Boundary and graceful failure UI around dashboard data widgetsΒ #474

@Baskarayelu

Description

@Baskarayelu

πŸ“‹ Description

The dashboard at app/dashboard/page.tsx composes many widgets β€” StatCard, MoneyDistributionWidget, SavingsByGoalWidget, RecentTransactionsWidget, SixMonthTrendsWidget. A throw in any single widget currently risks blanking the whole dashboard, and there is a WidgetErrorState component that isn't wired as a fallback.

This issue adds a reusable widget-level Error Boundary so one failing widget degrades to an error card instead of crashing the page.

Why this matters: a dashboard that goes fully blank because one chart threw is worse than a single widget showing "couldn't load β€” retry". Fault isolation keeps the rest of the financial overview usable.

🎯 Requirements & Context

Functional requirements

Context & constraints

  • Error boundaries must be client components ("use client").
  • Do not swallow errors silently β€” log them.

πŸ› οΈ Suggested Execution

git checkout -b feat/dashboard-widget-error-boundary
  • Build the boundary, wrap widgets, log errors, add TSDoc.
npm run lint
npx tsc --noEmit
npm run test:coverage
npm run build
  • Edge cases: widget throws on first render, throws after data update, retry recovers, multiple widgets fail independently, reduced motion.
  • a11y: error card must be announced; retry button reachable.

Example commit message

feat(dashboard): isolate widget failures with error boundary

Adds WidgetErrorBoundary rendering WidgetErrorState with retry and
wraps each dashboard widget to prevent full-page crashes.

βœ… Acceptance Criteria & Guidelines

Requirement Target
Reusable widget error boundary Required
Each major widget wrapped Required
Errors logged via logger Required
Retry/reset works Required
Accessibility + lint + typecheck + build Required
Timeframe 96 hours from assignment

πŸ’¬ Community & Support

Join the RemitWise contributor community on Discord: https://discord.gg/CtQuPZFMA

Comment to claim before starting. πŸš€

Metadata

Metadata

Assignees

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions