Make isketch installable, offline, and open files and shared text - #84
Merged
Merged
Conversation
A build-generated service worker caches the app shell. The manifest adds file handlers for .flow and a share target, which open as undoable changes.
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.
FL-82.
/sw.jsis written at build by a Vite plugin fromsrc/pwa/serviceWorker.js, listing that build's pages and hashed files plus the public shell. Pages are network first with the cached page or the app as fallback; our own files cache first (lookups ignoreVary, or a lazily imported chunk misses offline); other origins are untouched. Registered in production only; nginx serves it no-cache.start_url/new,file_handlersfor.flow, and a GETshare_target. Chrome reports no installability errors and no manifest errors..flowfile goes through the same path as Open (undoable, remembers the handle for Save); shared text (.flowor a Mermaid flowchart, fromtextorurl) opens as an undoable change, and anything else is refused with a message.Tests:
e2e/installable.spec.js(6, including offline and CDP installability), unit tests for the shared-text reader and the worker source. e2e 125 passed, vitest 254, lint and typecheck.