fix(console): route org-less users into guided org creation (multi-org)#2004
Merged
Conversation
RequireOrganization previously treated an empty organizations list as single-tenant and rendered through to /home — so on a multi-org (cloud) deployment a brand-new, org-less user landed on a dead home with no org/env. Now, when the runtime config has multiOrgEnabled !== false and the user has no orgs, redirect to /organizations (the 'Create your first organization' screen). Single-tenant self-host (multiOrgEnabled === false) still renders through. Pairs with cloud's guided-org-creation (signup no longer auto-provisions an org). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
RequireOrganizationtreated an empty organizations list as single-tenant and rendered through to/home. So on a multi-org (cloud) deployment, a brand-new, org-less user landed on a dead/home(a "Cloud" app with no org/env behind it) instead of being guided to create their workspace.Fix
When the runtime config has
features.multiOrgEnabled !== falseand the user has no orgs (and no active org), redirect to/organizations— the "Create your first organization" screen. Single-tenant self-host (multiOrgEnabled === false) still renders through unchanged. The config flag is read via the existinggetAuthConfig()(same one OrganizationsPage/CreateWorkspaceDialog use); we wait for it before deciding so we don't flash/homethen redirect.Why
Pairs with cloud's guided org creation (signup no longer auto-provisions a personal org with an auto-derived name). The new-user flow becomes: signup → org-less → guided "Create your workspace" (user picks name + slug) →
createOrganization→ born-with-env. Unifies the first org with "+ New organization".Verification
Browser-E2E'd on the live cloud control plane: fresh signup (0 orgs) → navigating into the console redirects to
/organizations("No organizations yet / Create your first organization") → created "Acme Corp" (slug auto-derivedacme-corp) → switched in → org born with itsos-…production env.🤖 Generated with Claude Code