fix: Backup feature Chunk load error#1462
Open
sub-hub wants to merge 2 commits into
Open
Conversation
cubicj
approved these changes
Jun 3, 2026
Collaborator
cubicj
left a comment
There was a problem hiding this comment.
Verified the backup export path and preload-error handling. Making streamsaver a static import removes the late chunk load from LocalWriter, and the global preload handler gives users a clear refresh path for remaining stale chunks.
Check, tests, and build pass locally.
Approving — thanks for the contribution!
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.
PR Checklist
Summary
Currently, An error occurs when trying to perform a backup after restart the web risu server.
The dynamic import streamsaver package does not work until reload the page because the address changes.
So I changed streamsaver import in LocalWriter to a static import for reliability (prevents backup failures if server restarts).
And added a global handler in main.ts for Vite’s vite:preloadError event. If a dynamic import fails (e.g., after server update), users are alerted that they needs to refresh the page.
There are other dynamic imports remaining, but I'm leaving them as is since they aren't important enough to convert to static.
Footnotes
Modifies the behavior of prompting, requesting, or handling responses from AI models. ↩
Over 80% of the code is AI generated. ↩