Repository navigation
fix(chat): repeated image paste and right-click menu failures - #1113
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs real behavior proof before merge. Reviewed August 7, 2026, 2:41 PM ET / 18:41 UTC. ClawSweeper reviewWhat this changesThe PR reconnects image clipboard paste handling after chat-composer remounts and adds a state-aware native right-click editing menu. Merge readiness⛔ Blocked until stronger real behavior proof is added - 4 items remain Keep open. Current main still gates the paste subscription behind a component-lifetime flag, so the reported remount failure remains relevant; merge requires inspectable current-head WinUI proof because the linked recording could not be retrieved in this review environment. Priority: P2 Review scores
Verification
How this fits togetherThe WinUI tray chat composer accepts text and clipboard images, turns images into draft attachments, and sends the resulting draft into the chat workflow. Its native text box also supplies editing actions through the right-click menu. flowchart LR
Clipboard[Clipboard text or bitmap] --> Composer[Tray chat composer]
Composer --> PasteChoice[Choose image or text paste]
Composer --> EditMenu[Native editing menu]
PasteChoice --> Attachments[Draft attachments]
EditMenu --> DraftText[Draft text]
Attachments --> ChatFlow[Chat submission flow]
DraftText --> ChatFlow
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve the stable per-control paste lifecycle and state projection, then provide an accessible redacted current-head recording that shows repeated image paste and the empty, text, and bitmap clipboard menu states. Do we have a high-confidence way to reproduce the issue? Yes for the repeated image-paste path: current main subscribes the native control only while Is this the best way to solve the issue? Unclear. A stable delegate attached and detached per native control plus a pure visibility projection is a narrow maintainable approach, but the complete PR-only implementation could not be retrieved for final source verification. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2439d4371096. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Fixes issues where the chat composer stopped accepting Ctrl+V image pastes after the first attachment rerender and where its right-click editing menu could flicker, omit Paste, or become unavailable even when supported clipboard content existed.
Why This Change Was Made
The composer now keeps one stable image-paste delegate and reconnects it to each native text box created by Reactor. It also uses a persistent context menu with platform-standard Undo, Redo, Cut, Copy, Paste, and Select All commands, recalculating command and separator visibility whenever the menu opens. Paste reads the current clipboard contents when activated, routes bitmap content through the existing attachment pipeline, preserves native text paste, and handles clipboard COM failures without crashing the tray.
User Impact
Users can repeatedly paste images after attachment rerenders and can reliably use the full right-click editing menu. Paste appears only when the clipboard currently contains supported text or bitmap content, while other editing commands appear when applicable.
Evidence
origin/mainpreserved merged fix(chat): correct native tool event correlation #1114 native-tool correlation behavior.a1d933a3was an ancestor of validated candidatec9656524, and the PR's effective diff remained the same four composer/test files.WinUI recording
PasteFix.under-10MB.mp4
Change Type
Scope
winnodeValidation
Validated local integration candidate
c9656524after merging currentorigin/main:.\build.ps1- passed.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj- passed 3,413, skipped 32, failed 0.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj- passed 2,208, failed 0.dotnet build .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-x64- passed.661827d3576a6fd43216e0dbb949dedc2f4cba8b- all active checks passed or skipped; merge state clean and mergeable before landing.Real Behavior Proof
661827d3576a6fd43216e0dbb949dedc2f4cba8b.c9656524.mainplus the unchanged four-file PR diff.Security Impact
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoCompatibility and Migration
Yes/No): YesYes/No): NoYes/No): NoLanding Result
Squash-merged unchanged exact head
661827d3576a6fd43216e0dbb949dedc2f4cba8bwith--match-head-commitafter its active dispatch check completed successfully. Merge commit:89666df49eb9da0f684851be088181065ca4b993.Review Conversations