From 02ea090cb4fdaa687e4c5878eb27de4a31863966 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 15 Jun 2026 16:19:47 +0000 Subject: [PATCH] Format sidebar allocation fix Co-authored-by: Julius Marminge Co-authored-by: codex --- apps/web/src/components/Sidebar.tsx | 34 +++++++++++++++++------------ 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 3c2b8587b2..0f33b7db5c 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -3247,22 +3247,28 @@ export default function Sidebar() { }, []); const animatedProjectLists = useMemo(() => new WeakSet(), []); - const attachProjectListAutoAnimateRef = useCallback((node: HTMLElement | null) => { - if (!node || animatedProjectLists.has(node)) { - return; - } - autoAnimate(node, SIDEBAR_LIST_ANIMATION_OPTIONS); - animatedProjectLists.add(node); - }, [animatedProjectLists]); + const attachProjectListAutoAnimateRef = useCallback( + (node: HTMLElement | null) => { + if (!node || animatedProjectLists.has(node)) { + return; + } + autoAnimate(node, SIDEBAR_LIST_ANIMATION_OPTIONS); + animatedProjectLists.add(node); + }, + [animatedProjectLists], + ); const animatedThreadLists = useMemo(() => new WeakSet(), []); - const attachThreadListAutoAnimateRef = useCallback((node: HTMLElement | null) => { - if (!node || animatedThreadLists.has(node)) { - return; - } - autoAnimate(node, SIDEBAR_LIST_ANIMATION_OPTIONS); - animatedThreadLists.add(node); - }, [animatedThreadLists]); + const attachThreadListAutoAnimateRef = useCallback( + (node: HTMLElement | null) => { + if (!node || animatedThreadLists.has(node)) { + return; + } + autoAnimate(node, SIDEBAR_LIST_ANIMATION_OPTIONS); + animatedThreadLists.add(node); + }, + [animatedThreadLists], + ); const visibleThreads = useMemo( () => sidebarThreads.filter((thread) => thread.archivedAt === null),