Skip to content

fix(ui): keep image inspections inside completed work - #197528

Merged
vyctorbrzezowski merged 5 commits into
mainfrom
openclaw/amber-crab-6
Nov 12, 2026
Merged

vyctorbrzezowski merged 5 commits into
mainfrom
openclaw/amber-crab-6

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes completed chat replies splitting around image-inspection tool rows, leaving internal work outside the “Worked” disclosure.

User Impact

Completed replies keep their inspected images inside expandable work, while delivered images, interactive widgets, and late failure or publication notices remain visible. No migration or user action is required.

Why This Change Was Made

The existing grouping treated all non-text tool content as delivered output. This change distinguishes inspection media from explicitly targeted inline widgets and uses the existing terminal predicate consistently when classifying run outcomes. It does not rewrite transcript storage, publication receipts, or virtualization.

Evidence

  • Replayed the reported stored turn through the real transcript projection: the original split reproduced before the fix; the patched result is one work disclosure plus the delivered reply.
  • After integrating main at 47ad50865b714f2bf90bd1a26154571d7286764a, 1,289 UI tests across 85 suites passed, including replay, streaming/history reconciliation, long transcripts, user/run boundaries, and media rendering.
  • 62 Gateway tests across two suites passed before integration, covering publication reporting and shared receipt reads. This PR does not change core production code.
  • Nine production-build Chromium flows across three suites passed after integration, including live completion, saved history/reload, expansion, ordering, widget retention, and interrupted history.
  • UI/core typechecks, scoped lint, formatting, and diff checks passed before integration. UI typechecking, affected-file lint/formatting, and diff checks passed again after integration.
  • Author-led review and simplification completed. Review caught and removed an attempted publication-phase change that could hide late notices. A fresh independent automated review of the final branch found no actionable P0–P2 findings in the supplied scope; the maintainer separately reviewed the owning code and ran the checks below.

The browser proof uses the real built Control UI with an isolated mock Gateway and synthetic media at 1200×900 in dark mode. The original authenticated conversation was replayed as stored messages, not opened in that browser. The before/after screenshots below were captured before integration; the same flows passed again after integration.

Regression coverage and scope

Coverage retains image-only answers, assistant images alongside tool calls, explicit inline widgets, no-answer tool results, late tool errors, unrelated background results, standalone/delayed publication notices, and nonterminal commentary/speech/reasoning messages. Negative controls failed on the unpatched implementation. Integration preserves main’s authoritative Gateway abort-state classification; the new nonterminal regression explicitly supplies that abort state.

The production change stays in two existing UI owners: 10 added and eight removed lines. The remainder is regression coverage and documentation. No new persistence, timer, manager, or global merging rule was added.

Requested by @vyctorbrzezowski.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

Before: image inspection rows split the completed reply

After: inspected images stay in Worked and the delivered image stays visible

Maintainer verification

26 Gateway tests, 94 UI tests and all six visualization browser cases passed. Additional saved/live/reload checks verify both inspection images decode and remain accessible; paired original production modules fail both visibility controls. Only a scoped 366-line allocation was added for existing regression coverage. Inspected captures and proof limits.

roboclaw-bot and others added 2 commits November 12, 2026 04:28
Keep tool-owned inspection media in the completed-work disclosure while preserving delivered images and explicit widgets. Use one terminal predicate for run liveness and interruption.

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

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ef1ee345-b875-4b50-8010-6582106eac45
@clawsweeper

clawsweeper Bot commented Nov 12, 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 size: M labels Nov 12, 2026
roboclaw-bot and others added 2 commits November 12, 2026 04:31
Preserve authoritative Gateway abort state while retaining one terminal predicate for run grouping.

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

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 82043d13-c7f6-4214-ac61-279e7906d9fb
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 12, 2026 04:33
@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. 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR folds inspected tool images into completed work while preserving delivered media and consistent run-outcome classification.

Example: A turn inspects before.png and after.png, then delivers “The preview is ready.” with an image.

  • Before: Both View Image rows remain outside the collapsed Worked disclosure.
  • After: The inspection rows stay inside Worked, and the final reply and delivered image remain visible.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused production logic with directly inspected UI proof; the missing test-budget allocation leaves a concrete required-check blocker.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots exercise the built Control UI's completed-work presentation using a mock Gateway and synthetic inspection and delivered images; the after image retains the delivered result while collapsing both inspections, and the body reports expansion, reload, and live-completion checks.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Completed replies leave internal image inspections outside their work disclosure.
Reason: The maintainer-authored direction restores coherent completed replies while keeping delivered results visible, with no new setting or persistence contract.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: it provides a focused correction to completed-turn presentation, with one concrete test-budget repair needed before merge.

Priority: P2
Reviewed head: c558ad60e9bae220884aad7882d2e7bb3a568241

Before merge

  • [P2] Allocate the retained regression-test growth (P2) - The added coverage contributes 366 net tracked test lines, but this PR adds no record under config/test-lines-allocations/. The repository's test-cost contract requires a separate allocation for justified regression growth, and the reviewed head's baseline-ratchet annotations explicitly report test-lines failed, which also fails ci-gate. Consolidate any unnecessary coverage and add an allocation for the retained net growth without raising the shared scalar; attribute any remaining inherited overage separately.

Findings

  • [P2] [P2] Allocate the retained regression-test growth — ui/src/e2e/chat-worked-for-visualization.e2e.test.ts:41-43
Agent review details

How this fits together

The Control UI projects saved messages and live events into tool activity, completed-work disclosures, and run frames without rewriting the stored transcript.

flowchart TD
  A[Saved messages and live events] --> B[Tool activity projection]
  B --> C[Message grouping]
  C --> D[Completed work presentation]
  D --> E[Run frames]
  E --> F[Visible reply and expandable work]
Loading

Technical review

Best possible solution:

Retain the existing-owner presentation fix and add a scoped allocation for the regression coverage that remains after consolidation.

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

Current-main visibility classification explains the reported split, and inspected browser screenshots corroborate it; no target code was executed during this review.

Is this the best way to solve the issue?

The smallest complete fix distinguishes inspection media at the existing completed-work owner and reuses the existing terminal predicate, preserving delivered assistant media and explicit inline widgets.

Full review comments:

  • [P2] [P2] Allocate the retained regression-test growth — ui/src/e2e/chat-worked-for-visualization.e2e.test.ts:41-43
    The added coverage contributes 366 net tracked test lines, but this PR adds no record under config/test-lines-allocations/. The repository's test-cost contract requires a separate allocation for justified regression growth, and the reviewed head's baseline-ratchet annotations explicitly report test-lines failed, which also fails ci-gate. Consolidate any unnecessary coverage and add an allocation for the retained net growth without raising the shared scalar; attribute any remaining inherited overage separately.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Completed-work media visibility changes intended behavior with a stated reason (fix(ui): keep ad hoc visualizations inline and readable #126729: Canvas and attachment outputs were preserved outside completed work so delivered visualizations would remain visible.)
  • Single completed-work disclosure and tool-owned images keeps the original intent (a967fa7: Restore one completed-turn disclosure and keep inspection images with their producing tool rather than standalone assistant rows.)
  • Terminal run classification keeps the original intent (cabc488: Distinguish run-ending outcomes from stopped commentary, provider speech, and reasoning mirrors while preserving session-wide liveness.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm check:test-lines-ratchet --base 47ad508 --no-merge-base
  • git diff --check

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 2a87667 adds ui/src/pages/chat/chat-agent-run-grouping.ts:198 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)
  • RoboClaw: Raw commit cabc488 adds ui/src/pages/chat/chat-agent-run-grouping.ts:154 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: cabc4887d4b6; files: ui/src/pages/chat/chat-agent-run-grouping.ts)

PR surface

Source +2, Tests +366, Docs +2. Total +370 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 10 8 +2
Tests 5 373 7 +366
Docs 1 5 3 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 388 18 +370

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.

Review metrics

Metric Value Why it matters
Production versus regression growth Production +10/−8; tests +373/−7 The production repair is small; regression growth covers media ownership, late outcomes, live/history reconciliation, and transcript-window placement, but lacks its required budget allocation.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Inspection rows clutter and split completed replies without blocking chat or losing the delivered answer.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • 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.

Reviewed November 11, 2026, 11:47 PM ET / November 12, 2026, 04:47 UTC.

@vyctorbrzezowski

Copy link
Copy Markdown
Member

Verification for dbfd000649b2c60d7cfe18c9682773570a35c654: runtime and test source match the tested c558ad60e9bae220884aad7882d2e7bb3a568241; the new commit adds only the scoped test allocation.

The inspection rows now stay inside collapsed Worked, and opening their tools still shows both images. The delivered answer image remains visible.

I verified the production UI with the existing synthetic Gateway fixture in saved-history and live-event modes, including reload. Both inspection images decoded at 640×120. The matched control restored only chat-agent-run-grouping.ts and chat-turn-presentation.ts to the PR merge base: both scenarios fail there because the inspection rows remain visible outside collapsed Worked. This is a matched production-code control, not a claim of a full current-main or live-model run.

The 26 Gateway publication tests, 94 UI grouping/outcome tests and all six visualization browser cases also passed. Temporary proof edits were restored. Images below: original-code control, fixed collapsed state, and fixed expanded state.

Original production control: inspection rows remain outside collapsed Worked

Fixed: inspection rows fold into Worked and the delivered image remains

Fixed expanded: both inspection images and the delivered image are available

@vyctorbrzezowski
vyctorbrzezowski merged commit 0c74f3c into main Nov 12, 2026
129 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/amber-crab-6 branch November 12, 2026 09:40
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 13, 2026
Keep inspection media inside completed work while preserving delivered media, widgets and late outcomes.

Focused Gateway/UI tests, six browser cases and matched saved/live expansion checks passed. The original production control fails on inspection rows remaining outside collapsed Worked.

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>
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 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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