diff --git a/app/static/index.html b/app/static/index.html index c629aef..158adb7 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -535,12 +535,21 @@ function app() { pipeline: {hot:{count:0,samples:[]},warm:{count:0,samples:[]},cold:{count:0,samples:[]}}, toast: {show:false,msg:'',type:'success'}, modal: {open:false, domain:'', ai:{}, sa:null}, - _chart: null, _poll: null, _toastTimer: null, + _chart: null, _poll: null, _toastTimer: null, _lastAiDone: 0, async init() { await Promise.all([this.loadStats(), this.pollIndex(), this.loadAiStatus()]); - this._poll = setInterval(()=>{ - this.loadStats(); this.pollIndex(); this.loadAiStatus(); + this._lastAiDone = this.aiSt.done ?? 0; + this._poll = setInterval(async ()=>{ + this.loadStats(); this.pollIndex(); + await this.loadAiStatus(); + // Refresh browse results when new AI assessments complete + if((this.aiSt.done ?? 0) > this._lastAiDone && this.tab==='browse' && this.domains.length>0) { + this._lastAiDone = this.aiSt.done; + await this._fetch(); + } else { + this._lastAiDone = this.aiSt.done ?? 0; + } if(this.tab==='enrich') this.loadQueue(); if(this.tab==='pipeline') this.loadPipeline(); }, 3000);