Skip to content

fix(webapp): onboard new cloud orgs via plan selection; allow Free plan without GitHub verification#4109

Merged
matt-aitken merged 2 commits into
mainfrom
fix/free-plan-onboarding
Jul 2, 2026
Merged

fix(webapp): onboard new cloud orgs via plan selection; allow Free plan without GitHub verification#4109
matt-aitken merged 2 commits into
mainfrom
fix/free-plan-onboarding

Conversation

@matt-aitken

Copy link
Copy Markdown
Member

What & why

Two related fixes to how new cloud organizations get onboarded onto the Free plan.

1. Route new cloud orgs through plan selection

New cloud organizations were created already activated, so they skipped the plan-selection step and went straight to creating projects — which meant their plan and usage limits were never set up. They're now created deactivated and routed through plan selection, which activates them once a plan is chosen. Self-hosted installs have no plan-selection step, so they're activated immediately on creation and are unaffected.

The Organization.v3Enabled field is renamed to isActivated to better describe what it now gates. It's mapped to the existing v3Enabled column, so there's no data migration — only a schema/code rename.

2. Allow selecting the Free plan without GitHub verification

Choosing the Free plan no longer requires connecting and verifying a GitHub account. The plan is applied immediately when selected. This removes:

  • the "Connect to GitHub" dialog and the GitHub-verified badge from the plan picker
  • the account-rejected state
  • the now-unreachable GitHub-connect return routes

Notes

  • These changes pair with the corresponding change in the billing service that applies the Free plan directly; they should be released together.

Testing

Verified locally end to end: a new cloud org is routed to plan selection, the Free plan applies in one click with no GitHub step, the org is activated, its usage allowance is provisioned, and it lands on the new-project page.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3cfc891

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 Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 72c25ef1-8c8e-4143-b5a6-f6f913ae9e84

📥 Commits

Reviewing files that changed from the base of the PR and between 090c64a and 3cfc891.

📒 Files selected for processing (6)
  • .server-changes/fix-managed-cloud-org-activation.md
  • apps/webapp/app/routes/_app.orgs.$organizationId.subscription.v3.free_connect_failed/route.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationId.subscription.v3.free_connect_success/route.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationSlug_.select-plan/route.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx
  • apps/webapp/app/services/platform.v3.server.ts
💤 Files with no reviewable changes (3)
  • apps/webapp/app/routes/app.orgs.$organizationSlug.select-plan/route.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationId.subscription.v3.free_connect_failed/route.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationId.subscription.v3.free_connect_success/route.tsx
✅ Files skipped from review due to trivial changes (1)
  • .server-changes/fix-managed-cloud-org-activation.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/webapp/app/services/platform.v3.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout. (24)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (12, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (11, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (9, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (5, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (8, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (6, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (2, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (10, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (7, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (1, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (4, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 10)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (3, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 10)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
⚠️ CI failures not shown inline (4)

GitHub Actions: 🔎 REVIEW.md Drift Audit / audit: fix(webapp): onboard new cloud orgs via plan selection; allow Free plan without GitHub verification

Conclusion: failure

View job details

##[group]Run anthropics/claude-code-action@428971d2ecd6e3a7cb0ee0da2a3a8b33fdb3678d
 with:
   anthropic_***REDACTED***
   use_sticky_comment: true
   allowed_bots: devin-ai-integration[bot]
   claude_args: --max-turns 30
--allowedTools "Read,Glob,Grep,Bash(git diff:*)"
   prompt: You are auditing this PR for drift against `.claude/REVIEW.md`.
## Context
`.claude/REVIEW.md` is the repo's source of truth for what AI / agent code reviewers should treat as critical findings (rolling-deploy safety, hot-table indexes, recovery-path queries, testcontainers usage, Lua versioning, etc.). It is consumed by review agents to calibrate severity. If REVIEW.md goes stale, every future agent review degrades.
## Strategy — read this first
You have a hard turn budget. Spend it on signal, not coverage. The audit is allowed to miss things; it is NOT allowed to time out.
1. Read `.claude/REVIEW.md` once, in full.
2. Run `git diff origin/main...HEAD --name-only` to get the list of changed files. Do NOT read the diff content yet.
3. Scan the file-list for relevance to REVIEW.md scope. Relevance signals: changes to Prisma schema, Redis / queue / Lua code, hot tables, recovery / restart loops, new packages, deletions of paths REVIEW.md cites. Skim everything else.
4. Open at most **5 files** total — only the ones most likely to surface a real signal. If nothing in the file-list looks relevant to any REVIEW.md rule, do NOT read any files; go straight to the verdict.
5. Form a verdict and stop. Do not exhaust the turn budget exploring.
Large PRs (>50 files changed) are a strong signal to be MORE selective, not more thorough. Pick 3-5 files at most.
## What to look for
- **Stale references** — does any REVIEW.md rule cite a file, directory, function, table, Prisma model, or package name that has been removed or renamed in this PR (or is already gone from `main`)?
- **Contradictions** — does code in this PR clearly violate a current REVIEW.md rule? (Don't re-review the PR. Only flag if REVIE...

GitHub Actions: 🔎 REVIEW.md Drift Audit / 0_audit.txt: fix(webapp): onboard new cloud orgs via plan selection; allow Free plan without GitHub verification

Conclusion: failure

View job details

egacy-run-engine.fix2
  * [new tag]             build-legacy-run-engine.fix3 -> build-legacy-run-engine.fix3
  * [new tag]             build-manual-checkpoints.rc1 -> build-manual-checkpoints.rc1
  * [new tag]             build-metadata-upgrade-logging.rc1 -> build-metadata-upgrade-logging.rc1
  * [new tag]             build-metadata-upgrade-logging.rc2 -> build-metadata-upgrade-logging.rc2
  * [new tag]             build-metadata-upgrade-logging.rc3 -> build-metadata-upgrade-logging.rc3
  * [new tag]             build-new-build-system.rc.1 -> build-new-build-system.rc.1
  * [new tag]             build-otel-upgrade-rc.0     -> build-otel-upgrade-rc.0
  * [new tag]             build-otel-upgrade-rc.1     -> build-otel-upgrade-rc.1
  * [new tag]             build-pre-pull-deployments-rc.1 -> build-pre-pull-deployments-rc.1
  * [new tag]             build-prod-rescue-rc.1      -> build-prod-rescue-rc.1
  * [new tag]             build-rate-limiter-fix-rc.1 -> build-rate-limiter-fix-rc.1
  * [new tag]             build-re2.rc0               -> build-re2.rc0
  * [new tag]             build-realtime-v2-stream-fix -> build-realtime-v2-stream-fix
  * [new tag]             build-realtime-v2-stream-fix-2 -> build-realtime-v2-stream-fix-2
  * [new tag]             build-realtime-v2-stream-fix-3 -> build-realtime-v2-stream-fix-3
  * [new tag]             build-realtime-v2-stream-fix-4 -> build-realtime-v2-stream-fix-4
  * [new tag]             build-realtime-v2-stream-fix-5 -> build-realtime-v2-stream-fix-5
  * [new tag]             build-realtimestreams-dedupe -> build-realtimestreams-dedupe
  * [new tag]             build-registry-maintenance-rc.1 -> build-registry-maintenance-rc.1
  * [new tag]             build-registry-maintenance-rc.2 -> build-registry-maintenance-rc.2
  * [new tag]             build-remote-ecr-rc.0       -> build-remote-ecr-rc.0
  * [new tag]             build-reschedule-hotfix.rc1 -> build-reschedule-hotfix.rc1
  * [new tag]             build-resume-f...

GitHub Actions: 📝 CLAUDE.md Audit / 0_audit.txt: fix(webapp): onboard new cloud orgs via plan selection; allow Free plan without GitHub verification

Conclusion: failure

View job details

a.46 -> `@trigger.dev/yalt`@3.0.0-beta.46
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.47 -> `@trigger.dev/yalt`@3.0.0-beta.47
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.48 -> `@trigger.dev/yalt`@3.0.0-beta.48
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.49 -> `@trigger.dev/yalt`@3.0.0-beta.49
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.5 -> `@trigger.dev/yalt`@3.0.0-beta.5
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.50 -> `@trigger.dev/yalt`@3.0.0-beta.50
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.51 -> `@trigger.dev/yalt`@3.0.0-beta.51
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.52 -> `@trigger.dev/yalt`@3.0.0-beta.52
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.53 -> `@trigger.dev/yalt`@3.0.0-beta.53
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.55 -> `@trigger.dev/yalt`@3.0.0-beta.55
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.6 -> `@trigger.dev/yalt`@3.0.0-beta.6
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.7 -> `@trigger.dev/yalt`@3.0.0-beta.7
  * [new tag]             build-alert-hotfix.rc1      -> build-alert-hotfix.rc1
  * [new tag]             build-alert-hotfix.rc2      -> build-alert-hotfix.rc2
  * [new tag]             build-arm-builds-rc.1       -> build-arm-builds-rc.1
  * [new tag]             build-arm-builds-rc.2       -> build-arm-builds-rc.2
  * [new tag]             build-arm-builds-rc.3       -> build-arm-builds-rc.3
  * [new tag]             build-batchid-carryover-rc.0 -> build-batchid-carryover-rc.0
  * [new tag]             build-batching-rc.1         -> build-batching-rc.1
  * [new tag]             build-batching-rc.2         -> build-batching-rc.2
  * [new tag]             build-billing-0.0.1         -> build-billing-0.0.1
  * [new tag]             build-billing-0.0.2         -> build-billing-0.0.2
  * [new tag]             build-billing-0.0.3         -> build-billing-0.0.3
  * [new tag]             build-buildinfo-rc.0        -> build-buildinf...

GitHub Actions: 📝 CLAUDE.md Audit / audit: fix(webapp): onboard new cloud orgs via plan selection; allow Free plan without GitHub verification

Conclusion: failure

View job details

##[group]Run anthropics/claude-code-action@428971d2ecd6e3a7cb0ee0da2a3a8b33fdb3678d
 with:
   anthropic_***REDACTED***
   use_sticky_comment: true
   allowed_bots: devin-ai-integration[bot]
   claude_args: --max-turns 25
--model claude-opus-4-8
--allowedTools "Read,Glob,Grep,Bash(git diff:*)"
   prompt: You are reviewing a PR to check whether any CLAUDE.md files or .claude/rules/ files need updating.
## Your task
1. Run `git diff origin/main...HEAD --name-only` to see which files changed in this PR.
2. For each changed directory, check if there's a CLAUDE.md in that directory or a parent directory.
3. Determine if any CLAUDE.md or .claude/rules/ file should be updated based on the changes. Consider:
   - New files/directories that aren't covered by existing documentation
   - Changed architecture or patterns that contradict current CLAUDE.md guidance
   - New dependencies, services, or infrastructure that Claude should know about
   - Renamed or moved files that are referenced in CLAUDE.md
   - Changes to build commands, test patterns, or development workflows
## Response format
If NO updates are needed, respond with exactly:
✅ CLAUDE.md files look current for this PR.
If updates ARE needed, respond with a short list:
📝 **CLAUDE.md updates suggested:**
- `path/to/CLAUDE.md`: [what should be added/changed]
- `.claude/rules/file.md`: [what should be added/changed]
Keep suggestions specific and brief. Only flag things that would actually mislead Claude in future sessions.
Do NOT suggest updates for trivial changes (bug fixes, small refactors within existing patterns).
Do NOT suggest creating new CLAUDE.md files - only updates to existing ones.
   trigger_phrase: `@claude`
   label_trigger: claude
   branch_prefix: claude/
   use_bedrock: false
   use_vertex: false
   use_foundry: false
   classify_inline_comments: true
   use_commit_signing: false
   bot_id: 41898282
   bot_name: claude[bot]
   track_progress: false
   include_fix_links: true
   display_report: false...

Walkthrough

Changes

This PR renames the Organization Prisma field v3Enabled to isActivated while keeping the same underlying database column, and updates organization creation, project gating, admin lookups, route loaders, and test seeds to use the new field. It also removes GitHub verification from the Free plan flow: the pricing UI drops verification-specific behavior, setPlan sends free connect-required cases through the success path, and the old free connect success route loader is deleted. A server-change note was updated to reflect both changes.

Sequence Diagram(s)

sequenceDiagram
  participant createOrganization
  participant featuresForUrl
  participant Prisma
  createOrganization->>featuresForUrl: featuresForUrl(new URL(env.APP_ORIGIN))
  createOrganization->>Prisma: organization.create({ isActivated: !features.isManagedCloud })
Loading
sequenceDiagram
  participant setPlan
  participant billingCache
  participant entitlementCache
  participant FreePlanPage
  setPlan->>billingCache: invalidateBillingCache
  setPlan->>entitlementCache: remove entitlement
  setPlan->>FreePlanPage: redirect
Loading

Estimated code review effort: 3/5 (Medium)

Related issues: None specified.

Related PRs: None specified.

Suggested labels: database, webapp, billing

Suggested reviewers: None specified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description explains the changes and testing, but it omits the required issue link, checklist, changelog, and screenshots sections. Add the template sections: Closes #issue, checklist items, a short changelog, and screenshots, or mark N/A where not applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: onboarding new cloud orgs through plan selection and removing the GitHub verification requirement for Free.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 fix/free-plan-onboarding

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.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

…tion

New managed-cloud orgs were created already activated, so they skipped the
select-plan flow that provisions their billing entitlement — leaving the
free-tier usage cap unenforced. Create managed-cloud orgs deactivated so
they're routed through select-plan, which activates them once a plan is
selected. Self-hosters have no billing gate and remain active immediately.

Rename the Organization.v3Enabled Prisma field to isActivated (mapped to the
existing v3Enabled column, so the database and billing service are unchanged)
to better reflect what the flag now gates.
@matt-aitken matt-aitken force-pushed the fix/free-plan-onboarding branch from d8bc6fa to 7fa8c43 Compare July 2, 2026 13:02
devin-ai-integration[bot]

This comment was marked as resolved.

@matt-aitken matt-aitken force-pushed the fix/free-plan-onboarding branch from 7fa8c43 to 090c64a Compare July 2, 2026 14:13
Selecting Free now provisions the plan immediately instead of routing
through a GitHub connect/verification step. Remove the 'Unlock Free plan' /
'Connect to GitHub' dialog, the GitHub-verified badge, and the account-
rejected state from the plan picker, simplify the setPlan free-result
handling to a success redirect, and delete the now-unreachable free-connect
return routes. The billing service provisions the free plan directly.
@matt-aitken matt-aitken force-pushed the fix/free-plan-onboarding branch from 090c64a to 3cfc891 Compare July 2, 2026 14:21

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Open in Devin Review

@matt-aitken matt-aitken enabled auto-merge (squash) July 2, 2026 14:32
@matt-aitken matt-aitken merged commit fd4f02b into main Jul 2, 2026
45 checks passed
@matt-aitken matt-aitken deleted the fix/free-plan-onboarding branch July 2, 2026 14:34
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