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:
@@ -579,8 +579,10 @@ const App = {
|
|||||||
// Sidebar-Dots aktualisieren
|
// Sidebar-Dots aktualisieren
|
||||||
data.refreshing.forEach(id => {
|
data.refreshing.forEach(id => {
|
||||||
this._updateSidebarDot(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 */ }
|
} catch (e) { /* Kein kritischer Fehler */ }
|
||||||
|
|
||||||
@@ -2041,12 +2043,11 @@ async handleRefresh() {
|
|||||||
// Detect first refresh: no summary means first run
|
// Detect first refresh: no summary means first run
|
||||||
const inc = this.incidents.find(i => i.id === msg.incident_id);
|
const inc = this.incidents.find(i => i.id === msg.incident_id);
|
||||||
const isFirst = inc && !inc.summary;
|
const isFirst = inc && !inc.summary;
|
||||||
// Always update sidebar status (visible for all incidents)
|
// Update progress state for ALL incidents (sidebar + popup if current)
|
||||||
UI._updateSidebarRefreshStatus(msg.incident_id, status, msg.data);
|
UI.showProgress(status, msg.data, msg.incident_id, isFirst);
|
||||||
// Re-render sidebar so status is baked into HTML (survives future re-renders)
|
// Re-render sidebar so status is baked into HTML (survives future re-renders)
|
||||||
this.renderSidebar();
|
this.renderSidebar();
|
||||||
if (msg.incident_id === this.currentIncidentId) {
|
if (msg.incident_id === this.currentIncidentId) {
|
||||||
UI.showProgress(status, msg.data, msg.incident_id, isFirst);
|
|
||||||
this._updateRefreshButton(status !== 'idle');
|
this._updateRefreshButton(status !== 'idle');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2054,6 +2055,8 @@ async handleRefresh() {
|
|||||||
async handleRefreshComplete(msg) {
|
async handleRefreshComplete(msg) {
|
||||||
this._refreshingIncidents.delete(msg.incident_id);
|
this._refreshingIncidents.delete(msg.incident_id);
|
||||||
this._updateSidebarDot(msg.incident_id);
|
this._updateSidebarDot(msg.incident_id);
|
||||||
|
UI._removeSidebarRefreshStatus(msg.incident_id);
|
||||||
|
this.renderSidebar();
|
||||||
|
|
||||||
if (msg.incident_id === this.currentIncidentId) {
|
if (msg.incident_id === this.currentIncidentId) {
|
||||||
this._updateRefreshButton(false);
|
this._updateRefreshButton(false);
|
||||||
|
|||||||
@@ -299,12 +299,17 @@ const UI = {
|
|||||||
this._progressTimerInterval = setInterval(() => this._tickProgressTimers(), 1000);
|
this._progressTimerInterval = setInterval(() => this._tickProgressTimers(), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only show UI for current incident
|
// Store queue position
|
||||||
if (incidentId !== App.currentIncidentId) return;
|
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);
|
this._updateSidebarRefreshStatus(incidentId, status, extra);
|
||||||
|
|
||||||
|
// Only show popup/mini UI for current incident
|
||||||
|
if (incidentId !== App.currentIncidentId) return;
|
||||||
|
|
||||||
|
|
||||||
if (false) { // popup always shown initially
|
if (false) { // popup always shown initially
|
||||||
state.minimized = true;
|
state.minimized = true;
|
||||||
|
|||||||
In neuem Issue referenzieren
Einen Benutzer sperren