Skip to content

fix(Vercel): Initial deployment fix#3263

Open
0ski wants to merge 1 commit intomainfrom
oskar/fix-vercel-initial-deployment
Open

fix(Vercel): Initial deployment fix#3263
0ski wants to merge 1 commit intomainfrom
oskar/fix-vercel-initial-deployment

Conversation

@0ski
Copy link
Collaborator

@0ski 0ski commented Mar 24, 2026

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Mar 24, 2026

⚠️ No Changeset found

Latest commit: 56f1ca5

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
Copy link
Contributor

coderabbitai bot commented Mar 24, 2026

Walkthrough

This PR introduces tracking of the onboarding origin (marketplace vs. dashboard) across the Vercel integration flow. The onboardingOrigin field is added to the Vercel project integration schema, extracted during onboarding completion, and stored with the integration data. The initial deployment trigger logic is refactored to query this stored origin value instead of inspecting the redirect URL directly. Additionally, the login page conditionally renders the Email login button based on whether the user is coming from a Vercel marketplace context, and the onboarding modal's control flow is adjusted to handle cases where onboarding is complete but GitHub isn't connected.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is entirely missing. The repository requires a description following the template with checklist, testing details, changelog, and optional screenshots. Add a complete pull request description following the template, including the issue number, checklist confirmation, testing steps, and a changelog entry describing the changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(Vercel): Initial deployment fix' is directly related to the changeset, which fixes initial deployment triggering logic in Vercel integration by tracking onboarding origin.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch oskar/fix-vercel-initial-deployment

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 and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

@0ski 0ski marked this pull request as ready for review March 25, 2026 20:40
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

View 4 additional findings in Devin Review.

Open in Devin Review

Comment on lines +1167 to 1170
) : !fromMarketplaceContext ? (
<Button
variant="tertiary/medium"
onClick={() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 Marketplace users with GitHub connected but missing nextUrl have no button to proceed, creating a stuck state

In the github-connection step's FormButtons, the confirmButton ternary evaluates to undefined when fromMarketplaceContext is true and isGitHubConnectedForOnboarding is true but nextUrl is falsy. The first branch requires all three (isGitHubConnectedForOnboarding && fromMarketplaceContext && nextUrl), the second branch requires !fromMarketplaceContext, and the fallback is undefined. No cancelButton is provided either. Since the outer dialog prevents closing for marketplace users (VercelOnboardingModal.tsx:698: if (!open && !fromMarketplaceContext)), and the auto-redirect effect at VercelOnboardingModal.tsx:297-312 also requires nextUrl, the user is permanently stuck with no way to proceed or dismiss the modal.

The old code always had a "Skip for now" fallback that called setState("completed"), allowing the completion effect to close the modal gracefully. The nextUrl can be missing if Vercel doesn't provide a next parameter or if it fails sanitizeVercelNextUrl at vercel.callback.ts:49.

(Refers to lines 1167-1178)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines 1164 to 1170
>
Complete
</Button>
) : (
<Button
variant="tertiary/medium"
onClick={() => {
trackOnboarding("vercel onboarding github skipped");
setState("completed");
if (fromMarketplaceContext && nextUrl) {
const validUrl = safeRedirectUrl(nextUrl);
if (validUrl) {
window.location.href = validUrl;
}
}
}}
>
Skip for now
</Button>
)
}
cancelButton={
isGitHubConnectedForOnboarding && fromMarketplaceContext && nextUrl ? (
) : !fromMarketplaceContext ? (
<Button
variant="tertiary/medium"
onClick={() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

🚩 Marketplace users without GitHub connected now have no skip/back option — intentional but removes escape hatch

The old code provided a "Skip for now" confirmButton for ALL users on the github-connection step (marketplace or not) when the first condition wasn't met. The new code at lines 1167-1177 restricts the skip button to !fromMarketplaceContext only. For marketplace users who haven't connected GitHub, there are no buttons but they CAN still interact with the "Install GitHub app" or "Connect GitHub repo" UI elements. The dialog also prevents closing for marketplace users. This appears to be an intentional design decision to force GitHub connection in marketplace flows, but it removes the previous escape hatch. If a user can't install the GitHub app (e.g., lacks org permissions), they'd need to use browser navigation to escape.

(Refers to lines 1151-1178)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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