Skip to content

feat(composer): drop images and folders on the whole thread (#469) - #473

Merged
currentbits merged 3 commits into
mainfrom
coder/drag-and-drop-images-and-folders-onto-th-1e30e1
Aug 18, 2026
Merged

currentbits merged 3 commits into
mainfrom
coder/drag-and-drop-images-and-folders-onto-th-1e30e1

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Summary

Thread-wide drag-and-drop for images and folders, matching the CLI muscle memory from #469.

Finder folders never reached classifyPaths because drop lived only on the composer strip and read dataTransfer.files. The open thread (<main data-thread-drop>) is now the drop target — transcript, empty state, and composer all accept a Finder drop.

Drops resolve each DataTransferItem via webkitGetAsEntry() / getAsFile() so a directory keeps a File that webUtils.getPathForFile → attachments:fromPaths → classifyPaths can turn into kind: "folder". Images still become kind: "image". The paperclip picker is unchanged as the fallback.

While a file drag is over the thread, a dashed overlay says “Drop images or folders” and dropEffect is copy. If a drop yields zero attachments (unsupported type, no path, web-mode folder), the composer shows a one-line error.

Tests

  • test/dropFiles.test.ts — items vs FileList, mixed, skip non-files
  • test/composerAttachments.test.tsx — image, directory-on-items-only, mixed, empty-drop error
  • test/threadView.test.tsx — drop on the transcript, overlay on dragenter
  • test/webDegrade.test.tsx — existing web saveImage path + native droppedFilePath/fromPaths folder

Closes #469

  • PR created by the Grok agent

Willem added 3 commits August 18, 2026 10:10
… Orchestration skills: handoff, advisor, committee as one-com
… Windows support hardening: WSL boundary, doctor checks, sand
Finder folders never reached classifyPaths because drop lived only on
the composer strip and read dataTransfer.files. Bind the open thread as
the drop target, resolve items via webkitGetAsEntry + droppedFilePath,
show a drop overlay, and surface a one-line error when nothing attaches.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant