diff --git a/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/webpage_generator_base.py b/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/webpage_generator_base.py index 1097c39..0bdddcb 100644 --- a/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/webpage_generator_base.py +++ b/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/webpage_generator_base.py @@ -2754,12 +2754,6 @@ function renderTomoQueue(jobs){{ el.innerHTML='
No jobs queued
'; return; }} - // Running jobs are auto-opened once, on first appearance. We remember which - // we have already auto-opened so a manual collapse is not undone on the next - // refresh (previously, collapsing the only open job made the snapshot empty - // and re-triggered the auto-open). - const autoOpened=window.__tqAutoOpened||(window.__tqAutoOpened=new Set()); - const presentKeys=new Set(); let html=''; jobs.forEach((job,i)=>{{ const status=job.status||'pending'; @@ -2767,14 +2761,9 @@ function renderTomoQueue(jobs){{ const isCommand=job.kind==='command'; const params=job.params||{{}}; const key=(job.added_at||'')+'|'+label; - presentKeys.add(key); - // Open if the user currently has it open, or it is a running job we have - // not auto-opened before (its first appearance). Auto-open fires once. - let shouldOpen=openKeys.has(key); - if(status==='running' && !autoOpened.has(key)){{ - shouldOpen=true; - autoOpened.add(key); - }} + // Open only if the user currently has it open -- never force-open a + // job just because it started running. + const shouldOpen=openKeys.has(key); // Command jobs have no "params" key -- render their step sequence // instead of an (otherwise blank) params table. const paramRows=isCommand?'':buildParamRows(params); @@ -2799,9 +2788,6 @@ function renderTomoQueue(jobs){{ +'' +''; }}); - // Drop remembered auto-open keys for jobs that are gone, so the set stays - // small and a job that later reappears is treated as new. - autoOpened.forEach(k=>{{ if(!presentKeys.has(k)) autoOpened.delete(k); }}); el.innerHTML=html; }} diff --git a/csaxs_bec/bec_ipython_client/plugins/omny/omny_webpage_generator.py b/csaxs_bec/bec_ipython_client/plugins/omny/omny_webpage_generator.py index b1e74f7..3866630 100644 --- a/csaxs_bec/bec_ipython_client/plugins/omny/omny_webpage_generator.py +++ b/csaxs_bec/bec_ipython_client/plugins/omny/omny_webpage_generator.py @@ -2839,26 +2839,15 @@ function renderTomoQueue(jobs){{ el.innerHTML='
No jobs queued
'; return; }} - // Running jobs are auto-opened once, on first appearance. We remember which - // we have already auto-opened so a manual collapse is not undone on the next - // refresh (previously, collapsing the only open job made the snapshot empty - // and re-triggered the auto-open). - const autoOpened=window.__tqAutoOpened||(window.__tqAutoOpened=new Set()); - const presentKeys=new Set(); let html=''; jobs.forEach((job,i)=>{{ const status=job.status||'pending'; const label=job.label||('Job '+(i+1)); const params=job.params||{{}}; const key=(job.added_at||'')+'|'+label; - presentKeys.add(key); - // Open if the user currently has it open, or it is a running job we have - // not auto-opened before (its first appearance). Auto-open fires once. - let shouldOpen=openKeys.has(key); - if(status==='running' && !autoOpened.has(key)){{ - shouldOpen=true; - autoOpened.add(key); - }} + // Open only if the user currently has it open -- never force-open a + // job just because it started running. + const shouldOpen=openKeys.has(key); const paramRows=buildParamRows(params); const addedAt=job.added_at ?'Added '+new Date(job.added_at).toLocaleString([],{{month:'short',day:'numeric',hour:'2-digit',minute:'2-digit'}}) @@ -2875,9 +2864,6 @@ function renderTomoQueue(jobs){{ +'' +''; }}); - // Drop remembered auto-open keys for jobs that are gone, so the set stays - // small and a job that later reappears is treated as new. - autoOpened.forEach(k=>{{ if(!presentKeys.has(k)) autoOpened.delete(k); }}); el.innerHTML=html; }}