Repository navigation
feat(spaces): Show a Space's Threads in the shared Threads panel - #4433
Conversation
The Space panel now renders the Threads panel that every Conversation with children shows, fed by the Lead's child agents. That panel groups Threads by what they need, with Done collapsed, in the In flight order. The child agents report gains each child's tree state and Watch flag, so the panel groups by the same state as feed rows. Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Show archived opens Done, where archived Threads sit. A Thread whose own run ended while a nested child still works shows the working icon, as its group does. Co-Authored-By: David Cramer <[email protected]>
dcramer
left a comment
There was a problem hiding this comment.
Let's get rid of the counts and the category headers. We still want them sorted in the correct order, but we don't need the separation like that
That should obviously be true for threads on all panels like that. And so the new panel shared across any route should treat threads without the subcategories and the counts per subcategory
The sidebar lists each root's Threads in attentionOrder at each level, so a Space's Lead and any Conversation with Threads show one order. A collapsed root shows the first Threads in that order. Co-Authored-By: David Cramer <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 33cbe6e. Configure here.
| threads: SidebarThread[]; | ||
| } { | ||
| const direct = root.threads ?? []; | ||
| const direct = attentionOrder(root.threads ?? []); |
There was a problem hiding this comment.
Sidebar order misses Thread tree state
Medium Severity
sidebarThreads now sorts with attentionOrder, which groups by treeState, watching, and latestTurnFailed. Nested feed Threads typically have none of those — conversationDisplayState even treats a Thread row as having no tree state — so a Thread that needs the viewer is grouped as Done and can fall past the collapsed cap. The new test only passes because it injects treeState onto those rows.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 33cbe6e. Configure here.
|
Done in #4463. Every Threads panel now shows one list with no group headings or counts. It keeps the same order: needs you, working, waiting, done. |


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
ConversationThreadsnow groups its rows, for every Conversation with Threads and for a Space: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
attentionGroupsinconversationSections.tsis the only sort. It takes rows of any shape with a reader for their group and time. In flight's busy rows and the sidebar's Threads read feed rows (attentionOrder), and the Threads panel reads child agent rows. The group order and the newest-first rule live in one place.The sidebar lists each root's Threads in that order at each level, so a Space's Lead and its Threads panel agree. A collapsed root shows its first three Threads in that order, plus the one that holds the open Thread.
API
GET /api/conversations/:id/agentsnow returns each child'streeStateandwatching, from the samereadConversationTreeStatesread 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
/agentsroute 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.tsuseSpaceConversationsData, and its read inpackages/junior-dashboard/src/client/lead/useLeadWork.tsuseLeadWork: the Lead looks up its Space's Conversations from thespaceIdfeed, which are now its child Threads.packages/junior/src/api/conversations/list.tsconversationSpaceFilter, thespaceIdfield ofconversationFeedQuerySchemainpackages/junior/src/api/schema/conversation-feed.ts, and the mockfilterMockConversationsBySpaceinpackages/junior-dashboard/src/mock-reporting/spaces.ts(and its branch inconversation-reports.ts): the feed filter goes once nothing reads it.packages/junior-dashboard/src/client/lead/leadWork.tsLeadWorkStateandpackages/junior-dashboard/src/client/lead/LeadWorkStatus.tsxleadWorkStatus: a second set of states and icons besideConversationStateIcon, used by the Lead's watch reports (lead/watchReport.ts,lead/LeadWatchReport.tsx).Space
Conversation with Threads
via @dcramer.
--
View Session [Sentry]