From f2eb496c1c6ff0c6329e8e1b5c76e33e759fd89a Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Mon, 4 May 2026 07:32:27 +0000 Subject: [PATCH] fix(ui): extract theme-flash inline script to /theme-flash.js for strict CSP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The strict CSP shipped from internal/api/security_headers.go uses script-src 'self' 'wasm-unsafe-eval' — no 'unsafe-inline'. The theme-flash FOUC guard in index.html was an inline + + + - +
diff --git a/ui/index.html b/ui/index.html index 158abc8..a36c444 100644 --- a/ui/index.html +++ b/ui/index.html @@ -11,37 +11,14 @@ docsiq — GraphRAG knowledge base - + +
diff --git a/ui/public/theme-flash.js b/ui/public/theme-flash.js new file mode 100644 index 0000000..daa5c7e --- /dev/null +++ b/ui/public/theme-flash.js @@ -0,0 +1,32 @@ +// Theme-flash guard. Applies the persisted theme class before React +// hydrates so there is no FOUC on first paint. Runs synchronously +// from via