feat(web): composer attach button and view-wide image drag-and-drop#4201
feat(web): composer attach button and view-wide image drag-and-drop#4201maria-rcks wants to merge 4 commits into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.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 |
ApprovabilityVerdict: Needs human review This PR adds a new user-facing feature (attach button + view-wide image drag-and-drop) with new UI elements, state management, and event handling. New feature additions introducing user-facing behavior warrant human review. You can customize Macroscope's approvability policy. Learn more. |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…y loss Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ed760bb. Configure here.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

What Changed
+attach button on the left of the composer footer that opens an image file picker, reusing the existingaddComposerImagesvalidation (image-only, size and count limits).ChatComposerto theChatViewroot, which shows a full-view "Drop images to attach" overlay while dragging and appends dropped images to the composer draft via a newaddImages(files)method onChatComposerHandle.Why
Attaching images was only discoverable via paste or by dropping precisely on the input box. The
+button makes uploads discoverable, and the view-wide drop zone with an explicit overlay makes drag-and-drop forgiving and clearly communicated.UI Changes
+attach button (light / dark):Drop-anywhere overlay while dragging files over the chat view (light / dark):
Attachment added after dropping on the header area, far from the composer:
Checklist
Note
Low Risk
Localized chat composer UX around image attachments; reuses existing validation and draft mutation with no auth or server contract changes.
Overview
Makes image attachments easier to discover by adding a
+attach control in the composer footer and moving file drag-and-drop from the composer box to the whole chat view.The footer button opens a hidden
image/*file picker and feeds files through the existingaddComposerImagespath (same limits as paste).ChatComposerHandlegainsaddImages(files)soChatViewcan attach drops from anywhere in the thread UI.While dragging files over the view, a full-screen “Drop images to attach” overlay appears. Drops are gated when the environment is unavailable or a draft has no project; drag state resets on
dragendand when attaching becomes disabled mid-drag. Composer-level drop handlers and the composer drop highlight are removed in favor of this view-level zone.Reviewed by Cursor Bugbot for commit 0504ff4. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add composer attach button and view-wide image drag-and-drop to chat
PlusIconbutton in the ChatComposer footer that opens a hidden file input to attach images, and exposes anaddImages(files)method on the composer handle for external callers.ImageUpIconwhen image files are dragged over the chat view, forwarding dropped files to the composer viaaddImages.Macroscope summarized 0504ff4.