ref(integrations): Convert AddIntegration to useAddIntegration hook#112278
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c0667fb. Configure here.
| window.removeEventListener('message', handleMessage); | ||
| dialogRef.current?.close(); | ||
| }; | ||
| }, [provider.key, provider.name, organization]); |
There was a problem hiding this comment.
Effect cleanup closes popup dialog on organization reference change
Medium Severity
The useEffect dependency array includes organization (an object), so any reference change triggers cleanup which calls dialogRef.current?.close() — closing the popup mid-installation. The original class component only closed the dialog on unmount. The onInstall and analyticsParams values were correctly stored in refs to avoid this, but organization was not given the same treatment despite only being used in an analytics call inside handleMessage.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c0667fb. Configure here.
c0667fb to
509bf57
Compare
509bf57 to
2549863
Compare
…seAddIntegration hook Replace the class-based AddIntegration render prop component with a useAddIntegration hook. This modernizes the integration setup flow to use hooks and prepares for the API-driven pipeline modal by adding feature-flag-gated support for opening a React pipeline modal instead of the legacy Django popup window. - Convert AddIntegration class component to useAddIntegration hook - Refactor AddIntegrationButton to use the hook directly - Add API pipeline feature flag support for github and gitlab providers - Rewrite tests to use renderHookWithProviders with comprehensive coverage for both legacy and API pipeline flows
2549863 to
5474548
Compare
…112278) Replace the class-based AddIntegration render prop component with a useAddIntegration hook. This modernizes the integration setup flow to use hooks and prepares for the API-driven pipeline modal by adding feature-flag-gated support for opening a React pipeline modal instead of the legacy Django popup window. - Convert AddIntegration class component to useAddIntegration hook - Refactor AddIntegrationButton to use the hook directly - Add API pipeline feature flag support for github and gitlab providers - Rewrite tests to use renderHookWithProviders with comprehensive coverage for both legacy and API pipeline flows --------- Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>


Replace the class-based AddIntegration render prop component with a
useAddIntegration hook. This modernizes the integration setup flow to
use hooks and prepares for the API-driven pipeline modal by adding
feature-flag-gated support for opening a React pipeline modal instead
of the legacy Django popup window.
coverage for both legacy and API pipeline flows