Workspaces
If you belong to more than one workspace, switch between them using the AccountSwitcher at the top of the sidebar.
A ChatbotGen user can belong to multiple workspaces (accounts). The AccountSwitcher component at the top of the left sidebar is how you see the current one and move to another.
One workspace vs. many
Verified from AccountSwitcher in app-layout.jsx:
-
multi = accounts.length > 1 -
When
multiisfalse, the switcher button is disabled — no dropdown opens, no chevron is shown, and the button'stitleattribute is the current workspace's name. -
When
multiistrue, clicking the button opens a dropdown; the button'stitleis "Switch workspace".
What the button shows
┌─ Sidebar header ────────────────┐
│ [logo] Acme Inc. ⬍ │
│ billing@acme.com │
└─────────────────────────────────┘
Two lines inside the button:
-
Primary:
current_account.name, or "Workspace" as fallback -
Subtitle:
current_account.billing_email, falling back tocurrent_user.email, falling back to "Workspace"
A small up/down chevron (two stacked polylines) appears on the right only when you belong to multiple workspaces.
The dropdown
Clicking the switcher (when multi) opens a popover menu:
┌─ WORKSPACES ─────────────────────┐
│ [logo] Acme Inc. ✓ │
│ billing@acme.com │
│ │
│ [logo] Personal projects │
│ personal@me.com │
│ │
│ [logo] Other workspace │
└──────────────────────────────────┘
At the top, a small uppercase header: WORKSPACES. Then one button per account in accounts, each showing:
- The brand mark
-
account.name -
account.billing_email(only when present) - A green checkmark on the currently-active workspace
Clicking a workspace row that isn't already active fires router.post("/app/current-account", { account_id: id }).
If you click the active one, switchTo returns early — no request is sent.
What switching does
Verified from CurrentAccountController.create/2:
-
The controller looks up
Accounts.get_account_user(account_id, user.id). -
If no membership exists, you get flash "Workspace not found." and a redirect to
/app. -
If membership exists, the controller stores
account_idin the session undercurrent_account_idand redirects to/app.
So every successful switch lands you on the dashboard (/app) — not wherever you were before.
Joining a workspace
There's no self-join. You have to be invited — see Members (from the inviter's side) and Invitations (from yours).
Leaving a workspace
The UI has no "leave" button for yourself. Members can be removed by admins via Members; to leave a workspace you're in, ask an admin there to remove you.