From f174c5d32c8e36b01c5690d845ee9b9559a22de1 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 5 Jun 2026 10:29:24 +0200 Subject: [PATCH] fix(dashboard): guard capabilities/tool-groups SSE handlers against in-progress edits - Add 'capabilities-section' and 'tool-groups-section' to MANAGED_SECTION_IDS so operatorIsTyping() covers them too - applyCapabilitiesChanged and applyToolGroupsChanged skip re-render when the operator has focus inside the section, preventing the table from being torn down under an in-progress checkbox edit. Tab-activation re-fetch is the recovery path for any missed event. --- frontend/packages/dashboard/src/tabs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/packages/dashboard/src/tabs.js b/frontend/packages/dashboard/src/tabs.js index c2a23c90..ab4974b0 100644 --- a/frontend/packages/dashboard/src/tabs.js +++ b/frontend/packages/dashboard/src/tabs.js @@ -1233,11 +1233,15 @@ window.marked = marked; function applyCapabilitiesChanged(ev) { const root = $('capabilities-section'); if (!root) return; + // Skip re-render while operator has a checkbox focused in this + // section — the tab-activation re-fetch is the recovery path. + if (root.contains(document.activeElement)) return; renderCapabilities(root, ev); } function applyToolGroupsChanged(ev) { const root = $('tool-groups-section'); if (!root) return; + if (root.contains(document.activeElement)) return; renderToolGroups(root, ev); } @@ -3457,6 +3461,8 @@ window.marked = marked; 'rebuild-queue-section', 'reminders-section', 'schedules-section', + 'capabilities-section', + 'tool-groups-section', ]; //
sections that should survive a refresh need a stable // `data-restore-key` attribute. snapshotOpenDetails walks managed