Feature/add error boundary component for ontology editor #129#199
Conversation
-add reusable ErrorBoundary component -add ontology-specific fallback UI with retry action -wrap main editor page to prevent full app crashes -add tests for fallback and recovery behavior close aadorian#129
-add tests for fallback and recovery behavior
charulata871
left a comment
There was a problem hiding this comment.
Hey,
I went through the changes and overall this is a really solid addition. Introducing an ErrorBoundary for the ontology editor is a great step—it makes the app much more resilient by preventing full crashes and keeping failures contained to the editor section.
I especially liked:
The reusable design of the ErrorBoundary
The fallback UI with the “Try again” action — feels smooth and user-friendly
Good test coverage, particularly around error handling and recovery flow
- A few things to improve:
In page.tsx, there seems to be duplicate layout rendering (header, main layout, panels repeated inside the ErrorBoundary). This could lead to unnecessary rendering and should be cleaned up.
There also appears to be a duplicate rendering of the main content (DetailsPanel / GraphView), which might cause unintended UI behavior.
Using console.error in componentDidCatch is fine for now, but in the future it would be better to integrate a proper logging/monitoring solution.
The fallback currently shows the raw error message — might be worth sanitizing it slightly for a better user-facing experience.
Overall
The feature is well implemented, tests are meaningful, and it clearly improves the robustness of the editor. Just a few small cleanups needed.
LGTM 👍 (with minor suggestions)
charulata871
left a comment
There was a problem hiding this comment.
Hey,
I went through the changes and overall this is a really solid addition. Introducing an ErrorBoundary for the ontology editor is a great step—it makes the app much more resilient by preventing full crashes and keeping failures contained to the editor section.
I especially liked:
The reusable design of the ErrorBoundary
The fallback UI with the “Try again” action — feels smooth and user-friendly
Good test coverage, particularly around error handling and recovery flow
- A few things to improve:
In page.tsx, there seems to be duplicate layout rendering (header, main layout, panels repeated inside the ErrorBoundary). This could lead to unnecessary rendering and should be cleaned up.
There also appears to be a duplicate rendering of the main content (DetailsPanel / GraphView), which might cause unintended UI behavior.
Using console.error in componentDidCatch is fine for now, but in the future it would be better to integrate a proper logging/monitoring solution.
The fallback currently shows the raw error message — might be worth sanitizing it slightly for a better user-facing experience.
-Overall
The feature is well implemented, tests are meaningful, and it clearly improves the robustness of the editor. Just a few small cleanups needed.
LGTM 👍 (with minor suggestions)
|
Thanks for the update! Since there’s a merge conflict in Also, the ErrorBoundary wrapper added here should be preserved, as it’s the core improvement of this PR. Once the conflict is resolved and duplicate layout/content rendering is cleaned up, this should be good to merge. Happy to re-review after the fix 👍 |
Description
Related Issue(s)
Closes #
Type of Change
Changes Made
-add reusable [ErrorBoundary] component
-add ontology-specific fallback UI with retry action
-wrap main editor page to prevent full app crashes
-add tests for fallback and recovery behavior
Screenshots/Recordings (if applicable)
Testing
-Open [details-panel.tsx]
-Add a temporary throw at the top of [DetailsPanel()]:
throw new Error('QA test error')
-Save the file and reload the page.
-Confirm the error boundary fallback appears instead of the full app crashing.
-Remove the temporary [throw new Error('QA test error')] line.
-Save again.
-Click Try again and confirm the editor recovers.
Test Plan
How to Test
2.Confirm the editor loads normally:
-header is visible
-left navigation is visible
-details/graph area renders
-stats panel renders
-easiest QA method: temporarily make a child component throw, for example in [details-panel.tsx], then reload.
-“Something went wrong”
-the error message
-a “Try again” button
Performance Impact
Performance measurements (if applicable):
Accessibility
Code Quality Checklist
anyunless justified)Documentation
Dependencies
New dependencies (if any):
Breaking Changes
Migration guide (if applicable):
Deployment Notes
Deployment instructions (if applicable):
Security Considerations
Rollback Plan
If roll back is needed, roll back to commits from branch.
Additional Context
Reviewer Checklist
Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com