Skip to content

Create a new user's organization without asking for a name - #37

Merged
jondeandres merged 1 commit into
mainfrom
infer-organization-name
Nov 17, 2026
Merged

jondeandres merged 1 commit into
mainfrom
infer-organization-name

Conversation

@jondeandres

Copy link
Copy Markdown
Contributor

What

The desktop app no longer asks a new user to name their organization. /onboarding creates it right away and goes on to picking a first model. The backend names the organization (nodea-sh/nodea#340):

  • Google sign-in: "{full name}'s Organization"
  • Email signup: "{part before the @}'s Organization"

Names no longer have to be unique, so two people called "Jon" both get "Jon's Organization".

Depends on nodea-sh/nodea#340. This PR posts {} to POST /v1/onboarding/organization, and the current backend rejects that ("Organization name is required"). Merge and deploy the backend first. The backend still accepts an explicit name, so desktop builds already installed keep working with their name form.

Behaviour

  • New user: the page shows "Setting up your organization…", creates it, and goes to the model step. If creation fails, it shows the error and a Try again button.
  • Just left an organization: "You're no longer in X" stays, now with a one-click Create my organization button instead of a name field. Nothing is created until they click, since they may want to open an invitation instead.
  • Already in an organization: right after login, organization is briefly null while it loads, so this page can show for a moment. A 422 from the create call ("already has an organization") is treated as "nothing to set up" and goes to /node.
  • The model step's eyebrow shows the organization's name instead of "Step 2 of 2", since step 1 is gone. New users see what their organization was called.

checkOrganizationName and its type are removed. Nothing calls them anymore.

Demo mode

?account=new is a new demo state: an account that has never had an organization, used to test the new-signup path. ?account=orgless is still the user who has just left one, since the membership check reports the loss.

Tests

tests/onboarding.spec.ts:

  • ?account=new lands on the model step with no name form and shows "Demo User's Organization".
  • ?account=orgless shows "You're no longer in Demo Organization", Create my organization creates one, and the device still reconnects to the new organization.

Run locally: full Playwright suite (npm test, 91 passed), tsc --noEmit, vite build. Nothing under src-tauri/ changed, so I didn't run the Rust suites.

Known edge

Someone who left their organization in the browser while the app was closed then opens the app with no organization, and the app doesn't know they left. They get a new organization automatically, like a new signup, where before they saw the name form. They can still leave it or accept an invitation.

Onboarding no longer shows an organization name form. A new user's
organization is created as soon as they reach /onboarding, and the
backend names it "{name}'s Organization" after the account name (a
Google sign-in) or the part of the email before the @
(nodea-sh/nodea#340). They go straight on to picking a first model,
whose page now shows the organization's name instead of "Step 2 of 2".

Someone who just left an organization is asked first, with a one-click
"Create my organization", since they may rather open an invitation. A
422 (already in an organization) means the page showed while the
organization was still loading, and goes on to the node page.

Demo mode gains ?account=new, an account that never had an
organization, so the e2e suite covers the new-signup path; ?account=
orgless remains the user who has just left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jondeandres
jondeandres merged commit 2882e71 into main Nov 17, 2026
11 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