Repository navigation
chore(pwa): health-check the live app and refresh the Pages mirror - #26
Merged
Merged
Conversation
- Replace the Pages-only health check with a live-app check: the Vercel production URL must serve index.html, manifest.webmanifest, sw.js, pwa-capture.js, icons and offline.html, and its manifest's id/start_url/scope must agree. The Pages mirror is checked separately and warns (does not fail) when it is stale or non-installable. - Pin the script ordering that fixes the lost beforeinstallprompt: the capture script must appear in index.html before the React entry. - Deploy 1.7.2 to the gh-pages mirror so it no longer serves the August build that had no manifest or service worker. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
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.
Follow-up to #25, which is already merged and live.
What this adds
.github/workflows/pages-health-check.ymlonly asserted that the old Pages URL returned HTTP 200 — which it did, while serving an August build with no manifest and no service worker. It now checks the primary Vercel deployment end to end:/,/manifest.webmanifest,/sw.js,/pwa-capture.js,/icons/icon-512.pngand/offline.htmlmust all return 200, the manifest must have 192 + 512 icons, andid/start_url/scopemust agree. The Pages mirror is checked separately and raised as a warning when stale, so it never hides a broken primary host or fails the build for a secondary one.tests/pwa-manifest.test.tsnow pins thatpwa-capture.jsappears inindex.htmlbefore the React entry and that the manifest is linked through%BASE_URL%— the two things that made the install invitation get lost.gh-pageswas rebuilt from currentmainand pushed (63dc0f7), sodlinacre.github.io/PokeGurunow serves 1.7.2 with a realmanifest.webmanifest(id/start_url/scope = /PokeGuru/), a realsw.js(BASE = /PokeGuru/),pwa-capture.jsand the icons. Before this, all of those paths returned the staleindex.html.Verification
id/start_url/scope = /, SW version1794688029820,pwa-capture.jsserved — i.e. the merged 1.7.2 build.id/start_url/scope = /PokeGuru/, SWBASE = /PokeGuru/, version1794688369209.npm run lint,npm run typecheck,npm test→ 24 files / 199 tests passing.