Skip to content

fix(sftp): display upload destination path on completed task items (#307)#308

Merged
binaricat merged 1 commit intomainfrom
fix/issue-307-display-upload-path
Mar 10, 2026
Merged

fix(sftp): display upload destination path on completed task items (#307)#308
binaricat merged 1 commit intomainfrom
fix/issue-307-display-upload-path

Conversation

@binaricat
Copy link
Owner

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

  • Add targetPath field to the modal's TransferTask type
  • Populate targetPath from currentPath when upload tasks are created
  • Display target path on completed upload items: Completed - 1.2 MB → /home/user/dir
  • Add i18n key sftp.upload.completedToPath for en and zh-CN

CWD 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., running tail -f, top, vim). In that case, the SFTP modal falls back to the home directory. This is an architectural limitation of injecting pwd into 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.ts
  • components/sftp-modal/SftpModalUploadTasks.tsx
  • application/i18n/locales/en.ts
  • application/i18n/locales/zh-CN.ts

)

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)
@binaricat binaricat merged commit a451fd8 into main Mar 10, 2026
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.

希望现实上传文件路径

1 participant