refactor(sftp): decouple transfers from SFTP panel lifecycle#43
Open
CoolLoong wants to merge 4 commits into
Open
refactor(sftp): decouple transfers from SFTP panel lifecycle#43CoolLoong wants to merge 4 commits into
CoolLoong wants to merge 4 commits into
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:
|
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.
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: