From 63ad7b040e0f7d1963294d4098c3fa950302c1bc Mon Sep 17 00:00:00 2001
From: Claude <noreply@anthropic.com>
Date: Thu, 22 Jan 2026 15:34:49 +0000
Subject: fix(pwa): register Service Worker for auto-update

The PWA was not auto-updating because the Service Worker registration
code was missing. Added virtual:pwa-register import and registerSW()
call to enable automatic updates when new versions are available.
---
 frontend/src/main.tsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'frontend/src/main.tsx')

diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx
index b96c76e..2a75c0c 100644
--- a/frontend/src/main.tsx
+++ b/frontend/src/main.tsx
@@ -1,11 +1,15 @@
 import { StrictMode } from "react";
 import { createRoot } from "react-dom/client";
 import { Provider as UrqlProvider } from "urql";
+import { registerSW } from "virtual:pwa-register";
 import "./index.css";
 import App from "./App.tsx";
 import { AuthProvider } from "./contexts/AuthContext";
 import { client } from "./services/graphql-client";
 
+// Register Service Worker for PWA auto-update
+registerSW({ immediate: true });
+
 // biome-ignore lint/style/noNonNullAssertion: root element is guaranteed to exist
 createRoot(document.getElementById("root")!).render(
 	<StrictMode>
-- 
cgit v1.3-1-g0d28

