Repository navigation
Create a new user's organization without asking for a name - #37
Merged
Merged
Conversation
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>
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.
What
The desktop app no longer asks a new user to name their organization.
/onboardingcreates it right away and goes on to picking a first model. The backend names the organization (nodea-sh/nodea#340):"{full name}'s Organization""{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
{}toPOST /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
organizationis 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.checkOrganizationNameand its type are removed. Nothing calls them anymore.Demo mode
?account=newis a new demo state: an account that has never had an organization, used to test the new-signup path.?account=orglessis still the user who has just left one, since the membership check reports the loss.Tests
tests/onboarding.spec.ts:?account=newlands on the model step with no name form and shows "Demo User's Organization".?account=orglessshows "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 undersrc-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.