From 1725db41ce72b301ef6e57d987c581830cafc437 Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Sat, 7 Mar 2026 21:07:27 +0100 Subject: [PATCH] fix: exclude archived/trashed notes from tag list The allTags derived store now filters out archived and trashed notes before collecting tags, so the sidebar tag filter only shows tags that yield visible results. Closes #9 Co-Authored-By: Claude Opus 4.6 --- src/lib/stores/notes.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/stores/notes.ts b/src/lib/stores/notes.ts index ce13241..0ac3aad 100644 --- a/src/lib/stores/notes.ts +++ b/src/lib/stores/notes.ts @@ -37,7 +37,9 @@ export const unpinnedNotes = derived(filteredNotes, ($notes) => export const allTags = derived(notes, ($notes) => { const tagSet = new Set(); - $notes.forEach((n) => n.tags?.forEach((t) => tagSet.add(t))); + $notes + .filter((n) => !n.archived && !n.trashed) + .forEach((n) => n.tags?.forEach((t) => tagSet.add(t))); return [...tagSet].sort(); });