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.
This commit is contained in:
parent
13b0844c41
commit
f174c5d32c
1 changed files with 6 additions and 0 deletions
|
|
@ -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',
|
||||
];
|
||||
// <details> sections that should survive a refresh need a stable
|
||||
// `data-restore-key` attribute. snapshotOpenDetails walks managed
|
||||
|
|
|
|||
Loading…
Reference in a new issue