Fix downloads losing UI state when modal is closed#10
Open
dannyd40 wants to merge 3 commits into
Open
Conversation
When a file exists locally, compare its size against the remote size to detect incomplete downloads. Shows "Incomplete" with orange button and size details (e.g. 3.21 GB / 6.46 GB) when the local file is smaller than expected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of re-downloading entirely, incomplete files can now be resumed from where they left off using HTTP Range requests. The download button shows "Resume" (orange) for incomplete files, and clicking it downloads only the remaining bytes using multi-connection or single-connection mode depending on the remaining size. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hide the modal instead of destroying it so download progress buttons stay updated via WebSocket events. Re-opening the modal shows current download states. Also adds a null check in updateDownloadButton to prevent errors when the modal reference is unavailable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
updateDownloadButtonto prevent JS errorsProblem
Closing the modal removed it from the DOM (
this.modal = null), causingupdateDownloadButtonto crash when WebSocket progress events arrived. While the server-side download continued, the UI lost all state and couldn't display progress when re-opened.Test plan
🤖 Generated with Claude Code