Skip to content

fix(cli): fix missing planId in non-subscription plan web fallback#15152

Merged
tonypan2 merged 2 commits intomainfrom
tonypan/fix-plan-fallback-web-ui
Feb 19, 2026
Merged

fix(cli): fix missing planId in non-subscription plan web fallback#15152
tonypan2 merged 2 commits intomainfrom
tonypan/fix-plan-fallback-web-ui

Conversation

@tonypan2
Copy link
Copy Markdown
Contributor

@tonypan2 tonypan2 commented Feb 19, 2026

Summary

  • When a user interactively selects a non-subscription billing plan in vercel integration add, the web checkout fallback was passing billingPlanId (the raw --plan flag, undefined when not passed) instead of billingPlan.id (the actually-selected plan)
  • This meant the Vercel Dashboard checkout wouldn't pre-select the plan the user just chose in the CLI

Root cause

Introduced in #14965 ("Add --plan flag to vercel integration add"). When threading billingPlanId through the non-subscription web fallback in provisionResourceViaCLI, the wrong variable was passed:

// Before (bug): passes raw --plan flag value, undefined when not provided
provisionResourceViaWebUI(..., billingPlanId);

// After (fix): passes the plan the user actually selected
provisionResourceViaWebUI(..., billingPlan.id);

Why TypeScript didn't catch it: Both billingPlanId (flags['--plan']) and billingPlan.id are string | undefined, so the type checker sees them as interchangeable.

Why the existing unit test didn't catch it: The test at add.test.ts:1399 only exercises --plan pro (explicit flag), where billingPlanId === billingPlan.id. There was no test for the interactive selection path (no --plan flag) where billingPlanId is undefined but billingPlan.id is the selected plan.

Scenario billingPlanId billingPlan.id Bug visible?
--plan pro (tested) "pro" "pro" No — same value
Interactive selection (untested) undefined "pro" YesplanId param missing from URL

Test plan

Unit tests

$ cd packages/cli && pnpm vitest run test/unit/commands/integration/add.test.ts

 ✓ test/unit/commands/integration/add.test.ts  (75 tests) 4284ms

 Test Files  1 passed (1)
      Tests  75 passed (75)

New test added: "should include planId in web UI URL for non-subscription plan selected interactively"

  • Exercises the interactive billing plan selection with acme-prepayment (no --plan flag)
  • Asserts planId=pro is present in the URL passed to open()
  • On main (without fix): fails with expected null to deeply equal 'pro' — confirms the bug
  • With fix: passes — planId=pro present in URL

Manual testing

The non-subscription billing plan → web fallback path is unit-only because no available real integration has prepayment-type plans on the test team. Verified by testing:

  • Prisma (vc integration add prisma --scope team_ZrswwWlkgu3cRre7Tk7Rr0HV): has billing plans (Free, Starter, Pro, Business) but all are subscription type → goes to CLI provisioning, never hits the web fallback
  • Upstash (vc integration add upstash/upstash-kv --scope team_ZrswwWlkgu3cRre7Tk7Rr0HV): unsupported wizard → browser fallback (different code path, no billing plan selection)
  • Neon (vc integration add neon --scope team_ZrswwWlkgu3cRre7Tk7Rr0HV): unsupported wizard → browser fallback (different code path)

Code paths covered

Path Verified by
Interactive plan selection → non-subscription → web fallback (the bug) Unit test (new)
--plan flag → non-subscription → web fallback (regression) Unit test (existing, line 1399)
Interactive plan selection → subscription → CLI provisioning Manual (prisma)
Unsupported wizard → browser fallback Manual (neon, upstash)

🤖 Generated with Claude Code

Note

Low Risk Change

Simple bug fix changing a variable reference from billingPlanId to billingPlan.id to pass the correct plan ID, with corresponding test coverage added.

  • Single-line fix: passes billingPlan.id instead of billingPlanId in web fallback
  • Adds unit test for interactive plan selection path

Risk assessment for commit ebed50f.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 19, 2026

🦋 Changeset detected

Latest commit: ebed50f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 19, 2026

📦 CLI Tarball Ready

The Vercel CLI tarball for this PR is now available!

Quick Test

You can test this PR's CLI directly by running:

npx https://vercel-hhkl2jvja.vercel.sh/tarballs/vercel.tgz --help

Use in vercel.json

To use this CLI version in your project builds, add to your vercel.json:

{
  "build": {
    "env": {
      "VERCEL_CLI_VERSION": "vercel@https://vercel-hhkl2jvja.vercel.sh/tarballs/vercel.tgz"
    }
  }
}

Python Runtime Wheel

A Python runtime wheel was also built for this PR.
To use in your Python project builds, also set this environment variable:

VERCEL_RUNTIME_PYTHON="vercel-runtime @ https://vercel-hhkl2jvja.vercel.sh/tarballs/vercel_runtime-0.5.0.dev1771537104+ebed50f-py3-none-any.whl"

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 19, 2026

🧪 Unit Test Strategy

Comparing: 09b3540ebed50f (view diff)

Strategy: Affected packages only

✅ Only testing packages that have been modified or depend on modified packages.

Affected packages - 1 (3%)
  1. vercel
Unaffected packages - 39 (98%)
  1. @vercel-internals/get-package-json
  2. @vercel/backends
  3. @vercel/build-utils
  4. @vercel/cervel
  5. @vercel/cli-auth
  6. @vercel/client
  7. @vercel/config
  8. @vercel/detect-agent
  9. @vercel/edge
  10. @vercel/elysia
  11. @vercel/error-utils
  12. @vercel/express
  13. @vercel/fastify
  14. @vercel/firewall
  15. @vercel/frameworks
  16. @vercel/fs-detectors
  17. @vercel/functions
  18. @vercel/gatsby-plugin-vercel-builder
  19. @vercel/go
  20. @vercel/h3
  21. @vercel/hono
  22. @vercel/hydrogen
  23. @vercel/koa
  24. @vercel/nestjs
  25. @vercel/next
  26. @vercel/node
  27. @vercel/oidc
  28. @vercel/oidc-aws-credentials-provider
  29. @vercel/python
  30. @vercel/python-analysis
  31. @vercel/redwood
  32. @vercel/related-projects
  33. @vercel/remix-builder
  34. @vercel/routing-utils
  35. @vercel/ruby
  36. @vercel/rust
  37. @vercel/static-build
  38. @vercel/static-config
  39. examples

Results

  • Unit tests: Only affected packages will run unit tests
  • E2E tests: Running in parallel via E2E Tests workflow
  • Type checks: Only affected packages will run type checks

This comment is automatically generated based on the affected testing strategy

When a user interactively selects a non-subscription billing plan,
the web checkout fallback was passing `billingPlanId` (the raw
--plan flag value, undefined when not passed) instead of
`billingPlan.id` (the plan the user actually selected). This meant
the web UI wouldn't pre-select the chosen plan.
@tonypan2 tonypan2 force-pushed the tonypan/fix-plan-fallback-web-ui branch from 317ce51 to c7233da Compare February 19, 2026 21:19
@tonypan2 tonypan2 changed the title fix(cli): pass selected plan ID to web fallback in integration add fix(cli): fix missing planId in non-subscription plan web fallback Feb 19, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tonypan2 tonypan2 marked this pull request as ready for review February 19, 2026 21:39
@tonypan2 tonypan2 requested review from a team as code owners February 19, 2026 21:39
@tonypan2 tonypan2 merged commit 9c24710 into main Feb 19, 2026
180 checks passed
@tonypan2 tonypan2 deleted the tonypan/fix-plan-fallback-web-ui branch February 19, 2026 22:12
tknickman pushed a commit that referenced this pull request Feb 19, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@50.22.0

### Minor Changes

- feat(cli): add `vercel integration guide` command
([#15108](#15108))

Adds a new `vercel integration guide` subcommand that displays getting
started guides,
code snippets, and resource links for marketplace integrations directly
in the terminal.

Supports single-product and multi-product integrations with interactive
product and
framework selection. Includes `--framework` flag for non-interactive
framework
selection (useful for CI/agents). Output is raw markdown written to
stdout for easy
    piping to files or other tools.

### Patch Changes

- fix(cli): fix missing planId in non-subscription plan web fallback
([#15152](#15152))

-   [services]([#15093](#15093))
- consolidate `workspace` and `entrypoint` from `experimentalServices`
`vercel.json` schema
- make `framework` config in service optional -- infer framework from
service workspace when not explicitly provided

- Updated dependencies
\[[`09b3540742ac86b768de9775929fef1ef36db412`](09b3540),
[`fc56fb91b4dafabe0f68f86efeabbaf98b2642bc`](fc56fb9)]:
    -   @vercel/build-utils@13.4.3
    -   @vercel/python@6.15.0
    -   @vercel/backends@0.0.36
    -   @vercel/elysia@0.1.39
    -   @vercel/express@0.1.48
    -   @vercel/fastify@0.1.42
    -   @vercel/go@3.4.1
    -   @vercel/h3@0.1.48
    -   @vercel/hono@0.2.42
    -   @vercel/hydrogen@1.3.5
    -   @vercel/koa@0.1.22
    -   @vercel/nestjs@0.2.43
    -   @vercel/next@4.15.31
    -   @vercel/node@5.6.6
    -   @vercel/redwood@2.4.9
    -   @vercel/remix-builder@5.5.10
    -   @vercel/ruby@2.3.1
    -   @vercel/rust@1.0.5
    -   @vercel/static-build@2.8.40

## @vercel/python@6.15.0

### Minor Changes

- Optimize cold starts for lambdas >250MB
([#15080](#15080))

1. Remove `uv pip install` and replace it with `uv sync --inexact
--frozen`
2. Pack the lambda zip with dependencies up to 245MB then only install
the remaining ones at runtime

### Patch Changes

- Updated dependencies
\[[`fc56fb91b4dafabe0f68f86efeabbaf98b2642bc`](fc56fb9)]:
    -   @vercel/python-analysis@0.6.0

## @vercel/python-analysis@0.6.0

### Minor Changes

- Optimize cold starts for lambdas >250MB
([#15080](#15080))

1. Remove `uv pip install` and replace it with `uv sync --inexact
--frozen`
2. Pack the lambda zip with dependencies up to 245MB then only install
the remaining ones at runtime

## @vercel/backends@0.0.36

### Patch Changes

- Updated dependencies
\[[`09b3540742ac86b768de9775929fef1ef36db412`](09b3540)]:
    -   @vercel/build-utils@13.4.3

## @vercel/build-utils@13.4.3

### Patch Changes

-   [services]([#15093](#15093))
- consolidate `workspace` and `entrypoint` from `experimentalServices`
`vercel.json` schema
- make `framework` config in service optional -- infer framework from
service workspace when not explicitly provided
- Updated dependencies
\[[`fc56fb91b4dafabe0f68f86efeabbaf98b2642bc`](fc56fb9)]:
    -   @vercel/python-analysis@0.6.0

## @vercel/cervel@0.0.23

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/backends@0.0.36

## @vercel/client@17.2.45

### Patch Changes

- Updated dependencies
\[[`09b3540742ac86b768de9775929fef1ef36db412`](09b3540)]:
    -   @vercel/build-utils@13.4.3

## @vercel/elysia@0.1.39

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/node@5.6.6

## @vercel/express@0.1.48

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/node@5.6.6
    -   @vercel/cervel@0.0.23

## @vercel/fastify@0.1.42

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/node@5.6.6

## @vercel/fs-detectors@5.8.9

### Patch Changes

-   [services]([#15093](#15093))
- consolidate `workspace` and `entrypoint` from `experimentalServices`
`vercel.json` schema
- make `framework` config in service optional -- infer framework from
service workspace when not explicitly provided

## @vercel/gatsby-plugin-vercel-builder@2.0.138

### Patch Changes

- Updated dependencies
\[[`09b3540742ac86b768de9775929fef1ef36db412`](09b3540)]:
    -   @vercel/build-utils@13.4.3

## @vercel/h3@0.1.48

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/node@5.6.6

## @vercel/hono@0.2.42

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/node@5.6.6

## @vercel/koa@0.1.22

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/node@5.6.6

## @vercel/nestjs@0.2.43

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/node@5.6.6

## @vercel/node@5.6.6

### Patch Changes

- Updated dependencies
\[[`09b3540742ac86b768de9775929fef1ef36db412`](09b3540)]:
    -   @vercel/build-utils@13.4.3

## @vercel/static-build@2.8.40

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/gatsby-plugin-vercel-builder@2.0.138

## @vercel/python-runtime@0.5.0

### Minor Changes

- Optimize cold starts for lambdas >250MB
([#15080](#15080))

1. Remove `uv pip install` and replace it with `uv sync --inexact
--frozen`
2. Pack the lambda zip with dependencies up to 245MB then only install
the remaining ones at runtime


<!-- VADE_RISK_START -->
> [!NOTE]
> Low Risk Change
>
> This PR is an automated Changesets release that only updates version
numbers in package.json files and CHANGELOG.md files across multiple
packages, with no logic changes.
> 
> - Version bumps across ~25 packages (patch and minor versions)
> - CHANGELOG.md updates documenting previous changes
> - Deleted changeset markdown files consumed by release process
>
> <sup>Risk assessment for [commit
f054c83](https://github.com/vercel/vercel/commit/f054c83041bfd8d833afeb59bac76918875f980e).</sup>
<!-- VADE_RISK_END -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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