fix(pwa, hydration): fix Vuetify SSR display mismatch and workbox precache error - #1083
Merged
gamatraindev merged 1 commit intoAug 2, 2026
Conversation
… precache error Vuetify's useDisplay() computed width as 0 on the server but read the real window.innerWidth on the client during hydration, causing mismatched classes/v-if for any non-mobile visitor across ~50 call sites (paper and multimedia download UI included). Passing ssr: true lets Vuetify keep server/client in sync through hydration and correct afterward. Also, globPatterns: [] left the workbox precache manifest empty while navigateFallback still defaulted to '/', so the generated service worker threw "non-precached-url" for '/' on every load. Explicitly unsetting navigateFallback removes the broken navigation fallback route entirely. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@sanaderi is attempting to deploy a commit to the GamaEdtech Team on Vercel. A member of the Team first needs to authorize it. |
gamatraindev
approved these changes
Aug 2, 2026
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.
Summary
Hydration completed but contains mismatchesand a service worker errorUncaught (in promise) non-precached-url :: [{"url":"/"}](seen on e.g. https://gamatrain.com/paper/39575/Predicted-Paper-Checkpoint-Science0893-Paper-1-for-October-2026-pdf).app/plugins/vuetify.tscreatedcreateVuetify()withoutssr: true. Vuetify'suseDisplay()(used in ~50 components, including the paper/multimedia download buttons) computes viewport width as0on the server but reads the realwindow.innerWidthon the client during hydration, producing mismatched classes/v-iffor any non-mobile visitor. Addingssr: truekeeps server/client display state in sync through hydration (Vuetify then corrects it right after, via its own Nuxtapp:suspense:resolvehook).nuxt.config.js'spwa.workbox.globPatternsis intentionally[](SSR app, nothing to precache), butnavigateFallbackwas left unset, so@vite-pwa/nuxtdefaulted it to'/'. The generated service worker then calledcreateHandlerBoundToURL('/')for a URL that was never precached, throwingnon-precached-urlon every load. Explicitly settingnavigateFallback: undefinedremoves that broken navigation-fallback route from the generatedsw.js(verified against workbox-build's own SW template, which gates that code behindif (navigateFallback)).Test plan
non-precached-urlservice worker error no longer appear on paper/multimedia detail pages🤖 Generated with Claude Code