Skip to content

bug(workspace): multi-agent chat picker is offered on builds with no rooms backend — 404 dead end #2128

Description

@trinity-ability

Found while validating #2120 (ent#358/#361/#381), which merged the Workspace multi-agent chat.

What happens

The Workspace "+ New chat" picker (components/portal/PortalAgentPicker.vue) lets a client select several agents, captioned "they will share this conversation". Selecting 2+ routes to store.createRoom() → POST /api/rooms.

/api/rooms exists only in the enterprise submodule (shared_sessions). There is no OSS router with that prefix:

$ grep -rn 'prefix="/api/rooms"' src/backend --include='*.py'
src/backend/enterprise/backend/shared_sessions/router.py:29:    prefix="/api/rooms",

So on an OSS-only build — or any install without the shared_sessions entitlement — picking two agents produces a 404, and Portal.vue renders the generic 'Could not start that chat.' The affordance is always offered and silently cannot work.

Why it regressed

The surface this replaced was gated. NavBar.vue before #2120:

<router-link v-if="enterpriseStore.isEntitled('shared_sessions')" to="/sessions">

#2120 removed that entry (ent#381) and moved the capability into the picker, but no equivalent gate came with it. The new /workspace/r/:roomId route also carries no requiresEntitlement, unlike the /sessions/:roomId? route it replaced.

Why this is not a one-liner

isEntitled() reads enterprise_features from /api/settings/feature-flags, which requires platform auth. The Workspace is reachable by an external client on an email-OTP portal session with no platform JWT, so the flag is not currently available to the principal that needs it. Fixing this properly means exposing a rooms-availability signal to a portal principal (e.g. on the /my-agents roster payload or a portal-scoped flags read), then gating the multi-select on it.

Acceptance criteria

  • On a build without shared_sessions, the picker does not offer multi-agent selection (or offers it visibly disabled with a reason) — never a dead-ended 404
  • The gate works for an external client on a portal session, not only for a signed-in platform user
  • Single-agent selection is unaffected in every edition
  • /workspace/r/:roomId refuses/redirects when rooms are unavailable, rather than rendering an empty room

Related: #2120, abilityai/trinity-enterprise#361, abilityai/trinity-enterprise#381

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions