Repository navigation
Description
Problem
Chat messages render markdown into a FunctionalUI Element tree. Prose (paragraphs + headings) and now simple lists coalesce into a single per-message RichTextBlock so they are one continuous drag-selection scope (branch karkarl-chat-bubble-richtextblock, commit 47b335d, follow-up to 2fa7279). However, selection is still fragmented at every styled island:
- Code blocks, tables, block quotes, thematic breaks, and any complex list (an item containing one of those) render as their own controls and are their own selection islands.
- You cannot drag-select from one message into another, or across a code block, in one gesture.
This is a hard WinUI limitation, confirmed during the RichTextBlock work:
InlineUIContainerbreaks text selection at its boundary and is excluded fromSelectedText, so styled cards cannot be embedded in-flow without losing selection.- There is no built-in mechanism for continuous selection spanning multiple sibling controls.
TextHighlighterkeeps text in-flow and selectable but only hugs glyphs per line (no padding/border/rounded corners/scroll), so it cannot preserve code-card chrome.
The per-message Copy button is the current whole-message grab affordance, and simple lists + prose now select as one block — this issue tracks going the rest of the way.
Goal
Whole-transcript (or at least whole-message, spanning styled islands) continuous selection, while keeping code blocks / tables / block quotes as separately styled, chrome-bearing surfaces.
Approach (to design)
Build a custom selection manager plus a custom UI Automation ITextProvider / ITextRangeProvider over the chat surface so a single drag maps to a logical text range that crosses control boundaries:
- Hit-test + anchor/focus tracking across child controls (prose RichTextBlocks + island cards).
- A logical document/offset model that stitches the rendered blocks into one selectable stream (including code/table text).
- Custom
TextPatternprovider for accessibility +Ctrl+Csemantics that mirror the visible selection. - Painting the selection highlight across islands without the native per-control selection overlay fighting it.
Constraints
- Keep the inert-markdown security posture (no
Hyperlink/BitmapImage;AppendInlinesstays inert). - Preserve the selection-preservation cache invariant (re-render/AST-reparse must not wipe an active selection).
- Keep code/table/blockquote visual chrome intact.
References
- Branch
karkarl-chat-bubble-richtextblock, commits 2fa7279 (prose coalescing) and 47b335d (simple-list coalescing) — PR pending from this branch; cross-link once opened. - File:
src/OpenClaw.Tray.WinUI/Chat/Markdown/ChatMarkdownRenderer.cs(coalescing + island rendering).
Out of scope
The RichTextBlock coalescing already landed. This issue is the larger custom-selection-engine follow-up.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
karkarl commentedon Jul 15, 2026
Base implementation landed in #997 (per-message RichTextBlock coalescing prose + simple lists). This issue tracks the custom cross-control selection engine to extend selection across the styled islands (code/table/blockquote) that #997 leaves separate.
clawsweeper commentedon Jul 16, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 23, 2026, 8:20 AM ET / 12:20 UTC.
Summary
Keep open for a maintainer product decision. Current main has no custom cross-control selection or text-provider layer, and the prior per-message selection renderer is no longer the production chat path.
Reproducibility: yes. for the missing custom engine: current source has no logical cross-control range or text-provider implementation. A current-head native-app capture is still needed to verify the exact Reactor Markdown drag behavior.
Regression provenance
Possible regression — suspected (reviewed change). No predecessor PR is attributed.
Maintainer decision needed
Why: The proposed engine changes native selection, clipboard semantics, accessibility, and virtualized timeline ownership; current source does not establish those product choices.
Next step
A maintainer must choose the supported selection and accessibility scope before a large virtualized-selection implementation can be safely bounded.
Review details
Best possible solution:
Decide the supported selection contract, restore and prove per-message native selection in the live Reactor path if it remains required, then design any transcript-wide range model with virtualization and UI Automation coverage.
Do we have a high-confidence way to reproduce the issue?
Yes for the missing custom engine: current source has no logical cross-control range or text-provider implementation. A current-head native-app capture is still needed to verify the exact Reactor Markdown drag behavior.
Is this the best way to solve the issue?
No, immediate implementation is not the best path. The production renderer no longer uses the earlier per-message coalescing path, so maintainers should first choose the supported baseline and transcript-selection scope.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against ccd64bbb7d68.
Label changes
Label justifications:
P3: This is a non-blocking transcript interaction improvement, and whole-message Copy remains available.impact:ux-friction: Fragmented selection makes partial copying awkward without preventing users from copying the entire message.Evidence reviewed
What I checked:
src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:439, ccd64bbb7d68)src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:157, ccd64bbb7d68)src/OpenClaw.Tray.WinUI/Chat/Markdown/ChatMarkdownRenderer.cs:39, d3ed6c78bf14)Likely related people:
src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs)src/OpenClaw.Tray.WinUI/Chat/Markdown/ChatMarkdownRenderer.cs)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.3 remaining items
github-actions commentedon Aug 23, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updated OpenClaw Windows details or it will be closed.
github-actions commentedon Aug 31, 2026
Closing due to inactivity.
If this still affects OpenClaw Windows, open a new issue with the current version, logs, and fresh reproduction details.