diff --git a/src/static/js/app.js b/src/static/js/app.js index 277f3de..7dace8b 100644 --- a/src/static/js/app.js +++ b/src/static/js/app.js @@ -2043,6 +2043,8 @@ async handleRefresh() { const isFirst = inc && !inc.summary; // Always update sidebar status (visible for all incidents) UI._updateSidebarRefreshStatus(msg.incident_id, status, msg.data); + // Re-render sidebar so status is baked into HTML (survives future re-renders) + this.renderSidebar(); if (msg.incident_id === this.currentIncidentId) { UI.showProgress(status, msg.data, msg.incident_id, isFirst); this._updateRefreshButton(status !== 'idle'); diff --git a/src/static/js/components.js b/src/static/js/components.js index 49fdf9d..00f7696 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -40,12 +40,32 @@ const UI = { const activeClass = isActive ? 'active' : ''; const creator = (incident.created_by_username || '').split('@')[0]; + // Determine refresh status for sidebar display + let refreshClass = ''; + let refreshStatusHtml = ''; + if (isRefreshing) { + const state = this._progressState[incident.id]; + const step = state ? state.step : 'researching'; + const isQueued = (step === 'queued'); + + if (isQueued) { + refreshClass = ' queued-item'; + const pos = state && state._queuePos ? ' (#' + state._queuePos + ')' : ''; + refreshStatusHtml = '