Skip to content

Bug: user chat bubble rendering #899

Closed

Description

@calebeden

Seems like the same thing as reported in #880 and fixed in #883 but happened to me today on a build from main that should have included these fixes.

I ran /new to reset the session. A few minutes later, I tried sending a message "What's the weather in Redmond, WA", which rendered as two small chat bubbles, one user bubble with a comma inside it, and one agent chat bubble (but on the right side of the screen) completely empty. The copy button was able to copy the original prompt to the clipboard. Closing and reopening the window rendered it correctly the second time around.

I cannot get this to reproduce beyond the one time that it happened. I do not recall the bubble ever rendering correctly, so I don't think that it disappeared, it was never correct in the first place, so I do not believe it is related to the tool call initiated by the agent to lookup the weather. I thought it might be related to /new, but this does not seem like it was part of the original report in #880.

Activity

  1. clawsweeper commented on Jul 1, 2026

    @clawsweeper

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 30, 2026, 8:17 PM ET / 00:17 UTC.

    Summary
    Keep open: current main and the latest release contain the earlier user-bubble fix, but the newly attached screenshots show the prompt still rendering incorrectly on first display and correctly after reopening, with no later merged fix owning this recurrence.

    Reproducibility: no. The reporter provided clear before/after screenshots and a plausible /new sequence, but they could not reproduce it again and this read-only review did not run the Windows tray UI.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Next step
    Manual review is the right next step because the bug has visible proof but no deterministic repro, and a live Windows trace is needed before queueing a focused repair.

    Review details

    Best possible solution:

    A focused native chat fix should make the first-render and reopened-render user bubbles match, with Tray.Tests coverage plus visible current-head Windows proof for the /new and weather-prompt path.

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

    No. The reporter provided clear before/after screenshots and a plausible /new sequence, but they could not reproduce it again and this read-only review did not run the Windows tray UI.

    Is this the best way to solve the issue?

    Unclear. The prior narrow user-bubble reset fix is already present, so the next fix should be based on a fresh current-head UI trace rather than assuming the old root cause is complete.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • There is still no deterministic current-main reproduction; the report is a strong visible occurrence but not yet a repeatable test case.
    • The failure could sit in the user-bubble visual state, FunctionalUI TextBlock reuse, or the post-/new reset/session event gate, so a live Windows UI trace should precede a narrow repair.

    Codex review notes: model internal, reasoning high; reviewed against 4166e0fd63f8.

    Label changes

    Label changes:

    • add P2: This is a user-visible native chat rendering bug with limited blast radius and no evidence of crash, security bypass, or data loss.
    • add impact:message-loss: The prompt text is visually suppressed or misrendered in the chat transcript even though the copy action and reopen path recover the underlying message.
    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • add clawsweeper:needs-info: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • add clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.

    Label justifications:

    • P2: This is a user-visible native chat rendering bug with limited blast radius and no evidence of crash, security bypass, or data loss.
    • impact:message-loss: The prompt text is visually suppressed or misrendered in the chat transcript even though the copy action and reopen path recover the underlying message.
    Evidence reviewed

    Acceptance criteria:

    • ./build.ps1
    • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
    • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore
    • Capture visible current-head Windows tray proof for /new, sending What's the weather in Redmond, WA, and reopening the window.

    What I checked:

    • Issue report and screenshots: The issue body reports a one-time failure after /new, and the follow-up comment includes before/after screenshots: first render shows /new plus a tiny comma user bubble and an empty right-side bubble, while reopening shows the full prompt.
    • Current user-bubble render path: Current main renders user prompt text through a selection-enabled TextBlock(string.Empty) and applies reset state before ApplyPlainSelectableInlines(t, messageText). (src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs:1133, 4166e0fd63f8)
    • Selectable inline cache: ApplyPlainSelectableInlines caches the normalized text per TextBlock, clears stale inlines, and adds a single Run; this explains why copy can still return the stored prompt while the visual layer is suspect. (src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs:297, 4166e0fd63f8)
    • Session-reset path is involved: The provider clears local timeline state after sessions.reset, then gates post-reset chat frames through ShouldDropChatMessageAfterResetLocked; tests cover several post-reset send/lifecycle cases but not this exact visible first-render failure. (src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs:1593, 4166e0fd63f8)
    • Prior fix provenance: The earlier merged fix added the chat text font cache, user-bubble visual-state resets, and ChatUserBubbleTextContractTests; git tag --contains shows that fix shipped in v0.6.11. (src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs:1140, 87dc3dc79d7c)
    • Latest release check: The checkout is at v0.6.12, so the report is against a build that should include the earlier v0.6.11 user-bubble fix. (4166e0fd63f8)

    Likely related people:

    • RBrid: Authored the native FunctionalUI chat experience, markdown chat rendering, inline approval chat work, and prior chat text-vanish fixes that share the same renderer family. (role: feature owner and recent area contributor; confidence: high; commits: 08cab69a038c, 0a164fc111b2, 16929b600710; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs, src/OpenClaw.Tray.WinUI/Chat/Markdown/ChatMarkdownRenderer.cs, src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs)
    • shanselman: Authored the merged user-bubble reset fix now present on main and the current release, and current shallow blame/logs also route the checked-out chat files through recent shanselman commits. (role: recent area contributor; confidence: high; commits: 87dc3dc79d7c, 4166e0fd63f8; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs, tests/OpenClaw.Tray.Tests/ChatUserBubbleTextContractTests.cs)
    • kenehong: Local history and shortlog show substantial earlier work in the central native chat timeline and continuation/duplicate-bubble layout paths. (role: adjacent owner; confidence: medium; commits: 65ba516cc138, 53d6a3df4ce4; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs, src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs)
    How this review workflow works
    • 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.
  2. calebeden commented on Jul 1, 2026

    @calebeden
    ContributorAuthor

    Forgot to add screenshots with the original report, here they are:

    Initial rendering bug
    Image

    Rendering correct after closing and opening new window
    Image

  3. calebeden commented on Jul 1, 2026

    @calebeden
    ContributorAuthor

    I checked the logs and nothing seems unusual here. The 33 char length is correct for the message I tried to send.

    [2026-06-30 15:45:34.947] [INFO] [EVENT] Received event: tick
    [2026-06-30 15:45:34.947] [DEBUG] [NODE RX] {"type":"event","event":"tick","payload":{"ts":1782859535890},"seq":27}
    [2026-06-30 15:45:34.959] [DEBUG] [NODE] Processing message type: event
    [2026-06-30 15:46:01.245] [INFO] Sent chat message (33 chars)
    [2026-06-30 15:46:02.566] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:02.567] [DEBUG] Agent event received: stream=lifecycle len=318
    [2026-06-30 15:46:02.603] [INFO] [EVENT] Received event: sessions.changed
    [2026-06-30 15:46:02.604] [INFO] [EVENT] sessions.changed received — refreshing sessions list
    [2026-06-30 15:46:02.660] [INFO] [EVENT] Received event: session.message
    [2026-06-30 15:46:02.665] [DEBUG] Chat event received: len=1762
    [2026-06-30 15:46:02.665] [INFO] [ChatTrace] chat.message thread='[REDACTED_SESSION_KEY]' role='user' final=False len=33 h=cfe40f65
    [2026-06-30 15:46:07.198] [INFO] [EVENT] Received event: session.message
    [2026-06-30 15:46:07.200] [DEBUG] Chat event received: len=3457
    [2026-06-30 15:46:07.200] [INFO] [EVENT] Received event: session.tool
    [2026-06-30 15:46:07.201] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:07.204] [DEBUG] Agent event received: stream=item len=1439
    [2026-06-30 15:46:07.219] [INFO] [EVENT] Received event: session.tool
    [2026-06-30 15:46:07.219] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:07.220] [DEBUG] Agent event received: stream=item len=1463
    [2026-06-30 15:46:07.687] [DEBUG] [NODE RX] {"type":"event","event":"tick","payload":{"ts":1782859568819},"seq":28}
    [2026-06-30 15:46:07.687] [INFO] [EVENT] Received event: tick
    [2026-06-30 15:46:07.688] [DEBUG] [NODE] Processing message type: event
    [2026-06-30 15:46:08.908] [INFO] [EVENT] Received event: session.message
    [2026-06-30 15:46:08.918] [DEBUG] Chat event received: len=2983
    [2026-06-30 15:46:08.921] [INFO] [EVENT] Received event: session.tool
    [2026-06-30 15:46:08.925] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:08.929] [DEBUG] Agent event received: stream=item len=1393
    [2026-06-30 15:46:09.633] [INFO] [EVENT] Received event: session.tool
    [2026-06-30 15:46:09.663] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:09.664] [DEBUG] Agent event received: stream=item len=1417
    [2026-06-30 15:46:11.373] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:11.375] [DEBUG] Agent event received: stream=assistant len=236
    [2026-06-30 15:46:11.376] [INFO] [EVENT] Received event: chat
    [2026-06-30 15:46:11.376] [DEBUG] Chat event received: len=271
    [2026-06-30 15:46:11.376] [INFO] [ChatTrace] chat.message thread='[REDACTED_SESSION_KEY]' role='assistant' final=False len=3 h=6c371441
    [2026-06-30 15:46:11.584] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:11.590] [DEBUG] Agent event received: stream=assistant len=285
    [2026-06-30 15:46:11.591] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:11.592] [DEBUG] Agent event received: stream=assistant len=267
    [2026-06-30 15:46:11.592] [INFO] [EVENT] Received event: chat
    [2026-06-30 15:46:11.593] [DEBUG] Chat event received: len=328
    [2026-06-30 15:46:11.593] [INFO] [ChatTrace] chat.message thread='[REDACTED_SESSION_KEY]' role='assistant' final=False len=33 h=9ec2b210
    [2026-06-30 15:46:11.771] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:11.780] [DEBUG] Agent event received: stream=assistant len=349
    [2026-06-30 15:46:11.782] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:11.782] [DEBUG] Agent event received: stream=assistant len=312
    [2026-06-30 15:46:11.783] [INFO] [EVENT] Received event: chat
    [2026-06-30 15:46:11.784] [DEBUG] Chat event received: len=390
    [2026-06-30 15:46:11.785] [INFO] [ChatTrace] chat.message thread='[REDACTED_SESSION_KEY]' role='assistant' final=False len=76 h=f17706f4
    [2026-06-30 15:46:12.043] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:12.045] [DEBUG] Agent event received: stream=assistant len=579
    [2026-06-30 15:46:12.046] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:12.046] [DEBUG] Agent event received: stream=assistant len=448
    [2026-06-30 15:46:12.055] [INFO] [EVENT] Received event: chat
    [2026-06-30 15:46:12.058] [DEBUG] Chat event received: len=618
    [2026-06-30 15:46:12.058] [INFO] [ChatTrace] chat.message thread='[REDACTED_SESSION_KEY]' role='assistant' final=False len=208 h=766cf078
    [2026-06-30 15:46:12.323] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:12.326] [DEBUG] Agent event received: stream=assistant len=530
    [2026-06-30 15:46:12.330] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:12.331] [DEBUG] Agent event received: stream=assistant len=502
    [2026-06-30 15:46:12.331] [INFO] [EVENT] Received event: chat
    [2026-06-30 15:46:12.333] [DEBUG] Chat event received: len=579
    [2026-06-30 15:46:12.333] [INFO] [ChatTrace] chat.message thread='[REDACTED_SESSION_KEY]' role='assistant' final=False len=255 h=3be6850f
    [2026-06-30 15:46:12.513] [INFO] [EVENT] Received event: session.message
    [2026-06-30 15:46:12.514] [DEBUG] Chat event received: len=3198
    [2026-06-30 15:46:12.515] [INFO] [ChatTrace] chat.message thread='[REDACTED_SESSION_KEY]' role='assistant' final=False len=284 h=e57bedc7
    [2026-06-30 15:46:12.516] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:12.516] [DEBUG] Agent event received: stream=assistant len=554
    [2026-06-30 15:46:12.522] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:12.522] [DEBUG] Agent event received: stream=lifecycle len=384
    [2026-06-30 15:46:12.541] [INFO] [EVENT] Received event: agent
    [2026-06-30 15:46:12.541] [DEBUG] Agent event received: stream=lifecycle len=383
    [2026-06-30 15:46:12.543] [INFO] [EVENT] Received event: chat
    [2026-06-30 15:46:12.543] [DEBUG] Chat event received: len=589
    [2026-06-30 15:46:12.544] [INFO] [ChatTrace] chat.message thread='[REDACTED_SESSION_KEY]' role='assistant' final=False len=284 h=e57bedc7
    [2026-06-30 15:46:12.545] [INFO] [EVENT] Received event: chat
    [2026-06-30 15:46:12.545] [DEBUG] Chat event received: len=565
    [2026-06-30 15:46:12.546] [INFO] [ChatTrace] chat.message thread='[REDACTED_SESSION_KEY]' role='assistant' final=True len=284 h=e57bedc7
    [2026-06-30 15:46:12.547] [INFO] Assistant response: role=assistant state=final len=284
    
  4. locked as resolved and limited conversation to collaborators on Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions