Repository navigation
Description
What I want
Attach pictures and folders the way Claude Code / Grok Build / Codex do in the terminal: drag from Finder onto the window. No paperclip, no dialog.
Today the only reliable path is the attach button (#68). That is the opposite of the CLI.
What we already have
#68 (plan:done) shipped the data model, the picker, paste, chips, and a drop handler. The drop path is vestigial:
- The handler lives only on the composer strip (
Composer.tsxonDrop/onDragOver). Dropping on the transcript, empty thread, or window chrome does nothing. - It reads
e.dataTransfer.files. Finder folders often do not show up there as usableFiles. The CLIs (and Electron) needdataTransfer.items+webkitGetAsEntry()/webUtils.getPathForFileper item so a dropped directory keeps its absolute path. dropAttachmentFiles(useCoder.ts) already callsattachments.droppedFilePath→attachments:fromPaths→classifyPaths, which does accept directories. The backend is ready. The drop never feeds it a folder path.- No drag overlay, no
dropEffect = \"copy\", no error if every file is skipped. It feels like drop is not supported, so people use the button.
Paste of an image already works (onPaste → saveImage). Drag of a screenshot file or a project folder does not.
Why it matters
The CLI muscle memory is: grab the screenshot, grab the fixtures/ folder, drop it, type the prompt. A file-dialog detour is why people stay in the TUI for attach.
Scope
- Window- or thread-wide drop target (composer + transcript + empty state), with a visible "drop images or folders" overlay while dragging.
- Resolve each
DataTransferItemto an absolute path (preloaddroppedFilePath). Directories becomekind: \"folder\"; images becomekind: \"image\"via existingclassifyPaths. - Keep the paperclip as a fallback, not the primary path.
- Show a one-line error when a drop produced zero attachments (unsupported type, no path, web mode folder).
- Tests: drop an image file, drop a directory, drop mixed, drop on the transcript (not only the composer).
Out of scope here: PDF/docs (#466), HEIC transcode (#463), screenshot markup (#460). Those ride the same drop once they land.
Related: #68 (original attach work), #381 (composer power-ups).
Activity
currentbits commentedon Aug 18, 2026
Round 22 cluster (same complaint: CLI muscle memory vs a button):
!shell mode: run a command in the worktree without a model turn #470 `!` shell mode/btwside question: ask without interrupting the live turn #471 `/btw` side question/palette should include the CLI verbs, not only orchestration #472 `/` palette should include compact/rewind/usage/model, not only /handoffThis ticket stays drop-only. Do not grow it into a composer rewrite.
Merge pull request #473 from currentbits/coder/drag-and-drop-images-a…