Skip to content

Link eligible orgs to Executor v2's import from the sidebar - #2266

Merged
RhysSullivan merged 2 commits into
mainfrom
v1-sidebar-v2-import
Oct 12, 2026
Merged

RhysSullivan merged 2 commits into
mainfrom
v1-sidebar-v2-import

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a "Move to Executor v2" link to the cloud dashboard sidebar. It opens v2's workspace import (/v1-import on v2's app host) in a new tab.

Only users v2 would let import the selected org see it, using v2's rules:

  • the user's email is verified (WorkOS),
  • the org has exactly one active member, and it is that user (WorkOS memberships, read live as v2 does, not from the mirror),
  • the org is not on a paid plan: no Autumn subscription to a plan outside free / free-pay-as-you-go that has not expired.

Billing is read without creating anything: AutumnService.findCustomer calls Autumn's read-only POST /v1/customers.get (autumn-js 1.2.8 has no SDK method for it) with the existing secret, server URL and the SDK's API version, and decodes the answer with a schema. A 404 customer_not_found means no customer, which is free. Any other failure hides the link.

Everyone else sees nothing, and so does anyone whose check fails. GET /api/auth/v2-import returns { url }, which is null unless the user is eligible. The dashboard fetches it once per load and caches it for 5 minutes. Reads stop at the first refusal.

v2's origin is not a new setting. It comes from the existing V2_SIGN_UP_URL var (its origin, which the edge already treats as v2's app host) and is validated by parseV2Edge. Where the v2 settings are absent, there is no link.

Tests are in the PR stacked on top.

Verification

  • Against the Autumn sandbox, customers.get for an unknown id answers 404 customer_not_found and creates nothing; a known customer returns subscriptions[].plan_id / status
  • bun run format:check, bun run lint, cloud and react typecheck, cloud bun run test (847 passed)
  • e2e cloud/v2-import-link.test.ts (4 passed): free sole member sees the link, a missing Autumn customer counts as free, both members of a shared org do not, a paid sole member does not

Sidebar with Move to Executor v2 link

Sidebar without the link for a shared org

@RhysSullivan
RhysSullivan added this pull request to stack #2268 October 11, 2026 21:55
@RhysSullivan RhysSullivan changed the title v1 sidebar v2 import Link eligible orgs to Executor v2's import from the sidebar Oct 11, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 5c8d467 Oct 11 2026, 10:57 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 5c8d467 Commit Preview URL

Branch Preview URL
Oct 11 2026, 10:55 PM

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@pkg-pr-new

pkg-pr-new Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@2266

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@2266

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@2266

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@2266

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@2266

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@2266

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@2266

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@2266

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@2266

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@2266

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@2266

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@2266

executor

npm i https://pkg.pr.new/executor@2266

commit: 5c8d467

@RhysSullivan
RhysSullivan marked this pull request as ready for review October 12, 2026 02:40
@RhysSullivan
RhysSullivan merged commit 90e415c into main Oct 12, 2026
42 of 44 checks passed
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