From d26c0b91c9e2ca3e8cce08c7c83621b17dc661b2 Mon Sep 17 00:00:00 2001 From: xintaofei Date: Wed, 22 Apr 2026 19:02:14 +0800 Subject: [PATCH] fix(sidebar): hide folder groups after removing from workspace --- .../conversations/sidebar-conversation-list.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/conversations/sidebar-conversation-list.tsx b/src/components/conversations/sidebar-conversation-list.tsx index 0d2ca35..53fca1e 100644 --- a/src/components/conversations/sidebar-conversation-list.tsx +++ b/src/components/conversations/sidebar-conversation-list.tsx @@ -375,20 +375,14 @@ export function SidebarConversationList({ const orderedFolderIds = useMemo(() => { const seen = new Set() const ids: number[] = [] - for (const f of allFolders) { + for (const f of folders) { if (!seen.has(f.id)) { seen.add(f.id) ids.push(f.id) } } - for (const id of byFolder.keys()) { - if (!seen.has(id)) { - seen.add(id) - ids.push(id) - } - } return ids - }, [allFolders, byFolder]) + }, [folders]) const flatItems = useMemo(() => { const items: FlatItem[] = []