Skip to content

Make isketch installable, offline, and open files and shared text - #84

Merged
raj-khan merged 1 commit into
mainfrom
fl-82-installable
Sep 27, 2026
Merged

raj-khan merged 1 commit into
mainfrom
fl-82-installable

Conversation

@raj-khan

Copy link
Copy Markdown
Owner

FL-82.

  • Offline: /sw.js is written at build by a Vite plugin from src/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 ignore Vary, or a lazily imported chunk misses offline); other origins are untouched. Registered in production only; nginx serves it no-cache.
  • Manifest: start_url /new, file_handlers for .flow, and a GET share_target. Chrome reports no installability errors and no manifest errors.
  • Opening: a launched .flow file goes through the same path as Open (undoable, remembers the handle for Save); shared text (.flow or a Mermaid flowchart, from text or url) opens as an undoable change, and anything else is refused with a message.
  • Playwright blocks service workers except in the offline spec.

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.

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.
@raj-khan
raj-khan merged commit 6d17753 into main Sep 27, 2026
4 checks passed
@raj-khan
raj-khan deleted the fl-82-installable branch September 27, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant