Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Transcript: while recording it draws the latest 300 or so lines, with Show earlier lines for the rest, so a long meeting no longer grows the window by GBs; every line stays saved and searchable

christianmat27a701456e62
diff --git a/app/src/renderer/src/components/Transcript.tsx b/app/src/renderer/src/components/Transcript.tsx
index a94e4218..88c71027 100644
--- a/app/src/renderer/src/components/Transcript.tsx
+++ b/app/src/renderer/src/components/Transcript.tsx
@@ -9,7 +9,7 @@ import { AudioLines, ArrowDown, ChevronDown, Search as SearchIcon } from 'lucide
import type { Segment, TranscriptPartial } from '../../../shared/types'
import { t } from '../../../shared/i18n'
import { useLanguage } from '../i18n'
-import { bubbles, clock, echoRuns, filterLines, lineAt, stableKeys, turns, withLive, type LiveSaid } from '../../../shared/transcript'
+import { bubbles, clock, echoRuns, filterLines, lineAt, recentRuns, stableKeys, turns, withLive, type LiveSaid } from '../../../shared/transcript'
import { markWords } from '../../../shared/highlight'
import { Player, type PlayerHandle } from './Player'
import { rememberedScroll, useScrollMemory } from '../useScrollMemory'
@@ -62,6 +62,10 @@ function useLines(id: string) {
* arrives takes its own words off at once (shared/liveWords), in the same render that shows it, so nothing shows twice.
* `previewed` tells a final line that took the place of live words (it settles in place instead of fading in).
*/
+/** a recording draws this many of its latest lines, trimmed in steps of LIVE_STEP (recentRuns) */
+const LIVE_LINES = 300
+const LIVE_STEP = 50
+
function useLive(id: string, recording: boolean) {
const [parts, setParts] = useState<Partial<Record<'me' | 'them', LiveSaid>>>({})
/** how far each side's live words have reached */
@@ -157,7 +161,9 @@ export function Transcript({ id, recording, inline = false, active = true, onClo
const timeline = useMemo(() => echoRuns(withLive(allLines, liveSaid)).filter(run => !run.echo), [allLines, liveSaid])
const lines = useMemo(() => timeline.flatMap(run => run.lines.filter((l): l is Line => !('live' in l))), [timeline])
const [query, setQuery] = useState('')
- useEffect(() => { setQuery('') }, [id])
+ // a long recording draws its latest lines; the earlier ones on request (recentRuns)
+ const [showAll, setShowAll] = useState(false)
+ useEffect(() => { setQuery(''); setShowAll(false) }, [id])
// the recording is only playable once it is finished
const [tracks, setTracks] = useState<Array<'me' | 'them'>>([])
@@ -305,6 +311,7 @@ export function Transcript({ id, recording, inline = false, active = true, onClo
if (!l) return
focusDone.current = focus.seq
stick.current = false
+ setShowAll(true)
setFocusedKey(key(l)); setFocusKey(key(l))
requestAnimationFrame(() => rowOf(key(l))?.scrollIntoView({ block: 'center' }))
}, [focus?.seq, lines, active])
@@ -331,7 +338,9 @@ export function Transcript({ id, recording, inline = false, active = true, onClo
const typed = query.trim()
// what is being said joins the bubble it carries on; not while searching
- const grouped = useMemo(() => timeline.map(run => ({ ...run, lines: typed ? run.lines.filter(l => !('live' in l) && filterLines([l], typed).length) : run.lines })).filter(run => run.lines.length), [timeline, typed])
+ const grouped = useMemo(() => timeline.map(run => ({ ...run, k: key(run.lines[0]), lines: typed ? run.lines.filter(l => !('live' in l) && filterLines([l], typed).length) : run.lines })).filter(run => run.lines.length), [timeline, typed])
+ // while recording (not searching), the latest lines only: over hours every line on the page grew the window past a GB
+ const drawn = useMemo(() => (recording && !typed && !showAll ? recentRuns(grouped, LIVE_LINES, LIVE_STEP) : { runs: grouped, earlier: 0 }), [grouped, recording, typed, showAll])
/** the line being played is on screen, not left out by the search */
const playingShown = useMemo(() => !!shownKey && shownLines.some((l) => key(l) === shownKey), [shownKey, shownLines])
const Surface = inline ? 'section' : 'aside'
@@ -355,7 +364,8 @@ export function Transcript({ id, recording, inline = false, active = true, onClo
{loadingPhase !== 'ready' && <li className="loading-placeholder"><Loading layout="transcript" /></li>}
{loaded && allLines.length === 0 && liveSaid.length === 0 && <li data-testid="transcript-empty" className="note-empty empty-state"><div className="empty-state-content"><div className="empty-tile"><AudioLines size={28} strokeWidth={1.5} aria-hidden="true" /></div>{t('Nothing heard yet.')}</div></li>}
{allLines.length > 0 && grouped.length === 0 && <li data-testid="transcript-none" className="note-empty">{t('Nothing found for “{query}”.', { query: typed })}</li>}
- {grouped.map(run => <Fragment key={key(run.lines[0])}>
+ {drawn.earlier > 0 && <li className="flex justify-center"><button data-testid="transcript-earlier" onClick={() => { stick.current = false; setShowAll(true) }} className="ghost-btn !px-2 !py-1 text-xs text-muted">{t('Show earlier lines')}</button></li>}
+ {drawn.runs.map(run => <Fragment key={run.k}>
{turns(run.lines).map((turn) => {
const me = turn[0].track === 'me', first = turn[0]
const color = me || !('speakerColor' in first) ? undefined : first.speakerColor
diff --git a/app/src/shared/locales/ar.json b/app/src/shared/locales/ar.json
index fe462d30..2b20c692 100644
--- a/app/src/shared/locales/ar.json
+++ b/app/src/shared/locales/ar.json
@@ -738,5 +738,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "عند إيقافه، يُحذف صوت الاجتماعات الجديدة بعد حفظ الملخص.",
"New recording": "تسجيل جديد",
"Hide events without a call link": "إخفاء الأحداث التي ليس لها رابط مكالمة",
- "Keep your agenda and reminders focused on calls.": "ركّز جدولك وتذكيراتك على المكالمات."
+ "Keep your agenda and reminders focused on calls.": "ركّز جدولك وتذكيراتك على المكالمات.",
+ "Show earlier lines": "عرض الأسطر السابقة"
}
diff --git a/app/src/shared/locales/bn.json b/app/src/shared/locales/bn.json
index 812f1401..f366bff7 100644
--- a/app/src/shared/locales/bn.json
+++ b/app/src/shared/locales/bn.json
@@ -668,5 +668,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "বন্ধ থাকলে সারাংশ সেভের পর নতুন মিটিংয়ের অডিও মুছবে।",
"New recording": "নতুন রেকর্ডিং",
"Hide events without a call link": "কলের লিঙ্ক ছাড়া ইভেন্ট লুকান",
- "Keep your agenda and reminders focused on calls.": "আপনার সময়সূচি ও রিমাইন্ডারে কলগুলোকে প্রাধান্য দিন।"
+ "Keep your agenda and reminders focused on calls.": "আপনার সময়সূচি ও রিমাইন্ডারে কলগুলোকে প্রাধান্য দিন।",
+ "Show earlier lines": "আগের লাইনগুলো দেখান"
}
diff --git a/app/src/shared/locales/cs.json b/app/src/shared/locales/cs.json
index 1aab9f38..db6a26ac 100644
--- a/app/src/shared/locales/cs.json
+++ b/app/src/shared/locales/cs.json
@@ -711,5 +711,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Při vypnutí se zvuk nových schůzek smaže po uložení shrnutí.",
"New recording": "Nová nahrávka",
"Hide events without a call link": "Skrýt události bez odkazu na hovor",
- "Keep your agenda and reminders focused on calls.": "Zaměřte svůj program a připomínky na hovory."
+ "Keep your agenda and reminders focused on calls.": "Zaměřte svůj program a připomínky na hovory.",
+ "Show earlier lines": "Zobrazit starší řádky"
}
diff --git a/app/src/shared/locales/da.json b/app/src/shared/locales/da.json
index d0b9b6f8..41e5784c 100644
--- a/app/src/shared/locales/da.json
+++ b/app/src/shared/locales/da.json
@@ -677,5 +677,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Når slået fra, slettes nye møders lyd, når resuméet er gemt.",
"New recording": "Ny optagelse",
"Hide events without a call link": "Skjul begivenheder uden opkaldslink",
- "Keep your agenda and reminders focused on calls.": "Hold fokus på opkald i din dagsorden og dine påmindelser."
+ "Keep your agenda and reminders focused on calls.": "Hold fokus på opkald i din dagsorden og dine påmindelser.",
+ "Show earlier lines": "Vis tidligere linjer"
}
diff --git a/app/src/shared/locales/de.json b/app/src/shared/locales/de.json
index 2ace3b83..1436d481 100644
--- a/app/src/shared/locales/de.json
+++ b/app/src/shared/locales/de.json
@@ -677,5 +677,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Wenn aus, wird Audio neuer Meetings nach Speichern der Zusammenfassung gelöscht.",
"New recording": "Neue Aufnahme",
"Hide events without a call link": "Termine ohne Anruflink ausblenden",
- "Keep your agenda and reminders focused on calls.": "Konzentriere dich in Agenda und Erinnerungen auf Anrufe."
+ "Keep your agenda and reminders focused on calls.": "Konzentriere dich in Agenda und Erinnerungen auf Anrufe.",
+ "Show earlier lines": "Frühere Zeilen anzeigen"
}
diff --git a/app/src/shared/locales/el.json b/app/src/shared/locales/el.json
index 3b67d134..7c832c90 100644
--- a/app/src/shared/locales/el.json
+++ b/app/src/shared/locales/el.json
@@ -680,5 +680,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Αν κλείσει, ο ήχος νέων συναντήσεων διαγράφεται μόλις σωθεί η σύνοψη.",
"New recording": "Νέα ηχογράφηση",
"Hide events without a call link": "Απόκρυψη συμβάντων χωρίς σύνδεσμο κλήσης",
- "Keep your agenda and reminders focused on calls.": "Εστιάστε το πρόγραμμά σας και τις υπενθυμίσεις στις κλήσεις."
+ "Keep your agenda and reminders focused on calls.": "Εστιάστε το πρόγραμμά σας και τις υπενθυμίσεις στις κλήσεις.",
+ "Show earlier lines": "Εμφάνιση προηγούμενων γραμμών"
}
diff --git a/app/src/shared/locales/en.json b/app/src/shared/locales/en.json
index a276f247..1aebd321 100644
--- a/app/src/shared/locales/en.json
+++ b/app/src/shared/locales/en.json
@@ -131,5 +131,6 @@
"Settings": "Settings",
"New recording": "New recording",
"Hide events without a call link": "Hide events without a call link",
- "Keep your agenda and reminders focused on calls.": "Keep your agenda and reminders focused on calls."
+ "Keep your agenda and reminders focused on calls.": "Keep your agenda and reminders focused on calls.",
+ "Show earlier lines": "Show earlier lines"
}
diff --git a/app/src/shared/locales/es.json b/app/src/shared/locales/es.json
index 07e22196..d5cee172 100644
--- a/app/src/shared/locales/es.json
+++ b/app/src/shared/locales/es.json
@@ -692,5 +692,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Si se desactiva, el audio de nuevas reuniones se borra al guardar el resumen.",
"New recording": "Nueva grabación",
"Hide events without a call link": "Ocultar eventos sin enlace de llamada",
- "Keep your agenda and reminders focused on calls.": "Centra tu agenda y tus recordatorios en las llamadas."
+ "Keep your agenda and reminders focused on calls.": "Centra tu agenda y tus recordatorios en las llamadas.",
+ "Show earlier lines": "Mostrar líneas anteriores"
}
diff --git a/app/src/shared/locales/fi.json b/app/src/shared/locales/fi.json
index bb710ea5..45b1c189 100644
--- a/app/src/shared/locales/fi.json
+++ b/app/src/shared/locales/fi.json
@@ -680,5 +680,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Pois päältä uusien kokousten ääni poistetaan yhteenvedon tallennuttua.",
"New recording": "Uusi tallennus",
"Hide events without a call link": "Piilota tapahtumat ilman puhelulinkkiä",
- "Keep your agenda and reminders focused on calls.": "Keskity puheluihin päiväohjelmassa ja muistutuksissa."
+ "Keep your agenda and reminders focused on calls.": "Keskity puheluihin päiväohjelmassa ja muistutuksissa.",
+ "Show earlier lines": "Näytä aiemmat rivit"
}
diff --git a/app/src/shared/locales/fil.json b/app/src/shared/locales/fil.json
index 1fadf2f0..20fb921e 100644
--- a/app/src/shared/locales/fil.json
+++ b/app/src/shared/locales/fil.json
@@ -677,5 +677,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Kapag naka-off, buburahin ang audio ng bagong pulong pag na-save ang buod.",
"New recording": "Bagong recording",
"Hide events without a call link": "Itago ang mga event na walang link sa tawag",
- "Keep your agenda and reminders focused on calls.": "Ituon ang iyong agenda at mga paalala sa mga tawag."
+ "Keep your agenda and reminders focused on calls.": "Ituon ang iyong agenda at mga paalala sa mga tawag.",
+ "Show earlier lines": "Ipakita ang mga naunang linya"
}
diff --git a/app/src/shared/locales/fr.json b/app/src/shared/locales/fr.json
index 73500328..cf37feab 100644
--- a/app/src/shared/locales/fr.json
+++ b/app/src/shared/locales/fr.json
@@ -692,5 +692,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Si désactivé, l’audio des nouvelles réunions est supprimé après sauvegarde du résumé.",
"New recording": "Nouvel enregistrement",
"Hide events without a call link": "Masquer les événements sans lien d’appel",
- "Keep your agenda and reminders focused on calls.": "Gardez les appels au centre de votre agenda et de vos rappels."
+ "Keep your agenda and reminders focused on calls.": "Gardez les appels au centre de votre agenda et de vos rappels.",
+ "Show earlier lines": "Afficher les lignes précédentes"
}
diff --git a/app/src/shared/locales/he.json b/app/src/shared/locales/he.json
index 91491cac..d986d44e 100644
--- a/app/src/shared/locales/he.json
+++ b/app/src/shared/locales/he.json
@@ -689,5 +689,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "כשכבוי, השמע של פגישות חדשות נמחק לאחר שמירת הסיכום.",
"New recording": "הקלטה חדשה",
"Hide events without a call link": "הסתרת אירועים ללא קישור לשיחה",
- "Keep your agenda and reminders focused on calls.": "מקדו את סדר היום והתזכורות בשיחות."
+ "Keep your agenda and reminders focused on calls.": "מקדו את סדר היום והתזכורות בשיחות.",
+ "Show earlier lines": "הצגת שורות קודמות"
}
diff --git a/app/src/shared/locales/hi.json b/app/src/shared/locales/hi.json
index 5f2ca6db..6de51659 100644
--- a/app/src/shared/locales/hi.json
+++ b/app/src/shared/locales/hi.json
@@ -668,5 +668,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "बंद होने पर नई मीटिंग का ऑडियो सारांश सेव होने के बाद मिटेगा।",
"New recording": "नई रिकॉर्डिंग",
"Hide events without a call link": "कॉल लिंक के बिना इवेंट छिपाएँ",
- "Keep your agenda and reminders focused on calls.": "अपने एजेंडा और रिमाइंडर को कॉल पर केंद्रित रखें।"
+ "Keep your agenda and reminders focused on calls.": "अपने एजेंडा और रिमाइंडर को कॉल पर केंद्रित रखें।",
+ "Show earlier lines": "पिछली पंक्तियाँ दिखाएँ"
}
diff --git a/app/src/shared/locales/hu.json b/app/src/shared/locales/hu.json
index 30432481..7d474871 100644
--- a/app/src/shared/locales/hu.json
+++ b/app/src/shared/locales/hu.json
@@ -668,5 +668,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Kikapcsolva az új megbeszélések hangja az összefoglaló mentése után törlődik.",
"New recording": "Új felvétel",
"Hide events without a call link": "Híváshivatkozás nélküli események elrejtése",
- "Keep your agenda and reminders focused on calls.": "A napirendben és az emlékeztetőkben a hívásokra összpontosítson."
+ "Keep your agenda and reminders focused on calls.": "A napirendben és az emlékeztetőkben a hívásokra összpontosítson.",
+ "Show earlier lines": "Korábbi sorok megjelenítése"
}
diff --git a/app/src/shared/locales/id.json b/app/src/shared/locales/id.json
index 5985158e..5776640f 100644
--- a/app/src/shared/locales/id.json
+++ b/app/src/shared/locales/id.json
@@ -632,5 +632,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Jika dimatikan, audio rapat baru dihapus setelah ringkasan tersimpan.",
"New recording": "Rekaman baru",
"Hide events without a call link": "Sembunyikan acara tanpa tautan panggilan",
- "Keep your agenda and reminders focused on calls.": "Fokuskan agenda dan pengingat Anda pada panggilan."
+ "Keep your agenda and reminders focused on calls.": "Fokuskan agenda dan pengingat Anda pada panggilan.",
+ "Show earlier lines": "Tampilkan baris sebelumnya"
}
diff --git a/app/src/shared/locales/it.json b/app/src/shared/locales/it.json
index c2be1a5f..1d73d661 100644
--- a/app/src/shared/locales/it.json
+++ b/app/src/shared/locales/it.json
@@ -695,5 +695,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Se disattivato, l’audio delle nuove riunioni si elimina dopo aver salvato il riepilogo.",
"New recording": "Nuova registrazione",
"Hide events without a call link": "Nascondi eventi senza link alla chiamata",
- "Keep your agenda and reminders focused on calls.": "Concentra agenda e promemoria sulle chiamate."
+ "Keep your agenda and reminders focused on calls.": "Concentra agenda e promemoria sulle chiamate.",
+ "Show earlier lines": "Mostra righe precedenti"
}
diff --git a/app/src/shared/locales/ja.json b/app/src/shared/locales/ja.json
index 42b918dd..76490eb6 100644
--- a/app/src/shared/locales/ja.json
+++ b/app/src/shared/locales/ja.json
@@ -632,5 +632,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "オフにすると、新しい会議の音声は要約の保存後に削除されます。",
"New recording": "新規録音",
"Hide events without a call link": "通話リンクのない予定を非表示",
- "Keep your agenda and reminders focused on calls.": "予定とリマインダーを通話中心に整理します。"
+ "Keep your agenda and reminders focused on calls.": "予定とリマインダーを通話中心に整理します。",
+ "Show earlier lines": "前の行を表示"
}
diff --git a/app/src/shared/locales/ko.json b/app/src/shared/locales/ko.json
index c0ec0ab0..8916e29e 100644
--- a/app/src/shared/locales/ko.json
+++ b/app/src/shared/locales/ko.json
@@ -632,5 +632,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "끄면 새 회의의 오디오가 요약 저장 후 삭제됩니다.",
"New recording": "새 녹음",
"Hide events without a call link": "통화 링크가 없는 일정 숨기기",
- "Keep your agenda and reminders focused on calls.": "일정과 알림을 통화 중심으로 정리하세요."
+ "Keep your agenda and reminders focused on calls.": "일정과 알림을 통화 중심으로 정리하세요.",
+ "Show earlier lines": "이전 줄 보기"
}
diff --git a/app/src/shared/locales/ms.json b/app/src/shared/locales/ms.json
index 16f37c52..29b2283b 100644
--- a/app/src/shared/locales/ms.json
+++ b/app/src/shared/locales/ms.json
@@ -632,5 +632,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Jika dimatikan, audio mesyuarat baharu dipadam selepas ringkasan disimpan.",
"New recording": "Rakaman baharu",
"Hide events without a call link": "Sembunyikan acara tanpa pautan panggilan",
- "Keep your agenda and reminders focused on calls.": "Fokuskan agenda dan peringatan anda pada panggilan."
+ "Keep your agenda and reminders focused on calls.": "Fokuskan agenda dan peringatan anda pada panggilan.",
+ "Show earlier lines": "Tunjukkan baris terdahulu"
}
diff --git a/app/src/shared/locales/nb.json b/app/src/shared/locales/nb.json
index 64d6224e..79687c2f 100644
--- a/app/src/shared/locales/nb.json
+++ b/app/src/shared/locales/nb.json
@@ -677,5 +677,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Når avslått, slettes lyd fra nye møter etter at sammendraget er lagret.",
"New recording": "Nytt opptak",
"Hide events without a call link": "Skjul hendelser uten anropslenke",
- "Keep your agenda and reminders focused on calls.": "Hold fokus på samtaler i agendaen og påminnelsene dine."
+ "Keep your agenda and reminders focused on calls.": "Hold fokus på samtaler i agendaen og påminnelsene dine.",
+ "Show earlier lines": "Vis tidligere linjer"
}
diff --git a/app/src/shared/locales/nl.json b/app/src/shared/locales/nl.json
index d9921c39..2d6bd574 100644
--- a/app/src/shared/locales/nl.json
+++ b/app/src/shared/locales/nl.json
@@ -677,5 +677,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Indien uit, wordt audio van nieuwe vergaderingen gewist zodra de samenvatting is opgeslagen.",
"New recording": "Nieuwe opname",
"Hide events without a call link": "Afspraken zonder gesprekslink verbergen",
- "Keep your agenda and reminders focused on calls.": "Richt je agenda en herinneringen op gesprekken."
+ "Keep your agenda and reminders focused on calls.": "Richt je agenda en herinneringen op gesprekken.",
+ "Show earlier lines": "Eerdere regels tonen"
}
diff --git a/app/src/shared/locales/pl.json b/app/src/shared/locales/pl.json
index db275baa..ea045cda 100644
--- a/app/src/shared/locales/pl.json
+++ b/app/src/shared/locales/pl.json
@@ -710,5 +710,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Po wyłączeniu dźwięk nowych spotkań znika po zapisaniu podsumowania.",
"New recording": "Nowe nagranie",
"Hide events without a call link": "Ukryj wydarzenia bez linku do rozmowy",
- "Keep your agenda and reminders focused on calls.": "Skup plan dnia i przypomnienia na rozmowach."
+ "Keep your agenda and reminders focused on calls.": "Skup plan dnia i przypomnienia na rozmowach.",
+ "Show earlier lines": "Pokaż wcześniejsze wiersze"
}
diff --git a/app/src/shared/locales/pt-BR.json b/app/src/shared/locales/pt-BR.json
index 5f7f16c9..7a8d44b3 100644
--- a/app/src/shared/locales/pt-BR.json
+++ b/app/src/shared/locales/pt-BR.json
@@ -692,5 +692,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Se desativado, o áudio de novas reuniões é excluído após salvar o resumo.",
"New recording": "Nova gravação",
"Hide events without a call link": "Ocultar eventos sem link de chamada",
- "Keep your agenda and reminders focused on calls.": "Mantenha sua agenda e seus lembretes focados em chamadas."
+ "Keep your agenda and reminders focused on calls.": "Mantenha sua agenda e seus lembretes focados em chamadas.",
+ "Show earlier lines": "Mostrar linhas anteriores"
}
diff --git a/app/src/shared/locales/ro.json b/app/src/shared/locales/ro.json
index 198c158e..f12ec9fe 100644
--- a/app/src/shared/locales/ro.json
+++ b/app/src/shared/locales/ro.json
@@ -695,5 +695,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Când e oprit, sunetul întâlnirilor noi se șterge după salvarea rezumatului.",
"New recording": "Înregistrare nouă",
"Hide events without a call link": "Ascunde evenimentele fără link de apel",
- "Keep your agenda and reminders focused on calls.": "Concentrează agenda și mementourile pe apeluri."
+ "Keep your agenda and reminders focused on calls.": "Concentrează agenda și mementourile pe apeluri.",
+ "Show earlier lines": "Afișează rândurile anterioare"
}
diff --git a/app/src/shared/locales/ru.json b/app/src/shared/locales/ru.json
index d50c4082..e25551e4 100644
--- a/app/src/shared/locales/ru.json
+++ b/app/src/shared/locales/ru.json
@@ -707,5 +707,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Если выключено, аудио новых встреч удаляется после сохранения сводки.",
"New recording": "Новая запись",
"Hide events without a call link": "Скрывать события без ссылки на звонок",
- "Keep your agenda and reminders focused on calls.": "Сосредоточьтесь на звонках в расписании и напоминаниях."
+ "Keep your agenda and reminders focused on calls.": "Сосредоточьтесь на звонках в расписании и напоминаниях.",
+ "Show earlier lines": "Показать предыдущие строки"
}
diff --git a/app/src/shared/locales/sv.json b/app/src/shared/locales/sv.json
index afcd4aa7..fd9ba046 100644
--- a/app/src/shared/locales/sv.json
+++ b/app/src/shared/locales/sv.json
@@ -680,5 +680,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "När avstängt raderas nya mötens ljud när sammanfattningen har sparats.",
"New recording": "Ny inspelning",
"Hide events without a call link": "Dölj händelser utan samtalslänk",
- "Keep your agenda and reminders focused on calls.": "Fokusera din agenda och dina påminnelser på samtal."
+ "Keep your agenda and reminders focused on calls.": "Fokusera din agenda och dina påminnelser på samtal.",
+ "Show earlier lines": "Visa tidigare rader"
}
diff --git a/app/src/shared/locales/th.json b/app/src/shared/locales/th.json
index 78eee3dd..48817863 100644
--- a/app/src/shared/locales/th.json
+++ b/app/src/shared/locales/th.json
@@ -632,5 +632,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "เมื่อปิด เสียงของการประชุมใหม่จะถูกลบหลังบันทึกสรุปแล้ว",
"New recording": "การบันทึกใหม่",
"Hide events without a call link": "ซ่อนกิจกรรมที่ไม่มีลิงก์การโทร",
- "Keep your agenda and reminders focused on calls.": "เน้นการโทรในกำหนดการและการแจ้งเตือนของคุณ"
+ "Keep your agenda and reminders focused on calls.": "เน้นการโทรในกำหนดการและการแจ้งเตือนของคุณ",
+ "Show earlier lines": "แสดงบรรทัดก่อนหน้า"
}
diff --git a/app/src/shared/locales/tr.json b/app/src/shared/locales/tr.json
index 445c79b0..fb44afc2 100644
--- a/app/src/shared/locales/tr.json
+++ b/app/src/shared/locales/tr.json
@@ -668,5 +668,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Kapalıyken yeni toplantıların sesi özet kaydedilince silinir.",
"New recording": "Yeni kayıt",
"Hide events without a call link": "Arama bağlantısı olmayan etkinlikleri gizle",
- "Keep your agenda and reminders focused on calls.": "Ajandanızı ve hatırlatıcılarınızı aramalara odaklayın."
+ "Keep your agenda and reminders focused on calls.": "Ajandanızı ve hatırlatıcılarınızı aramalara odaklayın.",
+ "Show earlier lines": "Önceki satırları göster"
}
diff --git a/app/src/shared/locales/uk.json b/app/src/shared/locales/uk.json
index 6a690c42..4cb21c92 100644
--- a/app/src/shared/locales/uk.json
+++ b/app/src/shared/locales/uk.json
@@ -707,5 +707,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Якщо вимкнено, аудіо нових зустрічей видаляється після збереження підсумку.",
"New recording": "Новий запис",
"Hide events without a call link": "Приховувати події без посилання на дзвінок",
- "Keep your agenda and reminders focused on calls.": "Зосередьте розклад і нагадування на дзвінках."
+ "Keep your agenda and reminders focused on calls.": "Зосередьте розклад і нагадування на дзвінках.",
+ "Show earlier lines": "Показати попередні рядки"
}
diff --git a/app/src/shared/locales/vi.json b/app/src/shared/locales/vi.json
index 32ed4e35..eb5c40dc 100644
--- a/app/src/shared/locales/vi.json
+++ b/app/src/shared/locales/vi.json
@@ -632,5 +632,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "Khi tắt, âm thanh cuộc họp mới sẽ bị xóa sau khi lưu tóm tắt.",
"New recording": "Bản ghi mới",
"Hide events without a call link": "Ẩn sự kiện không có liên kết cuộc gọi",
- "Keep your agenda and reminders focused on calls.": "Tập trung lịch trình và lời nhắc vào các cuộc gọi."
+ "Keep your agenda and reminders focused on calls.": "Tập trung lịch trình và lời nhắc vào các cuộc gọi.",
+ "Show earlier lines": "Hiện các dòng trước"
}
diff --git a/app/src/shared/locales/zh-CN.json b/app/src/shared/locales/zh-CN.json
index 47859d48..beb27706 100644
--- a/app/src/shared/locales/zh-CN.json
+++ b/app/src/shared/locales/zh-CN.json
@@ -632,5 +632,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "关闭后,新会议的音频将在摘要保存后删除。",
"New recording": "新建录音",
"Hide events without a call link": "隐藏没有通话链接的日程",
- "Keep your agenda and reminders focused on calls.": "让日程和提醒专注于通话。"
+ "Keep your agenda and reminders focused on calls.": "让日程和提醒专注于通话。",
+ "Show earlier lines": "显示更早的内容"
}
diff --git a/app/src/shared/locales/zh-TW.json b/app/src/shared/locales/zh-TW.json
index 02d1d8a9..519a63bb 100644
--- a/app/src/shared/locales/zh-TW.json
+++ b/app/src/shared/locales/zh-TW.json
@@ -632,5 +632,6 @@
"When off, new meetings' audio is deleted once the summary is saved.": "關閉後,新會議的音訊將在摘要儲存後刪除。",
"New recording": "新增錄音",
"Hide events without a call link": "隱藏沒有通話連結的行程",
- "Keep your agenda and reminders focused on calls.": "讓行程與提醒專注於通話。"
+ "Keep your agenda and reminders focused on calls.": "讓行程與提醒專注於通話。",
+ "Show earlier lines": "顯示更早的內容"
}
diff --git a/app/src/shared/transcript.ts b/app/src/shared/transcript.ts
index 95417baf..ae78e82e 100644
--- a/app/src/shared/transcript.ts
+++ b/app/src/shared/transcript.ts
@@ -101,3 +101,25 @@ export function stableKeys(prev: string[], prevKeys: number[], next: string[], n
const keys = next.map((_, i) => (at + i < prevKeys.length ? prevKeys[at + i] : n++))
return { keys, next: n }
}
+
+/**
+ * A long recording draws only its latest lines: a transcript keeps every line on the page, and over hours the window
+ * grew past a gigabyte (the 3 h test). Every line stays saved and searchable; the earlier ones show on request or once
+ * the meeting ends. Trimmed in steps, so the top of the list changes once every `step` lines and nothing jumps.
+ * Words still being said (live) are never counted or dropped.
+ */
+export function recentRuns<L extends object, R extends { lines: L[] }>(runs: R[], cap: number, step: number): { runs: R[]; earlier: number } {
+ const final = (l: L) => !('live' in l)
+ const total = runs.reduce((n, r) => n + r.lines.filter(final).length, 0)
+ const earlier = total <= cap ? 0 : Math.floor((total - cap) / step) * step
+ if (!earlier) return { runs, earlier: 0 }
+ let skip = earlier
+ const out: R[] = []
+ for (const r of runs) {
+ if (!skip) { out.push(r); continue }
+ let i = 0
+ while (i < r.lines.length && skip > 0) { if (final(r.lines[i])) skip--; i++ }
+ if (i < r.lines.length) out.push({ ...r, lines: r.lines.slice(i) })
+ }
+ return { runs: out, earlier }
+}
diff --git a/app/test/transcriptView.test.ts b/app/test/transcriptView.test.ts
index d2ee6421..962abb5c 100644
--- a/app/test/transcriptView.test.ts
+++ b/app/test/transcriptView.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
-import { bubbles, clock, filterLines, lineAt, stableKeys, turns, withLive } from '../src/shared/transcript'
+import { bubbles, clock, filterLines, lineAt, recentRuns, stableKeys, turns, withLive } from '../src/shared/transcript'
const l = (track: 'me' | 'them', startMs: number, speaker: string | null = null, endMs = startMs + 2000) => ({ track, startMs, endMs, speaker, text: '' })
@@ -102,3 +102,25 @@ describe('stableKeys', () => {
expect(a.keys).toEqual([0, 1, 2, 3])
})
})
+
+describe('a long recording draws only its latest lines (all of them stay saved)', () => {
+ const run = (n: number, from = 0) => ({ echo: false, lines: Array.from({ length: n }, (_, i) => ({ id: from + i })) })
+ it('a short meeting draws everything', () => {
+ expect(recentRuns([run(120)], 300, 50)).toEqual({ runs: [run(120)], earlier: 0 })
+ })
+ it('a long one keeps the last lines, trimmed in steps so the top changes rarely', () => {
+ const r = recentRuns([run(400)], 300, 50)
+ expect(r.earlier).toBe(100)
+ expect(r.runs[0].lines[0]).toEqual({ id: 100 })
+ expect(r.runs[0].lines.at(-1)).toEqual({ id: 399 })
+ // ten more lines: the same top line, nothing moves up there
+ expect(recentRuns([run(410)], 300, 50).runs[0].lines[0]).toEqual({ id: 100 })
+ expect(recentRuns([run(451)], 300, 50).earlier).toBe(150)
+ })
+ it('cuts across runs, and never counts the words being said (live) as lines to drop', () => {
+ const live = { live: true }
+ const r = recentRuns([run(250), run(150, 250), { echo: false, lines: [live] }] as never, 300, 50)
+ expect(r.earlier).toBe(100)
+ expect(r.runs.map((x: { lines: unknown[] }) => x.lines.length)).toEqual([150, 150, 1])
+ })
+})