fix: prevent stale tab renders by scoping workflow and loaded models data loading to their respective tokens

This commit is contained in:
Dariusz L
2026-06-07 18:37:00 +02:00
parent 9160b365b0
commit e61c868038
7 changed files with 91 additions and 29 deletions
+9 -1
View File
@@ -162,10 +162,18 @@ export const renderFormatMethods = {
while (this._analysisProgressToken === token) {
try {
const response = await api.fetchApi(`/model_resolver/analyze-progress/${analysisId}`);
if (response.ok && this.contentElement && this._analysisProgressToken === token) {
if (
response.ok &&
this.contentElement &&
this._analysisProgressToken === token &&
this.activeTab === 'missing'
) {
const progress = await response.json();
this.contentElement.innerHTML = this.renderAnalysisProgress(progress);
if (progress.status === 'completed' || progress.status === 'error') {
if (this._analysisProgressToken === token) {
this._analysisProgressToken = null;
}
return;
}
}