Skip to content

Conversation

@dionlow
Copy link
Contributor

@dionlow dionlow commented Oct 21, 2025

Summary

  • Add React Error Boundary to wrap InstallIntegration component
  • Provides graceful fallback UI with error message

How Error Boundary Works

<InstallIntegrationErrorBoundary
  onError={(error, errorInfo) => {
    // Optional: log to error tracking service
    console.error("Error caught:", error);
  }}
  fallback={<CustomErrorUI />} // Optional custom fallback
>
  <YourComponent />
</InstallIntegrationErrorBoundary>

Screenshot

Screenshot 2025-10-23 at 1 40 48 PM

Copilot AI review requested due to automatic review settings October 21, 2025 21:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an error boundary wrapper to the InstallIntegration component to prevent React errors from crashing the parent application. The implementation provides graceful error handling with a fallback UI and optional error callbacks.

Key Changes:

  • Created InstallIntegrationErrorBoundary class component with error catching capabilities
  • Wrapped the InstallIntegration component tree with the new error boundary
  • Exported the error boundary for standalone use in other parts of the application

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/components/Configure/ErrorBoundary.tsx New error boundary component implementation with fallback UI and error logging
src/components/Configure/InstallIntegration.tsx Wrapped component tree with error boundary to catch rendering and lifecycle errors
src/components/Configure/index.ts Exported error boundary for external use

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dionlow dionlow force-pushed the feat/error-boundary-install-integration branch from e1b2ba5 to cba45c8 Compare October 23, 2025 19:22
Add a proper React Error Boundary component to wrap InstallIntegration, preventing rendering errors or hook errors from crashing the parent application.

Changes:
- Created InstallIntegrationErrorBoundary class component that catches JavaScript errors
- Wrapped InstallIntegration component with error boundary
- Error boundary displays ComponentContainerError on failure
- Exported InstallIntegrationErrorBoundary for optional standalone use
- Added optional onError callback prop for custom error handling

Benefits:
- Prevents InstallIntegration errors from crashing parent app
- Provides graceful fallback UI when errors occur
- Logs errors to console for debugging
- Works as final safety net alongside the error callback improvements from previous PRs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

lint: fix lint errors

feat: add error boundary to install integration / polish
@dionlow dionlow force-pushed the feat/error-boundary-install-integration branch from f0437ec to d25cf09 Compare October 23, 2025 20:44
@dionlow dionlow changed the title feat: add React Error Boundary to InstallIntegration component feat: add React ErrorBoundary to InstallIntegration component Oct 23, 2025
@dionlow dionlow requested review from a team and RajatPawar and removed request for a team October 23, 2025 20:46
Copy link
Contributor

@RajatPawar RajatPawar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be good to add a couple of test cases for this

@dionlow dionlow merged commit e9bd420 into main Oct 23, 2025
3 checks passed
@dionlow dionlow deleted the feat/error-boundary-install-integration branch October 23, 2025 22:23
@dionlow dionlow changed the title feat: add React ErrorBoundary to InstallIntegration component [ENG-2836] feat: add React ErrorBoundary to InstallIntegration component Nov 11, 2025
@linear
Copy link

linear bot commented Nov 11, 2025

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.

3 participants