From 9aa80b4aecfc5ae6a1e20eb37b48bd84ca9ca0d6 Mon Sep 17 00:00:00 2001 From: Claude Dev Date: Thu, 9 Apr 2026 20:57:51 +0200 Subject: [PATCH] Lagenwechsel: Popup/Mini-Status pro Lage korrekt wiederherstellen Beim Zurueckwechseln auf eine laufende Lage wird der gespeicherte State (minimized/offen) direkt aus _progressState wiederhergestellt. War das Popup offen -> offen. War es minimiert -> Mini-Bar. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/static/js/app.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/static/js/app.js b/src/static/js/app.js index 8947bd5..c7d03ad 100644 --- a/src/static/js/app.js +++ b/src/static/js/app.js @@ -724,20 +724,29 @@ const App = { // Refresh-Status fuer diese Lage wiederherstellen const isRefreshing = this._refreshingIncidents.has(id); this._updateRefreshButton(isRefreshing); - // Hide any popup from previous incident + // Hide any popup/mini from previous incident const prevOverlay = document.getElementById('progress-overlay'); if (prevOverlay) prevOverlay.style.display = 'none'; const prevMini = document.getElementById('progress-mini'); if (prevMini) prevMini.style.display = 'none'; const grid = document.querySelector('.grid-stack'); if (grid) grid.classList.remove('blurred'); + if (isRefreshing) { const state = UI._progressState[id]; - const step = state ? state.step : 'researching'; - const isFirst = state ? state.isFirst : false; - UI.showProgress(step, {}, id, isFirst); + if (state) { + // Restore exactly as it was: popup open or minimized + if (state.minimized) { + UI._showMiniProgress(state.step, state); + } else { + UI._showPopupProgress(state.step, {}, state); + } + UI._lockActionsIfFirst(state.isFirst); + } else { + // No state yet — show popup (first status update will refine) + UI.showProgress('researching', {}, id, false); + } } else { - // Ensure actions are unlocked when viewing non-refreshing incident UI._lockActionsIfFirst(false); }