Skip to content

feat(frontend): implement react error boundaries (#188)#196

Open
JenyferMontano wants to merge 3 commits into
JointSave-org:mainfrom
JenyferMontano:feat/react-error-boundaries
Open

feat(frontend): implement react error boundaries (#188)#196
JenyferMontano wants to merge 3 commits into
JointSave-org:mainfrom
JenyferMontano:feat/react-error-boundaries

Conversation

@JenyferMontano

Copy link
Copy Markdown

Description

This PR introduces React error boundaries across the entire dashboard to prevent full-page crashes when a component throws an unexpected error. It includes the ErrorBoundary wrapper component, page-level wrapping, granular section boundaries (e.g., in Group Details), and a rate-limited error reporting utility that logs client errors to /api/errors.

Closes #188

Type of Change

  • feat: new feature
  • fix: bug fix
  • chore: maintenance, tooling, dependencies
  • docs: documentation only
  • refactor: code restructuring (no functional changes)
  • test: adding or updating tests

How Has This Been Tested?

I ran the local dev server and simulated UI crashes by throwing errors inside the components to ensure the fallback UI renders correctly. I also verified the backend API rate limiting and logging, and added unit tests for the error boundary logic.

  • cargo test passes (smart contracts)
  • pnpm build succeeds (frontend)
  • pnpm lint passes (frontend)
  • Manual testing (describe below)
    • Simulated a crash in app/explore/page.tsx to verify the full-page fallback UI.
    • Simulated a crash in components/group/group-details.tsx to verify the compact section fallback UI.
    • Verified error payloads were correctly logged in the Supabase cron_job_logs table via the /api/errors endpoint.

Checklist

  • My code follows the coding conventions of this project
  • I have added/updated tests if needed
  • I have updated documentation if needed
  • My changes generate no new warnings or errors

Screenshots (if applicable)

image

@Sendi0011
Sendi0011 self-requested a review July 24, 2026 07:08

@Sendi0011 Sendi0011 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks great @JenyferMontano kindly fix the failing CI then i will merge afterward

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.

[Feature] Add React error boundaries with fallback UI across all dashboard page routes

2 participants