feat: file explorer mention actions and zoom-aware context menus#4054
feat: file explorer mention actions and zoom-aware context menus#4054yordis wants to merge 4 commits into
Conversation
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Screen.Recording.2026-07-16.at.5.12.58.AM.mov |
ApprovabilityVerdict: Needs human review This PR introduces new user-facing features including file explorer context menu actions (copy mention, add to chat) and a paste handler that parses and converts mentions in pasted text. New capabilities affecting user interaction patterns warrant human review. You can customize Macroscope's approvability policy. Learn more. |
… from swallowing clipboard Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 718e283. Configure here.
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

Note
Low Risk
Localized UX changes to composer paste/insert and menu positioning; no auth or data-model changes, with unit coverage for zoom scaling.
Overview
The file browser gains a right-click menu with Copy mention and Add to chat, using the native desktop context menu API and a capture-phase listener so popup coordinates stay at the cursor when the tree’s anchor rect is unreliable.
Add to chat appends a serialized file mention through
insertTextAtEnd, which now acceptsensureLeadingBoundaryso mentions don’t run into existing prompt text. Copy mention puts the same token on the clipboard; pasting into the composer is handled by a newComposerInlineTokenPastePluginthat turns pasted mention syntax into structured mention nodes (with spacing rules aligned to autocomplete).On desktop, context menu placement multiplies renderer CSS coordinates by the window
getZoomFactor()beforeMenu.popup(), fixing menus that drift when the app is zoomed (including other surfaces that passclientX/clientY).Reviewed by Cursor Bugbot for commit a9caa6f. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add file explorer right-click context menu with mention actions and zoom-aware positioning
insertTextAtEndon the composer handle with a newensureLeadingBoundaryoption that prepends a space when the prompt doesn't end in whitespace.Macroscope summarized a9caa6f.