Fix/sftp explorer drag download#72
Draft
BungeeDEV wants to merge 2 commits into
Draft
Conversation
…2013#7) Dragging entries from the SFTP Explorer onto the desktop produced a junk "binary" file and only ever handled one entry. The drag used the HTML5 DataTransfer API (text/plain), which a Tauri webview cannot turn into real OS files, and only read the grabbed row. Replace it with a native OS drag session via tauri-plugin-drag: - New `sftp_download_to_temp` command stages every selected entry to a temp dir and awaits completion — files directly, folders recursively — then returns the local paths plus a drag-preview icon. The OS drag API needs real file handles before the drag begins. - ExplorerFileTable starts the native drag for any non-empty selection (files/folders/mixed) and cancels the broken HTML5 drag; in-app move-drag stays as the fallback for providers without OS drag-out (SCP/S3). - ExplorerView wires `onDragOut` for SFTP sessions. Adds tauri-plugin-drag (Rust + @crabnebula/tauri-plugin-drag) and the `drag:default` capability permission. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…eedback - Drop onto a folder row now uploads INTO that folder (hit-test the drop position against the listing) instead of always the current directory - Gate the OS drag-drop listener on the active tab so a single drop no longer uploads into every open SFTP session (issue macnev2013#17 keeps tabs mounted) - Add an overwrite-confirmation dialog when dropped files already exist remotely - Surface upload/download failures as toasts; toast on a successful drag-out - Remove the partial remote file on any mid-transfer upload error, not just cancel - Stage same-named drag-out entries into separate subdirs to avoid clobbering - Align the drop-zone highlight with the explorer active-state styling Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for native OS-level drag-out (dragging files or folders from the app directly to the desktop or Finder/Explorer) for SFTP connections. It introduces a new backend command to stage remote files/directories locally before starting a drag, integrates the
tauri-plugin-dragplugin, and improves the upload experience and drag-and-drop UI. Additionally, there are minor dependency and platform compatibility updates.Native drag-out support:
tauri-plugin-dragdependency and enabled it in both the Rust backend (Cargo.toml,lib.rs) and frontend (package.json,pnpm-lock.yaml,default.json) to allow real file handles to be handed to the OS for drag-out operations. [1] [2] [3] [4] [5] [6]sftp_download_to_tempcommand, which stages selected remote files and directories in a temporary local folder, preserving directory structure, and provides a preview icon for the drag session. This ensures the OS receives fully-written files before the drag begins.Frontend drag-and-drop improvements:
ExplorerDropZonecomponent to indicate when a drop will upload into a specific folder, improving user feedback during drag-and-drop operations. [1] [2]ExplorerFileTableprops to support a newonDragOuthandler, enabling the frontend to initiate native OS drags when supported.SFTP upload robustness:
Dependency and platform compatibility updates:
pnpm-lock.yamlto specify the correct libc (glibc/musl) for Linux targets, improving compatibility across different Linux distributions. [1] [2] [3] [4] [5]