From 30c2b0fe8232cc748ab2bded6ab4d76febe32425 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 3 May 2026 19:17:04 +0300 Subject: 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. --- web/sw.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web/sw.js') 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', ]; -- cgit v1.2.3