feat: brain sub-sidebar in AppShell — folders/tags under Brain nav item

- Brain nav item expands when on /brain page
- Shows Folders/Tags toggle tabs
- Folder links: /brain?folder=Work etc
- Tag links: /brain?tag=dev etc
- Counts shown next to each
- Brain page reads filter from URL params
- Only shows folders with items + key defaults (Home, Work, Knowledge)
- Tags limited to 12 most-used

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yusuf Suleman
2026-04-01 20:35:19 -05:00
parent 5f2fe8eca6
commit fd636f01fa
2 changed files with 128 additions and 0 deletions

View File

@@ -307,6 +307,16 @@
});
onMount(async () => {
// Read filters from URL params (set by AppShell sidebar links)
const urlFolder = new URL(window.location.href).searchParams.get('folder');
const urlTag = new URL(window.location.href).searchParams.get('tag');
if (urlFolder) {
activeFolder = urlFolder;
}
if (urlTag) {
activeTag = urlTag;
}
await loadSidebar();
await loadItems();
});