Skip to content

Multi-tenant orgs/workspaces (sidebar workspace card today is static) #130

@jiashuoz

Description

@jiashuoz

Background

The redesigned sidebar shows a workspace card (user name + usr_… id) that implies multi-org capability, but today every resource is owned by a single user_id — there's no org/workspace abstraction in the data model.

Scope

This is a major migration:

  • New orgs and org_members tables.
  • Change every WHERE user_id = $1 query to WHERE org_id = $1.
  • Invite flow (email → join token → membership).
  • RBAC (owner / admin / member at minimum).
  • Org switcher in the sidebar workspace card.
  • Migration path: every existing user gets a personal org seeded on first sign-in after deploy.

Recommendation

Defer until product genuinely needs multi-tenant (e.g., teams wanting shared agent inboxes, billing per workspace). The static workspace card is a placeholder that degrades gracefully; users don't see broken affordances.

Effort

L+ (multi-week migration touching auth, every API handler, and the dashboard data layer).

Source

BACKEND_TODO.md #9 (deferred bucket).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions