refactor(data-warehouse): render Linear inbox setup via DynamicSourceSetup#3398
Merged
Conversation
…Setup Extend DynamicSourceSetup to handle `oauth` config fields (connect + poll for the resulting integration, writing its id into the form), and route the Linear source-setup case through it instead of the bespoke LinearSetup. Linear's config is a single oauth field (kind=linear -> linear_integration_id), so the rendered form, connect flow, and create payload are unchanged; the only difference is a Cancel button, consistent with the other sources. Removes the ~130-line LinearSetup component.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
sortafreel
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Linear inbox source-setup form was a ~130-line bespoke component (
LinearSetup) duplicating connect-and-poll logic that the genericDynamicSourceSetup(added in #3306) could own. Linear's warehouse config is a singleoauthfield, so it can render from thewizardendpoint like the credential sources already do.Changes
DynamicSourceSetupto handleoauthconfig fields: a connect button launches the provider's OAuth flow, polls for the resulting integration, and writes its id into the form value (generalising the old Linear-specific poll).linearcase throughDynamicSourceSetupand deleteLinearSetup.Linear's config is exactly one oauth field (
kind=linear→linear_integration_id), so the connect flow, button microcopy, and create payload ({ linear_integration_id, schemas }) are unchanged. The only visible difference is a Cancel button, consistent with the other sources.GitHub is intentionally not included. Its config exposes an auth-method select (OAuth/PAT) and a
repositoryfield, but the current Code UI deliberately omits the auth-method/PAT UI and uses a bespoke searchable repo picker that isn't config-driven anywhere (PostHog's own web wizard special-cases it too). Rendering GitHub purely from config would change its UI and add no real simplification, so it stays bespoke.How did you test this?
pnpm --filter @posthog/ui typecheck— clean for the changed files (remaining errors are pre-existing stale cross-package dists).LinearSetup.Automatic notifications