summaryrefslogtreecommitdiff
path: root/web/sw.js
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-03 19:17:04 +0300
committerPaul Buetow <paul@buetow.org>2026-05-03 19:17:04 +0300
commit30c2b0fe8232cc748ab2bded6ab4d76febe32425 (patch)
tree985578b326a1ff8fe7af395bf08471857376b8fc /web/sw.js
parent687b86cdeef2192272f0945ddd496322a9113f9e (diff)
fix(admin): fix rescan goroutine lifecycle and race on shared ScanProgress
- Protect adminService scan state (cancel func + progress pointer) with sync.Mutex. - Allocate fresh ScanProgress per trigger and pass it to the scanner, eliminating races on the previously shared progress struct. - Cancel previous scan context before starting a new one. - Add tests for cancellation, fresh progress per scan, concurrent triggers, and empty progress when never started. - Fix race-prone tests by polling Running==true before waiting for completion.
Diffstat (limited to 'web/sw.js')
-rw-r--r--web/sw.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/web/sw.js b/web/sw.js
index 68bb0a1..a32b8cc 100644
--- a/web/sw.js
+++ b/web/sw.js
@@ -8,6 +8,7 @@ const ASSETS = [
'/css/layout.css',
'/css/components.css',
'/css/player.css',
+ '/css/lightbox.css',
'/css/login.css',
'/js/app.js',
'/js/state.js',
@@ -21,6 +22,7 @@ const ASSETS = [
'/js/notes.js',
'/js/admin.js',
'/js/pwa.js',
+ '/js/lightbox.js',
'/manifest.json',
];