Skip to content

fix(webapp): integrations page follow-ups — build settings visibility, onboarding spinner, dead code - #4786

Closed
0ski wants to merge 4 commits into
oskar/fix-vercel-integrations-pagefrom
oskar/chore-integrations-page-followups
Closed

fix(webapp): integrations page follow-ups — build settings visibility, onboarding spinner, dead code#4786
0ski wants to merge 4 commits into
oskar/fix-vercel-integrations-pagefrom
oskar/chore-integrations-page-followups

Conversation

@0ski

@0ski 0ski commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #4784. Clears TRI-13488, the follow-ups found while fixing James's two tickets.

fix: show build settings when the GitHub app is disabled

The page wrapped Git settings, the Vercel section and build settings in one githubAppEnabled guard, so with the GitHub app off it rendered an empty container.

Item 3 turned out narrower than the ticket described. The Vercel section genuinely depends on GitHub — it can't sync environment variables or link deployments without a connected repo, which is what VercelGitHubWarning says — so it stays gated. Build settings don't: they also apply to CLI deploys run with --native-build-server, exactly as the section's own description states. They now render regardless.

fix: stop the Vercel onboarding modal spinning forever

computeInitialState starts in loading-projects whenever the org has a Vercel integration but no onboarding data yet, and the effect that escapes it waits for availableProjects !== undefined. When getOnboardingData returns null — it does that on any thrown error, and when the org integration row is missing — nothing ever arrives.

The empty-array case self-resolves ([] !== undefined), so this is specifically the null case. The route can tell "still loading" from "loaded nothing" because its fetcher always requests ?vercelOnboarding=true; it now passes that down and the modal explains the failure with a retry and a link to check the integration's access on Vercel.

fix: match preview environment on slug, not type

VercelSettingsPresenter asked for a PREVIEW-typed environment with no parent filter, so any preview branch row satisfied it — branches are PREVIEW rows too. GitHubSettingsPresenter and ProjectSettingsService ask via the "preview" slug, which only the branchable parent carries, so two presenters feeding the same page could disagree. All four checks now match on slug.

chore: remove the remaining dead code

Continues the sweep from the parent branch:

  • The "installing" OnboardingState is unproducible — no setState call yields it — so its redirect effect, switch arm, isLoadingState conjunct and the vercelAppInstallPath import it was the only user of are all dead.
  • (state as string) !== "completed" sits in a branch where TypeScript has already narrowed "completed" out; the cast is what let it compile.
  • hideSectionToggles was only ever passed alongside layout="settings" but only read inside layout="card" blocks, so it could never take effect. Removed the prop entirely.
  • Unused bindings and the helpers only they referenced: envSlugLabel, _formatSelectedEnvs, _CompleteOnboardingForm, _handleFinishOnboarding, and the rest.

No behaviour change in that commit.

Not included

Per Oskar, the three overlapping modal-open effects in settings.integrations/route.tsx are left alone — they're defensive against a close-then-reopen race, and untangling them is a behavioural risk with no user-visible payoff.

Verification

pnpm run typecheck --filter webapp, pnpm run lint and pnpm run knip are clean, and the four Vercel/project-settings test files pass (39 tests). The one vite.config.ts duplicate-allowedHosts error in my local output is pre-existing and comes from an unrelated branch in my workspace, not this diff.

No changeset or .server-changes/ note: the build-settings visibility fix and the spinner fix only bite when the GitHub app is disabled or the Vercel integration has broken, and the rest is internal.

refs TRI-13488

0ski added 4 commits August 26, 2026 14:04
The integrations page wrapped the Git section, the Vercel section and the build
settings in a single `githubAppEnabled` guard, so with the GitHub app off the
page rendered an empty container.

The Vercel section genuinely depends on GitHub - it cannot sync environment
variables or link deployments without a connected repo - so it stays inside the
guard. Build settings do not: they also apply to CLI deploys run with
--native-build-server, exactly as the section describes. They now render
regardless.

TRI-13488
`computeInitialState` starts in "loading-projects" whenever the org has a Vercel
integration but no onboarding data yet. The effect that escapes that state waits
for `availableProjects !== undefined`, so when `getOnboardingData` returns null -
it does that on any thrown error, and when the org integration row is missing -
nothing ever arrives and the modal spins indefinitely with no explanation.

The route knows the difference between "still loading" and "loaded nothing",
since its fetcher always requests the onboarding data. It now passes that down,
and the modal shows what went wrong plus a way to retry or check the
integration's access on Vercel.

TRI-13488
VercelSettingsPresenter asked for a PREVIEW-typed environment with no filter on
the parent, so any preview *branch* row satisfied it - branches are PREVIEW rows
too. GitHubSettingsPresenter and ProjectSettingsService ask the same question via
the "preview" slug, which only the branchable parent carries, so the two
presenters feeding the same page could disagree.

All four checks now match on slug.

TRI-13488
…on UI

Follows the two unreachable panels removed in the parent branch. None of this is
reachable either:

- The `"installing"` OnboardingState is unproducible - no setState call ever
  yields it - so its redirect effect, switch arm, isLoadingState conjunct and the
  vercelAppInstallPath import it was the only user of are all dead.
- `(state as string) !== "completed"` is inside a branch where TypeScript has
  already narrowed "completed" out; the cast is what let it compile.
- `hideSectionToggles` was only ever passed alongside layout="settings" but only
  read inside layout="card" blocks, so it could never take effect.
- A handful of unused bindings and the helpers only they referenced:
  envSlugLabel, _formatSelectedEnvs, _CompleteOnboardingForm,
  _handleFinishOnboarding and friends.

No behaviour change.

TRI-13488
@changeset-bot

changeset-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 172de23

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 262bd4d3-2fa7-4882-8a70-8673173fdd16

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@0ski 0ski changed the title Stacked on #4784. Clears TRI-13488, the follow-ups found while fixing James's two tickets. fix(webapp): integrations page follow-ups — build settings visibility, onboarding spinner, dead code Aug 26, 2026
@0ski

0ski commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator Author

Folded into #4784 — these four commits now live on that branch, so everything ships as a single PR.

@0ski 0ski closed this Aug 26, 2026
@0ski
0ski deleted the oskar/chore-integrations-page-followups branch August 26, 2026 12:24
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.

1 participant