Repository navigation
Installable web app that opens offline (D4.2) - #52
Merged
Merged
Conversation
- manifest.webmanifest (written by build_site.py) and icons (192/512 px, maskable versions on the dark background, Apple touch icon): Chrome and Edge offer "Install EaglePlot"; it opens in its own window, no admin rights. - sw.js: site files network-first with a per-build cache (stamped with a hash of the build; older caches removed on activate), Pyodide from the CDN cache-first. index.html registers it and, on a first visit, waits (max 3 s) until it controls the page before starting Python, then sends it the URLs loaded before that (the page, the stlite runtime) to cache. - smoke.js: Chromium's installability check must pass, and a reload with the network off must reach "ready". Locally: installable, offline reload ready in 7.9 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onding Awaiting cache.put() before returning a response held every download until it had been copied into the cache. In CI with the real CDN, start-up went from 8.1 s / 7.2 s (cold / warm) to 11.7 s / 10.6 s. The response now goes to the page at once and the cache write finishes under event.waitUntil. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
This is roadmap D4.2. The browser app becomes a Progressive Web App:
What's added
manifest.webmanifest(written bybuild_site.py):display: standalonepackaging/web/icons/: 192 and 512 px, maskable versions on the dark background, and a 180 px Apple touch icon, all made fromeagleplot/assets/logo.pngsw.js, the service worker:build_site.pystamps the worker with a hash of the build, and older builds' caches are removed when a new one activates.index.html:window.eaglePlotOfflinetoready,next-visit,failedorunsupported.scripts/web/smoke.jsnow also checks that:Page.getInstallabilityErrors) reports no errors[Unreleased]has an entry.Tested (local build, self-hosted Pyodide)
smoke.jspasses 33 page loads. The app is installable, the service worker controls the page, and the offline reload is ready in 7.9 s.net::ERR_FAILED, because the page itself never passed through the worker on a first visit. That's what the "send the worker the URLs already loaded" step fixes.🤖 Generated with Claude Code