Repository navigation
feat(file-explorer): support drag-and-drop file import over SSH - #1279
Merged
Merged
Conversation
Add SFTP-based file upload for drag-and-drop imports when connected to an SSH remote. The relay's JSON-RPC fs.writeFile is text-only, so we open a direct SFTP channel for binary-safe transfers. Key changes: - Thread connectionId through preload → main to route SSH vs local - New sftp-upload.ts module with uploadFile, uploadDirectory, mkdirSftp - SSH import path with connection validation, per-item error handling, SFTP name deconfliction, symlink rejection, partial-failure toast - 27 tests covering local + SSH paths including edge cases Co-authored-by: Orca <help@stably.ai>
The formatter expanded compact one-liners, pushing the single test file over the 300-line oxlint limit. Split into routing/connection tests and operation tests. Co-authored-by: Orca <help@stably.ai>
Jinwoo-H
force-pushed
the
Jinwoo-H/drag-drop-files-ssh
branch
from
April 30, 2026 08:00
9912cb6 to
2876f5d
Compare
mralexsaavedra
pushed a commit
to mralexsaavedra/orca
that referenced
this pull request
May 2, 2026
…lyai#1279) Co-authored-by: Orca <help@stably.ai>
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…lyai#1279) Co-authored-by: Orca <help@stably.ai>
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.
Summary
fs.writeFileis text-only, so we open a direct SFTP channel for binary-safe transfersconnectionIdthrough renderer → preload → main to route SSH vs local import pathsChanges
New files:
src/main/ssh/sftp-upload.ts— shared SFTP helpers (uploadFile, uploadDirectory, mkdirSftp, sftpPathExists) with stream safety (settled flag, cross-stream destroy) and symlink/special-file guardssrc/main/ipc/filesystem-import-ssh.ts— SSH import pipeline: connection state validation, per-item error handling, SFTP name deconfliction via lstat, symlink rejectiondocs/drag-drop-files-ssh.md— design docModified files:
src/main/ipc/filesystem-mutations.ts— dispatch to SSH path when connectionId presentsrc/preload/api-types.ts+src/preload/index.ts— added optionalconnectionIdto importExternalPaths IPCsrc/renderer/.../useFileExplorerImport.ts— derive connectionId from worktree, toast on errors and partial failuressrc/main/ssh/ssh-relay-deploy-helpers.ts— re-export shared SFTP helpersTest plan
filesystem-import.test.tsandfilesystem-import-ssh.test.ts(all passing)Made with Orca 🐋