fix: revert notelist subtitle to show snippet instead of metadata (#118)

The metadata subtitle (date + word count) from #94 was only intended for
search results. Reverts NoteItem and PinnedCard to show first 2 lines of
note content with a date line underneath.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Luca Rossi
2026-02-27 15:27:38 +01:00
committed by GitHub
parent a5c2d26508
commit 4e6bbf4b88
3 changed files with 14 additions and 9 deletions

View File

@@ -266,12 +266,12 @@ describe('NoteList', () => {
expect(screen.getByText('Facebook Ads Strategy')).toBeInTheDocument()
})
it('context view shows prominent card with metadata subtitle', () => {
it('context view shows prominent card with snippet subtitle', () => {
render(
<NoteList entries={mockEntries} selection={{ kind: 'entity', entry: mockEntries[0] }} selectedNote={null} onSelectNote={noopSelect} onReplaceActiveTab={noopReplace} allContent={{}} onCreateNote={vi.fn()} />
)
// Metadata subtitle (date · word count) appears in the prominent card
expect(screen.getAllByText(/Empty/).length).toBeGreaterThan(0)
// Snippet text appears in the prominent card
expect(screen.getByText('Build a personal knowledge management app.')).toBeInTheDocument()
})
})