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); }