From 46540c69cfd362008e7a1772b70e179f5d3fec95 Mon Sep 17 00:00:00 2001 From: rope Date: Thu, 29 Oct 2026 09:58:49 +0000 Subject: [PATCH] Queue counts follow their row when moved Co-Authored-By: Claude Opus 5.5 --- static/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/app.js b/static/app.js index 2711037..7c37d37 100644 --- a/static/app.js +++ b/static/app.js @@ -721,11 +721,13 @@ function morphNode(old, fresh) { } // A fire's canvas sizes itself and holds its drawing: setting its size clears it. if (old.nodeName === "CANVAS" && old.dataset.flame === fresh.dataset.flame) return; + // A kept field whose key changed (a queue row moved) is now a different field. + const kept = old.dataset.keep !== undefined && old.dataset.keep === fresh.dataset.keep; for (const { name } of [...old.attributes]) if (!fresh.hasAttribute(name)) old.removeAttribute(name); for (const { name, value } of fresh.attributes) if (old.getAttribute(name) !== value) old.setAttribute(name, value); morphChildren(old, fresh); // What's typed or picked lives in properties, not attributes. Kept fields keep theirs (see render). - if (old.dataset.keep === undefined) { + if (!kept) { if (old.nodeName === "INPUT") { old.checked = fresh.checked; if (old.value !== fresh.value) old.value = fresh.value; @@ -846,7 +848,7 @@ function queuePanel() { return `
  • ${i + 1}${a.icon} ${esc(a.name)}${why ? `${esc(why)}` : ""} ${fills(a) ? `full` - : ``} + : ``} ${i || !now ? `` : ``}