diff --git a/frontend/packages/dashboard/src/tabs.js b/frontend/packages/dashboard/src/tabs.js index 54325005..1c965e07 100644 --- a/frontend/packages/dashboard/src/tabs.js +++ b/frontend/packages/dashboard/src/tabs.js @@ -2364,6 +2364,14 @@ window.marked = marked; function renderMetaInputs(s) { const root = $('meta-inputs-section'); if (!root) return; + // Snapshot which checkboxes the operator has ticked before wiping the + // DOM. A MetaInputsChanged event (e.g. triggered by a concurrent + // meta-update completing) would otherwise silently clear pending + // selections mid-flight. We restore them after rebuilding the list. + const checkedInputs = new Set( + Array.from(root.querySelectorAll('input[type="checkbox"][data-meta-input]:checked')) + .map((cb) => cb.dataset.metaInput), + ); root.replaceChildren(); const inputs = s.meta_inputs || []; if (!inputs.length) { @@ -2410,6 +2418,7 @@ window.marked = marked; value: inp.name, 'data-meta-input': inp.name, }); + if (checkedInputs.has(inp.name)) cb.checked = true; const label = el('label', { for: id, title: inp.name }); label.append(cb); if (depth > 0) label.append(el('span', { class: 'meta-input-twig' }, '└ '));