feat: add favorites section with star button, frontmatter persistence, and drag-to-reorder

Adds FAVORITES sidebar section backed by _favorite and _favorite_index
frontmatter properties. Star button in breadcrumb bar toggles favorite
state. Drag-to-reorder updates _favorite_index on all affected notes.
Section auto-hides when empty.

ADR 0038 documents the decision to use frontmatter for portability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Test
2026-04-02 14:44:23 +02:00
parent 931fed879b
commit 33db64822d
14 changed files with 256 additions and 7 deletions

View File

@@ -336,6 +336,7 @@ function filterByFilterType(entries: VaultEntry[], filter: string): VaultEntry[]
if (filter === 'all') return entries.filter(isActive)
if (filter === 'archived') return entries.filter((e) => e.archived && !e.trashed)
if (filter === 'trash') return entries.filter((e) => e.trashed)
if (filter === 'favorites') return entries.filter((e) => e.favorite && !e.archived && !e.trashed)
if (filter === 'pulse') return []
return []
}