Skip to main content

User Lifecycle

Every real account has one Personal organisation (organisations.kind = 'personal'): a private space only its owner belongs to, holding as many workspaces (bundles) as they like. Team organisations (kind = 'team') are shared. Guests never get a Personal organisation. See Organisations for the rules.

1. Getting an account

An invite never creates workspaces or a Personal organisation; the first login does (step 2). Inviting an existing account only adds the membership.

2. First login (onboarding)

ensure_personal_organisation runs on every magic-link login of a non-guest. It does the work once and is a no-op afterwards; if it fails the login fails, and the next login retries. The per-user slug (personal-<user id>) is unique: of two concurrent first logins, the second finds the first’s. Workspaces without an organisation that only this account uses (from before personal organisations) move in, and a home workspace is created only when the account has none. A guest who completes onboarding (POST /auth/complete-guest-onboarding) gets a magic link, and their Personal organisation at that login.

3. Everyday use

  • Workspace lists show only workspaces whose organisation_id is the current organisation.
  • Personal workspaces show a folder with a lock, no Share button, and a hint to move sessions into a team workspace to share them.
  • Sessions in Personal build topics like any other organisation; their summaries use the prompt override shared by all personal organisations.

4. Leaving a team organisation

Every member-management call on a personal organisation (add, role, remove, rename, icon) returns 409, for platform admins too.

5. Erasure

See Data subject requests.

6. Existing accounts at rollout

Migration m20261110_000001_personal_organisations brings accounts from before personal organisations in line. It runs on deploy, so run the read-only check below against production first and get it approved (#197, “Before the backfill”). users.customer_group and customer_prompt_overrides.customer_group stay one more release, because pods of the previous release read them while this one rolls out. No code reads them; drop them in a migration of the next release.

Read-only check

Run it in a read-only transaction. It returns account ids and counts, never content; don’t copy its output into tickets or files.
After it runs, rebuild the topic graph so projected topics carry their new organisation: kair-voice-topic-backfill project.