Skip to content

fix(ui): keep earlier runs' replies visible after subagent completions - #172571

Merged
roboclaw-bot merged 4 commits into
openclaw:mainfrom
holgergruenhagen:fix/control-ui-hidden-announce-replies
Oct 31, 2026
Merged

roboclaw-bot merged 4 commits into
openclaw:mainfrom
holgergruenhagen:fix/control-ui-hidden-announce-replies

Conversation

@holgergruenhagen

@holgergruenhagen holgergruenhagen commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: in a completed dashboard turn, the Control UI shows only the last assistant reply when the agent answered several subagent completions in a row without new user input. Every earlier reply, including the reply that ended the user's own run, is folded into the collapsed Worked disclosure, so users miss results and questions unless they expand it.

Example from a real claude-cli dashboard session on 2026.10.3: one user message, then six assistant replies from six runs (the user's run, four announce:v1:… completion runs and one announce:requester-settle:… run). After the turn completed, only the sixth reply was visible below "Worked for 7 seconds".

User Impact

Each run keeps its last visible reply below the completed-work disclosure. The Worked disclosure stays in the frame of the run that did the work; work spanning several runs stays above the replies outside any frame, as on main. Tool activity, commentary within a run and reasoning still collapse as before. A run that ended in failure (stopReason: "error", interrupted) stays folded behind the later answer that recovers it, as today. Source cards of a cited reply keep rendering when that run's web results sit in a rollup above an earlier run's reply.

Why This Change Was Made

collapseCompletedTurnWork (ui/src/pages/chat/chat-turn-presentation.ts; it lived in chat-thread-grouping.ts when this PR was opened) picks one terminal reply per user turn (turn.findLast(isFinalReplyGroup)) and folds every other unphased assistant text group into work (isCollapsibleWorkGroup keeps only explicit final_answer phases). Runtimes without reply phases (for example claude-cli, and the embedded openai-completions path in the repro below) therefore lose every reply except the last one once several runs share a user turn. Subagent completion announces and settle batches are such runs: they are not preceded by a user message in the transcript.

The comment above isFinalReplyGroup already describes a last-visible-reply policy for unphased providers. This change applies that policy per run: for every earlier run in the answer segment, its last reply group stays an answer. It reuses isFinalReplyGroup and groupEndsRunInFailure; no new state, settings or data contracts.

Claude CLI follow-up (review note: some Claude rows have no id and split the agent's turn): rows imported from the Claude CLI (importedFrom: claude-cli: tool calls, tool results, interim text, the interim end_turn) carry no runId or idempotencyKey; only the reply the Gateway persists per run has one. A single Claude run is not split by the per-run policy (groups without runId are skipped). The split happened one level up: once replies of several runs stay visible, the Worked rollup got no replyRunId, and coalesceAgentRunFrames could not frame its untagged rows, so the turn broke into a frameless Worked row and separate replies. Untagged work rows now take the run of the next row with a run id (the persisted reply they precede). When all work belongs to the first visible reply's run, the rollup gets that replyRunId; work owned by no visible reply is marked ownerless, so execution ids cannot frame it either. Its duration follows the same owner, and preview anchors that point to a reply inside a run frame are resolved against that frame row (projectTranscriptRows).

Source cards follow the same split: chat-agent-run-frame.tsx hands only its own frame's groups to extractChatSourcePreviews, so a later run's web results inside an ownerless rollup would no longer reach its cited reply. coalesceAgentRunFrames now passes that run's groups from the preceding ownerless rollup as detachedGroups (reset at the next user turn), and the frame reads them before its own groups. Rendering does not change.

Relation to #183267 and #188045 : 183267 (merged 2026-10-28) kept all completed narration visible, which also showed earlier runs' replies. 188045 (merged 2026-10-30) restored the single Worked for X rollup per completed turn, so the multi-run case is folded again on current main. This PR keeps that single-rollup design and only exempts the last reply of each earlier run.

Related, different scope: #140835 keeps all text-bearing pre-final groups visible (also commentary within one run). This PR changes only replies of separate runs.

Evidence

Update 2026-10-31: rebased onto main 1df551011c8 after 188045, source-card follow-up

Head 56f1c0615ee: the three commits rebased onto main 1df551011c8 (after #188045 restored the single completed-turn rollup; the only conflicts were the adjacent failure condition in collapseCompletedTurnWork and appended tests), plus one follow-up commit from a local Codex review of the rebased head:

  • fix(ui): keep later runs' source cards when an earlier run's reply stays visible

Live run: isolated test Gateway built from main 1df551011c8 (2026.10.9), real Control UI (Chromium/Playwright), Control UI served from main or from this head through gateway.controlUi.root. Fresh claude-cli session (Claude Sonnet 5.5): the parent spawns two subagents and answers; each completion run writes CHECKING, calls sessions_list, then replies RESULT …. The page stays open during all runs, then the session is reloaded. Stored sessions from 2026-10-23 were opened again after reload. Visible replies of the completed turn, Worked not expanded:

Session main 1df551011c8 this PR
claude-cli, fresh, page open during the runs (end state, 150 s) RESULT BETA-DONE only, 1 assistant group SPAWNED-BOTH, RESULT ALPHA-DONE, RESULT BETA-DONE, 3 assistant groups
same session after reload RESULT BETA-DONE only same three replies
claude-cli, stored: completion replies without tools RESULT BETA-DONE only SPAWNED-BOTH, RESULT ALPHA-DONE, RESULT BETA-DONE
claude-cli, stored: completion replies with a tool each last reply only all three replies
claude-cli, stored: one run, interim text, two tools FINAL-A, one Worked row identical
embedded (mock), stored: two subagents last ANNOUNCE-REPLY … only SPAWNED, both ANNOUNCE-REPLY …

main 1df551011c8 (live, end state) / this PR (after reload), Worked not expanded:

main: only RESULT BETA-DONE visible this PR: SPAWNED-BOTH, RESULT ALPHA-DONE and RESULT BETA-DONE visible

Tests:

  • New render case in chat-transcript-work-summary.test.ts: an earlier run's reply stays visible, the later run's web_search result sits in the rollup, and its cited reply still shows a source card. Fails without the follow-up commit; fails on main as well (the earlier reply is folded there).
  • All new cases from the earlier commits fail on main 1df551011c8 (8 of 74 tests in the three touched test files) and pass on this head.
  • Every test file that uses collapseCompletedTurnWork, coalesceAgentRunFrames, projectTranscriptRows, AgentRunFrame, extractChatSourcePreviews or the transcript harness: 14 files, 360 tests passed (44 s wall time, VPS, --maxWorkers=1).
  • Full ui/src/pages/chat: 629 node/jsdom files, 7506 tests passed, 84 skipped (Mac mini, 268 s); the 62 browser files ran on the VPS (Chromium for the browser project was missing on the Mac): 62 files, 550 tests passed (130 s).
  • oxfmt --check, oxlint --type-aware (one existing warning in chat-agent-run-frame.tsx line 144, unchanged), pnpm tsgo:ui, test-file type check, pnpm check:control-ui-controllers: clean. Local Codex review of the final head: no findings.

Update 2026-10-25: rebased onto main b22db9cddd2, Claude CLI follow-up

Head cb39cfc3b9b: the original change rebased onto current main (collapseCompletedTurnWork moved to chat-turn-presentation.ts in #180724 ; the per-run logic ports unchanged), plus two follow-up commits:

  • fix(ui): keep Claude CLI work inside its run frame when earlier replies stay visible
  • fix(ui): keep collapsed work previews visible when completed work spans run frames (from a local Codex review of the first follow-up)

Live run: isolated test Gateway built from main b22db9cddd2, real Control UI (Chromium/Playwright), Control UI served from main or from this head through gateway.controlUi.root, against the same real sessions (claude-cli on Claude Sonnet 5.5; embedded agent on a scripted OpenAI-compatible mock). Visible replies of the completed turn, Worked not expanded:

Session main b22db9cddd2 this PR cb39cfc3b9b
claude-cli: two subagents, completion replies without tools RESULT BETA-DONE only SPAWNED-BOTH, RESULT ALPHA-DONE, RESULT BETA-DONE; Worked in the frame of SPAWNED-BOTH
claude-cli: each completion reply writes CHECKING, calls a tool, then replies last reply only all three replies; Worked (work of three runs) above them, outside the frames
claude-cli: one run with interim text, two tools, final reply one frame same
embedded (mock): two subagents ANNOUNCE-REPLY PROBE-B-DONE 7001 only SPAWNED, both ANNOUNCE-REPLY …

Current main no longer starts the requester-settle run when every child result was already delivered on its own, so these sessions have no ALL-SETTLED reply.

Screenshots from the 2026-10-23 recheck on main 9e4a9ce9502 (same code in the changed files; collapsed state): main / original change only (rollup split out of the run frame) / with the Claude follow-up. Current head labels this rollup "Worked" without a duration, see the gap below.

main: only the last reply visible original change only: Worked rollup outside the run frame with the follow-up: Worked rollup in the first run frame

Tests (VPS, node scripts/run-vitest.mjs):

  • chat-thread-grouping.test.ts: per-run replies, three framing cases (untagged CLI work of the first run, untagged and tagged work across runs) and duration ownership. chat-transcript-message-index.test.ts: collapsed browser preview anchored to an earlier run's reply, with work in both runs and only in the later run. chat-transcript-work-summary.test.ts: rendered transcript. All new cases fail on main; the framing, duration and preview cases also fail with only the first commit.
  • Every test file that uses collapseCompletedTurnWork, coalesceAgentRunFrames or projectTranscriptRows, on this head: 18 files, 413 tests passed.
  • oxfmt --check, oxlint --type-aware, pnpm tsgo:ui, pnpm check:control-ui-controllers: clean. Local Codex review of the final head: no findings.
  • check-control-ui-performance reports startup JS gzip above its limit already on main b22db9cddd2 in this VPS build (271146 B, limit 270947 B); this head measures 271015 B with identical raw startup bytes (838411 B), so the change is not in the startup bundle.

Original evidence (2026-10-14, head 3e84ae53cde)

Isolated test Gateway (loopback, token auth, own state dir), two agents: claude-cli (Claude Sonnet 5.5) and an embedded agent on a scripted OpenAI-compatible mock. Each parent spawns two subagents without waiting; the parent answers each completion and the settle batch. Then the session is opened in the real Control UI (Chromium, Playwright) and visible texts are counted before and after expanding Worked.

Build Agent Visible without expanding After expanding
2026.10.3 (59cb447) claude-cli ALL-SETTLED only SPAWNED-BOTH, RESULT ALPHA-DONE, RESULT BETA-DONE, ALL-SETTLED
2026.10.3 (59cb447) embedded (mock) STEPS-DONE 0 only SPAWNED, 2 × ANNOUNCE-REPLY …, STEPS-DONE 0
main 0dd95c4d4f5 claude-cli ALL-SETTLED only all four
main + this PR 3e84ae53cde claude-cli SPAWNED-BOTH, RESULT ALPHA-DONE, RESULT BETA-DONE, ALL-SETTLED same
main 0dd95c4d4f5 embedded (mock) STEPS-DONE 0 only all four
main + this PR 3e84ae53cde embedded (mock) SPAWNED, 2 × ANNOUNCE-REPLY …, STEPS-DONE 0 same

The main rows use one Gateway build of this branch; the base rows serve the Control UI built from origin/main through gateway.controlUi.root against the same sessions.

Screenshots (completed turn, Worked not expanded):

claude-cli, origin/main 0dd95c4d4f5 (only ALL-SETTLED visible) / with this PR (all four run replies visible):

claude-cli on main: only the last reply visible claude-cli with this PR: all four run replies visible

embedded (mock), origin/main 0dd95c4d4f5 (only STEPS-DONE 0 visible) / with this PR (all four run replies visible):

embedded mock on main: only the last reply visible embedded mock with this PR: all four run replies visible

Tests (VPS, node scripts/run-vitest.mjs):

  • New grouping case in chat-thread.test.ts and a rendered-transcript case in chat-transcript-work-summary.test.ts (collapsed Worked row, all four run replies in the DOM, commentary not). Both fail on origin/main and pass with the change.
  • ui/src/pages/chat: 538 of 539 files passed on the first full run; the one failure (chat-transcript-message-index.test.ts, recovered failure case) led to excluding failed runs, and that file now passes. Final full run on head 3e84ae53cde before opening this PR: 539 of 539 files passed, 6616 tests passed, 3 skipped (Vitest duration 780 s, wall time 13 min 37 s).
  • oxfmt --check and oxlint --type-aware on the changed files: clean.

Gap: the session reports the runtime of its last run only, so a rollup that spans several runs, or that belongs to an earlier run, is untimed ("Worked") instead of showing the last run's duration.

@clawsweeper

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

@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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 14, 2026
@clawsweeper

clawsweeper Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Preserves each successful run’s last reply when several runs share one completed dashboard turn, including its frame and associated previews.

Example: A parent replies SPAWNED-BOTH, then two completion runs reply RESULT ALPHA-DONE and RESULT BETA-DONE.

  • Before: Only RESULT BETA-DONE remains visible below the collapsed Worked disclosure.
  • After: All three replies remain visible without expanding Worked.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, useful repair with inspected shipped-entry-point proof, meaningful regression coverage, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The reviewed head’s completed-turn projection is exercised through the real Control UI against an isolated Gateway and real claude-cli sessions. Inspected before/after screenshots show the three run replies preserved with Worked collapsed; the body records live completion, reload, and stored-session checks. Regression tests support the frame, timing, browser-preview, and source-card consumers.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Earlier completed replies disappear into Worked when subagent completion runs answer without another user message.
Reason: The change restores useful answers within the existing run-owned response contract while retaining collapsed commentary and the single-rollup design.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current, demonstrated reply-visibility bug while preserving the single Worked disclosure; no actionable correctness or security findings remain.

Priority: P2
Reviewed head: 56f1c0615ee06019d38f2f4ebb567fcc3314a1b9

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI projects Gateway transcript messages into completed-work disclosures, run frames, and virtualized rows; this change adjusts presentation without rewriting stored history.

flowchart TD
  A[Gateway transcript messages] --> B[Message grouping]
  B --> C[Completed work projection]
  C --> D[Agent run frames]
  D --> E[Transcript rows and previews]
  E --> F[Control UI conversation]
Loading

Technical review

Best possible solution:

Land the focused per-run reply preservation with the existing rollup, framing, preview, and source-card owners.

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

Current-main source explains the folding mechanism, and the contributor’s inspected Control UI screenshots demonstrate the same multi-run failure and corrected output; this read-only review did not execute a reproduction.

Is this the best way to solve the issue?

The patch repairs the existing completed-turn owner and carries the resulting ownership through its consumers; each production hunk serves the visibility invariant without introducing another renderer, persistent state, or configuration surface.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Verified introduced change: The pinned introduction diff changes the existing presentation, framing, preview projection, and their regression suites without adding another implementation. (ui/src/pages/chat/chat-turn-presentation.ts:300, 56f1c0615ee0)
  • Current main still folds earlier unphased replies: Current main selects one terminal reply per user turn and collapses other eligible assistant groups; it lacks the PR’s per-run preservation. (ui/src/pages/chat/chat-turn-presentation.ts:228, 3269c552c0b2)
  • Inspected real Control UI proof: Read the complete PR body and inspected prepared screenshots plus the latest linked before/after images. The isolated Gateway and Chromium scenario shows only RESULT BETA-DONE on main and all three replies on the reviewed head; the contributor also records live completion and reload checks. (56f1c0615ee0)
  • Maintainer discussion and additional report: The assigned reviewer, vyctorbrzezowski, previously found no actionable issue in the original per-run change. DonHouk supplied an additional cron-trigger report; current automation-result boundary handling separately protects that case. (ui/src/pages/chat/chat-turn-boundary.ts:61, 56f1c0615ee0)
  • Intent of the restored rollup: fix(ui): completed turns scatter work across many Worked disclosures #188045 restored one completed-work disclosure rather than per-envelope narration. This PR retains that design and narrowly preserves replies from distinct runs. (ui/src/pages/chat/chat-turn-presentation.ts:351, a967fa74c6a7)
  • Current-head merge and check state: GitHub confirms the reviewed head is non-draft and cleanly mergeable. Its check results contain no failures; PR context and evidence was cancelled, so that check is not claimed as passing. (56f1c0615ee0)

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 2a87667 adds ui/src/pages/chat/chat-agent-run-grouping.ts:44 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2a87667bb256; files: ui/src/pages/chat/chat-agent-run-grouping.ts)
  • Peter Steinberger: Raw commit f421a5e adds ui/src/pages/chat/chat-turn-presentation.ts:137 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f421a5e3ade0; files: ui/src/pages/chat/chat-turn-presentation.ts)

PR surface

Source +67, Tests +244. Total +311 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 80 13 +67
Tests 3 245 1 +244
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 325 14 +311

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +80/-13; tests +245/-1 The production growth preserves reply ownership and associated previews through existing projections; tests cover distinct grouping, timing, framing, browser-preview placement, and rendered source-card failures.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Completed dashboard turns hide useful replies behind a disclosure, but the content remains recoverable by expanding Worked.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • 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.

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-14T21:58:00.006Z sha 3e84ae53cde5fe6707282493a849226c957b6725 :: needs maintainer review before merge. :: none

Reviewed October 31, 2026, 2:54 PM ET / 18:54 UTC (Revision 2).

@DonHouk

DonHouk commented Oct 17, 2026

Copy link
Copy Markdown

This PR also fixes a second trigger we hit on 2026.10.4: a scheduled (cron) result posted into the current chat.

On 2026.10.4: a cron job with sessionTarget: "current" commits its result as an openclaw / automation-result assistant row. When that row lands after a completed answer with no user message in between, the earlier answer (a separate run, stopReason: "stop") is folded into Worked above the result. Reloading doesn't change it. We hit it twice in one dashboard session, once with no steering involved.

Checked against this PR (head 3e84ae53): we ran the real chat.history rows from that session (132 rows covering both folds) through buildCachedChatItems → coalesceStreamRuns → collapseCompletedTurnWork. With this PR, both earlier answers stay visible. With only the !earlierRunReplies.has(item) line removed, exactly those two answers fold into Worked, matching what the browser showed.

Suggested regression test (optional, ready to paste): this PR covers the cron case only through a fallback, and its current tests don't exercise it. Automation-result rows have no __openclaw.runId; their run identity comes from readSessionMessageIdentity() falling back to idempotencyKey (cron-current-completion:cron:<jobId>:<ts>). Without that key the row's runId is undefined, the new block is skipped, and the fold returns. The test below goes in the collapseCompletedTurnWork describe block in ui/src/pages/chat/chat-thread.test.ts, next to your new test. It passes on this head and fails with the !earlierRunReplies.has(item) line removed, or without the key.

  it("keeps an earlier run's reply visible when a cron automation result follows it", () => {
    const run = (runId: string) => ({ __openclaw: { runId } });
    const cronKey = "cron-current-completion:cron:job-1:4000";
    const items = collapsedItems({
      messages: [
        userMessage("User request", 1_000),
        { ...toolResult("call-1", 2_000), ...run("run-user") },
        assistantMessage("Reply from the user's run.", 3_000, {
          stopReason: "stop",
          ...run("run-user"),
        }),
        assistantMessage("Scheduled automation result.", 4_000, {
          api: "openclaw-transcript",
          provider: "openclaw",
          model: "automation-result",
          stopReason: "stop",
          idempotencyKey: cronKey,
          openclawAutomation: { kind: "cron", jobId: "job-1", runId: "cron:job-1:4000" },
          __openclaw: { idempotencyKey: cronKey },
        }),
      ],
    });
    const visibleText = items
      .filter((item) => item.kind === "group")
      .map((group) => messageRecord(group).content);
    expect(visibleText).toEqual([
      "User request",
      "Reply from the user's run.",
      "Scheduled automation result.",
    ]);
  });

@vyctorbrzezowski vyctorbrzezowski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed per-run reply preservation, failed-run recovery, streaming and handoff boundaries, persisted run identities, and the added grouping/rendering coverage. No actionable issue was found in the reviewed diff. Current main separately protects cron-result boundaries, but still lacks this preservation of earlier subagent-completion replies.

Automated code review complete. No further changes are requested from the author at this stage. Final product and design review will be handled by the responsible maintainer before the PR is considered for merge.

@holgergruenhagen

Copy link
Copy Markdown
Contributor Author

@vyctorbrzezowski Re-checked on current main (9e4a9ce9502) with a real claude-cli agent (Sonnet 5.5) on an isolated test gateway and the real Control UI, following your note about Claude rows without an id.

Findings

  • Rows imported from the Claude CLI (importedFrom: claude-cli: tool_use, tool_result, interim texts, interim end_turn) carry no runId or idempotencyKey. Only the gateway's final reply per run has one.
  • A single Claude run is not split by this PR: interim text, tools and the final reply look the same as on main, because the PR skips groups without runId.
  • The split happens in the run frames: once replies from several runs stay visible, the Worked rollup gets no replyRunId. Its Claude rows have no runId either, so coalesceAgentRunFrames moves it out of the frame (Worked without avatar). Embedded-runtime rows carry run ids, so they are not affected.
  • The bug itself still exists on main: after subagent completions only the last reply stays visible (claude-cli and embedded, live and after reload). collapseCompletedTurnWork now lives in chat-turn-presentation.ts; the PR change ports unchanged.

Local follow-up (not pushed)
Untagged work rows take the run of the next row with a runId (the persisted reply they precede). If all work then belongs to the first visible reply's run, the rollup gets that replyRunId; otherwise it stays unframed, as main already does for cross-run work (keeps "earlier reply in another run" green). New grouping test: red with only the PR, green with the follow-up. Checked live with claude-cli and embedded, including reload. The PR tests also need small adjustments for current main (removed Lit render/userMessage helpers, line cap on chat-thread.test.ts).

Screenshots (claude-cli, collapsed state): main / PR only / PR + follow-up

main: only the last reply visible PR only: Worked rollup outside the run frame PR + follow-up: Worked rollup back in the first run frame

Should I push the follow-up together with a rebase onto main to this branch, or are you changing it on your side?

Completed dashboard turns folded every unphased reply except the last one into the Worked disclosure, even when those replies came from separate runs (subagent completion announces, settle batches) that answered without new user input. Apply the last-visible-reply policy per run; failed runs stay folded behind the later answer that recovers them.
…es stay visible

Claude CLI turns import tool calls, tool results and interim text without a run id; only the persisted reply carries one. Once earlier runs keep their replies, the Worked rollup lost its replyRunId and its untagged rows left the agent run frame, so the turn split into a frameless Worked row and separate replies. Attribute untagged work rows to the run of the next row with a run id, and give the rollup that run when all of its work belongs to the first visible reply. Work across several runs stays outside any frame, as before. The Worked duration follows the same owner, so a later completion run's runtime is no longer shown for earlier work; cross-run work stays untimed.
…ns run frames

Completed work that no single visible reply owns stays outside the run frames, but its browser previews can be anchored to an earlier run's reply. That reply renders inside its agent run frame, whose row key is the frame key, so the collapsed preview was dropped. When all of that work came from one later run, the rollup was also framed with that run from its rows' execution ids and placed before the earlier reply. Mark such rollups ownerless so execution ids cannot frame them, and resolve preview anchors against the parts of each frame row.
@holgergruenhagen
holgergruenhagen force-pushed the fix/control-ui-hidden-announce-replies branch from cb39cfc to 56f1c06 Compare October 31, 2026 18:13
@holgergruenhagen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@roboclaw-bot
roboclaw-bot merged commit cacc502 into openclaw:main Oct 31, 2026
89 of 90 checks passed
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
openclaw#172571)

* fix(ui): keep earlier runs' replies visible after subagent completions

Completed dashboard turns folded every unphased reply except the last one into the Worked disclosure, even when those replies came from separate runs (subagent completion announces, settle batches) that answered without new user input. Apply the last-visible-reply policy per run; failed runs stay folded behind the later answer that recovers them.

* fix(ui): keep Claude CLI work inside its run frame when earlier replies stay visible

Claude CLI turns import tool calls, tool results and interim text without a run id; only the persisted reply carries one. Once earlier runs keep their replies, the Worked rollup lost its replyRunId and its untagged rows left the agent run frame, so the turn split into a frameless Worked row and separate replies. Attribute untagged work rows to the run of the next row with a run id, and give the rollup that run when all of its work belongs to the first visible reply. Work across several runs stays outside any frame, as before. The Worked duration follows the same owner, so a later completion run's runtime is no longer shown for earlier work; cross-run work stays untimed.

* fix(ui): keep collapsed work previews visible when completed work spans run frames

Completed work that no single visible reply owns stays outside the run frames, but its browser previews can be anchored to an earlier run's reply. That reply renders inside its agent run frame, whose row key is the frame key, so the collapsed preview was dropped. When all of that work came from one later run, the rollup was also framed with that run from its rows' execution ids and placed before the earlier reply. Mark such rollups ownerless so execution ids cannot frame them, and resolve preview anchors against the parts of each frame row.

* fix(ui): keep later runs' source cards when an earlier run's reply stays visible
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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M 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.

4 participants