activate('duplicates')}> Duplicates activate('tags')}> Tags activate('orphans')}> Orphans activate('trash')}> Trash

Notes with near-identical titles, grouped for review — not a verdict. Pick a target and the sources to fold into it; sources are soft-deleted afterward and stay recoverable from Trash.

{#if mergeError}

{mergeError}

{/if} {#if duplicatesError}

{duplicatesError}

{/if} {#if clusters === null}
{:else if clusters.length === 0}

No likely duplicates found.

{:else}
{#each clusters as c (c.members[0].slug)} {@const key = c.members[0].slug} {@const sourceCount = mergeSources[key]?.size ?? 0}
{c.members.length} similar notes {(c.top_similarity * 100).toFixed(0)}%

keep as target fold into it

{#each c.members as m (m.slug)} {@const isTarget = mergeTarget[key] === m.slug} {@const Icon = kindMeta(m.kind).icon} {/each}
{/each}
{/if}
{#if tagsError}

{tagsError}

{/if} {#if tags === null}
{:else} {@const maxUses = Math.max(1, ...tags.map((t) => t.uses))} {#each tags as t (t.tag)} {/each}
Tag Uses Variants
{#if renaming === t.tag}
{:else} {/if}
{t.uses} {#if t.split} {t.variants.join(', ')} {:else} {/if} {#if t.split} {/if}
{/if}

Notes untagged, unlinked to any entity, or untouched for 90+ days — invisible to most navigation paths and easy to lose track of. {#if orphanCounts.untagged || orphanCounts.unlinked || orphanCounts.stale} ({orphanCounts.untagged ?? 0} untagged · {orphanCounts.unlinked ?? 0} unlinked · {orphanCounts.stale ?? 0} stale) {/if}

{#if orphansError}

{orphansError}

{/if} {#if orphans === null}
{:else if orphans.length === 0}

Nothing orphaned.

{:else}
{#each orphans as o (o.slug)} {/each}
{/if}
{#if trashError}

{trashError}

{/if} {#if trash === null}
{:else if trash.length === 0}

Trash is empty.

{:else}
{#each trash as t (t.slug)}
{t.title} deleted {relativeTime(t.deleted_at)} by {t.deleted_by || 'unknown'}
{/each}
{/if}