Skip to content

fix(chat): text selection stops at Markdown block boundaries - #1844

Closed
karkarl wants to merge 14 commits into
openclaw:mainfrom
karkarl:karkarl-cross-block-markdown-selection
Closed

karkarl wants to merge 14 commits into
openclaw:mainfrom
karkarl:karkarl-cross-block-markdown-selection

Conversation

@karkarl

@karkarl karkarl commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Source: paulcam206's branch at d70d8936.

What Problem This Solves

Fixes: selecting an excerpt from an assistant reply stops at separate Markdown blocks instead of continuing through the visible message.

User Impact

User impact: this implementation coordinates selection and copy across paragraphs, lists, code, table cells, and visible disclosure summaries/bodies within one assistant message. It also renders allowlisted <details>/<summary> wrappers as native expanders; collapsed bodies are excluded from selection.

Draft only, not merge-ready. Full suites have failures outside the changed implementation, one changed list-range assertion failed in a combined native run, interactive behavior proof remains incomplete, and independent review raised keyboard-navigation and accessibility concerns below. The colleague's implementation is preserved, not silently revised.

Why This Change Was Made

Native Markdown blocks retain their existing layout while one NativeChatMessageText owner coordinates each realized message. ChatTextSelectionDocument maps visible text to UTF-16 offsets with grapheme-aware keyboard movement; ChatTextSurface maps those offsets to native geometry and highlights. ChatMessageTextAutomationPeer exposes the message as a UI Automation Text document. Reactor still owns rendering, keyed rows, reconciliation, and virtualization.

This imports all 13 colleague commits, including disclosure prerequisites, preserving their original authorship and commit IDs. Merge candidate 7d67ad90b605942951f33d984634e17294445458 combines source d70d8936 with observed upstream bef07da01911fa78ed5ab728ab9248bbb1ec0466. Their original common ancestor is 50d0b34a4e71a51286ad5346b57a388ebf805fd6; the PR diff is against the newer upstream parent, not the old fork base. The merge was conflict-free and no implementation changes were added.

How this maps to Reactor, and a proposed upstream port

This is already integrated into Reactor through a generated wrapper around NativeChatMessageText, used by ReactorChatTimeline.BuildSafeMarkdown. It is not a Reactor-library change yet.

The app pins Reactor 0.1.0-preview.12. Upstream MarkdownBuilder at 5ba98bf7, also checked at v0.1.0-preview.16, already offers MarkdownOptions.UnifiedRichText. It combines flow paragraphs/headings into one RichTextBlock, but embeds non-flow blocks with InlineUIContainer. Its own documentation says lists/code/tables still break selection. Simply enabling that option does not implement this PR's full contract.

Recommended port, not implemented by this PR:

  1. Move the generic document model, text-surface adapter, native selection host, and Text provider into Reactor behind an opt-in selection scope. Keep selection bounded to one Markdown instance and preserve existing rendering by default. Resolve the review concerns before upstreaming.
  2. Have Reactor's Markdown builder explicitly register semantic text surfaces and separators, including list markers, table rows/cells, code content, and visible custom blocks. Replace this implementation's dependency on runtime Grid/Stack shapes and app-owned ListRowProperty with a supported renderer contract. Custom render callbacks need a way to register selectable text and exclude toolbar chrome.
  3. Keep OpenClaw sanitization, inert link/image policy, disclosure allowlisting, localized copy feedback, and per-message policy application-owned. Provide generic visibility/custom-block hooks so expanders can update the scope without requiring Reactor to adopt OpenClaw's disclosure parser.
  4. Use reconciliation/mount/unmount hooks to register, update, suspend, and dispose surfaces. Preserve selection when text streams, invalidate stale callbacks, restore native child state on unload, and prevent selection leaking between recycled messages. Avoid concurrent native-leaf and scope selection owners.
  5. Port the seven pure selection tests and native geometry, keyboard, highlighting, UIA, disclosure, resize, and lifecycle proofs into Reactor's tests/gallery. Add keyboard navigation across fully clipped blocks and range-scoped embedded-provider discovery. Verify real ItemsView recycling, physical input, Narrator, and Windows High Contrast separately.
  6. Adopt a released Reactor version containing the new scope, then remove the app-owned generic classes. A package upgrade also needs source adaptation: newer Reactor moves Markdown factories to Microsoft.UI.Reactor.Advanced.Factories and returns an Auto/Star Grid for list rows. The preview.12 Stack-specific workaround must not be carried forward unchanged.

Preserved invariant: native presentation and interactive widgets remain intact while pointer, keyboard, copy, and assistive technology share one visible-text range per message.

Evidence

Current-candidate ARM64 Debug build passed all five production projects; the Release UI test build also passed. Focused selection/disclosure tests passed 45/45. All 10 native selection cases (five each in Debug/Release, Light) and four Debug disclosure cases passed in separate processes, with no skips. Full Shared: 4,655 passed, 3 failed, 26 skipped; full Tray: 4,504 passed, 13 failed. These are local run results, not GitHub CI or physical end-user interaction proof.

The adjacent list/table suite reported 3 passed, 1 failed: the bullet-list case could not find its text through the new Text provider (ReactorMarkdownListProofTests.cs:60). A fresh-process rerun of both resize variants passed 2/2. The original failure is retained as an unresolved timing/order-sensitive concern, not erased by the rerun.

Independent implementation/proof-plan review used the advertised code-review role, with model identity unverified. It raised two P2 concerns retained for review:

  • NativeChatMessageText.ProcessKey uses OffsetFromPoint, which filters fully clipped surfaces via VisibleBounds. Down/PageDown navigation can fail to reach the next off-screen block. A native viewport-boundary regression is still needed.
  • ChatMessageTextAutomationPeer.TextRange.GetChildren() unconditionally returns an empty array. Range-based clients cannot discover embedded interactive controls through this method; native control peers elsewhere in the tree do not demonstrate this Text range contract. Add range-scoped coverage and determine the appropriate providers.

Canonical shared autoreview was unavailable because its installed skill was absent. The independent review above is not a shared-helper report. Production ItemsView recycling, Narrator, real High Contrast, and physical input remain unverified.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-winui-interactive: native message selection, disclosure interaction, rendered highlighting, and accessibility changed. Current-head app-visible, physical-input, Narrator, and actual Windows High Contrast evidence is not collected.

Validation

All results below use candidate 7d67ad90b605942951f33d984634e17294445458 on Windows ARM64 with .NET SDK 10.0.402. OPENCLAW_REPO_ROOT points to the task worktree; Tray settings use an isolated task-owned directory.

Exact command Result
powershell -NoProfile -ExecutionPolicy Bypass -File .\build.ps1 Passed: Shared, Cli, WinNodeCli, SetupEngine, WinUI, Debug win-arm64. Documentation validation passed, 66 Markdown files.
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore Initial attempt failed before execution: NETSDK1004, missing fresh-worktree assets.
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore Initial attempt failed before execution: NETSDK1004, missing fresh-worktree assets.
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj After restore: 4,655 passed, 3 failed, 26 skipped, 4,684 total. Two executable-resolution failures involving PowerShell and one missing symbolic-link privilege.
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj After restore: 4,504 passed, 13 failed, 0 skipped, 4,517 total. Nine Kokoro ownership cases cannot launch pwsh; four BuildPrerequisite resolver cases fail assertions. These owners were not changed; no baseline run was performed.
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter 'FullyQualifiedName~ChatTextSelectionDocumentTests|FullyQualifiedName~ChatMarkdownDisclosureTests' --logger 'console;verbosity=normal' Passed: 45/45, no skips. The filter uses a literal pipe between the two class selectors.
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-ci-workflow-contract.ps1 Failed in existing Invoke-CiProcess.ps1: ProcessStartInfo.ArgumentList is unavailable in Windows PowerShell 5.1. PowerShell 7 is absent.
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-dev.ps1 -CheckOnly Passed reported build prerequisites; no installation. This does not resolve the separate PowerShell 7 or symlink-privilege blockers.
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\Get-CiChangeClassification.ps1 -EventName pull_request -BaseSha bef07da01911fa78ed5ab728ab9248bbb1ec0466 -HeadSha 7d67ad90b605942951f33d984634e17294445458 -Human Read-only plan completed: full classification because CI infrastructure changed. Not executed CI.

The first direct .\build.ps1 attempt was blocked by script execution policy. The first process-scoped retry was interrupted during Shared; the subsequent complete invocation passed. No machine-wide execution policy was changed.

Native proof commands and results

UI runs additionally set OPENCLAW_TRAY_APPDATA_DIR and OPENCLAW_TRAY_LOCALAPPDATA_DIR to task-owned directories. No physical-input flag was enabled. Every filtered invocation used a fresh test process; TRX totals and executed counts were checked, not exit status alone.

The first three Debug selection cases used the repository runner:

foreach ($case in @(
    'VisibleMessage_PointerKeyboardCopyAndTextProviderShareOneRange',
    'MessageBoundary_DragScrollAndRealizationReuse',
    'NativeUnits_RespectWrappingParagraphsAndTransientReload'
)) {
    $name = "selection-debug-$($case.Split('_')[0].ToLowerInvariant())-light-arm64"
    powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run-proof-tests.ps1 `
        -Project 'tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj' `
        -Filter "Category=NativeMarkdownSelectionProof&FullyQualifiedName~$case&DisplayName~Light" `
        -ResultName $name -Configuration Debug -RuntimeIdentifier win-arm64 `
        -ResultsDirectory TestResults\MarkdownSelection
}

Result: 1/1 passed per invocation, 3/3 total, no skips. The initial repeated-build matrix was stopped during the next invocation to avoid rebuilding the same binaries for every case. That incomplete invocation is not counted.

Remaining Debug invocations used already-built current-head binaries:

$filters = @(
    'Category=NativeMarkdownSelectionProof&FullyQualifiedName~SelectionPaint_PartialBlocksSurviveInactiveFocusAndReconcile&DisplayName~Light',
    'Category=NativeMarkdownSelectionProof&FullyQualifiedName~DisclosureSelection_VisibleSummaryAndExpandedBody&DisplayName~Light',
    'Category=NativeMarkdownProof&DisplayName~Light',
    'Category=NativeMarkdownProof&DisplayName~Dark',
    'Category=NativeMarkdownProof&DisplayName~HighContrast',
    'FullyQualifiedName~ReactorMarkdownDisclosureProofTests.AssistantMarkdown_UntrustedContentRemainsInertInsideDisclosure',
    'FullyQualifiedName~ReactorMarkdownListProofTests|FullyQualifiedName~ReactorMarkdownTableProofTests'
)
$index = 0
foreach ($filter in $filters) {
    $index++
    $name = "native-debug-prebuilt-$index"
    dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj `
        -c Debug -r win-arm64 --no-build --no-restore --filter $filter `
        --logger "trx;LogFileName=$name.trx" `
        --results-directory "TestResults\MarkdownSelection\$name"
}

Results: invocations 1-6 each 1/1 passed; invocation 7 3 passed, 1 failed. HighContrast here is a synthetic resource scope, not Windows High Contrast switching.

dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj `
    -c Debug -r win-arm64 --no-build --no-restore `
    --filter 'FullyQualifiedName~ListContent_WrapsWithinRemainingWidthAndReflowsOnResize' `
    --logger 'trx;LogFileName=list-resize-isolated.trx' `
    --results-directory TestResults\MarkdownSelection\list-resize-isolated

Result: 2/2 passed in the isolated diagnostic rerun. Original combined-run failure remains unresolved.

dotnet build .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj `
    -c Release -r win-arm64 --no-restore
foreach ($case in @(
    'VisibleMessage_PointerKeyboardCopyAndTextProviderShareOneRange',
    'MessageBoundary_DragScrollAndRealizationReuse',
    'NativeUnits_RespectWrappingParagraphsAndTransientReload',
    'SelectionPaint_PartialBlocksSurviveInactiveFocusAndReconcile',
    'DisclosureSelection_VisibleSummaryAndExpandedBody'
)) {
    $name = "native-release-$($case.Split('_')[0].ToLowerInvariant())"
    dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj `
        -c Release -r win-arm64 --no-build --no-restore `
        --filter "Category=NativeMarkdownSelectionProof&FullyQualifiedName~$case&DisplayName~Light" `
        --logger "trx;LogFileName=$name.trx" `
        --results-directory "TestResults\MarkdownSelection\$name"
}

Result: build passed, 0 errors, 1 obsolete-API warning; tests 1/1 passed per invocation, 5/5 total, no skips. These ARM64 ad hoc runs have no inventory-bound proof summary and do not complete the interactive pool or establish the x64 CI lane.

Real Behavior Proof

  • Environment tested: Windows ARM64, isolated WinUI testhost with real native geometry, highlight rendering, and Text providers; no shared app/Gateway changes.
  • PR head or commit tested: 7d67ad90b605942951f33d984634e17294445458.
  • Exact steps or command run: exact fresh-process commands and counts above.
  • Evidence after fix: native selection 10/10 and disclosure 4/4 passed. Example copied runner output: {"discovered":1,"executed":1,"passed":1,"failed":0,"skipped":0,"outcome":"passed"} for VisibleMessage_PointerKeyboardCopyAndTextProviderShareOneRange(theme: "Light"). The paint case passed in both Debug and Release.
  • Observed result: isolated native selection/disclosure contracts passed, including injected copy and provider APIs; full-suite, combined list-range, and interactive-proof gates are not satisfied.
  • Screenshot or artifact links verified? (Yes/No/N/A): N/A, no public screenshots or test artifacts uploaded.
  • Not verified or blocked: full clean local closeout; the combined-run list-range failure; x64 CI execution; current-head app-visible evidence; physical pointer/keyboard and OS clipboard interaction; real High Contrast; Narrator; production ItemsView recycling; shared autoreview; disposition of the two P2 review concerns.

Security Impact

  • New permissions or capabilities? (Yes/No): No.
  • Secrets or tokens handling changed? (Yes/No): No.
  • New or changed network calls? (Yes/No): No.
  • Command or tool execution surface changed? (Yes/No): No.
  • Data access scope changed? (Yes/No): No.
  • If any answer is Yes, explain the risk and mitigation: N/A. Disclosure parsing remains allowlisted rather than enabling general HTML. Existing sanitization and inert links/images remain; selected visible message text is copied only on user action.

Compatibility and Migration

  • Backward compatible? (Yes/No): Yes for configuration and wire contracts; native text interaction and accessibility behavior intentionally change and need the proof above.
  • Config or environment changes? (Yes/No): No for users. CI adds isolated native Markdown proof invocations.
  • Migration needed? (Yes/No): No.
  • If yes, list the exact upgrade steps: N/A. The proposed upstream Reactor port is future work, not a dependency upgrade in this PR.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🦞👀
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.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codex review: needs changes before merge.

What this changes

This PR coordinates selection and copying across one assistant message and adds native Markdown disclosures.

Example: Select from “Opening paragraph” through a bullet and the code line “code two”.

  • Before: Selection stops at a native Markdown block boundary.
  • After: The proposed message-level range includes the intervening visible text and copies it in order.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Useful direction and substantive native harness coverage, with concrete implementation/test defects and no supplied shipped-entry-point selection proof.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 5 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users cannot reliably select and copy an excerpt spanning multiple Markdown blocks in one assistant reply.
Reason: The reported workflow has clear value and prior selection history supports the direction; maintainer authorship settles adoption without another product approval.

Merge readiness

⛔ Needs changes before merge - 6 items remain

Keep this useful maintainer-authored draft open: main still fragments selection, but the replacement has concrete scrolling, accessibility, and test-contract defects.

Priority: P2
Reviewed head: 7d67ad90b605942951f33d984634e17294445458

Before merge

  • Handle the production ScrollView during selection autoscroll (P2) - A long assistant reply is hosted inside ItemsView.ScrollView, as confirmed by ReactorItemsViewScrollController and the production-layout tests. This loop collects only ScrollViewer ancestors, so dragging past the transcript edge cannot scroll the real timeline; its bounds also remain the whole XamlRoot instead of the transcript viewport. VisibleBounds repeats the same omission, allowing UIA visible ranges to include text clipped by that viewport. Support ScrollView in the existing owner and exercise the production ItemsView rather than only a standalone ScrollViewer fixture.
  • Expose embedded controls through the text range provider (P2) - For a document containing a disclosure, DocumentRange.GetChildren always returns an empty array even though the range contains a native Expander with an ExpandCollapse provider. A text-range client therefore cannot discover or invoke that embedded control through the new document contract. Return the appropriate range-scoped providers and preserve their RangeFromChild mapping, as required by the UI Automation Text contract. Checking that a peer exists elsewhere in the tree does not cover this path.
  • Update the production-layout test for message-owned selection (P2) - Once the assistant message loads, ChatTextSurface.Apply explicitly sets its RichTextBlock.IsTextSelectionEnabled to false. This unchanged assertion still requires true in ProductionRoot_AlignsColumnAndKeepsEveryComposerActionReachable, so the existing UI matrix conflicts with the intended takeover. Replace the leaf-selection assertion with an observable selection/copy assertion through the message owner, preserving the surrounding layout coverage.
  • Restore the independent UI profile-isolation guard (P3) - Removing UiLane_IsolatesEveryProductRootAndSeparatesNativeOnboardingProof also removes the only checks for the UI job's exact data, roaming AppData, local AppData, and repository-root bindings. The updated PowerShell contract checks the new category filter but replaces none of those assertions. A later missing or misdirected binding would now pass this coverage and could point UI tests at unintended profile state. Preserve those independent assertions while adapting the filter, as the test-audit policy requires.
  • Correct the documented selection owner (P3) - The added disclosure contract says selection still belongs to each native Markdown text control, while this PR disables those controls' selection and the later section assigns one range to NativeChatMessageText. These are incompatible descriptions of the shipping interaction contract. Update this sentence to the message-level owner.
  • Explain or restore the original intent of Independent UI profile-isolation coverage - feat: guide Windows onboarding from setup to native AI tasks #1531: Keep UI tests isolated from product data through distinct data, roaming, local, and repository roots; deleting the complete guard is not justified by changing its filter assertion.

Findings

  • [P2] Handle the production ScrollView during selection autoscroll — src/OpenClaw.Tray.WinUI/Chat/Markdown/NativeChatMessageText.cs:344-350
  • [P2] Expose embedded controls through the text range provider — src/OpenClaw.Tray.WinUI/Chat/Markdown/ChatMessageTextAutomationPeer.cs:176-177
  • [P2] Update the production-layout test for message-owned selection — tests/OpenClaw.Tray.UITests/ReactorChatLayoutProofTests.cs:1136-1138

Provenance

  • Independent UI profile-isolation coverage changes intended behavior without addressing why it exists (feat: guide Windows onboarding from setup to native AI tasks #1531: Keep UI tests isolated from product data through distinct data, roaming, local, and repository roots; deleting the complete guard is not justified by changing its filter assertion.)

Tests

  • Missing end-to-end proof: Supplied evidence does not show the shipped chat exercising physical cross-block selection and clipboard behavior in its real ItemsView viewport, including keyboard boundary movement and recycling; a base-fail/head-pass regression run is also not shown.
Agent review details

How this fits together

Assistant text enters ReactorChatTimeline, passes through sanitization and Markdown rendering, and becomes native controls inside a virtualized ItemsView; the new owner coordinates their selection, clipboard operations, and UI Automation ranges.

flowchart LR
A[Assistant text] --> B[Sanitizer and disclosure parser]
B --> C[Reactor Markdown rendering]
C --> D[Native message selection owner]
D --> E[Text surfaces and highlights]
D --> F[Clipboard]
D --> G[UI Automation]
H[ItemsView ScrollView] --> D
Loading

Technical review

Best possible solution:

Complete the existing message owner’s ScrollView and accessibility integration while preserving native layout, inert content, message isolation, and independent regression coverage.

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

Current-main source exposes separate selectable Markdown controls, consistent with the block-boundary report at #1550; no interactive reproduction was run during this read-only review.

Is this the best way to solve the issue?

A single native selection owner addresses styled blocks that Reactor’s UnifiedRichText option explicitly leaves separate, but its viewport handling must match the production ItemsView and its Text provider must expose embedded controls.

Full review comments:

  • [P2] Handle the production ScrollView during selection autoscroll — src/OpenClaw.Tray.WinUI/Chat/Markdown/NativeChatMessageText.cs:344-350
    A long assistant reply is hosted inside ItemsView.ScrollView, as confirmed by ReactorItemsViewScrollController and the production-layout tests. This loop collects only ScrollViewer ancestors, so dragging past the transcript edge cannot scroll the real timeline; its bounds also remain the whole XamlRoot instead of the transcript viewport. VisibleBounds repeats the same omission, allowing UIA visible ranges to include text clipped by that viewport. Support ScrollView in the existing owner and exercise the production ItemsView rather than only a standalone ScrollViewer fixture.
    Confidence: 0.99
  • [P2] Expose embedded controls through the text range provider — src/OpenClaw.Tray.WinUI/Chat/Markdown/ChatMessageTextAutomationPeer.cs:176-177
    For a document containing a disclosure, DocumentRange.GetChildren always returns an empty array even though the range contains a native Expander with an ExpandCollapse provider. A text-range client therefore cannot discover or invoke that embedded control through the new document contract. Return the appropriate range-scoped providers and preserve their RangeFromChild mapping, as required by the UI Automation Text contract. Checking that a peer exists elsewhere in the tree does not cover this path.
    Confidence: 0.98
  • [P2] Update the production-layout test for message-owned selection — tests/OpenClaw.Tray.UITests/ReactorChatLayoutProofTests.cs:1136-1138
    Once the assistant message loads, ChatTextSurface.Apply explicitly sets its RichTextBlock.IsTextSelectionEnabled to false. This unchanged assertion still requires true in ProductionRoot_AlignsColumnAndKeepsEveryComposerActionReachable, so the existing UI matrix conflicts with the intended takeover. Replace the leaf-selection assertion with an observable selection/copy assertion through the message owner, preserving the surrounding layout coverage.
    Confidence: 0.99
  • [P3] Restore the independent UI profile-isolation guard — tests/OpenClaw.Tray.Tests/CiNugetCacheWorkflowTests.cs:5-7
    Removing UiLane_IsolatesEveryProductRootAndSeparatesNativeOnboardingProof also removes the only checks for the UI job's exact data, roaming AppData, local AppData, and repository-root bindings. The updated PowerShell contract checks the new category filter but replaces none of those assertions. A later missing or misdirected binding would now pass this coverage and could point UI tests at unintended profile state. Preserve those independent assertions while adapting the filter, as the test-audit policy requires.
    Confidence: 0.98
  • [P3] Correct the documented selection owner — docs/CHAT_VISUAL_DESIGN.md:94-95
    The added disclosure contract says selection still belongs to each native Markdown text control, while this PR disables those controls' selection and the later section assigns one range to NativeChatMessageText. These are incompatible descriptions of the shipping interaction contract. Update this sentence to the message-level owner.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Karen: Raw commit 3dda3cf adds src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:553 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3dda3cf87fb9; files: src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs)
  • Barbara Kudiess: Raw commit 5164faa adds src/OpenClaw.Tray.WinUI/Chat/ChatMarkdownPresentation.cs:16 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5164faab1df6; files: src/OpenClaw.Tray.WinUI/Chat/ChatMarkdownPresentation.cs)
  • Scott Hanselman: Raw commit 4ae1c36 adds src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:552 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 4ae1c366afca; files: src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs)

Labels

Label changes:

  • add P2: Reliable excerpt selection improves an established chat workflow, with defects limited to selection, accessibility, and validation.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Reliable excerpt selection improves an established chat workflow, with defects limited to selection, accessibility, and validation.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 follows the weaker of proof and patch quality; ✨ 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 October 22, 2026, 2:53 PM ET / 18:53 UTC.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to inactivity.
Please update it or it will be closed.

@roboclaw-bot

Copy link
Copy Markdown
Contributor

PR cleanup review

Reviewed head: 7d67ad90b605942951f33d984634e17294445458. Main comparison: e59374c064f43d68f5c72d070d4c89ef2d20ec3b.

The user-visible selection problem remains, but this old app-owned implementation is not safe to merge unchanged. Verified blockers include ScrollViewer-only handling despite the production ItemsView.ScrollView, an always-empty TextRange.GetChildren, and a leaf-selection assertion contradicted by the new owner. It also contains the older disclosure parser without #1773’s later fixes. Reactor’s opt-in selection work has now merged upstream in microsoft/microsoft-ui-reactor#1475, but Windows main has not adopted it. Recommend a narrow downstream adoption/reconciliation lane rather than restoring this older fork; do not close it as already fixed on Windows main.

Action in this cleanup pass: leaving this PR open. No branch changes or runtime-proof waiver. The findings above come from source, discussion and recorded-CI review; Windows validation was not rerun in this pass.

@github-actions github-actions Bot removed the stale label Nov 11, 2026
@karkarl

karkarl commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by microsoft/microsoft-ui-reactor#1475 (Add opt-in cross-block Markdown text selection), which has merged upstream: microsoft/microsoft-ui-reactor#1475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants