feat: note subtitle — show metadata (date + word count) (#94)

* feat: show metadata subtitle (date + word count) instead of snippet

Replace the note list subtitle with a compact metadata summary showing
relative date and word count (e.g. "2d ago · 342 words") instead of
the first paragraph of note content. Adds word_count to VaultEntry on
the Rust backend, computed during vault scan.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: cargo fmt formatting

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Luca Rossi
2026-02-26 20:50:29 +01:00
committed by GitHub
parent 1c2f0ee193
commit 4664f3360e
30 changed files with 279 additions and 21 deletions

View File

@@ -21,6 +21,7 @@ const mockEntry: VaultEntry = {
createdAt: null,
fileSize: 1024,
snippet: '',
wordCount: 0,
relationships: {},
icon: null,
color: null,
@@ -64,6 +65,7 @@ const referrerEntry: VaultEntry = {
createdAt: null,
fileSize: 200,
snippet: '',
wordCount: 0,
relationships: {},
icon: null,
color: null,
@@ -363,6 +365,7 @@ This is a test note with some words to count.
createdAt: null,
fileSize: 500,
snippet: '',
wordCount: 0,
relationships: { 'Type': ['[[type/responsibility]]'] },
icon: null,
color: null,
@@ -388,6 +391,7 @@ This is a test note with some words to count.
createdAt: null,
fileSize: 300,
snippet: '',
wordCount: 0,
relationships: { 'Belongs to': ['[[responsibility/grow-newsletter]]'], 'Type': ['[[type/essay]]'] },
icon: null,
color: null,
@@ -413,6 +417,7 @@ This is a test note with some words to count.
createdAt: null,
fileSize: 400,
snippet: '',
wordCount: 0,
relationships: { 'Belongs to': ['[[responsibility/grow-newsletter]]'], 'Type': ['[[type/procedure]]'] },
icon: null,
color: null,
@@ -438,6 +443,7 @@ This is a test note with some words to count.
createdAt: null,
fileSize: 200,
snippet: '',
wordCount: 0,
relationships: { 'Related to': ['[[responsibility/grow-newsletter]]'], 'Type': ['[[type/experiment]]'] },
icon: null,
color: null,
@@ -596,6 +602,7 @@ Status: Active
createdAt: null,
fileSize: 300,
snippet: '',
wordCount: 0,
relationships: { 'Belongs to': ['[[responsibility/grow-newsletter]]'], 'Type': ['[[type/essay]]'] },
icon: null,
color: null,