fix(GRO-1829): add skipWaiting/clientsClaim to VitePWA workbox config #31

Merged
Scrubs McBarkley merged 1 commits from gro-1829-swpwa-fix into dev 2026-05-27 02:22:26 +00:00
Owner

Summary

  • Add skipWaiting: true and clientsClaim: true to vite-plugin-pwa workbox config in vite.config.ts
  • Fixes blank-page regression where React never mounted on UAT

Root Cause

Without skipWaiting/clientsClaim, the old ServiceWorker stayed active after a new one was installed. The waiting-phase SW served stale precached HTML/JS/CSS, causing React to fail silently (blank login page).

Test plan

  • Build succeeds and dist/sw.js contains self.skipWaiting() and self.clients.claim()
  • Deploy to UAT — login page renders correctly (not blank)
  • Clear SW cache manually and reload — app loads fresh without blank screen

🤖 Generated with Claude Code

## Summary - Add `skipWaiting: true` and `clientsClaim: true` to `vite-plugin-pwa` workbox config in `vite.config.ts` - Fixes blank-page regression where React never mounted on UAT ## Root Cause Without `skipWaiting`/`clientsClaim`, the old ServiceWorker stayed active after a new one was installed. The waiting-phase SW served stale precached HTML/JS/CSS, causing React to fail silently (blank login page). ## Test plan - [ ] Build succeeds and `dist/sw.js` contains `self.skipWaiting()` and `self.clients.claim()` - [ ] Deploy to UAT — login page renders correctly (not blank) - [ ] Clear SW cache manually and reload — app loads fresh without blank screen 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Scrubs McBarkley added 1 commit 2026-05-27 02:22:13 +00:00
fix: add skipWaiting/clientsClaim to VitePWA workbox config
CI / Test (pull_request) Successful in 15s
CI / Lint & Typecheck (pull_request) Successful in 17s
CI / Build & Push Docker Image (pull_request) Successful in 33s
ad9a178c89
Root cause: SW remained in waiting phase after redeploy, serving stale
precached assets. Without skipWaiting/clientsClaim the old SW persisted
and controlled the page even after a new SW was installed.

Fixes blank-page regression where React never mounted on login.
Scrubs McBarkley merged commit 228a3d746c into dev 2026-05-27 02:22:26 +00:00
Sign in to join this conversation.