Skip to content

File tree: dragging files from Finder into a folder does nothing #120

@spamsch

Description

@spamsch

Bug

Dragging files from Finder (macOS) onto the file tree — either onto a specific folder or the root — silently discards the drop. No files are copied, no error is shown.

Root cause

Tauri's onDragDropEvent in MultiPaneWorkspace.tsx only checked whether the drop landed over an editor pane. If the cursor was over the file tree sidebar, isWorkspaceFileDropTarget returned false and the handler returned early without doing anything.

Expected behavior

Dropping one or more files from Finder onto a folder in the file tree copies them into that vault folder. The target folder highlights on hover (matching the existing accent-tinted outline used for internal drag-and-drop). The file tree refreshes automatically after the copy.

Reproduction

  1. Open a vault with at least one folder in the file tree.
  2. Drag a file from Finder and hover it over a folder in the sidebar — no highlight appears.
  3. Drop the file — nothing happens.

Fix (in linked PR)

  • New backend command copy_external_file_to_vault: copies a file from an absolute path on disk into a vault-relative folder, reusing the existing filename deduplication logic and emitting a vault change event.
  • EXTERNAL_FILE_TREE_DRAG_EVENT custom DOM event so MultiPaneWorkspace can broadcast hover state to FileTree without prop-drilling.
  • onDragDropEvent extended: emits folder hover events on enter/over; on drop, if the cursor is over a data-folder-path element the files are copied into that folder rather than opened in an editor pane.
  • FileTree listens for the event and sets dragOverPath, activating the existing folder highlight style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions