Skip to content

Sidebar: drag-and-drop to move files into folders does not work #74

Description

@KrisPowers

Moving files between folders by dragging them in the sidebar does not work. The file tree does not accept drops onto folder items, so there is no way to reorganize the directory structure without leaving the app and using the OS file manager.

The code has some drag-drop wiring for tabs, but the file tree itself does not support dragging a file node and dropping it onto a folder.

What needs to happen

  • A file or folder in the tree should be draggable by clicking and holding it
  • Folders should be valid drop targets; they should visually highlight when a dragged item hovers over them
  • Dropping a file onto a folder moves it into that folder via the backend file operation
  • Dropping a folder onto another folder moves the entire directory
  • If the drag is released outside any valid target, cancel the operation with no changes
  • The tree should auto-expand a collapsed folder after hovering over it for ~600ms during a drag (standard drag-to-expand behavior)

Files likely involved

  • app/frontend/src/fullscreen/FileExplorer.tsx -- drag source and drop target logic
  • cpp/src/fileops.cpp -- the actual file move operation on disk

Acceptance criteria

  • Dragging file A and dropping it onto folder B moves A into B
  • The folder tree refreshes immediately after the move
  • Dragging a folder into a subfolder of itself is rejected (with a clear error or just no-op)
  • Undo is not required for v1 but the operation should at minimum be confirmed or reversible via OS undo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions