Repository navigation
fix(downloads): bound cancellation acknowledgements - #4873
Merged
gabsprogrammer merged 1 commit intoSep 13, 2026
Merged
gabsprogrammer merged 1 commit into
gabsprogrammer merged 1 commit into
Conversation
This was referenced Sep 16, 2026
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.
Why this matters
The Models page can keep Cancel disabled forever when POST /api/models/download/cancel stalls before headers or while reading an error body. Even an acknowledged cancellation holds the same guard while its subsequent status refresh is pending. Three hook-boundary regressions reproduce these cases on public-beta.
Give the acknowledgement a 45-second deadline, longer than the dashboard API's 30-second host-agent request. Retain the last observed transfer state on timeout and tell the operator that cancellation was not acknowledged. Release the duplicate-submission guard after the acknowledgement settles; status polling independently determines whether the transfer actually stopped. There are no automatic retries or optimistic cancelled/success states.
Overlap check
Searched 4,381 open/closed upstream PRs by cancellation, download deadlines and changed-file histories for useDownloadProgress.js, including legacy paths. Compared #3040 (progress percentages and single-flight polling), #3316 (status outage reporting), #3803 (terminal dismissal), and merged #893 (backend cancellation). None bounds cancellation acknowledgements or separates the acknowledgement guard from status refresh. These behaviors remain independent; overlapping hook changes must preserve both contracts when integrated.
Regression and validation
Shared browser behavior on Linux, Windows and macOS; no live download was cancelled. The backend remains authoritative and a lost acknowledgement does not prove the server stopped. Revert restores the former indefinite UI guard without changing stored state or backend lifecycle behavior.
This is PR 1 of an authorized 30-PR quality batch. No dependency on another batch PR. Combined-head validation and hosted CI results will be recorded after the batch candidates are available.