Skip to content

ref(onboarding): Add useIntegrationLauncher hook for multi-provider flows#112741

Closed
jaydgoss wants to merge 1 commit intojaygoss/vdy-69-scm-more-dropdownfrom
jaygoss/vdy-69-integration-launcher-hook
Closed

ref(onboarding): Add useIntegrationLauncher hook for multi-provider flows#112741
jaydgoss wants to merge 1 commit intojaygoss/vdy-69-scm-more-dropdownfrom
jaygoss/vdy-69-integration-launcher-hook

Conversation

@jaydgoss
Copy link
Copy Markdown
Member

Summary

  • Add a useIntegrationLauncher hook that accepts the provider at call time instead of at initialization, suitable for data-driven UIs like dropdowns
  • Replace the hidden-child registration pattern in ScmProvidersDropdown (which mounted one invisible component per provider to stash callbacks in a ref map) with a single hook call
  • Export computeCenteredWindow and getApiPipelineProvider from addIntegration.tsx (no behavior change) so the new hook can reuse them

Stacks on #112730.

Refs VDY-69

PR Stack

Test plan

  • Existing addIntegration tests pass (13/13)
  • Existing scmProviderPills tests pass (4/4)
  • Verify dropdown items still trigger the OAuth install flow

…lows

Add a standalone hook that accepts the provider at call time instead
of at initialization. This replaces the hidden-child registration
pattern in ScmProvidersDropdown, which mounted one component per
provider purely to call useAddIntegration and stash callbacks in a
ref map.

The new hook owns a single message listener and popup reference,
handling both legacy popup and pipeline modal paths. Existing
useAddIntegration callers are unaffected.
@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 10, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 10, 2026
@ryan953
Copy link
Copy Markdown
Member

ryan953 commented Apr 13, 2026

oh, this looks similar in intent to #112766
we should sync up

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems like we could actually just refactor useIntegration to have this API, there's not too many call-sites I think so it wouldn't be a huge lift right?

@jaydgoss jaydgoss closed this Apr 13, 2026
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.

3 participants