Skip to content

fix(ui): stop duplicate commentary after replay eviction - #147600

Merged
RomneyDa merged 1 commit into
mainfrom
fix/ui-evicted-commentary-dedup
Sep 14, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/ui-evicted-commentary-dedup

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: Control UI repeats persisted commentary when opening a long active run after the matching replay item events have fallen out of the bounded in-flight snapshot.

User Impact

User impact: active session commentary renders once after navigation or reconnect, while genuinely new streamed text remains visible.

Why This Change Was Made

History hydration previously assumed every keyed commentary mirror was still owned by a replay item event. The in-flight event snapshot is bounded, so older item events can be evicted while their durable commentary rows and the cumulative assistant buffer remain.

Hydration now treats only surviving replay item IDs as live owners. Persisted commentary without a surviving item is optional cumulative-prefix evidence: matching text is retired from the live tail, while nonmatching commentary is skipped so steer boundaries remain intact.

Evidence

  • Baseline reproduction on 078ca0bc2ff: the two persisted paragraphs render again inside the cumulative live stream.
  • Fixed mocked-Gateway browser flow: the two persisted paragraphs each render once, followed only by Still working.; the retained tool row remains visible.
  • 101 focused history/reconciliation tests passed.
  • Focused Control UI E2E passed on the exact branch head.
  • check:changed passed formatting, conflict, dependency, i18n, TypeScript, coercion, and dead-export gates. Its final lint pass initially found an unused test binding and an over-limit touched legacy test; both were removed, and targeted Oxlint passes.
  • Auto Review: scoped clean through P1, confidence 0.81.

Before

Before: persisted commentary repeats in the active stream

After

After: each persisted commentary paragraph appears once

@clawsweeper

clawsweeper Bot commented Sep 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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 14, 2026
@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 Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 8:31 PM ET / September 14, 2026, 00:31 UTC.

ClawSweeper review

What this changes

The Control UI uses persisted commentary to remove duplicate streamed text when the corresponding replay events have been evicted, with a browser regression covering the rendered result.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main still exhibits the underlying reconciliation gap, and the supplied screenshots demonstrate the intended improvement. No blocking introduced defect was found.

Priority: P2
Reviewed head: fce5b553f1f495e0ce96182b487bda77e7519e78

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with directly relevant visual evidence and a browser regression, with no blocking introduced defect identified.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots from the declared mocked-Gateway browser flow demonstrate the changed history owner's visible result: duplicate persisted paragraphs disappear while new streamed text and the tool row remain. This is rendering proof, not a live-provider claim.
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 declared mocked-Gateway browser flow demonstrate the changed history owner's visible result: duplicate persisted paragraphs disappear while new streamed text and the tool row remain. This is rendering proof, not a live-provider claim.
Evidence reviewed 7 items Introduced repair: The history owner passes surviving replay commentary IDs into cumulative-prefix reconciliation. Missing keyed commentary becomes optional matching prefix evidence; callers that omit the new argument retain their previous treatment of keyed commentary.
Current main still needs the repair: Current main excludes every keyed commentary message from cumulative-prefix reconciliation, regardless of whether its replay event survives. The two changed production files have no differences between fetched main and the pinned PR base.
Replay eviction is an actual producer contract: The Gateway limits progress snapshots to 50 events and 128 KiB, evicts older activity, and canonicalizes preamble identifiers into data.itemId. The new reader therefore uses the existing Gateway event contract without depending on a separate provider harness.
Findings None None.
Security None None.

How this fits together

The Control UI combines saved conversation history with a running assistant's text and recent activity events. History reconciliation determines which text is already displayed and which continuation should remain visible.

flowchart TD
  A[Saved conversation messages] --> D[History reconciliation]
  B[Cumulative assistant text] --> D
  C[Bounded activity replay] --> E[Identify surviving commentary items]
  E --> D
  D --> F[Remove matching persisted prefix]
  F --> G[Saved commentary and new visible text]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +44, Tests +69. Total +113 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 55 11 +44
Tests 1 69 0 +69
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 124 11 +113

Review metrics

None.

Technical review

Best possible solution:

Keep prefix reconciliation in the existing history owner, preserving saved commentary, genuinely new text, and established steering boundaries.

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

Yes: hydrate an active run with saved keyed commentary, cumulative text containing that commentary, and a replay snapshot lacking its item events. Current source establishes the duplicate path, and the supplied before screenshot demonstrates it; this reviewer did not execute tests.

Is this the best way to solve the issue?

Yes: the patch supplies missing replay facts to the existing reconciler and preserves the default behavior of its other callers without adding settings, storage, or a competing owner.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: Duplicate commentary after reopening a long active conversation is a bounded user-visible rendering bug.
  • add proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots from the declared mocked-Gateway browser flow demonstrate the changed history owner's visible result: duplicate persisted paragraphs disappear while new streamed text and the tool row remain. This is rendering proof, not a live-provider claim.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots from the declared mocked-Gateway browser flow demonstrate the changed history owner's visible result: duplicate persisted paragraphs disappear while new streamed text and the tool row remain. This is rendering proof, not a live-provider claim.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after screenshots from the declared mocked-Gateway browser flow demonstrate the changed history owner's visible result: duplicate persisted paragraphs disappear while new streamed text and the tool row remain. This is rendering proof, not a live-provider claim.

Label justifications:

  • P2: Duplicate commentary after reopening a long active conversation is a bounded user-visible rendering bug.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 declared mocked-Gateway browser flow demonstrate the changed history owner's visible result: duplicate persisted paragraphs disappear while new streamed text and the tool row remain. This is rendering proof, not a live-provider claim.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots from the declared mocked-Gateway browser flow demonstrate the changed history owner's visible result: duplicate persisted paragraphs disappear while new streamed text and the tool row remain. This is rendering proof, not a live-provider claim.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots from the declared mocked-Gateway browser flow demonstrate the changed history owner's visible result: duplicate persisted paragraphs disappear while new streamed text and the tool row remain. This is rendering proof, not a live-provider claim.

Evidence

What I checked:

Likely related people:

  • leapdragon: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: 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.

@RomneyDa
RomneyDa merged commit 261eb0c into main Sep 14, 2026
137 checks passed
@RomneyDa
RomneyDa deleted the fix/ui-evicted-commentary-dedup branch September 14, 2026 02:41
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
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 maintainer Maintainer-authored PR 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: S 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