Skip to content

fix(sftp): wire asyncssh progress_handler for transfer progress - #48

Merged
Orinks merged 1 commit into
devfrom
fix/sftp-progress-callback-clean
Mar 2, 2026
Merged

fix(sftp): wire asyncssh progress_handler for transfer progress#48
Orinks merged 1 commit into
devfrom
fix/sftp-progress-callback-clean

Conversation

@Orinks

@Orinks Orinks commented Mar 2, 2026

Copy link
Copy Markdown
Owner

Fixes #45 — rebased cleanly onto dev after asyncssh migration merge.

Wires up asyncssh progress_handler for both uploads and downloads so the UI progress bar updates correctly. Ensures progress callbacks dispatch to the wx main thread via wx.CallAfter.

6 new tests covering progress updates, no-callback path, BytesIO fallback, and upload size verification. 352 tests passing.

After the asyncssh migration, SFTP downloads/uploads showed 0% progress
because the manual chunk-read loop bypassed asyncssh's pipelined I/O and
native progress reporting.

Switch SFTPClient.download() and upload() to use sftp.get()/sftp.put()
with their progress_handler callback. This gives pipelined reads/writes
for better throughput and correct progress updates via the existing
wx.PostEvent thread-safe notification path.

A chunked-read fallback is retained for in-memory BinaryIO streams
(BytesIO) used in tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Orinks
Orinks merged commit 15792c0 into dev Mar 2, 2026
6 checks passed
@Orinks
Orinks deleted the fix/sftp-progress-callback-clean branch March 2, 2026 16:46
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