Repository navigation
feat(web): chats are mail threads with one agent; sidebar sections workbenches and chats (CL-8432) - #868
Merged
Conversation
…rkbenches and chats (CL-8432) Chats now ride the stock surfaces only: a person triggers an agent's deployment run over POST /workflows/:runId/mail, and the agent's reply lands in their own @corbits/mailbox inbox, threaded by In-Reply-To. - apps/web/src/chat/threads-api.ts is the one seam: agents from the stock run listing, chats from GET /me/inbox/threads, transcripts from a thread read plus inbox frames, sends through the run-trigger route, live updates from the inbox SSE stream. Every response is parsed with arktype. - The sidebar shows two labeled sections: Workbenches (the bench's child tenants, from the stock tenant listing) above Chats (one agent each, newest first, collapsed past five). Nothing in the sidebar path calls a deleted chat route any more. - /chats/new composes a first message to an agent picked in a select or by @tagging one; /chats/:id is that chat. / hops onto the newest chat. - Tests covering the deleted listing shapes are removed rather than adapted.
Every backend call on the chat surfaces is now a useQuery with a stable key from one factory, or a useMutation that invalidates that key's scope. The inbox SSE subscription is the only remaining effect: it writes into the query cache by invalidating, never by fetching.
TheGreatAxios
force-pushed
the
cl-8432-chats-threads
branch
from
September 18, 2026 04:42
b37c580 to
e459da9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Chats are ephemeral, ChatGPT-style threads in the bench tenant with exactly one agent, built on stock surfaces only. No backend changes.
apps/web/src/chat/threads-api.ts— the one seam:GET /workflows/runslisting (it already carriesaddressanddefinitionName;myra-deploy-sourcedisplays as "Myra")GET /mailbox/me/inbox/threads, grouped by thread root, agent inferred from therun_…address among a thread's participantsGET .../threads/:rootUidplusGET /me/inboxfor the frame bodiesPOST /api/tenants/:t/workflows/:runId/mailGET /me/inbox/events#glyph, the bench's child tenants from the stock tenant listing) above Chats (agent initials circle, newest first, collapsed past five with a See all toggle). Nothing in the sidebar path calls a deleted chat route./chats/newcomposes a first message with an agent select (default Myra) or by@taggingan agent;/chats/:idis the transcript plus a reply box./hops onto the newest chat, or the composer when there are none.useQuerywith keys from one factory,useMutationwith invalidation, SSE invalidating the cache rather than fetching in an effect.Known gap
The person's own turns are held in
localStorage, not in the mailbox:@corbits/mailboxwrites rows for addressed principals only, and a run address is not a mailbox, so a trigger leaves no durable copy the sender can read back. The agent's replies are durable; the person's own turns follow the device until the hub gives a sender a copy of their own outbound mail.Tests
Tests pinning the deleted listing shapes were deleted rather than adapted (
sidebar-rows,workbench-list,fetch-dedupe), per the standing ruling.