refactor(sftp): decouple transfers from SFTP panel lifecycle#43
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #43 +/- ##
==========================================
+ Coverage 54.53% 54.56% +0.02%
==========================================
Files 159 158 -1
Lines 54170 53906 -264
==========================================
- Hits 29542 29413 -129
+ Misses 24628 24493 -135 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks a lot |
Problem
Closing the SFTP page during an upload/download freezes the progress bar at InProgress and breaks the cancel button.
Root cause:
transfer task lifecycle was owned by SftpTable, and progress/completion/cancel were reported back through a WeakEntity<TableState>. Once the page closed and the entity was dropped, the reporting closures stopped running, so the global TransferCenterState stayed stuck at InProgress and the cancel token became unreachable.
Solution
Move transfer task ownership from SftpTable to the global TransferCenterState: