Skip to content

fix: Drag-and-drop file attach broken#1620

Merged
charlesvien merged 1 commit intomainfrom
fix/drag-drop-file-path
Apr 13, 2026
Merged

fix: Drag-and-drop file attach broken#1620
charlesvien merged 1 commit intomainfrom
fix/drag-drop-file-path

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented Apr 13, 2026

Problem

Drag and drop to attach files is broken.

Changes

  1. Expose webUtils.getPathForFile from preload via contextBridge
  2. Add getFilePath utility that uses the bridge with a File.path fallback
  3. Replace all File.path casts in drop handlers (SessionView, TaskInput, useTiptapEditor, AttachmentMenu)
  4. Add Window.electronUtils type declaration

How did you test this?

Manually

Copy link
Copy Markdown
Member Author

charlesvien commented Apr 13, 2026

@charlesvien charlesvien marked this pull request as ready for review April 13, 2026 17:20
@charlesvien charlesvien changed the title Use webUtils.getPathForFile for drag-and-drop file attachments fix: Apr 13, 2026
@charlesvien charlesvien changed the title fix: fix: Drag and drop files to attach them is broken. Apr 13, 2026
@charlesvien charlesvien changed the title fix: Drag and drop files to attach them is broken. fix: Drag and drop to attach files is broken Apr 13, 2026
@charlesvien charlesvien changed the title fix: Drag and drop to attach files is broken fix: Drag-and-drop file attach broken Apr 13, 2026
Copy link
Copy Markdown
Member Author

charlesvien commented Apr 13, 2026

Merge activity

  • Apr 13, 7:31 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 13, 7:42 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 13, 7:48 PM UTC: @charlesvien merged this pull request with Graphite.

@charlesvien charlesvien changed the base branch from 04-13-cory-nits to graphite-base/1620 April 13, 2026 19:32
@charlesvien charlesvien changed the base branch from graphite-base/1620 to main April 13, 2026 19:40
@charlesvien charlesvien force-pushed the fix/drag-drop-file-path branch from 6cf8dcf to 2221226 Compare April 13, 2026 19:41
@charlesvien charlesvien merged commit 2362e01 into main Apr 13, 2026
16 checks passed
@charlesvien charlesvien deleted the fix/drag-drop-file-path branch April 13, 2026 19:48
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.

2 participants