From a4b0e4a2a0e11f0316d2a8556a7426902572ccab Mon Sep 17 00:00:00 2001 From: yyh Date: Fri, 30 Jan 2026 17:12:51 +0800 Subject: [PATCH] fix(skill): clear file tree highlight when switching to start tab The sync hook skipped deselectAll() when activeTabId was START_TAB_ID, leaving stale highlights after closing the last file tab. --- .../workflow/skill/hooks/use-sync-tree-with-active-tab.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/skill/hooks/use-sync-tree-with-active-tab.ts b/web/app/components/workflow/skill/hooks/use-sync-tree-with-active-tab.ts index 5e5bead339..96dccd4bf8 100644 --- a/web/app/components/workflow/skill/hooks/use-sync-tree-with-active-tab.ts +++ b/web/app/components/workflow/skill/hooks/use-sync-tree-with-active-tab.ts @@ -25,14 +25,14 @@ export function useSyncTreeWithActiveTab({ const storeApi = useWorkflowStore() useEffect(() => { - if (!activeTabId || activeTabId === START_TAB_ID) + if (!activeTabId) return const tree = treeRef.current if (!tree) return - if (isArtifactTab(activeTabId)) { + if (activeTabId === START_TAB_ID || isArtifactTab(activeTabId)) { requestAnimationFrame(() => { tree.deselectAll() })