Sidebar: Refresh-Status fuer ALLE Lagen korrekt anzeigen

Progress-State wird jetzt fuer alle refreshenden Lagen angelegt,
nicht nur fuer die aktuell ausgewaehlte. Sidebar-Update passiert
vor dem Early-Return fuer nicht-aktuelle Lagen.

Bei WebSocket-Reconnect (auch nach Ctrl+Shift+R) wird der State
fuer bereits laufende Refreshes korrekt wiederhergestellt.

Sidebar-Cleanup bei Refresh-Abschluss fuer alle Lagen.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
Claude Dev
2026-04-09 20:36:16 +02:00
Ursprung 244cc56bde
Commit 762d8dbc1a
2 geänderte Dateien mit 15 neuen und 7 gelöschten Zeilen

Datei anzeigen

@@ -579,8 +579,10 @@ const App = {
// Sidebar-Dots aktualisieren
data.refreshing.forEach(id => {
this._updateSidebarDot(id);
UI._updateSidebarRefreshStatus(id, 'researching', {});
// Init progress state so sidebar renders correctly
UI.showProgress('researching', {}, id, false);
});
this.renderSidebar();
}
} catch (e) { /* Kein kritischer Fehler */ }
@@ -2041,12 +2043,11 @@ async handleRefresh() {
// Detect first refresh: no summary means first run
const inc = this.incidents.find(i => i.id === msg.incident_id);
const isFirst = inc && !inc.summary;
// Always update sidebar status (visible for all incidents)
UI._updateSidebarRefreshStatus(msg.incident_id, status, msg.data);
// Update progress state for ALL incidents (sidebar + popup if current)
UI.showProgress(status, msg.data, msg.incident_id, isFirst);
// 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');
}
},
@@ -2054,6 +2055,8 @@ async handleRefresh() {
async handleRefreshComplete(msg) {
this._refreshingIncidents.delete(msg.incident_id);
this._updateSidebarDot(msg.incident_id);
UI._removeSidebarRefreshStatus(msg.incident_id);
this.renderSidebar();
if (msg.incident_id === this.currentIncidentId) {
this._updateRefreshButton(false);

Datei anzeigen

@@ -299,12 +299,17 @@ const UI = {
this._progressTimerInterval = setInterval(() => this._tickProgressTimers(), 1000);
}
// Only show UI for current incident
if (incidentId !== App.currentIncidentId) return;
// Store queue position
if (status === 'queued' && extra.queue_position) {
state._queuePos = extra.queue_position;
}
// Update sidebar status text
// Update sidebar status for ALL incidents (not just current)
this._updateSidebarRefreshStatus(incidentId, status, extra);
// Only show popup/mini UI for current incident
if (incidentId !== App.currentIncidentId) return;
if (false) { // popup always shown initially
state.minimized = true;