Repository navigation
fix: paste chat text once after using the context menu - #2371
Conversation
|
🦞👀 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 maintainer review before merge. What this changesThis PR scopes chat context-menu keyboard shortcuts to the open menu and disables them after dismissal. Example: Copy CLIPBOARD-ONE-PASTE, open and dismiss the chat editor's context menu, then press Ctrl+V once.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it addresses a concrete paste defect still present on main, and review found no introduced correctness defect. Reviewed head: Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherReactorChatComposer mounts the native TextBox and its editing menu; keyboard and clipboard input update the draft, while bitmap paste uses the existing composer controller. flowchart LR
Keyboard[Keyboard input] --> Editor[Native TextBox]
Keyboard --> Menu[Open menu presenter]
Menu --> Commands[Standard editing commands]
Commands --> Editor
Editor --> Draft[Composer draft]
Commands --> Images[Existing image paste controller]
Technical reviewBest possible solution: Keep the focused accelerator lifetime fix in the existing composer view while preserving native editing commands and clipboard routing. Do we have a high-confidence way to reproduce the issue? Main retains the unrestricted menu shortcut path, and the supplied baseline native runs report three Paste events after menu dismissal; this review executed no reproduction. Is this the best way to solve the issue? The patch addresses competing shortcut ownership directly, without a debounce, custom key forwarding, controller changes, or additional production state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 17cadf79dbea. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
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 November 24, 2026, 10:26 PM ET / November 25, 2026, 03:26 UTC. |
What Problem This Solves
After opening and dismissing the chat editor's context menu, one Ctrl+V could paste the same text three times. This makes composing or editing messages error-prone.
User Impact
User impact: paste inserts text once, whether the chat context menu is open or has been dismissed. Native Copy/Cut/Undo/Redo/Select All, image paste, shortcut hints and screen-reader shortcut information remain available.
Why This Change Was Made
Keep one keyboard-editing owner: the TextBox outside the menu, and native accelerators scoped to the menu's own presenter while it has focus. Disable menu accelerators after dismissal. This prevents leftover shortcut handlers without a debounce or a custom clipboard/key-forwarding path.
Hanselman dual-model review caught an open-menu keyboard regression in the first candidate. It was reproduced against a stock Windows TextBox, repaired, and revalidated before this PR. No controller, network, permission or settings changes.
Evidence
claude-opus-5.5toclaude-opus-5-5. Both reviewed the final identical file hashes. No remaining verified product defects; optional wording/redundant-assertion suggestions are documented, not represented as bugs.Final reviewed and tested source identity
Validation ran on the dirty source tree rooted at
64727b8dbd382a98e813977fd3bf4d66324ba9ef, before the publication-only commit. Publication commit0d257b42e50c44811238b7889acfcad06d5d57d2was checked against these exact four source hashes. The earlier validation was not rerun at the publication commit.ReactorChatComposer.cs6A254F0DD44E347711C12A3600A74BD33AC5EF273CE2AA2E3BC8505DF7992019ReactorChatLayoutProofTests.Clipboard.csA10E57003263C039F18D40716C2E502A549072368B8DFEE05A6DD522FC2F77D4ReactorChatLayoutProofTests.EditCommands.cs6EA85CC41B325F141AFECD924D37904E1F97E31E1DCFFBBCF42BBABEC390DC94ReactorChatLayoutProofTests.OpenMenuProbe.cs9ED6A2CB0A6682606FFB989F912561BA7F6CECB90D0121B9BFA2CA59DDCA461BChange Type
Scope
winnodeRequired proof pools
windows-winui-interactive: chat editing shortcuts and native accessibility behavior changed. Focused native keyboard/UIA proof completed on the authorized isolated Windows ARM64 desktop. This is selected behavior proof, not a claim that every inventory-owned pool command ran.Validation
Final native ARM64 build and canonical closeout passed on the exact reviewed source:
build.ps1No forced RID for Shared/Tray tests. Their gated skips are not counted as native integration proof. Hosted PR CI is separate and has not run before publication.
Additional x64 Release attempt (2026-11-24)
0d257b42e50c44811238b7889acfcad06d5d57d2, unchanged source. Production-shaped non-Dev Release build of the WinUI app and UI-test project forwin-x64passed with 0 warnings and 0 errors, 2m03s.Cannot initialize owned testhost as PerMonitorV2: context=0x12, withSetProcessDpiAwarenessContexterror 5. This is a failed attempt, not a clipboard behavior pass or a skipped success.Real Behavior Proof
winnode-d0ec93d80a59.64727b8dbd382a98e813977fd3bf4d66324ba9ef, exact four hashes above. Final native/canonical runrun_b2dacd5332ee486632d779b412d9935d; native receipt noncecde76dec0736429c86688611bb63a667. Publication commit0d257b42e50c44811238b7889acfcad06d5d57d2matches these four reviewed file hashes. Upstream was observed at17cadf79dbea1b1623f3301a01f9af590cea93bbduring publication. This draft preserves the tested base; integration with newer main has not been revalidated.Security Impact
Yes, explain the risk and mitigation: N/A. Existing clipboard/edit scope unchanged.Compatibility and Migration
Review Conversations