Skip to content

fix(fullscreen): complete drag-drop file move with auto-expand and ancestor guard#82

Merged
KrisPowers merged 3 commits into
masterfrom
fix/explorer-drag-drop-expand
Jun 29, 2026
Merged

fix(fullscreen): complete drag-drop file move with auto-expand and ancestor guard#82
KrisPowers merged 3 commits into
masterfrom
fix/explorer-drag-drop-expand

Conversation

@KrisPowers

Copy link
Copy Markdown
Member

Closes #74

Summary

  • Adds a 600ms auto-expand timer: hovering a dragged item over a collapsed folder expands it after 600ms, matching standard OS drag-to-expand behavior
  • Guards ancestor drops: dropping a folder onto one of its own descendants is now a silent no-op (the ancestor check in both onDragOver and onDrop uses startsWith(src + '/') to detect this)
  • Fixes false dragLeave resets: onDragLeave now checks currentTarget.contains(relatedTarget) before clearing state, preventing flickering when the cursor moves over child spans within the same row

The underlying move via fs.rename IPC and the fe-node--dragover highlight were already wired; these changes complete the remaining acceptance criteria from the issue.

Test plan

  • Drag a file onto a folder — file moves into the folder, tree refreshes
  • Drag a folder onto another folder — entire directory moves, tree refreshes
  • Drag a folder onto one of its own subfolders — no move, no error
  • Drag a file onto itself or its own parent — no-op
  • Hover a dragged item over a collapsed folder for >600ms — folder expands without dropping
  • Release drag outside any folder — operation cancels, nothing changes

@KrisPowers KrisPowers changed the title fix(explorer): complete drag-drop file move with auto-expand and ancestor guard fix(fullscreen): complete drag-drop file move with auto-expand and ancestor guard Jun 29, 2026
@KrisPowers KrisPowers merged commit e6de24a into master Jun 29, 2026
26 checks passed
@KrisPowers KrisPowers deleted the fix/explorer-drag-drop-expand branch June 29, 2026 22:46
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.

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

1 participant