Skip to content

feat: add themed error boundary fallback for LeaderboardTable (Closes #813) - #858

Open
waterWang wants to merge 1 commit into
Predictify-org:mainfrom
waterWang:feat/leaderboard-table-error-boundary-813
Open

feat: add themed error boundary fallback for LeaderboardTable (Closes #813)#858
waterWang wants to merge 1 commit into
Predictify-org:mainfrom
waterWang:feat/leaderboard-table-error-boundary-813

Conversation

@waterWang

Copy link
Copy Markdown

Summary

Adds a polished, leaderboard-themed error boundary fallback for the LeaderboardTable component. When a render error is caught, users see a friendly message with a Retry button instead of a blank screen or the generic ErrorRecoveryScreen.

Changes

New files

  • components/leaderboard/LeaderboardTableErrorFallback.tsx — Custom fallback UI that matches the dark-slate leaderboard palette. Includes:

    • Trophy icon & "Leaderboard temporarily unavailable" heading
    • Explanatory text
    • Incident ID display (development only)
    • Retry button (cyan accent, matching table theme)
    • Collapsible error details (development only)
  • components/leaderboard/LeaderboardTableErrorBoundary.tsx — Class-based error boundary that wraps render content and catches errors. Exports:

    • LeaderboardTableErrorBoundary — reusable boundary class
    • LeaderboardTableWithBoundary — convenience wrapper around the LeaderboardTable
    • LeaderboardTable re-export for backward compatibility
  • components/leaderboard/__tests__/LeaderboardTableErrorBoundary.test.tsx — 6 tests covering:

    • Normal render (no error)
    • Fallback render when child throws
    • Retry button interaction
    • Heading and button existence in standalone fallback
    • Incident ID visibility in development
    • Smoke test for LeaderboardTableWithBoundary

Testing

  • All 6 new tests pass
  • Pre-existing test suite shows identical results (153 pre-existing failures, unchanged by these changes)

Closes #813

@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

@waterWang is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Polish LeaderboardTable error-boundary fallback UI [b#079]

1 participant