Agent Zero AI framework
fix(tooltips): finish fades before disposing instances
Alessandro423fc4bdd6d5
diff --git a/webui/components/tooltips/AGENTS.md b/webui/components/tooltips/AGENTS.mdindex b0048f40a..735400002 100644--- a/webui/components/tooltips/AGENTS.md+++ b/webui/components/tooltips/AGENTS.md@@ -12,6 +12,7 @@- Keep tooltip positioning compatible with desktop and mobile layouts.- Do not make tooltips required for completing a workflow.+- Finish pending tooltip fade callbacks before disposing detached controls, including rows moved between sidebar sections.- Tooltip content wraps, including long unbroken strings such as file paths (`overflow-wrap: anywhere` on `.tooltip` in `webui/index.css`, inherited by `.tooltip-inner`); keep that rule when restyling.## Work Guidancediff --git a/webui/components/tooltips/tooltip-store.js b/webui/components/tooltips/tooltip-store.jsindex 2a273b0e6..39b4de75c 100644--- a/webui/components/tooltips/tooltip-store.js+++ b/webui/components/tooltips/tooltip-store.js@@ -60,6 +60,8 @@ function disposeBootstrapTooltip(element) {const instance = globalThis.bootstrap?.Tooltip?.getInstance(element);if (!instance) return;try {+ // Finish pending fade callbacks before Bootstrap clears the instance state.+ instance.tip?.dispatchEvent(new Event("transitionend"));instance.dispose();} catch {// Bootstrap 5 can throw while disposing an already-torn-down tooltip node.