Skip to content

fix(ui): keep subagent details in the background tasks panel - #113671

Merged
steipete merged 1 commit into
mainfrom
steipete/sub-agent-task-panel-ux-365c30
Jul 25, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/sub-agent-task-panel-ux-365c30

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where selecting a running subagent in Chat's Background tasks rail could show Could not load task details in the mock/live-development path and encouraged opening the child session as the pane's main conversation, even though subagents are session-owned background work rather than human-facing chat threads.

AI-assisted implementation and review.

Why This Change Was Made

Task selection now replaces the rail list with a compact in-panel detail view that owns status, timing, current tool activity, prompt, output, cancellation, and back navigation. Subagent transcript navigation is intentionally omitted, while linked-session actions remain available for other task runtimes. The mock Gateway now implements tasks.get, so the development fixture exercises the real detail contract instead of returning an invalid empty response.

The transition also preserves keyboard focus: selection moves focus to Back, Back restores focus to the selected row, and terminal tasks reveal the Finished section before focus restoration. The Back path merges the newest lookup snapshot into the list first so row placement stays correct when tasks.get is newer than task events.

User Impact

Operators can inspect subagent progress without leaving or replacing their main conversation. The compact panel remains live as a task completes, returns to the correctly regrouped list with Back, and no longer exposes a misleading subagent transcript action.

Release-note context: Control UI background-task selection now opens a compact in-panel subagent detail view instead of navigating the main chat pane.

Evidence

Visual flow

Task list before selection:

Background task list

Compact detail after selecting a subagent:

Compact background task detail

Automated proof

  • Blacksmith Testbox tbx_01kycm5n9jzqcqpwqgq4f7ykxb: pnpm tsgo:ui, pnpm tsgo:scripts, pnpm lint:ui:i18n, pnpm lint:scripts, 222 focused UI tests, and 2 background-task browser E2E tests passed. Run
  • Final Blacksmith Testbox tbx_01kycnfq5ad3azyh7xy1ykg6tv: pnpm tsgo:ui, 26 focused task-rail tests, and 2 browser E2E tests passed after the focus/freshness fixes. Run
  • Browser E2E proves subagent selection leaves the chat URL and transcript unchanged, hides View transcript, applies a pushed completion in place, returns to the regrouped list, and sends cancellation without selecting the row.
  • Focused regression coverage proves keyboard focus moves to Back and returns to the selected task even when a newer terminal lookup moves it into a previously collapsed Finished section.

Live behavior validation

A source-blind run against pnpm dev:ui:mock passed the observable list → compact detail → back flow in dark mode. The URL and visible main transcript stayed unchanged, elapsed time advanced, prompt/output/tool activity rendered, no detail error appeared, and browser console plus dev-server error logs were empty.

The broad changed-file classifier was attempted on Testbox but stopped before the UI lanes on an unrelated current-main max-lines ratchet entry for extensions/slack/src/monitor/message-handler/dispatch.ts; the focused affected lanes above were then run directly and passed.

@steipete
steipete marked this pull request as ready for review July 25, 2026 12:58
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts size: L maintainer Maintainer-authored PR labels Jul 25, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for b8a1cdd656d88c9f82e61b23f1177f3047768ea0:

Known proof note: the broad changed-file classifier stopped before affected lanes on an unrelated current-main max-lines ratchet entry for extensions/slack/src/monitor/message-handler/dispatch.ts; the affected UI/script lanes were run directly and passed as listed above.

@steipete
steipete merged commit a2acc8a into main Jul 25, 2026
172 of 177 checks passed
@steipete
steipete deleted the steipete/sub-agent-task-panel-ux-365c30 branch July 25, 2026 13:13
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 docs Improvements or additions to documentation maintainer Maintainer-authored PR scripts Repository scripts size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant