fix(sftp): display upload destination path on completed task items (#307)#308
Merged
fix(sftp): display upload destination path on completed task items (#307)#308
Conversation
) Show the remote target path inline on completed upload task items (e.g. "Completed - 1.2 MB → /home/user/dir") so users know exactly where their files were uploaded after drag-and-drop to terminal. - Add `targetPath` field to modal's TransferTask type - Populate targetPath from currentPath in onTaskCreated callback - Display targetPath on completed upload items in SftpModalUploadTasks - Add i18n key `sftp.upload.completedToPath` (en/zh-CN)
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
Closes #307
After dragging files to a remote terminal for SFTP upload, users had no way to know the exact remote directory where files were uploaded. This PR shows the upload destination path inline on completed task items.
Changes
targetPathfield to the modal'sTransferTasktypetargetPathfromcurrentPathwhen upload tasks are createdCompleted - 1.2 MB → /home/user/dirsftp.upload.completedToPathfor en and zh-CNCWD Detection Note
The issue also mentions files occasionally not uploading to the terminal's current directory. This happens when
getSessionPwd()times out (3s) because the shell is busy (e.g., runningtail -f,top,vim). In that case, the SFTP modal falls back to the home directory. This is an architectural limitation of injectingpwdinto the shell stream. With this PR, the actual upload path is always visible on the task item, so users can immediately see where files landed.Files Changed
components/sftp-modal/hooks/useSftpModalTransfers.tscomponents/sftp-modal/SftpModalUploadTasks.tsxapplication/i18n/locales/en.tsapplication/i18n/locales/zh-CN.ts