Skip to content

Drag-and-drop images and folders onto the thread, like the CLIs #469

Closed

Description

@currentbits

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.tsx onDrop / 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 usable Files. The CLIs (and Electron) need dataTransfer.items + webkitGetAsEntry() / webUtils.getPathForFile per item so a dropped directory keeps its absolute path.
  • dropAttachmentFiles (useCoder.ts) already calls attachments.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

  1. Window- or thread-wide drop target (composer + transcript + empty state), with a visible "drop images or folders" overlay while dragging.
  2. Resolve each DataTransferItem to an absolute path (preload droppedFilePath). Directories become kind: \"folder\"; images become kind: \"image\" via existing classifyPaths.
  3. Keep the paperclip as a fallback, not the primary path.
  4. Show a one-line error when a drop produced zero attachments (unsupported type, no path, web mode folder).
  5. 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

  1. added
    enhancement
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Aug 18, 2026
  2. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Round 22 cluster (same complaint: CLI muscle memory vs a button):

    This ticket stays drop-only. Do not grow it into a composer rewrite.

  3. added a commit that references this issue on Aug 18, 2026
  4. added
    plan:done
    and removed
    plan:doing
    on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions