Repository navigation
feat(spaces): Show a Lead's Conversation details instead of a Space panel - #4444
Merged
Merged
Conversation
A Space's Conversations are now child agents of its Lead, so results, messageAgent, listAgents, Watches, stop, archive, and roll-ups work the same as for any parent. The Lead is the tree root of its Space, and a new top_level_conversation_id keeps per-work state, such as Participants, pins, and lists, on each of the Lead's children. The Lead starts work with startAgent, and startConversation is removed. A move into, out of, or between Spaces re-parents the Conversation and its subtree, and refuses to make private work public. A Lead has no cap on active children, its children count as roots for maxAgentDepth, and it hears a child's done as a Conversation note. Co-Authored-By: David Cramer <[email protected]>
…rtAgent Co-Authored-By: David Cramer <[email protected]>
Drop top_level_conversation_id. A Conversation in a Space has the Lead as its parent and its root, as in any agent tree, so Participants and access come from the Lead. A move rewrites the root of the moved subtree, and the migration does the same for existing Space work. Co-Authored-By: David Cramer <[email protected]>
A Space's members were a separate table. With the Lead as the root of every Space Conversation, they are now its Participants, like any agent tree. Creating a Space makes its Lead, joining adds a Participant, and leaving removes it. The migration makes a Lead for every Space and copies the old members onto it. The old table stays unused until a release without it is live. Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
The Lead transcript shows the Conversations it starts as child agent rows, like any parent. Drop the Lead page state that only the removed started Conversation card read.
…bers A person joins a Space before they post in it on the web. Before, only the Lead refused web posts from non-members, so a web post in a public Space Conversation made the poster a member. Co-Authored-By: David Cramer <[email protected]>
A Lead heard a child's done as a quiet note, so it could not act on the result, and it broke the rule that a parent gets each child's result.
Space work is a child of its Lead, so feed code that matched a row's id to Participant roots or to root_conversation_id missed it. A member's feed now lists the Space's work, and a row reads its own subtree for Threads, work owners, annotations, and search. Repository and annotation search resolve a match to its top-level Conversation. createSpace also removes the Space when its Lead fails to save. Co-Authored-By: David Cramer <[email protected]>
Leave and unsubscribe on a Space Conversation act on the Lead, its root. When the person was the last subscriber, that archived the Lead's whole tree, which is every Conversation in the Space. Only a Space archive ends a Space now. Also drop stale startConversation and root wording.
Stacked on #4413 (Space Conversations become children of the Lead). Merge that first; this PR's base is `agents/lead-children`. A Space's Threads are now the Lead's child Threads, so the Space panel beside the Lead renders the same Threads panel that every Conversation with children shows, instead of its own list. #4416 added that custom list; this PR removes it (`SpaceThreads.tsx`). ### The Threads panel, everywhere `ConversationThreads` now groups its rows, for every Conversation with Threads and for a Space: - **Needs you · N**: the child's tree waits on the viewer, or its run failed or is blocked. - **Working · N**, then **Waiting · N** (it watches for an Event or a Timer, or its run is paused). - **Done · N** last, collapsed. Its heading opens it. Archived Threads go here, so "Show archived" opens it. - In each group, the most recent update comes first. A row's icon now shows a wait on the viewer, work in its tree, or a Watch over the run's own status, so a row under Needs you or Working does not show a check mark. Tasks keep their flat list. Waiting starts open. Those Threads still have work in flight, and In flight shows them too, so hiding them would put active work two clicks away. Only Done needs nothing and grows without limit, so only Done starts collapsed. ### One order `attentionGroups` in `conversationSections.ts` is the only sort. It takes rows of any shape with a reader for their group and time. In flight's busy rows read feed rows (`attentionOrder`), and the Threads panel reads child agent rows. The group order and the newest-first rule live in one place. ### API `GET /api/conversations/:id/agents` now returns each child's `treeState` and `watching`, from the same `readConversationTreeStates` read that feed rows and the Space roll-up use. Without it, the panel could not tell a child that waits on the viewer from one that is done. It adds one SQL statement to the read, in parallel with the metrics reads. Redacted rows keep both fields: they show no content. ### Mock data The mock `/agents` route answers a Lead with its Space's Conversations as child Threads, as the API does after #4413. ### Follow-up deletion Space-only code that the Lead's children now duplicate. This PR keeps it: - `packages/junior-dashboard/src/client/spaces/queries.ts` `useSpaceConversationsData`, and its read in `packages/junior-dashboard/src/client/lead/useLeadWork.ts` `useLeadWork`: the Lead looks up its Space's Conversations from the `spaceId` feed, which are now its child Threads. - `packages/junior/src/api/conversations/list.ts` `conversationSpaceFilter`, the `spaceId` field of `conversationFeedQuerySchema` in `packages/junior/src/api/schema/conversation-feed.ts`, and the mock `filterMockConversationsBySpace` in `packages/junior-dashboard/src/mock-reporting/spaces.ts` (and its branch in `conversation-reports.ts`): the feed filter goes once nothing reads it. - `packages/junior-dashboard/src/client/lead/leadWork.ts` `LeadWorkState` and `packages/junior-dashboard/src/client/lead/LeadWorkStatus.tsx` `leadWorkStatus`: a second set of states and icons beside `ConversationStateIcon`, used by the Lead's watch reports (`lead/watchReport.ts`, `lead/LeadWatchReport.tsx`). | | Dark | Light | | --- | --- | --- | | Desktop |  |  | | Phone |  |  | <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Ab5ee8d5333087bc45e7c6d1574b48eaf --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Ab5ee8d5333087bc45e7c6d1574b48eaf) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ab5ee8d5333087bc45e7c6d1574b48eaf/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <[email protected]>
# Conflicts: # design/agent-teams.md # design/child-agents.md # packages/junior-evals/evals/agent/lead.eval.ts
…per Conversation A Thread that the grouping puts in Needs you because its tree waits on the viewer now shows that icon, even when its own run failed or is blocked. The Threads panel gets a key per Conversation, so an open Done group does not stay open on the next Conversation.
A Lead's child counts as a root for limits.maxAgentDepth, and the depth check in spawn.ts already allows it. The tool binding did not know that, so with depth 0 such a child never got startAgent. The run now passes whether its Conversation is top-level work. Co-Authored-By: David Cramer <[email protected]>
…anel A Lead opens the same Conversation details as any Conversation: its Threads, To-dos, Inbox items, linked work, and Participants. Its Space's description, members, and settings show as cards in those details, and the Space-only details panel is gone. Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: David Cramer <[email protected]> # Conflicts: # TERMINOLOGY.md # design/agent-teams.md # design/spaces.md
…lead-conversation-details Co-Authored-By: David Cramer <[email protected]> # Conflicts: # packages/junior-dashboard/src/client/shell/pages/spaces/SpaceDetails.tsx
2 of 12 tasks
dcramer
approved these changes
Nov 26, 2026
The Participants of a Lead are its Space's members, and a person joins a Space on purpose. A mention in a public Space's work added the mentioned person as a Participant of the Lead, which made them a member without Join. Mentions in a Space now add nobody, on the dashboard and in Slack.
…lead-conversation-details
The sidebar orders a root's Threads with attentionOrder, but nested feed Threads had no tree state, so a Thread that waits on the viewer sorted under Done and could hide past the collapsed cap. The Thread read now reads each Thread's tree state with its first messages, so the feed takes one more SQL round. Co-Authored-By: David Cramer <[email protected]>
dcramer
enabled auto-merge (squash)
November 26, 2026 07:26
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 158cd33. Configure here.
#4413 merged into main, so this PR now targets main.
Member
|
Members should exist the same way between conversations and spaces, and the description doesn't need to show up right now, nor does the config panel, so it can literally just be the normal conversation panel |
Contributor
|
18 screenshot changes — 18 changed · 0 added · 0 removed Review screenshots in Frameshift Show 12 more changed screenshots |
This branch was successfully deployed
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.

A Lead is a Conversation, and since #4413 a Space's Threads are its Lead's children. The Space-only details panel repeated what Conversation details already show, so two panels had to be kept in step. A Lead now opens the same Conversation details panel as any Conversation: its Threads (grouped, Done collapsed), To-dos, Inbox items, linked work, Tasks that open in the drawer, Participants, and memories.
The Space keeps a small layer inside those details: an About card with its description, then Members and Settings, after the Tasks and before Participants.
ConversationDetailstakes them as one optionalspaceslot.SpaceDetailsPanelis deleted. A Space without a Lead still shows the same cards on its page.On a Lead, the details button and panel are now named "Conversation details", as on other Conversations. A Space page reads three more endpoints, the Inbox items, To-dos, and Watches that every Conversation's details read, so its request budget goes from 15 to 18.
Tree state on the feed's nested Threads
The sidebar orders a root's Threads with
attentionOrder(#4433), but the feed sent nested Threads without a tree state. A Thread that waits on the viewer sorted under Done and could hide past the collapsed cap.readFeedThreadRecordsnow reads each Thread's tree state and Watch flag withreadConversationTreeStates, in parallel with its first-message read. The feed takes one more serial SQL round (3 to 4), and each Thread item grows by those two fields.via @dcramer.
--
View Session [Sentry]