From f783794b8678d977e1234ba5ffda2bce44666c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Tue, 14 Jul 2026 21:25:26 +0200 Subject: [PATCH] fix: add vapid diagnostics --- templates/sw.js | 4 +- templates/tracker/today.html | 133 +++++++++++++++++++++++++++++++---- tracker/tests.py | 28 ++++++++ tracker/views.py | 9 ++- 4 files changed, 158 insertions(+), 16 deletions(-) diff --git a/templates/sw.js b/templates/sw.js index 0bf8170..394ee52 100644 --- a/templates/sw.js +++ b/templates/sw.js @@ -1,5 +1,7 @@ // Served from / (not /static/) so its scope covers /admin/today/. -const CACHE = "osiris-v1"; +// Bump on any change here or to the cached pages: activate() drops older caches, +// which is what stops a stale Today page surviving a deploy. +const CACHE = "osiris-v2"; self.addEventListener("install", (event) => { self.skipWaiting(); diff --git a/templates/tracker/today.html b/templates/tracker/today.html index 7a6188f..ea1e225 100644 --- a/templates/tracker/today.html +++ b/templates/tracker/today.html @@ -145,19 +145,34 @@ {% endif %} -