feat: add error boundaries for feature modules - #101
Merged
Conversation
jobbykings
approved these changes
Jun 22, 2026
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add error boundary wrappers to all major feature modules so a crash in any one
component no longer takes down the entire app. Every feature page and standalone
component now has its own boundary with a graceful fallback UI.
ErrorBoundary— full-page red-themed fallback with "Something went wrong","Try Again", and "Go Home". Used for Lab and Campus pages.
RouteErrorBoundary— amber/warning-themed per-section fallback with"Could not load {section}" and "Retry Section". Used inside BCIDashboard for
per-tab isolation.
Related Issue
Closes #71
Type of Change
Packages Affected
contracts/(Soroban / Rust)backend/(Node / Express)frontend/(Next.js)docs/How Has This Been Tested?
tab switching recovers, sidebar stays functional, dev/prod mode) and NanoLearningHub
(normal render, empty skills, section presence).
tsc --noEmitclean on all modified files.next lintclean — no new warnings or errors.Run with (from
frontend/):npm test -- --no-cache --runInBand src/components/__tests__/(if memory-constrained, use the programmatic inline config as described in the issue thread).
Checklist
Breaking Changes
None
Additional Notes / Screenshots
Files modified:
frontend/src/components/ErrorBoundary.tsx— added default exportfrontend/src/components/RouteErrorBoundary.tsx— added default exportfrontend/src/app/lab/page.tsx— wrapped<VirtualScienceLab />in<ErrorBoundary>frontend/src/app/campus/page.tsx— wrapped<MetaverseCampus />in<ErrorBoundary>frontend/src/components/BCI/BCIDashboard.tsx— wrapped each tab'srenderActiveTab()in
<RouteErrorBoundary routeName={...}>for per-tab crash isolationfrontend/src/components/NanoLearning/NanoLearningHub.tsx— wrapped JSX in<ErrorBoundary>Files added:
frontend/src/components/__tests__/BCIDashboard.test.tsxfrontend/src/components/__tests__/NanoLearningHub.test.tsxScreenshot