fix(lamni,flomni,omny): stop force-opening tomo-queue panel of running job
CI for csaxs_bec / test (pull_request) Successful in 1m49s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 1m47s

The status webpage's tomo-queue accordion auto-expanded a job's details
panel as soon as its status became "running", overriding whatever
open/closed state the user had selected. Panel state now depends only
on the existing DOM snapshot of user selections.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit was merged in pull request #290.
This commit is contained in:
x01dc
2026-07-31 13:38:13 +02:00
co-authored by Claude Sonnet 5
parent badbb82ba4
commit 0e7ef10eee
2 changed files with 6 additions and 34 deletions
@@ -2754,12 +2754,6 @@ function renderTomoQueue(jobs){{
el.innerHTML='<div class="tq-empty">No jobs queued</div>';
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){{
+'</div>'
+'</details>';
}});
// 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;
}}
@@ -2839,26 +2839,15 @@ function renderTomoQueue(jobs){{
el.innerHTML='<div class="tq-empty">No jobs queued</div>';
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){{
+'</div>'
+'</details>';
}});
// 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;
}}