From 9c74f84c5b64b5c1d77f01ead925734cdca353f3 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Sat, 11 Jul 2026 22:29:43 -0500 Subject: [PATCH] feat(transcript): show per-segment timestamps in live and finalized views --- src/lib/views/TranscriptNotes.svelte | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/lib/views/TranscriptNotes.svelte b/src/lib/views/TranscriptNotes.svelte index 490a161..a3cc08a 100644 --- a/src/lib/views/TranscriptNotes.svelte +++ b/src/lib/views/TranscriptNotes.svelte @@ -35,6 +35,17 @@ return speakers.find((s) => s.label === label)?.display_name ?? label; } + // Transcript timestamps: segment start_ms → "m:ss" (or "h:mm:ss" past an + // hour). Shown as a quiet monospace prefix so a line reads "0:42 Alice: …". + function fmtTs(ms: number): string { + const total = Math.floor(ms / 1000); + const h = Math.floor(total / 3600); + const m = Math.floor((total % 3600) / 60); + const s = total % 60; + const mm = h ? String(m).padStart(2, "0") : String(m); + return `${h ? `${h}:` : ""}${mm}:${String(s).padStart(2, "0")}`; + } + // T8.7/FR-TRX-4: the meeting view shows the language actually used, not // just the raw ISO code — falls back to the code itself if it's not in // the (curated) catalog, and to "auto-detecting…" before any is known. @@ -266,7 +277,11 @@
No transcript for this meeting.
{:else} {#each m.segments as s (s.id)} -{speakerName(s.speaker, m.speakers)}: {s.text}
++ {fmtTs(s.start_ms)} + {speakerName(s.speaker, m.speakers)}: + {s.text} +
{/each} {/if} {/if} @@ -428,6 +443,7 @@ class:active={open} onclick={() => (selectedSegmentMs = open ? null : s.start_ms)} > + {fmtTs(s.start_ms)} {speakerName(s.speaker)}: {s.text} {#if hasNote} @@ -561,6 +577,14 @@ .note-badge { margin-left: 0.3rem; } + /* Transcript timestamp: a quiet monospace prefix, not competing with the + speaker name or text for attention. */ + .ts { + font-family: var(--font-mono, ui-monospace, monospace); + font-size: 0.78em; + color: var(--muted); + margin-right: 0.15rem; + } .segment-note-input { display: block; width: 100%;