From 9fc650fb123c3e38c63cf4514a47f9c00b7f2b03 Mon Sep 17 00:00:00 2001 From: dtoro Date: Wed, 20 May 2026 15:12:36 +0200 Subject: [PATCH] web(sidebar): auto-expand folder tree ancestors of the active folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the timeline navigates to a nested folder (RightSidebar's open-folder icon, URL hydration, back/forward), the LeftSidebar already highlighted the matching row via filters.folderPath — but if the parent folder was collapsed in the persisted openSet, the highlighted row wasn't visible at all. Each FolderTree instance now runs an effect that adds every ancestor of the active path to its openSet on filter change. The root instance expands the top-level ancestor first, which mounts the next-depth FolderTree instance — and the same effect runs there, cascading down to the leaf. Persisted to localStorage so the expansion sticks across reloads. Skipped in `readonly` mode (heap-convert picker has its own selectedPath and shouldn't drive the sidebar state). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../lib/components/layout/FolderTree.svelte | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/web/src/lib/components/layout/FolderTree.svelte b/web/src/lib/components/layout/FolderTree.svelte index f7de61d..15b7701 100644 --- a/web/src/lib/components/layout/FolderTree.svelte +++ b/web/src/lib/components/layout/FolderTree.svelte @@ -40,6 +40,7 @@