From c2d427691d3d859e55efa4a1b40fc96dc541b3fb Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Tue, 8 Sep 2026 14:26:14 +0100 Subject: [PATCH] fix(web): stop tool-group flashing and config-menu closure on updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reuse existing tool-group DOM elements in rebuildTranscript instead of tearing them down — preserves CSS transition state and focus. Defer config-menu DOM rebuild while the menu is open so dropdowns aren't destroyed. + // Mark dirty so the next open rebuilds with fresh data. + if (!configMenu.hidden && !configBusy) { + configDirty = true; + return; + } + configDirty = false; configMenu.replaceChildren(); for (const option of ordered) { const row = document.createElement("label"); @@ -785,6 +811,7 @@ export function createStructuredConnection( configTrigger.addEventListener("click", () => { const opening = configMenu.hidden; + if (opening && configDirty) renderConfig(); configMenu.hidden = !opening; configTrigger.setAttribute("aria-expanded", String(opening)); });