States — contract, not decoration
Every state a consumer must render is frozen here. QA writes RED Playwright specs against these before the flow is built.
Fetching your organizations
aria-busy="true" skeleton while GET /api/organizations is in flight.
Just you and the platform, for now
A brand-new user has a Personal context and membership of root and nothing else. Empty is a real state — not an error. Prompt: create your first organization.
Setting up your account…
First sign-in: the root membership row is being written
(WorkspaceProvisioningGate). The switcher is held until user_role resolves — it must never flash a GUEST/empty state mid-provision.
Couldn't switch context
The org list or the target org failed to load. The previous active context is kept — we never strand you in a blank context.
You no longer have access to that organization
Your membership was removed while it was in your
switcher. This is an authorization denial (403) rendered in place — the switcher
drops the row and returns you to Personal. Never a sign-in redirect; only a 401 re-authenticates.
Create organization
NAME_TAKEN — renders inline on the field, never a toast that loses the form.