Showcase worker/subagent threads with a dedicated UI surface
Summary
When the main agent spawns a worker thread (via spawn_worker_thread or spawn_subagent { dedicated_thread: true }), the worker thread should be surfaced to the user in a deliberate, dedicated UI surface rather than appearing as a plain entry in the conversation list.
Problem
Today, worker threads carry parent_thread_id on the backend (src/openhuman/memory/rpc_models.rs) and render inline inside the parent via WorkerThreadRefCard — but the worker thread itself also appears as a standalone entry in the main conversation list (app/src/pages/Conversations.tsx). That clutters the list with threads the user didn't directly start and exposes background reasoning that doesn't have a coherent presentation yet (no clear title, no progress affordance, no done-state, no link back to the parent).
As a stopgap, worker threads (any thread with parentThreadId) are now filtered out of the conversation list. The inline WorkerThreadRefCard remains. This means worker threads are reachable only via the card click, which navigates to a thread that is not in the sidebar — a hack, not a feature.
Solution (optional)
Design a proper presentation for worker threads. Options to explore:
- A collapsible "sub-thread" tray under the parent in the conversation list.
- A dedicated "Background work" section or filter tab.
- An inline-expandable transcript inside
WorkerThreadRefCard(no navigation away from the parent). - A side-panel / split-pane that shows the worker thread alongside the parent.
Tradeoffs to weigh: discoverability vs. noise, live-progress vs. summary, ability to interrupt/cancel a worker, nesting (workers spawning workers is currently depth-guarded).
Acceptance criteria
- [ ] Worker threads have a deliberate UI surface — not the default conversation list, not a hidden hack.
- [ ] Parent ↔ worker navigation is bidirectional — users can jump from parent into worker and back.
- [ ] Worker lifecycle is visible — running / completed / failed states surface (events already exist:
SubagentSpawned,SubagentCompleted,SubagentFailedinsrc/core/event_bus/events.rs). - [ ] Stopgap removed — the
t.parentThreadIdfilter inConversations.tsxis replaced by the intentional design. - [ ] Diff coverage ≥ 80% — the implementing PR meets the changed-lines coverage gate.
Related
- Stopgap filter:
app/src/pages/Conversations.tsx(filteredThreads) - Inline card:
app/src/pages/conversations/components/WorkerThreadRefCard.tsx - Ref parser:
app/src/pages/conversations/utils/workerThreadRef.ts - Spawn tools:
src/openhuman/tools/impl/agent/spawn_worker_thread.rs,src/openhuman/tools/impl/agent/spawn_subagent.rs - Lifecycle events:
src/core/event_bus/events.rs(SubagentSpawned/SubagentCompleted/SubagentFailed)
Solution
Worker threads should not behave like normal conversations.
Fix Keep worker threads hidden from Conversations.tsx Show them only inside the parent chat using a dedicated UI (WorkerTaskCard) Add worker status like: running completed failed Better structure type Thread = { id: string threadKind: "conversation" | "worker" }
Then filter sidebar:
threads.filter(t => t.threadKind === "conversation") UI
Instead of opening hidden chats, show workers as:
Researching repo... [running] Summarizing files... [done]
inside the parent conversation.
Result Cleaner sidebar Better UX Proper background-task handling No hidden conversation hacks
Picking this up — will land the dedicated worker-thread UI surface (re-add the parentThreadId filter with intent, live running/completed/failed status badge on WorkerThreadRefCard wired to the existing subagent_* socket events, and a back-to-parent affordance on the worker view).