Skip to content

fix: a repeated chat frame no longer blanks the assistant reply already on screen - #2431

Merged
shanselman merged 2 commits into
openclaw:mainfrom
shanselman:fix-2254-blank-chat-bubble
Dec 2, 2026
Merged

shanselman merged 2 commits into
openclaw:mainfrom
shanselman:fix-2254-blank-chat-bubble

Conversation

@shanselman

@shanselman shanselman commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 7bb4d97edb5f3d7f16a5f6047d04c38fea6b8e09

Dimension Assessment Rationale
Change confidence 9/10 ↑ Five-line guard mirrors the existing reconcile and new-bubble guards.
↑ Build, Shared 6236/0 failed, Tray 7228/0 failed locally.
↑ CI Gate green on this head after one rerun of an unrelated setup UI test (NativeSharedFlowTests.ConfigurationChangeWithdrawsReadyWithoutReplayingSetup).
↑ Live openclaw@2026.11.13 Gateway (disposable Windows Sandbox, fake local model, no credentials): a tool-using reply rendered correctly on this head.
↓ Proof was a client harness on the real socket, not a Companion UI screenshot.
Diagnosis confidence 9.5/10 ↑ Reducer test and fixture socket test both fail without the guard and pass with it.
Evidence fit 6/10 ↑ The reported frame order blanks the reply through the real client, bridge and provider.
↓ A live 2026.11.13 Gateway did not reproduce the blank on main: it streams each reply separately (not cumulative) and sends its empty replace frame only after the reply is saved.
↓ The reported cumulative frames likely depend on a Gateway version or provider path not tested here.

Closes #2254. During a chat reply that uses a tool, Companion shows a second assistant bubble after the tool runs; if the Gateway then repeats a frame holding only the first bubble's text, that second bubble went blank. This is @SebTardif's fix, cherry-picked with his authorship from his fork (SebTardif/openclaw-windows-node#12) because he could not open a PR here. The streaming fast path now ignores a repeated frame that adds no new text, as the other two paths already did. Opened by a Copilot agent, not Scott.

Two tests fail with the reducer guard removed and pass with it: the reducer test IntraTurnFastPath_RegressionCumulative_DoesNotBlankActiveBubble (bubble text ""), and InteractiveGatewayChatTests.RepeatedCumulativeChatFrameAfterToolDoesNotBlankSecondReplyOverTheRealSocket, which sends the reported frames from the fixture Gateway through the real WebSocket client, chat bridge and provider. ./build.ps1 succeeded, Shared tests passed 6236 (28 skipped) and Tray tests passed 7228 (excluding the host-profile-only OpenClawTrayDataDirRedirectsSettingsAwayFromRealAppData). Required proof pools: none, since the change is a pure timeline reducer. Live check: a real openclaw@2026.11.13 Gateway in a disposable Windows Sandbox, with an empty state directory and a fake local OpenAI-compatible model returning a tool-using reply, was driven through the real client, bridge and provider. The reply stayed intact on this head and also on main, so this setup did not reproduce #2254: that Gateway streams each reply separately and sends its empty replace frame after the reply is saved. The fix is still safe; whether a live Gateway sends the reported cumulative frames remains unconfirmed.

The fast path wrote the stripped text even when the strip consumed
the whole frame. The reconcile and new-bubble paths already leave
that bubble alone. The fast path now does the same. A later frame
that still has new text still updates the bubble.

Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
@clawsweeper

clawsweeper Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

🦞👀
Pull request received.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. impact:session-state This issue is about session, memory, transcript, context, or agent state drift. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Dec 1, 2026
@clawsweeper

clawsweeper Bot commented Dec 1, 2026

Copy link
Copy Markdown

Codex review: passed.

What this changes

Preserves the active assistant bubble when a repeated cumulative chat frame strips to empty.

Example: After a tool call, a second bubble displays "Here's the partial finding so far for A2." and a frame repeats only "Investigating the workspace layout in detail now."

  • Before: The second bubble becomes empty.
  • After: The second bubble retains its text and identity, and subsequent new text updates it.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A minimal, source-supported repair with useful regression coverage; confidence in real frame delivery remains limited to the supplied unit evidence.
Proof confidence 🦐 gold shrimp (3/6) The contributor proof gate is exempt; supplied evidence exercises the production reducer through unit tests rather than a live Gateway or mounted chat window.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A repeated earlier chat frame erases the visible assistant reply after a tool call.
Reason: Preserving already displayed reply content is established behavior, and the maintainer-authored PR supplies a narrow repair with distinct coverage.

Merge readiness

✅ Ready for maintainer review

This maintainer-authored PR fixes a source-verifiable defect still present on main; the focused patch has no actionable findings.

Reviewed head: e39cb52096c99d689f46569712ba6f711bbd52a4

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway chat messages become timeline events consumed by ChatTimelineReducer, whose returned state supplies Companion's native conversation display.

flowchart LR
  A[Gateway chat frames] --> B[Chat data provider]
  B --> C[Conversation state]
  C --> D[Chat timeline reducer]
  D --> E[Native conversation display]
Loading

Technical review

Best possible solution:

Land the existing minimal guard and regression through the normal CI gates.

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

The supplied event sequence reaches main's unguarded empty assignment while the second assistant remains active; the PR reports an exact failing-before/passing-after regression, which this read-only review did not execute.

Is this the best way to solve the issue?

The guard repairs the missing branch of an established duplicate-frame contract without changing prefix matching, delta appends, explicit identities, or ownership.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Régis Brid: Raw commit 5505a85 adds src/OpenClaw.Chat/ChatTimelineReducer.cs:339 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5505a85da7df; files: src/OpenClaw.Chat/ChatTimelineReducer.cs)
  • Barbara Kudiess: Raw commit 243f9cf adds src/OpenClaw.Chat/ChatTimelineReducer.cs:1317 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 243f9cff53d8; files: src/OpenClaw.Chat/ChatTimelineReducer.cs)
  • Scott Hanselman: Raw commit 7051c98 adds src/OpenClaw.Chat/ChatTimelineReducer.cs:1588 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7051c9869040; files: src/OpenClaw.Chat/ChatTimelineReducer.cs)

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
Focused change size Production +5/-0 lines; tests +43/-0 lines One guard and one distinct regression fit the existing owner without adding state or abstractions.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ 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 December 1, 2026, 12:08 PM ET / 17:08 UTC.

Drives the openclaw#2254 frame order through the real WebSocket client, chat bridge and provider. Fails without the reducer guard (second reply goes blank) and passes with it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@shanselman
shanselman merged commit 4102528 into openclaw:main Dec 2, 2026
56 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:session-state This issue is about session, memory, transcript, context, or agent state drift. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

A repeated chat frame blanks the assistant bubble already on screen

2 participants