Skip to content

fix(ui): chat hides narration after a run finishes - #183267

Merged
steipete merged 25 commits into
openclaw:mainfrom
Marvinthebored:fix/180490-web-in-place-work
Oct 28, 2026
Merged

steipete merged 25 commits into
openclaw:mainfrom
Marvinthebored:fix/180490-web-in-place-work

Conversation

@Marvinthebored

@Marvinthebored Marvinthebored commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Related: #180490

What Problem This Solves

Fixes completed Control UI dashboard chats hiding assistant narration inside one work disclosure, while bubble mode leaves completed tool activity outside that grouping.

User Impact

Assistant narration and visual results stay inline in source order. Only contiguous tool and reasoning work collapses, in both flat and bubble mode. Opening one work section does not open another, and loading older history preserves expanded sections.

Why This Change Was Made

The presentation layer now separates mixed assistant envelopes without changing stored history or the source identities used by copy, reply, reactions, and full-message loading. Capped envelopes and envelopes whose Markdown or visibility depends on surrounding blocks remain intact, so full-message recovery replaces one rendering unit. Envelopes carrying saved media also stay intact so their attachments render exactly once. Work disclosures anchor to the following visible boundary so history prepends do not replace their identity. Whole-run timing stays in the final recap and is not assigned to individual work stretches. A fresh pane restores saved timing from admitted cache metadata or the live session row only when it matches the visible completed reply; changing agent or Gateway invalidates the prior recap.

The refresh retains current main's distinct-message identities and ordered transcript indexes. Redundant portable fixture cases, repeated viewport checks, and verbose duration-test setup were removed. Unused session timing inputs were removed from work grouping and its memo keys. The pure projection tests run once; flat and bubble rendering retain separate browser coverage. The preview-order test uses a compact widget so it does not assume offscreen virtual rows stay mounted; the separate geometry regression remains.

Original implementation and regression work by @Marvinthebored; contributor commits are retained.

Evidence

The prior CI runs 40596392967 and 40599346638 exposed the test-line ceiling and a first-load video-widget test flake. Head 65fac8b then passed CI 40601985740, but a concurrent main ceiling update made it conflicting. Main 50bb32e is integrated; the only textual conflict was that budget value.

Exact-count ceilings repeatedly fell behind the newer main tree used by CI. Run 40603752066 passed its code, type, lint, and UI checks but counted 6,292,334 lines, 24 more than its locally measured tree. The ceiling of 6,293,407 was set from that measured CI tree plus 1,073 lines, the largest main-tree growth observed between this lane's integrations. The final candidate integrates main b3f004e and counts 6,293,028 lines: 1,367 PR-owned counted lines, 343 lines already over main's 6,291,318 ceiling, and 379 lines of remaining headroom. The existing ratchet stays enabled; assertions, snapshots, and test inclusion are unchanged.

The retained tests cover distinct ordering, source actions, privacy, Markdown, result pairing, recovery, status, and timing boundaries. Earlier consolidation reduced test/fixture growth from 1,823 to 1,424 lines; the final lazy-import wait adds one line.

The video-widget test now waits for its actual lazy import before checking the play button. Its playback and retained-frame assertions are unchanged. All 92 selected widget, duration, progress, and transcript tests pass after integrating main. The production implementation did not change in this CI follow-up. Independent review found no actionable P0–P2 findings. A fresh full-candidate review after integration found no actionable P0–P2 findings. The bounded budget follow-up also passed independent review. A later review identified persisted media being copied into every split fragment; the renderer regression reproduced three image tiles from one saved attachment. The repair keeps media-bearing envelopes whole through the existing media reader. All 65 tests in the affected projection, message-group, and video-gallery suites pass after the final integration (17.65 seconds wall time; 12.86 seconds Vitest duration). Independent review of the media repair found no actionable P0–P2 findings. Head 7dbf64a passed all CI checks and ClawSweeper with no findings. A concurrent main edit then conflicted only in the test-budget scalar. Main b3f004e is now integrated with the same ceiling and no chat-source change; all 92 selected chat, media, and identity tests pass (25.45 seconds total wall time). Final head 833e2d7 passed CI 40608575612, including the final gate. ClawSweeper reviewed that same head with no findings and marked it ready for maintainer review.

  • Original-main regression: both flat and bubble narration cases fail before the fix and pass on the candidate.
  • Pagination negative control: restoring the first-work-row key makes both prepend tests fail; the following-boundary key passes.
  • Follow-up regressions reproduce duplicated recovered text and a first work stretch incorrectly labeled with the whole 13-second run; both pass after repair. All 80 tests in the affected projection, recovery, duration, and message-group suites pass on the refreshed candidate.
  • A fresh-history regression fails without a recap and passes after restoring matching saved timing. A mismatched run stays quiet. All 66 duration, progress, and transcript-render tests pass, including cached startup with an absent or sparse live row and repeated agent/Gateway owner switches; the 134 projection and sibling tests also pass.
  • The prior candidate passed 306 focused unit/browser tests and all 17 tests across four affected mock Gateway E2E suites, including preview order, expansion geometry, mobile bubbles, async questions, and nested tool diagnostics. That visual and interaction evidence is retained; the follow-up changes target recovery and recap ownership.
  • Targeted oxlint, oxfmt, and diff checks pass. Local UI typechecking refuses the shared dependency installation; PR CI supplies the typecheck and broad proof.
  • Isolated Codex review: no actionable P0–P2 findings. Final CI follow-up removes a stale reply-navigation argument reported by the typecheck; affected renderer tests pass after integrating current main.
  • Initial published diff: production +332, tests/fixtures +1,823. Current diff against refreshed main: production +300, tests/fixtures +1,453, docs +4. Production growth preserves mixed-envelope rendering, tool-result pairing, and original actions without rewriting history.
  • Live provider/channel round trips were not run: this is a renderer change, exercised with synthetic history through the existing mock Gateway.

The before/after captures below are from the running Control UI with synthetic mock Gateway data. The flat view now keeps “Checking.” visible; bubble mode keeps narration visible with completed work collapsed.

Mode Before After
Flat Flat before Flat after
Desktop bubbles Desktop bubbles before Desktop bubbles after
Mobile bubbles Mobile bubbles before Mobile bubbles after

@clawsweeper

clawsweeper Bot commented Oct 25, 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 size: XL labels Oct 25, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro 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:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 25, 2026
@clawsweeper

clawsweeper Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Keeps completed assistant narration inline and collapses contiguous tool and reasoning activity into separate disclosures.

Example: A completed dashboard run contains “Checking.”, a read operation, and “Done.”

  • Before: Flat mode hides “Checking.” with the completed work.
  • After: “Checking.” remains visible, followed by a collapsed Worked disclosure and “Done.”

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong visual evidence and no identified introduced defect; this PR implements only the web portion of the linked cross-client request.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots exercise the running Control UI with synthetic mock-Gateway history and show flat narration preserved and bubble work collapsed; supporting regressions cover source actions, recovery, timing, and media.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Yes · Fix scope: Partial
User problem: Narration containing findings and caveats disappears behind completed work, making the visible reply appear incomplete.
Reason: This changes the original final-answer-first policy, with the feature owner's repair commit recording the new direction; the native portion remains in the companion PR.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides a useful web presentation change that current main lacks, with no actionable introduced defects found.

Priority: P2
Reviewed head: 833e2d7c76aec9be8009cd0362fe5916fb23b46c

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI projects Gateway history and live chat events into transcript rows, disclosures, previews, and source-message actions.

flowchart TD
  A[Gateway history and events] --> B[Message grouping]
  B --> C[Mixed envelope projection]
  C --> D[Contiguous work grouping]
  D --> E[Transcript indexes and run frames]
  E --> F[Flat and bubble views]
  E --> G[Original message actions]
Loading

Technical review

Best possible solution:

Retain this focused web implementation alongside the native companion, preserving original transcript identities and keeping whole-run timing in the final recap.

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

Current-main predicates establish narration folding, and the supplied before captures show it; no target code was executed during this review.

Is this the best way to solve the issue?

The projection addresses mixed envelopes at the presentation boundary while preserving source actions, parser context, recovery, and attachment ownership.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Completed-work visibility and ordering changes intended behavior with a stated reason (feat(ui): collapse completed turn work behind a "Worked for X" rollup #105012: The original feature deliberately folded commentary and tools so completed turns read final-output-first.)
  • Whole-run duration placement changes intended behavior with a stated reason (25f6775: The earlier repair retained known run duration in one Worked disclosure; multiple bounded work stretches now require that duration to remain in the final recap.)
  • Tool pairing, preview order, and source identities keeps the original intent (3e4daf8: Existing owners preserve ordered visual results and original message actions; the new fragment projections retain those contracts. Older local content searches hit unavailable promisor history, supplemented by GitHub records.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit f421a5e adds ui/src/pages/chat/chat-turn-presentation.ts:40 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 +300, Tests +1453, Docs +4, Other 0. Total +1757 across 39 files. Added test files: 4.

View PR surface stats
Area Files Added Removed Net
Source 18 538 238 +300
Tests 19 1618 165 +1453
Docs 1 10 6 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 39 2167 410 +1757

Review metrics

Metric Value Why it matters
Production versus test growth Production +538/-238; tests and fixtures +1618/-165. The growth supports mixed-envelope projection and distinct ordering, action identity, privacy, recovery, timing, attachment, and pagination regressions.

Root-cause cluster

Relationship: partial_overlap
Canonical: #180490
Summary: This PR supplies the web portion of the cross-client narration request; native rendering and explicit delivery identity have separate implementations.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Completed narration becomes harder to discover, but remains recoverable through an in-product disclosure.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; 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.

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 (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-27T22:13:30.403Z sha 9283f8b :: needs changes before merge. :: [P2] Preserve restored run duration when opening a fresh pane
  • reviewed 2026-10-27T22:30:45.628Z sha 81364a2 :: needs changes before merge. :: [P2] Restore saved timing from cached transcript metadata
  • reviewed 2026-10-27T22:45:20.345Z sha 4ae9e91 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T23:11:05.147Z sha 665665c :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T23:32:16.532Z sha 65fac8b :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T23:50:20.600Z sha 57363a8 :: needs changes before merge. :: [P2] Keep persisted media facts from rendering in every split fragment
  • reviewed 2026-10-28T00:02:46.056Z sha 461b6b5 :: needs changes before merge. :: [P2] Keep persisted media from rendering in every split fragment
  • reviewed 2026-10-28T00:15:49.625Z sha 7dbf64a :: needs maintainer review before merge. :: none

Reviewed October 27, 2026, 8:32 PM ET / October 28, 2026, 00:32 UTC (Revision 14).

@openclaw-barnacle openclaw-barnacle Bot reopened this Oct 25, 2026
@Marvinthebored
Marvinthebored force-pushed the fix/180490-web-in-place-work branch from 14a168b to f9f85d0 Compare October 25, 2026 06:44
@Marvinthebored

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 25, 2026
@clawsweeper clawsweeper Bot removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 25, 2026
@steipete

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Set the ceiling to the measured CI tree plus 1,073 lines, the largest observed main-tree growth during this repair. Preserve all assertions and test inclusion while avoiding repeated failures as main advances during a run.
@steipete

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor

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 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

3 participants