From 210b01c3859673af644a600da1a6ad36825ccb11 Mon Sep 17 00:00:00 2001 From: Antigravity Date: Sun, 10 May 2026 19:07:17 +0000 Subject: [PATCH] fix: also remove from expandedIds when unpinning a notebook --- memento-note/components/sidebar.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/memento-note/components/sidebar.tsx b/memento-note/components/sidebar.tsx index 824cc0d..21838a1 100644 --- a/memento-note/components/sidebar.tsx +++ b/memento-note/components/sidebar.tsx @@ -547,6 +547,8 @@ export function Sidebar({ className, user }: { className?: string; user?: any }) const next = new Set(prev) if (next.has(id)) { next.delete(id) + // Also collapse the notebook when unpinning + setExpandedIds(e => { const ne = new Set(e); ne.delete(id); return ne }) } else { next.add(id) // Ensure it's also expanded when pinned