From 059395393c438c17367bc8bc4e103f155260f1e4 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Mon, 27 Apr 2026 20:52:39 +0000 Subject: [PATCH] Fix: rAF-Sicherheitsnetz fuer Blur zentral in _showPopupProgress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vorheriger Fix in selectIncident griff nicht beim handleRefresh-Pfad (manueller Aktualisieren-Klick), weil dieser direkt UI.showProgress aufruft ohne selectIncident zu durchlaufen. Damit blieb eine Lage, deren erster Refresh per Klick angestossen wurde, unblurred. rAF mit add("blurred") jetzt direkt in _showPopupProgress (components.js), sobald state.isFirst gesetzt ist. Damit greift der Blur in jedem Pfad, der durch _showPopupProgress laeuft — selectIncident, handleRefresh, handleStatusUpdate (WebSocket), Initial-Restore. Der zentrale rAF in selectIncident ist redundant und wieder entfernt. Der _willReBlur-Skip von remove("blurred") in selectIncident bleibt erhalten — verhindert ueberfluessiges remove+add im selben Tick. cache-bust components.js auf v=20260427a, app.js auf v=20260427c. --- src/static/dashboard.html | 4 ++-- src/static/js/app.js | 8 -------- src/static/js/components.js | 11 ++++++++++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/static/dashboard.html b/src/static/dashboard.html index 0ce9484..0ad8ebb 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -626,9 +626,9 @@ - + - + diff --git a/src/static/js/app.js b/src/static/js/app.js index 95dcf4e..1d94dfa 100644 --- a/src/static/js/app.js +++ b/src/static/js/app.js @@ -752,14 +752,6 @@ const App = { UI._showPopupProgress(state.step, {}, state); } UI._lockActionsIfFirst(state.isFirst); - // _showPopupProgress setzt .blurred bereits, aber CSS filter - // greift nach dem grossen DOM-Reshuffle (Display-Toggle, - // renderSidebar, leerge innerHTML) im selben Frame nicht - // zuverlaessig. Im naechsten Frame nochmal setzen — - // idempotent, falls schon gesetzt. - if (state.isFirst && grid && !state.minimized) { - requestAnimationFrame(() => grid.classList.add('blurred')); - } } else { // No state yet — show popup (first status update will refine) UI.showProgress('researching', {}, id, false); diff --git a/src/static/js/components.js b/src/static/js/components.js index a58fb21..5a05c8c 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -336,7 +336,16 @@ const UI = { overlay.classList.add('blocking'); // Apply blur to grid const grid = document.querySelector('.tab-panels'); - if (grid) grid.classList.add('blurred'); + if (grid) { + grid.classList.add('blurred'); + // Sicherheitsnetz: bei viel DOM-Reshuffle im selben Tick + // (Display-Wechsel, renderSidebar, leere innerHTML) greift + // CSS filter:blur erst beim naechsten Layout-Pass. Im + // naechsten Frame nochmal setzen — idempotent. + requestAnimationFrame(() => { + if (state && state.isFirst) grid.classList.add('blurred'); + }); + } } else { overlay.classList.remove('blocking'); }