Skip to content

chore(pwa): health-check the live app and refresh the Pages mirror - #26

Merged
DLinacre merged 1 commit into
mainfrom
arena/205abdf3-pokeguru
Nov 14, 2026
Merged

DLinacre merged 1 commit into
mainfrom
arena/205abdf3-pokeguru

Conversation

@DLinacre

Copy link
Copy Markdown
Owner

Follow-up to #25, which is already merged and live.

What this adds

  • Live-app health check. .github/workflows/pages-health-check.yml only 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.png and /offline.html must all return 200, the manifest must have 192 + 512 icons, and id/start_url/scope must 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.
  • Script-order test. tests/pwa-manifest.test.ts now pins that pwa-capture.js appears in index.html before the React entry and that the manifest is linked through %BASE_URL% — the two things that made the install invitation get lost.
  • Mirror refreshed. gh-pages was rebuilt from current main and pushed (63dc0f7), so dlinacre.github.io/PokeGuru now serves 1.7.2 with a real manifest.webmanifest (id/start_url/scope = /PokeGuru/), a real sw.js (BASE = /PokeGuru/), pwa-capture.js and the icons. Before this, all of those paths returned the stale index.html.

Verification

  • Live Vercel: manifest id/start_url/scope = /, SW version 1794688029820, pwa-capture.js served — i.e. the merged 1.7.2 build.
  • Live Pages: manifest id/start_url/scope = /PokeGuru/, SW BASE = /PokeGuru/, version 1794688369209.
  • npm run lint, npm run typecheck, npm test → 24 files / 199 tests passing.

- 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>
@DLinacre
DLinacre merged commit 88d123d into main Nov 14, 2026
2 checks passed
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