Skip to content

fix(ui): keep reply attribution above same-turn tool activity - #162322

Merged
roboclaw-bot merged 3 commits into
mainfrom
openclaw/review-related-prs-150549-and-160612
Oct 1, 2026
Merged

roboclaw-bot merged 3 commits into
mainfrom
openclaw/review-related-prs-150549-and-160612

Conversation

@roboclaw-bot

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

Copy link
Copy Markdown
Collaborator

Related: #150549, #160612

What Problem This Solves

Same-run tool activity can appear above the Replying to strip when a history window omits the prompt or completed work spans an automatic resumption.

User Impact

The reply line heads its completed work and answer, including the existing agent/participant avatars and connector. The strip, typography, colors, spacing tokens and footer styling are unchanged; there are no CSS changes.

Execution IDs remain unchanged. Peer inputs, forwarded sources, system markers and steers still separate presentation segments. Live mixed-run activity remains its existing separate log rather than being assigned to an arbitrary reply. No protocol, configuration, storage or migration changes.

Why This Change Was Made

The completed-work projector already knows which terminal reply owns a rollup but discarded that presentation fact. The frame builder then required uniform nested run IDs and a loaded prompt boundary, leaving work outside its reply frame.

Carry the selected reply’s display ownership through that handoff, and use a frame-local identity for a known run whose prompt is outside the loaded window. Recovered failures stay visible in work without poisoning the later successful reply’s outcome. Forwarded work cannot borrow local framing even when its execution ID matches.

Evidence

  • The actual buildChatItems → projectTranscriptChain path and production-bundle browser scenario fail on original base 80680fb3428a5d06bbccafaccaaade703da651ef and pass with this repair. The retained projection matrix also catches a deliberately reintroduced forwarded-boundary defect.
  • Test audit: 57 fewer test lines, with no production or design changes. Shared extraction/setup and dashboard/channel lifecycle cases are consolidated; one lower-level projected-source row is removed in favor of its stronger real-builder matrix. Distinct promptless-run, stream-boundary, notice, recovery, navigation and visual-interaction coverage remains. Final PR delta: production +47 net, tests +434 net.
  • 76 focused cases passed after the audit: 30 frame-grouping, 33 projection/index, 13 notice-promotion. The prior 63 sibling/lifecycle and 21 browser passes remain valid for unchanged production and browser fixtures; avatar proof below is unchanged.
  • The first hosted run exposed an older notice test that expected known-run output to stay unframed before promotion. Reproduced 10 failures / 3 passes locally, then updated that superseded structural expectation while preserving notice text, search, custody, boundaries and ordering; 13/13 pass. No production workaround or assertion suppression.
  • Single-worker command wall times: frame grouping 2.82 s, projection 2.97 s, notices 2.50 s. Unchanged avatar-enabled reply E2E: 29.47 s including build/browser setup; the added rendered scenario itself took about 1 s. Hosted CI run 36813928892 passed on audited head d9686f9. CI module test-execution durations: frame grouping 0.021 s, projection 0.160 s, notices 0.064 s (Vitest diagnostics, excluding setup/imports; not command wall time).
  • UI-test typechecks, scoped lint, formatting, ratchets and the full changed-test validation gate passed. The final staged files are byte-identical to the corrected working-tree candidate assessed by independent review.
Independent review disposition

The forwarded-work/same-execution-ID finding was reproduced and fixed, with a failing-then-passing regression. A suggestion to make promptless framing dashboard-only was not adopted: the shared Control UI already frames channel turns when their prompts are loaded. A parity test verifies the same frame, key, message visibility and row mapping when that prompt is outside the window. Channel work is not collapsed and channel transport is untouched.

The post-audit review identified only the old indexed notice expectation; the corrected working-tree version was already assessed without additional P0–P2 findings. Staging that exact reviewed version resolved the finding before commit.

Proof uses the real production-bundle UI with synthetic Gateway data, not live-provider or native-device evidence.

Screenshots

Same synthetic conversation, real production-bundle Control UI, 1440×900 dark desktop viewport. Identical 910×385 crops; existing agent and participant avatars are visible. No CSS or styling changes.

Before

Before: completed tool activity above the reply strip, with avatars

After

After: the reply strip heads completed tool activity and the answer, with avatars

Worked on by

Work sessions


View the OpenClaw team session

roboclaw-bot and others added 2 commits October 1, 2026 02:44
Carry completed-work display ownership into run frames and preserve known-run history suffixes without inventing prompt or recipient facts. Keep forwarded, peer, steer and system boundaries, and preserve the existing reply-strip design.

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

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: c1fb845d-96b6-4511-8b63-6215cf374e72
@clawsweeper

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

@roboclaw-bot

roboclaw-bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Same synthetic conversation, real production-bundle Control UI, 1440×900 dark desktop viewport. Identical 910×385 crops; existing agent and participant avatars are visible. No CSS or styling changes.

Before

Before: completed tool activity above the reply strip, with avatars

After

After: the reply strip heads completed tool activity and the answer, with avatars

@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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 12:17 AM ET / 04:17 UTC (Revision 3).

ClawSweeper review

What this changes

The Control UI keeps reply attribution above completed tool activity across resumed runs and history windows that omit the prompt, with regression coverage for presentation boundaries.

Merge readiness

✅ Ready for maintainer review

This repair remains useful: pinned current main still exhibits the source-level grouping gap. The inspected screenshots demonstrate the intended improvement, and the current patch has no actionable correctness finding.

Priority: P2
Reviewed head: d9686f9d8d60583c3a6937827a05cd4f4bef4353

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with directly inspected visual proof, meaningful boundary coverage, and no remaining actionable finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots from the production-bundle Control UI show resumed-run completed work moving below the reply line with avatars preserved. The browser scenario exercises the same projection and renderer using synthetic Gateway history; production and browser fixtures are unchanged by the latest test-only commit. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after screenshots from the production-bundle Control UI show resumed-run completed work moving below the reply line with avatars preserved. The browser scenario exercises the same projection and renderer using synthetic Gateway history; production and browser fixtures are unchanged by the latest test-only commit. No stored-data contract changes.
Evidence reviewed 10 items Pinned introduced production change: The introduced delta carries terminal-reply presentation ownership into completed work and allows known-run frames without a loaded prompt. Forwarded sources remain excluded, and nested execution IDs are preserved.
Repair remains absent from pinned main: Pinned current main still requires a loaded boundary before framing and derives work ownership from uniform nested run IDs. These conditions leave promptless output and mixed-run completed work outside the answer frame.
Inspected visual proof: Inspected both prepared GitHub attachment images. Before, the Worked disclosure precedes the Replying to Jordan Lee line; afterward, that line precedes the disclosure and answer. Agent and participant avatars remain visible. The supplied body identifies a production-bundle Control UI with synthetic Gateway history at a 1440×900 desktop viewport.
Findings None None.
Security None None.

How this fits together

The Control UI projects Gateway conversation history and live activity into chat rows. Its grouping layer connects completed work to the displayed answer and supplies stable rows for rendering and reply navigation.

flowchart TD
  A[Conversation history] --> C[Transcript projection]
  B[Live activity] --> C
  C --> D[Completed work grouping]
  D --> E[Reply and boundary checks]
  E --> F[Stable chat frames]
  F --> G[Reply line and work display]
  F --> H[Message navigation]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +47, Tests +434. Total +481 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 2 63 16 +47
Tests 4 451 17 +434
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 514 33 +481

Review metrics

Metric Value Why it matters
Production versus test growth production +47 net, tests +434 net Production growth carries presentation ownership and promptless frame identity; tests cover distinct projection, lifecycle, boundary, and rendered behavior.

Technical review

Best possible solution:

Keep one transcript projection owner that places completed work beneath its answer’s attribution while preserving execution identities, presentation boundaries, and navigation.

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

Yes: pinned main’s framing conditions expose a clear reproduction using promptless history or mixed-run completed work, and the supplied before screenshot shows the ordering defect. This review did not execute that scenario.

Is this the best way to solve the issue?

Yes: the patch carries an existing completed-work ownership fact through the current projector and renderer, avoiding a competing renderer or changes to transcript identities.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This fixes a bounded chat attribution and activity-ordering defect without changing message delivery or stored conversation data.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after screenshots from the production-bundle Control UI show resumed-run completed work moving below the reply line with avatars preserved. The browser scenario exercises the same projection and renderer using synthetic Gateway history; production and browser fixtures are unchanged by the latest test-only commit. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots from the production-bundle Control UI show resumed-run completed work moving below the reply line with avatars preserved. The browser scenario exercises the same projection and renderer using synthetic Gateway history; production and browser fixtures are unchanged by the latest test-only commit. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots from the production-bundle Control UI show resumed-run completed work moving below the reply line with avatars preserved. The browser scenario exercises the same projection and renderer using synthetic Gateway history; production and browser fixtures are unchanged by the latest test-only commit. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduced production change: The introduced delta carries terminal-reply presentation ownership into completed work and allows known-run frames without a loaded prompt. Forwarded sources remain excluded, and nested execution IDs are preserved. (ui/src/pages/chat/chat-thread-grouping.ts:611, d9686f9d8d60)
  • Repair remains absent from pinned main: Pinned current main still requires a loaded boundary before framing and derives work ownership from uniform nested run IDs. These conditions leave promptless output and mixed-run completed work outside the answer frame. (ui/src/pages/chat/chat-agent-run-grouping.ts:182, b58f2a2c3327)
  • Inspected visual proof: Inspected both prepared GitHub attachment images. Before, the Worked disclosure precedes the Replying to Jordan Lee line; afterward, that line precedes the disclosure and answer. Agent and participant avatars remain visible. The supplied body identifies a production-bundle Control UI with synthetic Gateway history at a 1440×900 desktop viewport.
  • Proof matches the rendered entrypoint: The browser scenario loads resumed-run history through the Control UI, checks that completed work is inside the answer group, compares reply-line and work geometry, and expands the tool result. The production renderer consumes the projected frame and resolves its reply line from the final answer. (ui/src/e2e/chat-reply-attribution.e2e.test.ts:103, d9686f9d8d60)
  • Re-review continuity: The prior completed review retained no findings. Production modules and browser fixtures are unchanged from the earlier reviewed head. GitHub's exact latest-commit patch confirms test consolidation and the corrected notice expectation; the real-builder matrix retains forwarded-source, steer, recovery, navigation, prompt-prepend, and channel-parity checks. (ui/src/pages/chat/components/chat-transcript-message-index.test.ts:159, d9686f9d8d60)
  • Validation and measured test cost: The captured PR body reports 76 focused cases passing after consolidation, single-worker command wall times of 2.82, 2.97, and 2.50 seconds, and unchanged browser proof costing 29.47 seconds including setup. These are contributor-recorded results; this read-only review did not execute tests. (d9686f9d8d60)

Likely related people:

  • vyctorbrzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-01T03:01:20.983Z sha 2a0f7da :: needs changes before merge. :: none
  • reviewed 2026-10-01T03:54:11.844Z sha 2a0f7da :: needs maintainer review before merge. :: none

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 1, 2026 03:49
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) October 1, 2026 03:53
@roboclaw-bot
roboclaw-bot disabled auto-merge October 1, 2026 03:55
Use one owner-boundary matrix for projected sources and shared fixtures for frame identity and content assertions. Retain independent lifecycle and rendered proof. Update the notice-promotion expectation for known-run suffix framing without changing production or design.

Co-authored-by: vyctorbrzezowski <[email protected]>
@roboclaw-bot
roboclaw-bot merged commit 75d1f82 into main Oct 1, 2026
92 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/review-related-prs-150549-and-160612 branch October 1, 2026 04:25
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
…aw#162322)

* fix(ui): keep reply attribution above same-turn tool activity

Carry completed-work display ownership into run frames and preserve known-run history suffixes without inventing prompt or recipient facts. Keep forwarded, peer, steer and system boundaries, and preserve the existing reply-strip design.

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

* fix(ui): keep reply attribution above same-turn tool activity

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: c1fb845d-96b6-4511-8b63-6215cf374e72

* test(ui): consolidate reply-frame regression coverage

Use one owner-boundary matrix for projected sources and shared fixtures for frame identity and content assertions. Retain independent lifecycle and rendered proof. Update the notice-promotion expectation for known-run suffix framing without changing production or design.

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

---------

Co-authored-by: vyctorbrzezowski <[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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant