diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a29d3a..78939ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ Das Format folgt [Keep a Changelog](https://keepachangelog.com/de/1.1.0/), die V ## [Unreleased] +## [0.14.2] - 2026-10-31 + +### Fixed +- Installierte App: Der Service Worker lieferte `manifest.json` zuerst aus dem Cache, sodass der Browser bei der Prüfung auf geänderte App-Farben noch die alte blaue Fassung sah. Das Manifest kommt jetzt immer frisch vom Server (Cache nur offline); die App-Caches werden einmal erneuert. + ## [0.14.1] - 2026-10-30 ### Fixed @@ -340,7 +345,8 @@ Das Format folgt [Keep a Changelog](https://keepachangelog.com/de/1.1.0/), die V - Geteilte Listen (Einkaufs-, Pack- und Checklisten) mit `#Kategorie`-Gruppierung, Mengenangaben und Echtzeit-Abhaken. - Benutzer-, Gruppen- und Admin-Verwaltung (Ersteinrichtungs-Assistent, Einladungscodes, Profilbilder, persönliche API-Keys & Webhook-Ingest `/api/v1/webhooks/ingest`, JSON-Datenexport) sowie CSS-Theme-Engine mit 4 Themes (`Dark`, `Light`, `High Contrast`, `Soft`) und PWA-Unterstützung. -[Unreleased]: https://git.dsit.me/sandrodach/MindSift/compare/v0.14.1...dev +[Unreleased]: https://git.dsit.me/sandrodach/MindSift/compare/v0.14.2...dev +[0.14.2]: https://git.dsit.me/sandrodach/MindSift/compare/v0.14.1...v0.14.2 [0.14.1]: https://git.dsit.me/sandrodach/MindSift/compare/v0.14.0...v0.14.1 [0.14.0]: https://git.dsit.me/sandrodach/MindSift/compare/v0.13.0...v0.14.0 [0.13.0]: https://git.dsit.me/sandrodach/MindSift/compare/v0.12.2...v0.13.0 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 56a0904..333a94d 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "mindsift-frontend", - "version": "0.14.1", + "version": "0.14.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mindsift-frontend", - "version": "0.14.1", + "version": "0.14.2", "license": "Unlicense", "dependencies": { "@fontsource-variable/inter": "5.3.0", diff --git a/frontend/package.json b/frontend/package.json index 881bba6..3658ed2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "mindsift-frontend", "private": true, - "version": "0.14.1", + "version": "0.14.2", "license": "Unlicense", "type": "module", "scripts": { diff --git a/frontend/public/sw.js b/frontend/public/sw.js index cbda0bd..f05efa3 100644 --- a/frontend/public/sw.js +++ b/frontend/public/sw.js @@ -2,10 +2,12 @@ // - Page loads (navigation): network first, so a new release is picked up right away; offline the // last loaded index.html is used. // - Built bundles (/assets/*, file names contain a content hash): from the cache, loaded once. -// - Icons and manifest: from the cache, refreshed in the background. +// - Icons: from the cache, refreshed in the background. +// - Manifest: network first (the browser checks it for changed app colours and name; a cached copy +// would hand it the old values), the cache only offline. // - API requests are never touched; offline data comes from the app's own cache (lib/offline.ts). // Raise VERSION when this file changes in a way that needs fresh caches. -const VERSION = 'v3'; +const VERSION = 'v4'; const SHELL_CACHE = `mindsift-shell-${VERSION}`; const ASSET_CACHE = `mindsift-assets-${VERSION}`; const MAX_ASSETS = 80; @@ -70,6 +72,17 @@ async function cacheFirstAsset(request) { return response; } +async function networkFirstShell(request) { + const cache = await caches.open(SHELL_CACHE); + try { + const response = await fetch(request, { cache: 'no-store' }); + if (response.ok && response.type === 'basic') cache.put(request, response.clone()); + return response; + } catch { + return (await cache.match(request)) || Response.error(); + } +} + async function staleWhileRevalidate(request) { const cache = await caches.open(SHELL_CACHE); const hit = await cache.match(request); @@ -162,6 +175,8 @@ self.addEventListener('fetch', (event) => { event.respondWith(networkFirstPage(request)); } else if (url.pathname.startsWith('/assets/')) { event.respondWith(cacheFirstAsset(request)); + } else if (url.pathname === '/manifest.json') { + event.respondWith(networkFirstShell(request)); } else if (SHELL_URLS.includes(url.pathname)) { event.respondWith(staleWhileRevalidate(request)); }