fix(desktop): let every CEF first responder own the paste hotkey - #110
fix(desktop): let every CEF first responder own the paste hotkey#110banozz0 wants to merge 1 commit into
Conversation
The renderer-edit passthrough introduced with the chat/Docs/Source guard stops the Cmd+V terminal binding from shadow-pasting into the shell-focus terminal while a Chromium surface is AppKit's first responder. The same double-fire exists for every other CEF surface — app modals, the sidebar, Kanban/Automate pages, titlebar popups, browser tabs, the editor companion — because shell_focus keeps naming a terminal pane while those views hold native focus. The phantom terminal draft it leaves behind is what a later chat send's draft-preservation step sweeps into Saved Prompts as a prompt the user never saved. Widen the guard to any CEF first responder: a Chromium view always owns its own paste. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe macOS renderer edit hotkey passthrough now treats every ChangesCEF Paste Focus Handling
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change routes Cmd+V to the visible CEF view instead of a hidden terminal composer, preventing duplicate pastes and unintended saved drafts. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Clippy (1.97.1)Clippy execution failed Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Complements the renderer-edit CEF passthrough (7a70ed4) by widening it from Source/Manage/SessionChat to every CEF first responder.
Why
shell_focuskeeps naming a terminal pane while an app modal, the sidebar, a Kanban/Automate page, a titlebar popup, a browser tab, or the editor companion holds AppKit's first responder — so the app-wide Cmd+V binding still resolves a hidden terminal and pastes the same clipboard into its composer alongside the CEF view's own paste. The next chat send's draft-preservation step then sweeps that phantom composer draft into Saved Prompts as a prompt the user never saved.We hit this in the wild today: image pastes into session chat were written to disk twice ~45ms apart (native terminal path first, chat composer second) and the terminal copy surfaced as an untagged Saved Prompt after the send. 7a70ed4 fixes the chat/Docs/Source cases; this covers the remaining Chromium surfaces, which shadow-paste through exactly the same mechanism. A Chromium first responder always owns its own paste, so the enumeration doesn't need to grow case by case.
cargo checkclean (no new warnings in focus.rs).🤖 Generated with Claude Code
Summary by CodeRabbit