Repository navigation
fix(web): cancel Loom downloads when leaving the downloader - #3453
Open
vedanth-jadhav wants to merge 3 commits into
Open
vedanth-jadhav wants to merge 3 commits into
vedanth-jadhav wants to merge 3 commits into
Conversation
Contributor
|
Someone is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
Author
This branch has not been deployed
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.
Leaving the free Loom downloader page keeps its conversion running. A late URL lookup can even start a conversion or click a direct-download link after unmount; a late conversion result creates a Blob URL that the already-finished cleanup cannot revoke.
Own one AbortController for the whole download attempt, abort it on unmount, and ignore progress/results/errors after cancellation. The resolver currently has no cancellation API, so its pending lookup can finish, but its result no longer starts work after the page is gone. Pass the controller through conversion and clear the active attempt only from its own finally. Converter setup checks cancellation after asynchronous codec checks, file-picker creation, and conversion initialization; cancellation aborts an opened writable before encoding begins. Completed MP4 URLs remain available while mounted and are revoked on unmount.
Validation: 19 focused tests pass, including seven mounted lifecycle/control cases and three converter setup cancellation cases that fail on the previous head. Four regressions fail against main 8dd141d: missing conversion abort, late converted Blob download, late direct URL download, and late lookup starting conversion. Success URL lifetime, direct download and retry after an error remain covered. Tests use real React unmount and AbortController, with controlled resolver/converter promises; no live Loom network or native conversion claim for these lifecycle tests.
Scoped strict TypeScript/noUncheckedIndexedAccess for the component and new tests, Biome, CI YAML parsing and git diff --check pass. Combined locally with #3448 and #3449, all 34 codec/assembly/lifecycle/conversion/download tests pass. Full web build/typecheck not run. No dependencies or public API changes.
This fixes the downloader component's lifetime; #3448 changes codec requirements and #3449 changes DASH input assembly. The PR is independent and targets main.


Confidence Score: 5/5
The cancellation follow-up appears safe to merge.Summary
The follow-up closes the cancellation gap during Loom conversion setup.
Reviews (2) · Last reviewed commit: "test(loom): preserve cancellation across..." · Reviewed by Greptile