refactor: make library rendering server-first and deterministic
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 4m7s

Move library header/covers to deterministic server-side rendering, split preference controls into controlled/uncontrolled modes, and remove client cover wrapper to eliminate hydration mismatches and provider coupling on library pages.
This commit is contained in:
2026-02-28 14:06:27 +01:00
parent 26021ea907
commit 01951c806d
14 changed files with 264 additions and 154 deletions

View File

@@ -172,6 +172,18 @@ export function ServiceWorkerProvider({ children }: { children: ReactNode }) {
return;
}
if (process.env.NODE_ENV === "development") {
setIsSupported(false);
setIsReady(false);
setVersion(null);
unregisterServiceWorker().catch(() => {
// Ignore cleanup failures in development
});
return;
}
setIsSupported(true);
// Register service worker