mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:01:08 +02:00
The PWA was configured end-to-end in vite.config.ts and built the manifest + service worker correctly, but neither was ever loaded by the browser — no <link rel="manifest"> in the HTML and no script registering the generated registerSW.js. Chrome therefore never fired beforeinstallprompt, no install icon appeared in the URL bar, and the hand-rolled PwaUpdatePrompt hung on navigator.serviceWorker.ready because no SW had been registered. Changes: - Render pwaInfo.webManifest.linkTag into <svelte:head> in the root layout so Chrome finds the hashed manifest. - Replace the hand-rolled SW-update logic in PwaUpdatePrompt with useRegisterSW() from virtual:pwa-register/svelte — it registers the worker (immediate: true) and exposes reactive needRefresh + updateServiceWorker stores that match registerType: 'prompt'. - Add triple-slash refs to vite-plugin-pwa/info and /svelte in app.d.ts for the virtual module types. - Set manifest.id = startUrl in @mana/shared-pwa so Chrome doesn't warn and keeps the install identity stable across start_url edits. - Keep devEnabled: false and expand the comment: the 2026-04-08 dreams mic-button bug and the /offline navigateFallback both misbehave when Workbox precache doesn't run under vite dev. Test the install flow via `pnpm build && pnpm preview` instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| credits | ||
| eslint-config | ||
| feedback | ||
| help | ||
| local-llm | ||
| local-store | ||
| local-stt | ||
| notify-client | ||
| qr-export | ||
| shared-auth | ||
| shared-auth-ui | ||
| shared-branding | ||
| shared-drizzle-config | ||
| shared-error-tracking | ||
| shared-go | ||
| shared-hono | ||
| shared-i18n | ||
| shared-icons | ||
| shared-landing-ui | ||
| shared-links | ||
| shared-llm | ||
| shared-logger | ||
| shared-pwa | ||
| shared-python/manacore_auth | ||
| shared-storage | ||
| shared-stores | ||
| shared-tags | ||
| shared-tailwind | ||
| shared-theme | ||
| shared-theme-ui | ||
| shared-types | ||
| shared-ui | ||
| shared-uload | ||
| shared-utils | ||
| shared-vite-config | ||
| spiral-db | ||
| subscriptions | ||
| test-config | ||
| wallpaper-generator | ||