Fix chat bubble text vanish on hover-out and tool-card collapse on click - #589
Conversation
Bug openclaw#1: Selecting text in a chat bubble lost the selection as soon as the pointer left the bubble. ChatMarkdownRenderer was re-applying the same MdInline list to TextBlock.Inlines on every render, which wiped the Run instances the selection pointed to. Cache the last applied inline list on each TextBlock via ConditionalWeakTable and skip re-application when the list is reference-equal. Add reflection-based equality guard tests for MdInline to ensure new fields are included in equality comparisons. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When the mouse exited an assistant bubble containing a tool-output panel, the wrapped text inside vanished, leaving an empty rectangle. Clicking anywhere in the panel also toggled collapse. Both behaviors are fixed: * Phase A: Memoize tool-output Inlines via ConditionalWeakTable so parent re-renders (e.g. hover-out flipping `hoveredEntries`) no longer rebuild the TextBlock content and invalidate live selections. * Restructure the tool card so only the header is a Button. The body sits in a sibling row, so clicks/selections inside the body no longer collapse the panel. Bottom-corner rounding is driven by `hasExpandedBody` to keep the visual seam consistent. * Hoist the `Cascadia Code` FontFamily out of the per-render lambda. FontFamily is a DependencyObject with thread affinity, so the static field is backed by a per-DispatcherQueue ConditionalWeakTable cache (mirrors the existing brush-cache pattern). Off-dispatcher callers (tests / design-time) get a one-shot uncached instance. Validation: `./build.ps1` green; Shared tests 2031 passed / 29 skipped; Tray tests 868 passed; manual repro confirmed cured by user. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs real behavior proof before merge. Reviewed June 5, 2026, 1:55 PM ET / 17:55 UTC. Summary Reproducibility: Source-reproducible, but not runtime-reproduced here: current master still wraps the tool body in the toggle Button and renders tool output through direct TextBlock text with a fresh FontFamily. The supplied screenshots corroborate the empty-output symptom but do not exercise both interactions after the fix. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused tray chat fix after interactive proof is added and maintainers either accept the accessibility follow-up or require accessibility wiring before merge. Do we have a high-confidence way to reproduce the issue? Source-reproducible, but not runtime-reproduced here: current master still wraps the tool body in the toggle Button and renders tool output through direct TextBlock text with a fresh FontFamily. The supplied screenshots corroborate the empty-output symptom but do not exercise both interactions after the fix. Is this the best way to solve the issue? Mostly yes: the patch follows the existing inline-cache pattern and narrows the collapse toggle to the header, which is the right ownership boundary. It is not merge-ready until the interaction proof and accessibility deferral decision are handled. AGENTS.md: found, but no applicable review policy affected this item. Codex review notes: model gpt-5.5, reasoning high; reviewed against 99efc50cbc22. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
Fixes two bugs in the tray chat timeline (OpenClawChatTimeline.cs):
Files changed
Key regions (post-merge with master):
Validation
Review
Underwent a dual-model adversarial review (Claude Opus + GPT Codex) of the diff. Consensus hardening applied:
A follow-up a11y issue (HIGH severity, 60% confidence: tool-output body sits outside the header Button's automation subtree → Narrator may miss body content) was deferred to keep this PR scoped to the user-reported bug.
Screenshot with disappearing tool content:

After fix:
