/** Where a record opens. A task, a snippet, a lesson and a note live at * different routes, and a link that guesses wrong is worse than one that is * plain. One copy, for every list that links a record of any kind. */ export function recordHref(rec: { id: number; is_task?: boolean; note_type?: string }): string { if (rec.is_task) return `/tasks/${rec.id}`; if (rec.note_type === "snippet") return `/snippets/${rec.id}`; if (rec.note_type === "lesson") return `/lessons/${rec.id}`; return `/notes/${rec.id}`; }