Conversation
- Merge upstream/main (go 1.26.2, charm.land imports, tests, linting, security) - Update sftp.go to use charm.land import paths - Fix sftpModel.View() to return tea.View
|
would it be hard to have the ability to select multiple files to transfer using spacebar for selection ? |
|
should add ctrl+s to readme, and update changelog with the new feature |
sure,
i dont believe so, will check it. |
@lfaoro I think for now i'm going to keep it imp for multiple individual files but excluding the folders, i guess it can become messy pretty quick if i happen to do for thousands of folders and nested folders. So to transfer files in a dir you'd have to select all files inside and transfer them. what do think? |
|
things I'd like to see:
|
sure, let's start with whatever makes it easier to implement to launch the feature faster |
Add 40+ tests covering: - fileItem Title/Description/FilterValue - fileKind with symlink detection - humanSize formatting - loadLocalDir with valid/invalid paths - sftpModel lifecycle (Init, Update, close) - pane focus toggle and switching - handleEnter for directories and files - confirm dialog acceptance/rejection - handleDelete for local and remote panes - history buffer capping at 50 entries - progressWriter Write method - transferMsgCmd message creation
Add SFTP and run-command key bindings to the main host list help: - ctrl+s: open SFTP file browser - ctrl+r: open run-command sub-model Update TestInitKeys to expect 6 bindings instead of 4.
Core features: - Dual-pane file browser (local ↔ remote) using github.com/pkg/sftp - firstBoot pattern for submodel initialization (Init() not called on submodels) - connectSFTP with onStarted callback for in-flight SSH process tracking - close() kills connecting SSH process and closes client on Esc/q - Upload/download with file size display and transfer history buffer (50 entries) - Overwrite confirmation dialog for existing files - Delete operation with y/n confirmation on both panes - Symlink detection in directory listings (local and remote) - SSH options: StrictHostKeyChecking=no, BatchMode=yes, RequestTTY=no - Remote pane starts in /tmp instead of server home directory - Local dir error fallback sets empty items to prevent stale UI Design consistency: - Solid background bar headers matching main TUI list title style - Theme colors with lightDark() adaptive colors on delegate styles - Help bar with • bullet separators matching main TUI help - q/esc to exit, tab to switch pane, d to delete
CHANGELOG: - Add SFTP file browser entry under [Unreleased] with all sub-features - Update test count from 92 to 132+ tests README: - Add ctrl+s key binding to keys table AGENTS: - Add SFTP sub-model to pkg/tui/ description - Add sftp_test.go to test file list - Update test count to 132+ across 6 files - Add SFTP constraint (github.com/pkg/sftp, BatchMode) - Add SFTP security notes (BatchMode, RequestTTY=no, sync.Mutex)

Implements the initial SFTP file transfer view for #8.
This adds dual-pane file browser with: