Skip to content

feat(web): workbench room is the child tenant's mail thread; legacy chat client deleted (CL-8435) - #875

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-8435-room-threads
Sep 18, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-8435-room-threads

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What

/w/:tenantId is now a room over the child tenant's mailbox, and the client for the deleted /chat/workbenches/* routes is gone. Rebased onto current main (#870–#874).

  • pages/workbench-room-page.tsx — header (tenant name), participants (people from GET /api/tenants/:id/principals + agents from the child's live deployment run addresses), timeline built from the room mailbox's Sent + INBOX threaded by In-Reply-To/References, sub-thread replies in a side panel, composer addressed to every agent in the room. TanStack Query throughout (roomKeys in chat-path.ts); the only effect is the mailbox SSE subscription, which invalidates.
  • chat/threads-api.ts — room additions: listRoomParticipants, readRoom, sendToRoom. sendToRoom is the single send seam and now uses main's mailbox send route (POST /api/tenants/<childId>/mailbox/me/inbox/send with to, body, optional inReplyTo), so the hub triggers the agents and keeps the Sent copy — no localStorage anywhere.
  • workbench-create.ts + pages/new-workbench-picker.tsx — create child tenant (POST /api/tenants {name,slug,parentId}) → publish the tool-package registry into it → resolve its own offering (resolveExistingOffering(childId), which inherits) → deploy Myra into the child (deployMyraSource + stock POST /workflows/deployments) → send the opening message through the child's mailbox → navigate in the mutation's onSuccess.

Why deploy rather than invite: verified on a live hub that the stock member invite only accepts a real user's email, and a child tenant's deploy route rejects the parent's inherited asset (404 "Workflow asset not found") while its resolved models/offerings do inherit.

Deleted

chat/api.ts and everything that only served it: chat-workspace, timeline, composer, mentions, typing-indicator, use-workbench-feed, use-workbench-stream, workbench-presence, streaming-reply, direct-workbench, shared-workbenches, default-agent-workbench, mailbox-timeline, thread-feed, use-optimistic-sends, use-thread-navigation, workbench-timeline-view, workbench-settings/, pr-thread-view, artifact-chip, chat/sidebar, profile-relations, myra-workbench, instant-agent-create, agent-chat-launch, agent-dm-launch, pages/chat-page.tsx, pages/workbench-timeline.tsx, workbench-timeline-merge, shell/tenant-resolution — plus their tests. Outdated tests were deleted, not adapted. grep -rn 'chat/workbenches|chat/api"' apps/web/src is empty.

Touched files owned by other tickets (minimum to unbreak)

  • pages/insights-page.tsx — dropped the embedded WorkbenchTimelineRoute (its page is deleted) and switched to @/chat/workbench-tenants.
  • shell/bench-activity.ts rewritten over stock listings, so agents-page.tsx, mission-control-page.tsx and library-page.tsx are untouched.
  • command-palette-provider.tsx / command-palette-actions.ts — import path only; "talk to Myra" now lands on /chats/new.
  • shell/context-menu/items.tsx — pin item removed (workbench settings surface deleted). shell/canvas-column.tsx — profile card keeps identity + mention; "Message" lands on /chats/new, shared-workbench channels empty (no stock read for another principal's rooms).
  • agents-api.ts — listCapabilityInventory moved here from the deleted chat/api.ts, alongside feat(web): Agents and Skills pages read stock deployments; create agent deploys a workflow asset (CL-8433) #874's deploy hooks.

Gaps

  • The new-workbench screen no longer offers an agent multi-select: only Myra's definition can be rendered and deployed into a room today (agent-deploy.ts deploys from a name + system prompt, which an existing bench definition does not expose). Adding more agents to a room is a follow-up on that pipeline.
  • A room's agent is addressable once its deployment's run surfaces; an opening message sent before that is skipped rather than failing the create — the person sends it from the room.
  • Read state (/me/inbox/:uid/read) is not wired; presence/typing/streaming dropped as ruled.

bun run check passes (typecheck, lint, fmt, 587 tests).

@linear-code

linear-code Bot commented Sep 18, 2026

Copy link
Copy Markdown

CL-8435

…hat client deleted (CL-8435)

A workbench is a child tenant, so /w/:tenantId renders that tenant's
mailbox: participants are its principals plus its live deployments' run
addresses, the timeline is Sent + INBOX threaded by In-Reply-To, and a
message is one mailbox send addressed to every agent in the room.

Agents join a room by being deployed into it: the stock member invite
only accepts a real user's email, and a child tenant's deploy route
rejects the parent's inherited asset, while its resolved offering does
inherit. Creating a workbench creates the child tenant, deploys Myra
into it, sends the opening message and lands on the room.

The chat client for the deleted /chat/workbenches routes is gone, along
with every module that only existed to serve it.
@TheGreatAxios
TheGreatAxios merged commit 28c0163 into main Sep 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant