Repository navigation
Conversation
…ry context, update CI contract
…arated container markers
Preserve the colleague fork commits and integrate with current upstream main for draft review. Co-authored-by: Copilot App <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis 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”.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherAssistant 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
Technical reviewBest 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:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bef07da01911. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 22, 2026, 2:53 PM ET / 18:53 UTC. |
|
This pull request has been automatically marked as stale due to inactivity. |
PR cleanup reviewReviewed head: 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. |
|
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 |
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
NativeChatMessageTextowner coordinates each realized message.ChatTextSelectionDocumentmaps visible text to UTF-16 offsets with grapheme-aware keyboard movement;ChatTextSurfacemaps those offsets to native geometry and highlights.ChatMessageTextAutomationPeerexposes 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
7d67ad90b605942951f33d984634e17294445458combines sourced70d8936with observed upstreambef07da01911fa78ed5ab728ab9248bbb1ec0466. Their original common ancestor is50d0b34a4e71a51286ad5346b57a388ebf805fd6; 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 byReactorChatTimeline.BuildSafeMarkdown. It is not a Reactor-library change yet.The app pins Reactor
0.1.0-preview.12. UpstreamMarkdownBuilderat5ba98bf7, also checked atv0.1.0-preview.16, already offersMarkdownOptions.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:
ListRowPropertywith a supported renderer contract. Custom render callbacks need a way to register selectable text and exclude toolbar chrome.Microsoft.UI.Reactor.Advanced.Factoriesand 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-reviewrole, with model identity unverified. It raised two P2 concerns retained for review:NativeChatMessageText.ProcessKeyusesOffsetFromPoint, which filters fully clipped surfaces viaVisibleBounds. 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
Scope
winnodeRequired 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
7d67ad90b605942951f33d984634e17294445458on Windows ARM64 with .NET SDK 10.0.402.OPENCLAW_REPO_ROOTpoints to the task worktree; Tray settings use an isolated task-owned directory.powershell -NoProfile -ExecutionPolicy Bypass -File .\build.ps1win-arm64. Documentation validation passed, 66 Markdown files.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csprojdotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csprojpwsh; 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'powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-ci-workflow-contract.ps1Invoke-CiProcess.ps1: ProcessStartInfo.ArgumentList is unavailable in Windows PowerShell 5.1. PowerShell 7 is absent.powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-dev.ps1 -CheckOnlypowershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\Get-CiChangeClassification.ps1 -EventName pull_request -BaseSha bef07da01911fa78ed5ab728ab9248bbb1ec0466 -HeadSha 7d67ad90b605942951f33d984634e17294445458 -HumanThe first direct
.\build.ps1attempt 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_DIRandOPENCLAW_TRAY_LOCALAPPDATA_DIRto 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:
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:
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.
Result: 2/2 passed in the isolated diagnostic rerun. Original combined-run failure remains unresolved.
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
7d67ad90b605942951f33d984634e17294445458.{"discovered":1,"executed":1,"passed":1,"failed":0,"skipped":0,"outcome":"passed"}forVisibleMessage_PointerKeyboardCopyAndTextProviderShareOneRange(theme: "Light"). The paint case passed in both Debug and Release.Yes/No/N/A): N/A, no public screenshots or test artifacts uploaded.Security Impact
Yes/No): No.Yes/No): No.Yes/No): No.Yes/No): No.Yes/No): No.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
Yes/No): Yes for configuration and wire contracts; native text interaction and accessibility behavior intentionally change and need the proof above.Yes/No): No for users. CI adds isolated native Markdown proof invocations.Yes/No): No.Review Conversations