Skip to content

feat(ui): show yield acknowledgments as agent text and list waited-on sessions - #185585

Merged
roboclaw-bot merged 9 commits into
mainfrom
openclaw/yield-ack-session-list
Oct 27, 2026
Merged

roboclaw-bot merged 9 commits into
mainfrom
openclaw/yield-ack-session-list

Conversation

@roboclaw-bot

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

Copy link
Copy Markdown
Collaborator

Related: #164190, #165378, #173938, #162272

What Problem This Solves

A sessions_yield acknowledgment shows in Control UI chat as a centered, muted system notice (other channels deliver it as a normal reply), disappears once the agent resumes, and the waiting line does not say which sessions the agent is waiting on.

User Impact

User impact: the agent's acknowledgment reads as its own message and stays in the conversation after it resumes; while it waits, the line names the child session (or lists several, with status in words and attention first, each linked to its session); a "Resumed · 9m 32s later · 3 sessions" rule marks where it picked up. A message wait with no acknowledgment keeps the "Waiting for a message" notice. No Gateway, protocol or config change.

Known limitation: a child paused by its own sessions_yield (awaiting a continuation) reads Done, because session rows don't carry that paused state; Needs your input comes from the child's own attention status, the same signal the sidebar shows. A paused field is tracked separately.

Why This Change Was Made

The acknowledgment already exists only as the confirmed sessions_yield result, so the yield projection now adds it as assistant text in the run that handed off, instead of a notice that is dropped on resume. Only the public acknowledgment the result echoes is used; the private continuation message stays hidden. Webchat stores no separate assistant copy for agent runs, so nothing renders twice.

The waiting line and resume rule read children from the pane's own access-scoped child query and name nobody until that query is complete (rows seeded from the sidebar can be a partial set). Names link through the shared session route helper; children the pane can't open, or panes without a session opener, show plain text.

This partly undoes #165378. That PR removed the "Handed off"/"Resumed" markers and named only subagents. This change brings back a "Resumed" rule, but only beneath a spoken acknowledgment, inline in that reply, carrying the wait duration and an expandable child list; and it names visible non-subagent child sessions, only once the roster is hydrated. The reason: an acknowledgment is the agent speaking, and once it is kept after resume, the reader needs to see where the wait ended and which sessions did the work. @shakkernerd, since #165378 was your deliberate call, a review of that tradeoff would be appreciated.

Interaction with #162272: that open PR persists the acknowledgment as a separate assistant transcript row. If both land as written, the acknowledgment would show twice; whichever lands second needs to drop the persisted copy or dedupe against it.

The sessions_yield acknowledgment parameter now describes a brief waiting status shown to the user and asks for answers in normal assistant text (prompt snapshots regenerated).

Contributor credit: @jalehman requested and approved this design.

Work sessions

Evidence

Real Control UI production build with a mocked Gateway and synthetic content, light theme, 1280 wide.

Short acknowledgment, one child waiting

Before:
Before: acknowledgment as a centered notice, generic working line

After:
After: acknowledgment as assistant text, waiting line names the child session

Long acknowledgment, three children waiting (one needs input, one done)

Before:
Before: long acknowledgment as a centered notice

After:
After: acknowledgment as assistant text with a list of three waited-on sessions and their status

Resumed (list expanded)

Before:
Before: acknowledgment gone after resume

After:
After: acknowledgment kept, Resumed rule with the expanded session list, then the answer

  • New ui/src/e2e/chat-yield-acknowledgment.e2e.test.ts (3 scenarios) fails on main and passes here; it also clicks a listed child and asserts navigation to its session.
  • Focused UI unit tests: 217 passed (yield projection; subagent wait incl. partial-roster, link-target/fallback, restarted-child membership and attention/name invalidation cases; pane run status; cursor policy; thread grouping, agent-run grouping, handoff, transcript index). Updated e2e: chat-empty-assistant, chat-subagent-waiting pass.
  • tsgo:ui, tsgo:test:ui, tsgo:core, oxlint, stylelint, oxfmt, check:control-ui-controllers, ui:i18n:verify, prompt:snapshots:check, sessions-yield-tool tests, git diff --check pass. AutoReview (P1) scoped-clean on each commit.
  • Handoff styles live in the existing chat working-indicator sheet (chat boot stays at 3 CSS requests) and add +194 B gzip / +1,010 B raw to total CSS. control-ui-performance passes on this head without a budget change: run 40467006497 measures 307,160 B gzip / 1,591,165 B raw against the 307,769 B / 1,597,581 B ceilings, because main has since reduced total CSS.

Worked on by

roboclaw-bot and others added 5 commits October 27, 2026 06:01
A sessions_yield acknowledgment is the agent speaking, but webchat showed it
as a centered runtime notice and dropped it once the run resumed. It now
renders as assistant text in the run that handed off and stays after resume.
A message wait without an acknowledgment keeps the "Waiting for a message"
notice.

While a handoff waits on child sessions, the working line names them: one
child reads "Waiting on <name> · <elapsed>"; several get a disclosure with
each child's status in words, attention first. After resume, a "Resumed ·
<duration> later · N sessions" rule under the acknowledgment expands to the
same list. "Needs your input" is the child's existing agent attention status;
no Gateway fields were added.

The sessions_yield acknowledgment description now asks for a brief waiting
status and keeps answers in normal assistant text.

Co-authored-by: jalehman <[email protected]>
Child names on a handoff's waiting line, its session list, and the Resumed
list are now links to each child's session, built with the shared
sessionNavigationTarget route owner. Plain clicks open the session in place
through the pane's session opener; Cmd/Ctrl/middle-click keep native link
behavior for a new tab. Children missing from the pane's access-scoped child
rows, or panes that cannot open sessions, show the name as plain text.

The single-child name previously opened the Subagents panel; it now opens the
child session. The panel stays reachable from the running count and the layout
menu. Both session lists share one width so status chips align.

Co-authored-by: jalehman <[email protected]>
The Resumed rule now waits, like the waiting line, until the pane's own child
query has answered with no covering read outstanding. Rows seeded from the
sidebar can be a partial set, so naming or linking one could point at the
wrong session; until then the rule shows the wait time alone. The roster
render key now changes on the partial-to-complete transition so settled rows
pick up the list.

Co-authored-by: jalehman <[email protected]>
… sessions

Worked on by:
- @jalehman

Co-authored-by: jalehman <[email protected]>
OpenClaw-Publication: 3327ebbe-0d27-44ac-8a07-15c3df193f7a
@clawsweeper

clawsweeper Bot commented Oct 27, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui agents Agent runtime and tooling size: XL labels Oct 27, 2026
roboclaw-bot and others added 2 commits October 27, 2026 06:45
…/yield-ack-session-list

# Conflicts:
#	test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md.diff
#	test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md
Worked on by:
- @jalehman

Co-authored-by: jalehman <[email protected]>
OpenClaw-Publication: fa8c61d0-5810-46d7-a77f-21f629a4ab7d
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 27, 2026 06:48
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR retains yield acknowledgments as assistant messages and adds linked child-session lists while waiting and after resuming.

Example: An agent delegates dependency updates to three child sessions.

  • Before: The acknowledgment appears as a muted notice and disappears after resuming.
  • After: The acknowledgment remains as assistant text, with named sessions and a collapsible Resumed rule.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, visually demonstrated, and free of blocking findings after the earlier repairs; one key-only test provides weaker regression protection than its name suggests.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected production-Control-UI screenshots with a mocked Gateway show public acknowledgments as assistant text and linked, attention-first child lists; the supplied browser scenarios also cover resumed retention, disclosure, and child navigation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Waiting acknowledgments disappear after resuming, and generic wait indicators obscure which child sessions are involved.
Reason: Collaborator authorship supplies the direction decision, the presentation tradeoff is explained, and paused-child semantics are explicitly deferred to separate work.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it delivers an approved chat presentation improvement that current main lacks, and the five earlier findings are resolved without a new blocking defect.

Priority: P2
Reviewed head: b287482182201cb9c6a02faab24e3a81fd6543b1

Before merge

None.

Findings

None.

Tests

  • Low-value test ui/src/pages/chat/chat-subagent-wait.test.ts: The test named “re-renders resumed lists” checks only rowsKey inequality; replace it with an attention-only and name-only update through the transcript renderer to protect the visible behavior.
Agent review details

How this fits together

The Control UI projects confirmed yield results and access-scoped child-session rows into chat messages, waiting indicators, and links through the existing session-navigation owner.

flowchart TD
A[Confirmed yield result] --> B[Transcript projection]
C[Access scoped child roster] --> D[Handoff session projection]
B --> E[Assistant acknowledgment]
D --> F[Waiting and resumed lists]
E --> F
F --> G[Existing session navigation]
Loading

Technical review

Best possible solution:

Retain the existing transcript, child-roster, and navigation owners while coordinating deduplication if the separate persistence PR lands.

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

Current-main source establishes the temporary-notice behavior, and inspected before/after screenshots demonstrate the changed waiting presentation; no target code was executed during this review.

Is this the best way to solve the issue?

The change uses the existing yield projection and scoped roster rather than adding persisted state or another lifecycle owner, and its shared list component serves both waiting and resumed views.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Yield acknowledgment presentation changes intended behavior with a stated reason (fdc6aa4: Show confirmed public waiting acknowledgments while avoiding empty assistant rows and keeping private continuation context hidden.)
  • Resume markers and named child sessions changes intended behavior with a stated reason (59fc07d: Remove internal handoff markers and retain a continuous answer with an in-place subagent wait.)
  • Child-name navigation changes intended behavior with a stated reason (bf43db3: Open child work in the Subagents panel beside the parent conversation.)
  • Settled transcript memoization keeps the original intent (eb03e87: Retain prepared transcript rows and invalidate only consumers of changed presentation facts.)
  • Duplicate subagent status removal changes intended behavior with a stated reason (d18177d: Keep child details and compact counts without repeated transcript status surfaces.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +566, Tests +632, Docs +15. Total +1213 across 22 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 12 650 84 +566
Tests 9 715 83 +632
Docs 1 36 21 +15
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 22 1401 188 +1213

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This improves acknowledgment continuity and delegated-work visibility within Control UI chat.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Replace the key-only invalidation test with a resumed transcript renderer test that changes only a child's name or attention.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-27T07:02:56.272Z sha 7f91210 :: needs changes before merge. :: [P2] Invalidate resumed lists when displayed child facts change | [P2] Exclude later child runs from historical handoff lists | [P2] Update the affected pane tests for named waits | [P2] Qualify the pointer selector as an anchor | [P2] Keep handoff styles within the existing chat CSS budgets

Reviewed October 27, 2026, 9:02 AM ET / 13:02 UTC (Revision 2).

roboclaw-bot and others added 2 commits October 27, 2026 07:24
- Move handoff list styles into the chat working-indicator sheet and reuse
  existing status/chevron classes, so chat boot keeps three CSS requests.
  Status dots are gone; status stays in words.
- Drop the class-only cursor rule; the names are anchors already.
- Update the pane run-status tests for named handoff waits.
- List a resumed handoff's children by their current run start, so a child
  restarted after the resume is not credited with the handoff.
- Re-render resumed lists when a listed child's name or attention changes.

Co-authored-by: jalehman <[email protected]>
Worked on by:
- @jalehman

Co-authored-by: jalehman <[email protected]>
OpenClaw-Publication: be3691d4-6f16-4d3b-9273-8161b8bb86b3
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 27, 2026
@clawsweeper clawsweeper Bot removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 27, 2026
@roboclaw-bot
roboclaw-bot merged commit 0ab9fc0 into main Oct 27, 2026
150 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/yield-ack-session-list branch October 27, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation 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: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant