-
Notifications
You must be signed in to change notification settings - Fork 327
refactor(common): convert error-boundary to TypeScript #3964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
refactor(common): convert error-boundary to TypeScript #3964
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Devin, please only make these changes
Closing due to inactivity. |
WalkthroughA new error boundary system is introduced, including a customizable React error boundary component, a default error display UI, and a higher-order component (HOC) for easy integration. The system centralizes error catching, formatting, and reporting, and provides a single entry point for importing these utilities. Changes
Sequence Diagram(s)sequenceDiagram
participant Parent as Parent Component
participant ErrorBoundary as ErrorBoundary
participant Wrapped as Wrapped Component
participant ErrorUI as Error Component
Parent->>ErrorBoundary: Render with child (Wrapped)
ErrorBoundary->>Wrapped: Render child with onError prop
Wrapped-->>ErrorBoundary: (If error occurs) Call onError(error)
ErrorBoundary->>ErrorBoundary: handleError(error)
ErrorBoundary->>Parent: onError callback (with formatted error)
ErrorBoundary->>ErrorUI: Render error UI with error prop
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Convert error-boundary to TypeScript
This PR converts the files in
src/elements/common/error-boundary
from JavaScript with Flow to TypeScript.Changes
.js.flow
files for backward compatibilityNotes
References
Similar conversion PRs: #3725 and #3635
Link to Devin run
https://app.devin.ai/sessions/a33c1ac8720944a0a5162d8d4e8c4508
Summary by CodeRabbit