From 537c9fa70bec65a2261d34bd73e9e9b400e65e95 Mon Sep 17 00:00:00 2001 From: archipelago Date: Sat, 18 Jul 2026 07:01:45 -0400 Subject: [PATCH] fix(demo): suppress the PWA update prompt + reload on the public demo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SW-update modal is noise on the demo (nothing to update to) and both accept-paths end in a reload that replays the intro from scratch. With skipWaiting/clientsClaim off, ignoring the waiting worker is safe — the new build activates on the visitor's next session. Co-Authored-By: Claude Fable 5 --- neode-ui/src/components/PWAUpdatePrompt.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neode-ui/src/components/PWAUpdatePrompt.vue b/neode-ui/src/components/PWAUpdatePrompt.vue index 2a4f3051..91d0c9b9 100644 --- a/neode-ui/src/components/PWAUpdatePrompt.vue +++ b/neode-ui/src/components/PWAUpdatePrompt.vue @@ -26,6 +26,7 @@ import { ref, onMounted } from 'vue' import BaseModal from '@/components/BaseModal.vue' import { useLoginTransitionStore } from '@/stores/loginTransition' +import { IS_DEMO } from '@/composables/useDemoIntro' const showUpdatePrompt = ref(false) let updateCallback: (() => Promise) | null = null @@ -53,6 +54,12 @@ function reloadAfterCinematic() { } onMounted(() => { + // The public demo has no version to update to — the prompt is noise, and + // both accept-paths end in a reload that replays the demo intro ("the site + // just reset itself"). skipWaiting/clientsClaim are off, so ignoring the + // waiting worker is safe: this page keeps its complete old cache, and the + // new build activates on the next visit. + if (IS_DEMO) return // Listen for service worker updates if ('serviceWorker' in navigator) { // On the very first visit the page loads with no controlling SW; the