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 <noreply@anthropic.com>
This commit is contained in:
Frederic Cabassut
2026-03-07 21:08:16 +01:00
co-authored by Claude Opus 4.6
parent 7f42bc616d
commit 1725db41ce
+3 -1
View File
@@ -37,7 +37,9 @@ export const unpinnedNotes = derived(filteredNotes, ($notes) =>
export const allTags = derived(notes, ($notes) => {
const tagSet = new Set<string>();
$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();
});