What: Improve the ErrorBoundary component with error reporting, retry logic, and fallback UI options.
Why: The current ErrorBoundary shows a generic error. It needs to report errors to a service, offer retry, and allow custom fallback UIs.
Scope: Add error reporting (console.error or external service). Add retry button with exponential backoff. Allow custom fallback UI via props. Add error details toggle for developers.
Acceptance criteria:
- Errors are reported
- Retry button works
- Custom fallback is supported
- Error details are toggleable
Technical context: src/components/shared/error-boundary.tsx — existing ErrorBoundary. src/app/layout.tsx — root layout.
What: Improve the ErrorBoundary component with error reporting, retry logic, and fallback UI options.
Why: The current ErrorBoundary shows a generic error. It needs to report errors to a service, offer retry, and allow custom fallback UIs.
Scope: Add error reporting (console.error or external service). Add retry button with exponential backoff. Allow custom fallback UI via props. Add error details toggle for developers.
Acceptance criteria:
Technical context:
src/components/shared/error-boundary.tsx— existing ErrorBoundary.src/app/layout.tsx— root layout.