Skip to content

feat(ui): redesign tool-call rendering, grouping, and lifecycle narration - #198133

Merged
obviyus merged 58 commits into
mainfrom
brzezowski/chat-transcript-lifecycle
Nov 16, 2026
Merged

obviyus merged 58 commits into
mainfrom
brzezowski/chat-transcript-lifecycle

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Tool-call history was noisy and hard to follow: routine wrappers competed with useful work, launches could be confused with later outcomes, and expanded details could shift or disappear as history refreshed.

User Impact

Chat now shows compact, chronological tool activity with independent disclosures and distinct subagent launch, stop, success, failure, and timeout facts. Commands use one muted, truncated line while expanded details retain their content. Image inspection previews remain separate from attachments in the final answer.

Questions stay in the composer, and inline command output keeps its existing opt-in preference. These narration changes are for the Control UI, including the macOS dashboard; they do not introduce extra messages to Discord, Telegram, or other channels. No schema migration or new user configuration is required. Existing bundle budget adjustments approved during the cleanup remain unchanged.

Why This Change Was Made

Recorded execution identities and result-time placement keep lifecycle rows stable across streaming, output caps, history refreshes, and reloads. Nested tool-search calls share the same presentation as direct calls. Mixed collections retain their error details while completed workers get their own factual outcome rows. Explicit disclosure choices stay shared between panes; automatic expansion for reading stays local to its pane.

Original design and implementation: @vyctorbrzezowski. Simplification and follow-up fixes: @obviyus (Ayaan Zaidi). Both contributions are retained.

Evidence

Maintainer review of c4ae85d1, test-only correction 21286219, and integration e4cd6537 on main at 9bfad2b:

  • Inspected the linked real-Gateway verification history and the published screenshots, including the later direct/tool-search completion proofs. The extensive live campaign is reused at the maintainer's request; historical captures below retain their actual execution/render heads.
  • Corrected stale continuation and missing-tool-result expectations, removed the obsolete empty-Stop test after confirming Stop still requires captured nonblank text, and replaced the lint-invalid fixture spread. Production code and the approved design were not changed.
  • Strengthened the existing mixed-success/error collection case: its wait details remain accessible alongside the worker completion, both live and after output truncation.
  • Backend owner suites: 144 passed across 5 files. Reported runner stages: 0.26 s, 32.62 s, and 39.04 s.
  • UI lifecycle, disclosure, ordering, and rendering suites passed after the fixture corrections. The final renderer rerun passed 565 cases including 535 required canaries, in 33.09 s; these overlap earlier runs and are not an additional unique-test total.
  • Browser checks: 4 passed across 2 files, covering swarm lifecycle and nested tool presentation/reload, in 21.48 s.
  • Type-aware lint, formatting, and diff checks passed. The verified test-line allocation is 1,425 net lines = 400 standard + 1,025 allocated, recalculated after main's test consolidation.
  • Fresh independent review covered the complete candidate in two passes and reported no actionable P0–P2 findings.
  • Integrated main at 9bfad2b, preserving its removal of two test suites. Independent integration review confirmed that the overlapping delivery code keeps main's current-chat ownership; the PR adds only display metadata there.
  • Integration validation passed: 542 UI cases (73.35 s), 1 continuation browser case (18.83 s), 1 Gateway delivery owner case (118.46 s including the cold build), and 33 requester-settle ownership/dispatch cases (34.78 s). Type-aware lint on the five overlapping delivery files also passed.

Known inherited CI failure: extensions/codex/src/app-server/run-attempt.context-engine.test.ts:631 expects no markSentToProvider call but receives one. It reproduced on both the reviewed PR (18 passed / 1 failed) and an isolated fcf29c4 baseline (same assertion, 58.13 s). The test and its notifier/active-turn sources are byte-identical between them: the notifier calls markRuntimePersisted and then markSentToProvider synchronously. Those inputs remain unchanged after integrating 9bfad2b. This failure remains disclosed; it was not hidden or repaired by changing this PR's behavior. Current-head integration checks are pending.

The earlier live verification used UI/runtime 726c42e for the image/disclosure refinements, e4e46df for six refreshed compositions, and 0f5247c for typography. Other images retain their stated earlier provenance. The source-card absence after reload and visible output truncation are disclosed below, not claimed as fixes here.

Live image and disclosure refinements — 726c42e

UI and runtime both use this commit. Existing histories were freshly rendered; the image comparison retains its explicit before/after provenance.

Spacing and independent subagent disclosures — Fresh render of existing records: 12px around narration, 4px between tools and child rows, stronger names, and separate group and child disclosure state. Capture and execution provenance are retained with the artifacts.

Clean capture Same capture with red callouts
Runtime refinement 726c42e layout clean Runtime refinement 726c42e layout annotated

Live image preview without automatic attachment — Comparable real image-inspection flows. The new preview appeared while the parent continued working; the final response contained text only. Capture and execution provenance are retained with the artifacts.

Clean capture Same capture with red callouts
Runtime refinement 726c42e image clean Runtime refinement 726c42e image annotated

Temporal checks confirmed the image reference and preview arrived while the parent was still working, with no image attached to its final text response. The cold question opened without the page-sized loading skeleton or the prior height overshoot. The label was observed as Wait for subagents; an invalid model-supplied timeout combination was rejected before the model corrected it.

Typography and patch labels — 0f5247c

Comparable real workflows show the tool font changing from 13px to the transcript’s 14px and the completed patch label changing from Apply Patch to Changed files. Before: UI e4e46df. After: UI 0f5247c. Both use runtime d070dd0.

Clean comparison Same comparison with red callouts
Tool typography 0f5247c clean Tool typography 0f5247c annotated

Temporal samples separately confirmed subtle command shimmer. A transient question-dock height adjustment was observed; its cause was not isolated or fixed by this change.

Before and after: expanded command

The same recorded multiline command, expanded at the same viewport and crop, before and after the change.

Before — cbf5fbb After — 7fce36a
Command comparison before Command comparison after

Visual review — 7fce36a

Real Gateway captures with per-block provenance. Blocks 01–03, 07–08 and 10 were refreshed at e4e46df. The other captures and the separate before/after comparison retain their original 7fce36a provenance. Each clean image is paired with the same composition annotated in red. Replayed records retain their execution-head provenance. Click an image for full resolution.

01 · Successful completion and real boundaries — Only successful workers finish; stopped workers are excluded and intervening actions retain chronological boundaries. Existing recorded run, freshly rendered in this build. Rendered at e4e46df.

Clean capture Same capture with red callouts
Atlas refresh e4e46df 01 clean Atlas refresh e4e46df 01 annotated

02 · Adjacent lifecycle batches — Consecutive launches and stops share compact rows. Narration and a file read retain their chronological boundaries. Existing recorded run, freshly rendered in this build. Rendered at e4e46df.

Clean capture Same capture with red callouts
Atlas refresh e4e46df 02 clean Atlas refresh e4e46df 02 annotated

03 · Swarm launch through completion — A real concurrent launch stays in one pending row. Confirmed launch and successful completion remain compact. Existing recorded run, freshly rendered in this build. Rendered at e4e46df.

Clean capture Same capture with red callouts
Atlas refresh e4e46df 03 clean Atlas refresh e4e46df 03 annotated

04 · Standalone and manually opened errors — The failed standalone action stays muted; a manually opened activity group exposes its recorded error. Existing recorded run, freshly rendered in this build.

Clean capture Same capture with red callouts
Final atlas 04 clean Final atlas 04 annotated

05 · Reader and follower stay independent — The same completed run stays expanded in the reader pane while the pane following the end remains collapsed.

Clean capture Same capture with red callouts
Final atlas 05 clean Final atlas 05 annotated

06 · File creation, rename and deletion — Multi-file patch details, a silent command and a failed file read. Existing recorded run, freshly rendered in this build.

Clean capture Same capture with red callouts
Final atlas 06 clean Final atlas 06 annotated

07 · Short question in the composer — The short question stays in the composer at desktop and narrow widths, with one concise tool label. Existing recorded run, freshly rendered in this build. Rendered at e4e46df.

Clean capture Same capture with red callouts
Atlas refresh e4e46df 07 clean Atlas refresh e4e46df 07 annotated

08 · Long question and submitted answers — The longer next step wraps in the composer. The completed conversation retains both submitted answers. Existing recorded run, freshly rendered in this build. Rendered at e4e46df.

Clean capture Same capture with red callouts
Atlas refresh e4e46df 08 clean Atlas refresh e4e46df 08 annotated

09 · Attachments and explicit media — Uploaded image and CSV, standalone image inspection, and returned media or file cards.

Clean capture Same capture with red callouts
Final atlas 09 clean Final atlas 09 annotated

10 · One command summary with nested results — Code Mode and shell commands share one command summary, preserving child results and the standalone script title. Existing recorded run, freshly rendered in this build. Rendered at e4e46df.

Clean capture Same capture with red callouts
Atlas refresh e4e46df 10 clean Atlas refresh e4e46df 10 annotated

11 · Interruption, steering and reload — A stopped parent run followed by independent work, with accepted notes preserved in order.

Clean capture Same capture with red callouts
Final atlas 11 clean Final atlas 11 annotated

12 · Inline details opt-in — The same settled transcript with inline details disabled and explicitly enabled. Existing recorded run, freshly rendered in this build.

Clean capture Same capture with red callouts
Final atlas 12 clean Final atlas 12 annotated

13 · Permission decisions — Actual denial, approval and pending controls from a dedicated guarded session.

Clean capture Same capture with red callouts
Final atlas 13 clean Final atlas 13 annotated

14 · Web fetch and source rendering — The live answer includes its Sources card. After reload the citation link remains, while the separate Sources card is absent.

Clean capture Same capture with red callouts
Final atlas 14 clean Final atlas 14 annotated

15 · Long output and its available tail — Actual command output, a separate no-match grep result, and the available output tail with its truncation marker. Existing recorded run, freshly rendered in this build.

Clean capture Same capture with red callouts
Final atlas 15 clean Final atlas 15 annotated

16 · Dark and narrow layouts — Current transcript examples at reduced width and in dark mode. Existing recorded run, freshly rendered in this build.

Clean capture Same capture with red callouts
Final atlas 16 clean Final atlas 16 annotated

Capture/render head is verified for every image. Replayed conversations retain a separately recorded execution head. Automatic error-group expansion is not claimed: the observed active command flow exposed a summary. Output truncation and source rendering are reported exactly as captured.

Simplification pass — 211ac7a

Merged main, then simplified with no change to behavior or design. Against merge base 25c9790: production net +2,687 → +2,604, tests net +2,752 → +1,335, and the test-line allocation went from 2,352 to 921. Also requested: subagents action: "list" uses the lifecycle icon and reads "Listed subagents". The swarm and screenshot e2e now match the coalesced lifecycle rows. Evidence and screenshots: #198133 (comment)

@clawsweeper

clawsweeper Bot commented Nov 13, 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 gateway Gateway runtime agents Agent runtime and tooling size: XL labels Nov 13, 2026
@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 Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR reorganizes chat tool activity into compact chronological groups with separate subagent lifecycle rows and stable disclosures.

Example: Atlas launches, finishes, and the parent continues working.

  • Before: The launch row changes with the child's current state.
  • After: The transcript retains “Launched Atlas” and adds “Atlas finished” when completion arrives.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful and supported by real behavior proof, but the latest change fails the architecture contract.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected real-Gateway image and disclosure captures demonstrate the changed presentation at their recorded heads; maintainer-approved reuse is supported by later lifecycle evidence and focused continuation coverage.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Tool history is noisy, launch rows blur creation with later outcomes, and disclosure content can shift during reconciliation.
Reason: The maintainer-authored direction and subsequent approval establish product value and accept the presentation and bundle-cost tradeoffs.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-approved redesign open. The prior findings are addressed, but the latest continuation repair introduces an import cycle that blocks the architecture check.

Priority: P2
Reviewed head: 5b947bb48d77f843deac9481c5b05b75634af16d

Before merge

  • Keep continuation projection in the history module (P2) - This new type import closes a static cycle: helpers → session-history-types → session-accessor.sqlite-projection-read → session-actor-transaction → session-transcript-authority.types → session-row-transcript-preview → session-display-projection → helpers. The repository's Madge check includes type imports, and the exact-head architecture job reports that check failing. Keep attachProjectedTurnBoundary and projectCompletionReportInput together in chat-display-projection.history.ts, their existing caller, so the continuation repair does not add this reverse dependency.

Findings

  • [P2] Keep continuation projection in the history module — src/gateway/chat-display-projection.helpers.ts:9
Agent review details

How this fits together

Agent execution and persisted transcript receipts feed Gateway display projection, which supplies the Control UI's grouping, lifecycle narration, and expandable tool details.

flowchart LR
  A[Agent execution] --> B[Transcript receipts]
  B --> C[Gateway display projection]
  C --> D[Chat activity projection]
  D --> E[Lifecycle rows]
  D --> F[Expandable tool details]
Loading

Technical review

Best possible solution:

Preserve the redesign and continuation fix while keeping both continuation-projection functions in the existing history module.

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

Source inspection establishes the newly closed import cycle, and exact-head CI independently reports the matching architecture-check failure; no local target execution was performed.

Is this the best way to solve the issue?

The redesign uses recorded execution facts and consolidates activity rendering, but its newest helper relocation creates an unnecessary dependency cycle.

Full review comments:

  • [P2] Keep continuation projection in the history module — src/gateway/chat-display-projection.helpers.ts:9
    This new type import closes a static cycle: helpers → session-history-types → session-accessor.sqlite-projection-read → session-actor-transaction → session-transcript-authority.types → session-row-transcript-preview → session-display-projection → helpers. The repository's Madge check includes type imports, and the exact-head architecture job reports that check failing. Keep attachProjectedTurnBoundary and projectCompletionReportInput together in chat-display-projection.history.ts, their existing caller, so the continuation repair does not add this reverse dependency.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Grouped outcomes keeps the original intent (210b364: Recovered failures should remain inspectable on individual rows without misleading aggregate failure counts.)
  • Detailed tool rendering keeps the original intent (2c5b726: Keep detailed argument parsing and rendering outside chat boot.)
  • Self-wake continuation grouping keeps the original intent (24385a2: Work resumed by internal wakes stays with the prompt that started it while genuine new inputs retain their boundaries.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm check:madge-import-cycles
  • pnpm test src/gateway/chat-display-projection.visibility.test.ts
  • pnpm test ui/src/pages/chat/chat-background-run-lifecycle.test.ts
  • git diff --check

What I checked:

PR surface

PR surface statistics unavailable: the file list is incomplete.

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Label justifications:

  • P2: This is a useful chat presentation improvement with a focused architecture-check blocker.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • 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.

History

Review history (7 earlier review cycles)
  • reviewed 2026-11-13T06:41:56.006Z sha 94b0f15 :: needs changes before merge. :: [P2] Preserve inline command exposure beside lifecycle rows | [P2] Limit the working bubble to the active operation segment
  • reviewed 2026-11-13T14:10:55.455Z sha 087f37e :: needs changes before merge. :: [P2] Keep detailed tool formatting behind its lazy boundary
  • reviewed 2026-11-16T07:47:54.632Z sha b45db63 :: blocked before merge. :: [P2] Retain collection rows that contain per-ID errors
  • reviewed 2026-11-16T08:22:23.937Z sha f393fbd :: blocked before merge. :: [P2] Retain collection rows that contain per-ID errors | [P3] Update the documented wait and launch presentation
  • reviewed 2026-11-16T09:20:31.559Z sha 58ab1d4 :: blocked before merge. :: [P2] Retain collection rows that contain per-ID errors | [P2] Emit failure outcomes for non-collector child completions | [P3] Update the documented wait and launch presentation
  • reviewed 2026-11-16T09:35:44.448Z sha ce3bbc0 :: blocked before merge. :: [P2] Retain collection rows that contain per-ID errors | [P2] Emit failure outcomes for non-collector child completions | [P3] Update the documented wait and launch presentation
  • reviewed 2026-11-16T09:51:29.706Z sha f37585b :: blocked before merge. :: [P2] [P2] Retain collection rows that contain per-ID errors | [P2] [P2] Emit failure outcomes for non-collector child completions | [P3] [P3] Update the documented wait and launch presentation

Reviewed November 16, 2026, 10:49 AM ET / 15:49 UTC (Revision 8).

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Addressed the review of 94b0f154680 in the current head 087f37e59bdc0c24795f973e56d50ceea559c5ae:

  • The segmented renderer forwards inline-command exposure and limits the working presentation to the eligible tail segment. Existing mixed-lifecycle coverage verifies both paths.
  • Failed/skipped attempts no longer add blanket group warnings. Their recorded outcomes remain inspectable; later success does not rewrite an earlier attempt or infer a retry relationship.
  • Completion preserves the above-tail reading anchor, the live buffer retains all 60 operations, and routine hidden polling no longer reappears as a completed Code Mode wrapper.

The body now contains six new recordings and ten screenshots, with the final-head real-model run and deterministic scenarios clearly separated from historical evidence. Final focused tests, UI types/lint/build and the three canonical bundled browser cases passed. The six current UI performance-budget violations are explicitly retained as limitations; no budget was raised. This remains a draft for product review.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Nov 13, 2026
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 gateway Gateway runtime 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts 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.

2 participants