{#each visible as n (n.id)}
dispatch('open', n.id)}
on:keydown={(e) => e.key === 'Enter' && dispatch('open', n.id)}
>
{@html hl(noteTitle(n.content))}
{@html hl(noteBody(n.content).slice(0, 120))}
{#each n.tags as t}{t}{/each}
{when(n.modified_at)}
{:else}
{query.trim() ? 'No matches — Enter creates this note' : 'No notes yet'}
{/each}
{#if filtered.length > MAX_ROWS}
…and {filtered.length - MAX_ROWS} more — keep typing to narrow down
{/if}