Skip to content

feat: wrap wallet and match detail pages with PageErrorBoundary#579

Open
Petah1 wants to merge 1 commit into
Arenax-gaming:mainfrom
Petah1:feat/page-error-boundaries
Open

feat: wrap wallet and match detail pages with PageErrorBoundary#579
Petah1 wants to merge 1 commit into
Arenax-gaming:mainfrom
Petah1:feat/page-error-boundaries

Conversation

@Petah1

@Petah1 Petah1 commented Jun 24, 2026

Copy link
Copy Markdown

Closes #558


Summary

  • Adds a shared PageErrorBoundary class component (src/components/common/PageErrorBoundary.tsx) that wraps MobileErrorBoundary's pattern using PageError as its fallback UI, including a "Try again" button that resets boundary state via this.setState
  • Wraps <WalletDashboard /> in /wallet/page.tsx with PageErrorBoundary so runtime errors inside the dashboard tree are isolated to that section
  • Extracts the match page body into MatchHubPageContent and wraps it with PageErrorBoundary in the default export of /matches/[id]/page.tsx, preventing a crash in that component tree from propagating to the shell
  • All caught errors are logged via console.error("[PageErrorBoundary]", ...) — consistent with the existing error.tsx files in both routes
  • Existing Next.js error.tsx route-level boundaries are preserved and unchanged as a higher-level fallback

Test plan

  • Navigate to /wallet with no errors — confirm the page renders normally
  • Simulate a runtime throw inside WalletDashboard — confirm PageError renders with "Wallet unavailable" title and "Try again" button; clicking it recovers the page
  • Navigate to /matches/[id] with no errors — confirm the page renders normally
  • Simulate a runtime throw inside MatchHubPageContent — confirm PageError renders with "Failed to load match" title and "Try again" button; clicking it recovers the page
  • Confirm errors are logged to the browser console as [PageErrorBoundary] ...
  • Confirm no change to routing, existing state, or loading/error states handled by the pages themselves

@Petah1 Petah1 requested a review from anonfedora as a code owner June 24, 2026 16:39
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

@Petah1 is attempting to deploy a commit to the paul joseph's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@Petah1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[frontend] - Error boundary missing for wallet and match pages

1 participant