You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 43f53f1
Browse filesBrowse the repository at this point in the historyBrowse files
fix offline navigation breaking to weapon/armor/monster/decoration pages
Next.js's client router falls back to a full browser navigation when a
route's RSC payload isn't cached, and while genuinely offline that
navigation gets hard-reset to "/" by Next's own client bootstrap even
when the service worker serves valid cached content. Since we
deliberately don't precache the ~3800 individual item pages, this made
offline browsing effectively unusable beyond whatever page was open
when connectivity dropped.
Intercept link clicks while offline (before Next's <Link> handler
runs) and render the destination in-place from the cached data
bundles instead of asking the router to navigate at all, keeping the
address bar and back/forward in sync via history.pushState. List pages
(weapon type trees, armor slot/rank, monster categories, decorations)
are split into thin server pages + reusable client content components
so the same components back both real navigation and this in-place
rendering. Also fixes a staleness bug in client-data.ts where
switching between sibling items backed by the same bundle didn't
re-render with the new item.
0 commit comments