Skip to content

refactor(data-warehouse): render Linear inbox setup via DynamicSourceSetup#3398

Merged
Gilbert09 merged 1 commit into
mainfrom
tom/inbox-linear-dynamic-setup
Jul 13, 2026
Merged

refactor(data-warehouse): render Linear inbox setup via DynamicSourceSetup#3398
Gilbert09 merged 1 commit into
mainfrom
tom/inbox-linear-dynamic-setup

Conversation

@Gilbert09

Copy link
Copy Markdown
Member

Problem

The Linear inbox source-setup form was a ~130-line bespoke component (LinearSetup) duplicating connect-and-poll logic that the generic DynamicSourceSetup (added in #3306) could own. Linear's warehouse config is a single oauth field, so it can render from the wizard endpoint like the credential sources already do.

Changes

  • Extend DynamicSourceSetup to handle oauth config 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).
  • Route the linear case through DynamicSourceSetup and delete LinearSetup.

Linear's config is exactly one oauth field (kind=linearlinear_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 repository field, 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).
  • Biome lint/format clean.
  • Not verified in the running app (no CDP session available): the live Linear OAuth connect + source creation. The connect/poll logic and the create payload are a faithful port of the previous LinearSetup.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

…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.
@trunk-io

trunk-io Bot commented Jul 13, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

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

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 815ef54.

@Gilbert09 Gilbert09 requested a review from a team July 13, 2026 15:22
@Gilbert09 Gilbert09 merged commit 2677036 into main Jul 13, 2026
23 checks passed
@Gilbert09 Gilbert09 deleted the tom/inbox-linear-dynamic-setup branch July 13, 2026 16:03
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.

2 participants