Repository navigation
V2/save location - #9
Open
marcelgundermann wants to merge 3 commits into
Open
marcelgundermann wants to merge 3 commits into
marcelgundermann wants to merge 3 commits into
Conversation
SwDownloadSink (the coordinator's end) moves next to createPortStream (the service worker's end). It only needs MessagePort, so it compiles under both tsconfigs, and the test now pairs the real producer with the real consumer over a MessageChannel instead of a hand-written copy of the producer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RunningJob now asks the location for an output per file instead of switching on kinds in sinkFor and deliver. Each output carries its sink descriptor and transferables, what to do once the sink is open, how to finish, and what to release on failure; the SW download and OPFS staging kinds own their state. - A failure in any of those steps fails the file as save-failed and stops the job. A missing service worker no longer hangs it, and run() catches everything, so `done` never rejects. - The encrypt header write now honours cancel; before, a download that never granted credit could not be cancelled. - OPFS staging holds a Web Lock per staged file until its download has had time to finish, and sweeps unlocked files before staging. clearStagingArea, which nothing called, is gone. - SaveTarget is now SaveLocation, matching the glossary; FileOutput moves with it, and the OPFS sink reports 'saved' like the others. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chooseSaveLocation runs straight from the click: it picks the kind for this browser and file count, shows the save or folder picker if there is one, and returns a SaveLocation or why not (dismissed, needs-gesture, unsupported, save-failed). It never throws, and it only picks OPFS staging once getDirectory() actually opens, which WebKit's private sessions refuse. whereToSave says beforehand whether Start will ask where to save. - The cards call chooseSaveLocation and startJob themselves; pickAndStart and asksWhereToSave are gone. Both cards now show save-failed. - chooseSink, detectCapabilities, sizeLimit, SIZE_LIMITS and outputName leave the public interface; preflight works out the save path itself. - The choice is tested through an internal seam with a fake browser: kinds, the picker error mapping, the gesture rule, and refused OPFS. - The bench uses outputName and OPFS_STAGING_DIR instead of copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being 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.
No description provided.