Skip to content

ref(integrations): Refactor useAddIntegration to accept params at call time#113059

Merged
evanpurkhiser merged 1 commit intomasterfrom
evanpurkhiser/ref-integrations-refactor-useaddintegration-to-accept-params-at-call-time
Apr 15, 2026
Merged

ref(integrations): Refactor useAddIntegration to accept params at call time#113059
evanpurkhiser merged 1 commit intomasterfrom
evanpurkhiser/ref-integrations-refactor-useaddintegration-to-accept-params-at-call-time

Conversation

@evanpurkhiser
Copy link
Copy Markdown
Member

Move useAddIntegration from views/settings/organizationIntegrations/ to
utils/integrations/ and change the API so startFlow() accepts all params
(provider, organization, onInstall, etc.) at call time instead of at
hook init. The hook now manages its own message listener via refs, so a
single instance can launch flows for any provider without a context
provider.

This enables multi-provider UIs like dropdowns to share one hook above
the dropdown, passing the selected provider to startFlow on click.

Extract computeCenteredWindow to utils/window/ and add urlParams to
AddIntegrationParams for the installation_id case.

Refs VDY-69

@evanpurkhiser evanpurkhiser requested review from a team as code owners April 15, 2026 16:07
@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 15, 2026

@evanpurkhiser evanpurkhiser requested review from jaydgoss and removed request for a team April 15, 2026 16:07
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 15, 2026
@sentry
Copy link
Copy Markdown
Contributor

sentry bot commented Apr 15, 2026

Sentry Snapshot Testing

Name Added Removed Modified Renamed Unchanged Status
sentry-frontend
sentry-frontend
0 0 0 0 204 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

Comment thread static/app/utils/integrations/useAddIntegration.tsx
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2a89eca. Configure here.

Comment thread static/app/utils/integrations/useAddIntegration.spec.tsx Outdated
…l time

Move useAddIntegration from views/settings/organizationIntegrations/ to
utils/integrations/ and change the API so startFlow() accepts all params
(provider, organization, onInstall, etc.) at call time instead of at
hook init. The hook now manages its own message listener via refs, so a
single instance can launch flows for any provider without a context
provider.

This enables multi-provider UIs like dropdowns to share one hook above
the dropdown, passing the selected provider to startFlow on click.

Extract computeCenteredWindow to utils/window/ and add urlParams to
AddIntegrationParams for the installation_id case.

Refs VDY-69
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-integrations-refactor-useaddintegration-to-accept-params-at-call-time branch from 2a89eca to 2499e12 Compare April 15, 2026 16:28
@evanpurkhiser evanpurkhiser enabled auto-merge (squash) April 15, 2026 16:28
@evanpurkhiser evanpurkhiser merged commit 009a754 into master Apr 15, 2026
65 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-integrations-refactor-useaddintegration-to-accept-params-at-call-time branch April 15, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants