Skip to content

feat(ui): show subagents and background processes with progress in session Details - #175041

Merged
roboclaw-bot merged 8 commits into
mainfrom
openclaw/visualize-subagents-and-progress
Oct 17, 2026
Merged

roboclaw-bot merged 8 commits into
mainfrom
openclaw/visualize-subagents-and-progress

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The session Details panel only listed currently running subagents under a generic "Background tasks" heading, with no counts, no finished or failed children, no plan progress, and no background processes at all, so you had to open separate side panels to see what a session had started and how it was going.

User Impact

User impact: Details now shows Subagents and Processes as two collapsible groups. Each heading shows observed counts ("2 running · 3 done · 1 failed") and a segmented bar that stays visible when the group is collapsed. Each group previews three rows (live work first, then failures), "Show N more" expands the rest in place, and "All subagents" / "All processes" open the existing side panels. Running subagents show their live headline, elapsed time, and plan steps (2/4) when the observer stream reports them. Groups with nothing to show stay hidden.

Requested by Peter Steinberger (@steipete).

Work sessions

Why This Change Was Made

Subagents (agents you steer) and processes (commands you stop) are different things, so they get separate groups instead of one vague heading with nested folding. Details is the at-a-glance view; the Subagents and Processes panels remain where you act (stop, transcript, full output).

  • Subagent rows come from the pane's existing hydrated child roster (listSubagents, finished children included); settled-state mapping reuses endedWithoutFinishing. The transcript's unfinished-only projection is unchanged.
  • Process rows reuse the Processes panel's data owner (ProcessesPanelData via useSessionPanel), polling only while Details is presented in a pane that can open that panel. No new store or Gateway API.
  • Plan steps come only from live session.observer digests, because session rows do not carry planProgress. Accepted limitation: after a reload the step meter is absent until the subagent's next observer update.
  • Running state uses --info (the theme accent reads as failure in the default palette); pulse/flow animations stop under reduced motion.

Evidence

Screenshots from the e2e run (mocked Gateway, fixture with 6 subagents and 4 processes).

Before (main) After
Before: one Background tasks group listing two running subagents After: Subagents and Processes groups with counts, bars, three-row previews
After, light After, Show more expanded + Processes collapsed
After in light theme Subagents expanded to all six rows; collapsed Processes keeps its counts and bar
  • pnpm tsgo:ui: pass
  • Related unit suites (subagent wait/spawned/activity-live, Details session, working indicator, subagents/processes panel data, Details browser): 86 tests pass
  • New e2e ui/src/e2e/session-details-background-work.e2e.test.ts (light + dark): counts, attention order, 3-row preview, Show more, collapsed heading keeps its bar, live plan steps 2/4, "All processes" opens the panel. Pass
  • oxfmt --check, oxlint on touched files, git diff --check, pnpm ui:i18n:baseline: clean
  • Autoreview (Codex, P0–P2): no actionable findings

Worked on by


View the OpenClaw team session

roboclaw-bot and others added 2 commits October 17, 2026 03:18
…ssion Details

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: b2170e38-cdfc-4106-b77d-2ef6db09a6f8
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 17, 2026 03:21
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 17, 2026
roboclaw-bot and others added 2 commits October 17, 2026 03:35
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 72b3e70a-6d83-4c30-a1e3-c76e26e2d98e
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

Adds separate Subagents and Processes groups with status counts, progress indicators, bounded previews, and links to existing panels.

Example: A session has six subagents and four background processes.

  • Before: Details lists only two unfinished subagents under Background tasks.
  • After: Details shows 2 running, 3 done, and 1 failed subagent, plus process counts and expandable previews.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, visually demonstrated implementation with no identified code defect; broad CI still has an unclassified Skills library focus failure.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after production-UI screenshots from Chromium with a mocked Gateway show the changed Details owner rendering status counts, three-row previews, live 2/4 plan progress, light/dark themes, expanded children, and a collapsed Processes bar.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Users must inspect separate panels to understand completed, failed, and running work started by a session.
Reason: Maintainer authorship establishes direction, and the compact summaries improve inspection without introducing configuration or a competing execution model.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: it delivers a useful, maintainer-directed Details improvement, and review found no actionable introduced defect.

Priority: P2
Reviewed head: 2a6b35781559b0acb6c112703fc7a4dae5085080

Before merge

  • Complete next step - Compare the Skills library keyboard-focus failure with the base revision to determine whether it requires a PR repair or inherited-failure handling.

Findings

None.

Agent review details

How this fits together

The Control UI Details inspector projects the existing child-session roster, live observer digests, and session process RPC results into summaries and existing panel navigation.

flowchart TD
  A[Child session roster] --> D[Details background groups]
  B[Live observer digests] --> E[Subagent activity rows]
  A --> E
  C[Processes panel data] --> D
  E --> D
  D --> F[Existing inspection panels]
Loading

Technical review

Best possible solution:

Retain this focused Details presentation while keeping execution, process control, and full inspection in their existing owners.

Do we have a high-confidence way to reproduce the issue?

This is a feature addition; current-main source and the before screenshot establish the narrower existing Details presentation.

Is this the best way to solve the issue?

The approach fits the existing architecture: it derives summaries from established owners and preserves the transcript's unfinished-only projection.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a98802ebaf88.

Provenance checked

  • Child roster and inline activity keeps the original intent (a285e8b: Restore per-child activity using the existing roster and scoped observer headlines without transcript polling.)
  • Details grouping and hierarchy keeps the original intent (b883658: Collect session context and progress in one bounded inspector while preserving existing action owners.)
  • Separate Subagents and Processes panels keeps the original intent (e25a981: Restore separate child and process inspection using existing lifecycle, permissions, and process ownership.)
  • Compact subagent row presentation changes intended behavior with a stated reason (21ba1c8: Keep session information in collapsible Details sections; this PR explains the expanded status, elapsed-time, and plan presentation.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +579, Tests +368. Total +947 across 13 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 10 646 67 +579
Tests 3 368 0 +368
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 1014 67 +947

Review metrics

Metric Value Why it matters
Production versus test growth Production +646/-67 lines; tests +368/-0 lines Growth primarily implements the new grouped presentation and styles, with component and browser coverage; existing transport and execution owners are reused.

Labels

Label changes:

  • add P2: Useful session-inspection improvement with limited user impact and no demonstrated urgent regression.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Useful session-inspection improvement with limited user impact and no demonstrated urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 16, 2026, 11:53 PM ET / October 17, 2026, 03:53 UTC.

roboclaw-bot and others added 4 commits October 17, 2026 04:48
#174744 and #174859 landed together; the consolidated lstatIfExists helper is always bigint and takes one argument, so tsgo failed on main.

Co-authored-by: steipete <[email protected]>
…ssion Details

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: e8a8a5fe-8ce5-434d-8807-90475a1a4836
obviyus added a commit that referenced this pull request Nov 22, 2026
## Problem

Open a brand-new main chat (no messages yet, for example right after onboarding sets a model). Session Details shows a red "Session process access changed; refresh the conversation." with Retry until the first reply arrives. The Gateway log shows three refused reads for the same chat:

- `sessions.processes.list` → `FORBIDDEN` "Session process access changed; refresh the conversation."
- `mcp.app.discover` → `FORBIDDEN` "The requested session is unavailable; open an existing session first."
- `talk.catalog` → `INVALID_REQUEST` "No session found: agent:main:main"

A config hot reload is not needed: a fresh profile with a model already configured shows the same three refusals.

![Before: new chat shows the process access alert](https://github.com/user-attachments/assets/da479b13-8826-428d-b009-f85f9c914719)

## Root cause

The agent's main conversation has no session row until its first turn creates it. The chat still starts session-scoped reads for it on open:

- Session Details reads processes as soon as it renders (`ui/src/pages/chat/chat-pane-layout-render.ts:293`, process Details since #175041). The Gateway has no row to bind the list to and answers with the access-changed error (`src/gateway/server-methods/session-processes.ts:69-79`, since #164061).
- The composer mounts MCP discovery for the chat. The composer already has a `sessionAdmitted` gate for provisional sessions (`chat-composer-view.tsx:414`, #166865), but the chat pane never set it. Discovery needs a session authority, which needs a row (`src/gateway/session-access-authority.ts:246`).
- The composer reads the session-scoped Talk catalog. The catalog only uses the key to pick the agent, but `talk.catalog` refused the missing row (`src/gateway/talk/handlers/catalog.ts:536`). Subscriptions already admit the caller's own unstarted main conversation (`isStartableMainSession`, #197151).

v2026.11.6 has the same chat pane and process code.

## Fix

Each reader is fixed at the owner of the fact it depends on:

| Read | Depends on | Owner and fix |
|---|---|---|
| `sessions.processes.list` | the row's `sessionId` | Control UI: Details stops offering process reads once the chat's history read proved the session absent (`isChatSessionProvenAbsent`, #197151). A cold load of an existing chat keeps its Details layout while rows load. |
| `mcp.app.discover` | a session authority built from the row | Control UI: the chat pane sets the composer's existing `sessionAdmitted` gate from the selected row, so composer extensions mount once it exists |
| `talk.catalog` | only the agent named by the key | Gateway: answers the caller's own unstarted main conversation from its agent (same `isStartableMainSession` rule as subscriptions); other missing or hidden keys still get "No session found" |

Holding `talk.catalog` in the UI instead would keep dictation unavailable for the first message, and the protocol has no agent-only form of the request.

Same PR, first send (two causes, both at their owner):

- **Diff baseline (session creation owner).** The first turn captures the session diff baseline (`sessionDiffBaseline`, the files that existed before the session) about half a second after `chat.send` creates the row. A diff read in that window either showed pre-existing workspace files as session changes or was refused with "Session workspace changed during file access" when the baseline landed. A new operator conversation now records the pending baseline claim (`sessionDiffBaselineCapture`) with its row, as `sessions.create` already does (`buildNewSessionCreationFields` in `src/config/sessions/session-diff-baseline-capture.ts`), and the diff answers "no changes" while the claim is pending (`src/gateway/server-methods/sessions-diff.ts`). The first turn's existing capture settles the claim.
- **Skill-library selection (workspace owner).** The first turn writes an empty selection (`librarySelections: []`) into a row that had none, and the session file workspace compared `undefined` with `[]` strictly. The sandbox owner already treats both as "no selection" (`librarySelections?.length`); the workspace check now does too.

The existing access-change refusals (replaced row, revoked sharing) are unchanged.

## Impact

- A new chat opens without an error. Processes and MCP controls appear after the first turn, which is when they can have content. The first message can be dictated.
- No protocol or schema change.

![After: new chat opens without the alert](https://github.com/user-attachments/assets/fccbce31-4a42-4e73-a9b5-4f8d0adb2460)

## Evidence

- Real-Gateway Control UI e2e `ui/src/e2e/chat-new-session-readers.real-gateway.e2e.test.ts`: opens `agent:main:main` before its first turn at 1600x900, sends the first message, checks that no non-retryable Gateway read failed and that process, MCP and diff reads succeed after the row exists. Red on the merge base (the three refusals above), green on this branch.
- `src/gateway/talk/handlers/catalog.test.ts` "answers the caller's unstarted main conversation from its agent": red on the merge base, green here. A missing non-main key and a caller who cannot start the conversation still get "No session found".
- `src/gateway/server-methods/sessions-diff-reset.test.ts` "shows no changes for a new operator conversation before its first turn captures the baseline": creates the row through the real reply session init, then reads the diff of a repo with a pre-existing file. Red on the merge base (the pre-existing file is listed as a session change), green here.
- `src/gateway/server-methods/session-file-live-read.test.ts` "keeps a diff read across the first turn recording no library skills": red on the merge base, green here; a real selection change still invalidates.
- Isolated Gateway with a real provider, fresh agent main chat, Control UI at 1600x900: base shows the alert and logs the three refusals; this branch shows no alert and no refusal, and the first reply arrives.
- Existing consumers: `chat-pane-side-panels.test.ts`, `chat-details-reload.e2e.test.ts`, `test/vitest-ui-e2e-config.test.ts` green. `chat-pane-state-snapshot.e2e.test.ts` was red on `main` and is fixed separately in #203246.
- `pnpm tsgo:ui`, `pnpm check:test-types`, `pnpm check:changed` (the dead-export scan reports two exports in files this PR does not touch; same on `main`).

Isolated Gateway first-send log (fresh agent, real provider, head rebased on #203283): from opening the brand-new chat through the first reply, no FORBIDDEN, UNAVAILABLE or INVALID_REQUEST line. The `talk.catalog` first-read "warming" answer is fixed at its owner in #203283.

## Merge danger

Two-way door: a revert fully restores the previous behavior. No stored state, config or published contract changes. Blast radius: Control UI chats, `talk.catalog` callers for an unstarted main conversation, new operator session rows (pending diff-baseline claim), and session file/diff reads across the first turn.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 22, 2026
…w#203126)

## Problem

Open a brand-new main chat (no messages yet, for example right after onboarding sets a model). Session Details shows a red "Session process access changed; refresh the conversation." with Retry until the first reply arrives. The Gateway log shows three refused reads for the same chat:

- `sessions.processes.list` → `FORBIDDEN` "Session process access changed; refresh the conversation."
- `mcp.app.discover` → `FORBIDDEN` "The requested session is unavailable; open an existing session first."
- `talk.catalog` → `INVALID_REQUEST` "No session found: agent:main:main"

A config hot reload is not needed: a fresh profile with a model already configured shows the same three refusals.

![Before: new chat shows the process access alert](https://github.com/user-attachments/assets/da479b13-8826-428d-b009-f85f9c914719)

## Root cause

The agent's main conversation has no session row until its first turn creates it. The chat still starts session-scoped reads for it on open:

- Session Details reads processes as soon as it renders (`ui/src/pages/chat/chat-pane-layout-render.ts:293`, process Details since openclaw#175041). The Gateway has no row to bind the list to and answers with the access-changed error (`src/gateway/server-methods/session-processes.ts:69-79`, since openclaw#164061).
- The composer mounts MCP discovery for the chat. The composer already has a `sessionAdmitted` gate for provisional sessions (`chat-composer-view.tsx:414`, openclaw#166865), but the chat pane never set it. Discovery needs a session authority, which needs a row (`src/gateway/session-access-authority.ts:246`).
- The composer reads the session-scoped Talk catalog. The catalog only uses the key to pick the agent, but `talk.catalog` refused the missing row (`src/gateway/talk/handlers/catalog.ts:536`). Subscriptions already admit the caller's own unstarted main conversation (`isStartableMainSession`, openclaw#197151).

v2026.11.6 has the same chat pane and process code.

## Fix

Each reader is fixed at the owner of the fact it depends on:

| Read | Depends on | Owner and fix |
|---|---|---|
| `sessions.processes.list` | the row's `sessionId` | Control UI: Details stops offering process reads once the chat's history read proved the session absent (`isChatSessionProvenAbsent`, openclaw#197151). A cold load of an existing chat keeps its Details layout while rows load. |
| `mcp.app.discover` | a session authority built from the row | Control UI: the chat pane sets the composer's existing `sessionAdmitted` gate from the selected row, so composer extensions mount once it exists |
| `talk.catalog` | only the agent named by the key | Gateway: answers the caller's own unstarted main conversation from its agent (same `isStartableMainSession` rule as subscriptions); other missing or hidden keys still get "No session found" |

Holding `talk.catalog` in the UI instead would keep dictation unavailable for the first message, and the protocol has no agent-only form of the request.

Same PR, first send (two causes, both at their owner):

- **Diff baseline (session creation owner).** The first turn captures the session diff baseline (`sessionDiffBaseline`, the files that existed before the session) about half a second after `chat.send` creates the row. A diff read in that window either showed pre-existing workspace files as session changes or was refused with "Session workspace changed during file access" when the baseline landed. A new operator conversation now records the pending baseline claim (`sessionDiffBaselineCapture`) with its row, as `sessions.create` already does (`buildNewSessionCreationFields` in `src/config/sessions/session-diff-baseline-capture.ts`), and the diff answers "no changes" while the claim is pending (`src/gateway/server-methods/sessions-diff.ts`). The first turn's existing capture settles the claim.
- **Skill-library selection (workspace owner).** The first turn writes an empty selection (`librarySelections: []`) into a row that had none, and the session file workspace compared `undefined` with `[]` strictly. The sandbox owner already treats both as "no selection" (`librarySelections?.length`); the workspace check now does too.

The existing access-change refusals (replaced row, revoked sharing) are unchanged.

## Impact

- A new chat opens without an error. Processes and MCP controls appear after the first turn, which is when they can have content. The first message can be dictated.
- No protocol or schema change.

![After: new chat opens without the alert](https://github.com/user-attachments/assets/fccbce31-4a42-4e73-a9b5-4f8d0adb2460)

## Evidence

- Real-Gateway Control UI e2e `ui/src/e2e/chat-new-session-readers.real-gateway.e2e.test.ts`: opens `agent:main:main` before its first turn at 1600x900, sends the first message, checks that no non-retryable Gateway read failed and that process, MCP and diff reads succeed after the row exists. Red on the merge base (the three refusals above), green on this branch.
- `src/gateway/talk/handlers/catalog.test.ts` "answers the caller's unstarted main conversation from its agent": red on the merge base, green here. A missing non-main key and a caller who cannot start the conversation still get "No session found".
- `src/gateway/server-methods/sessions-diff-reset.test.ts` "shows no changes for a new operator conversation before its first turn captures the baseline": creates the row through the real reply session init, then reads the diff of a repo with a pre-existing file. Red on the merge base (the pre-existing file is listed as a session change), green here.
- `src/gateway/server-methods/session-file-live-read.test.ts` "keeps a diff read across the first turn recording no library skills": red on the merge base, green here; a real selection change still invalidates.
- Isolated Gateway with a real provider, fresh agent main chat, Control UI at 1600x900: base shows the alert and logs the three refusals; this branch shows no alert and no refusal, and the first reply arrives.
- Existing consumers: `chat-pane-side-panels.test.ts`, `chat-details-reload.e2e.test.ts`, `test/vitest-ui-e2e-config.test.ts` green. `chat-pane-state-snapshot.e2e.test.ts` was red on `main` and is fixed separately in openclaw#203246.
- `pnpm tsgo:ui`, `pnpm check:test-types`, `pnpm check:changed` (the dead-export scan reports two exports in files this PR does not touch; same on `main`).

Isolated Gateway first-send log (fresh agent, real provider, head rebased on openclaw#203283): from opening the brand-new chat through the first reply, no FORBIDDEN, UNAVAILABLE or INVALID_REQUEST line. The `talk.catalog` first-read "warming" answer is fixed at its owner in openclaw#203283.

## Merge danger

Two-way door: a revert fully restores the previous behavior. No stored state, config or published contract changes. Blast radius: Control UI chats, `talk.catalog` callers for an unstarted main conversation, new operator session rows (pending diff-baseline claim), and session file/diff reads across the first turn.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant