Five-slice navigable map of the entire codebase under
docs/architecture-map/. Each slice is a self-contained
breadcrumbed sub-tree:
01-frontend (16) Svelte/SvelteKit UI
02-tauri-runtime (26) src-tauri commands + lifecycle
03-audio-transcription (16) audio + transcription crates
04-llm-formatting-mcp (19) llm, ai-formatting, mcp, cloud
05-core-storage-hotkey-build core, storage, hotkey, workspace,
(26) CI, dev glue
Plus master README.md and data-flow-end-to-end.md tracing
audio bytes from microphone to FTS5 search to MCP read.
Generated by 5 parallel subagents on 2026/05/09 against
HEAD 3c47000. Each page has YAML frontmatter, file:line code
refs, sibling cross-links, plain-English summaries.
Aggregated debt surfaced (full lists in master README):
RB-08 macOS power assertion, schema head drift v14 vs v15,
VAD blocked on ort version conflict, streaming primitives
not wired into live.rs, no prompt versioning, MCP has no
auth, cloud-providers in-memory keystore, SettingsPage
2 484 LOC, commands/live.rs 1 737 LOC, dual theme system,
brand rename to Lumenote pending across the codebase.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.0 KiB
4.0 KiB
name, type, slice, last_verified
| name | type | slice | last_verified |
|---|---|---|---|
| History page | architecture-map-page | 01-frontend | 2026/05/09 |
History page
Where you are: Architecture map → Frontend → Pages overview → History
Plain English summary. The transcript browser. Lists everything saved to SQLite, full text searchable via FTS5, with inline expansion to read the full body, audio playback, starring, manual + auto tagging, copy, delete, export to Markdown, and "open in viewer" handoff to the dedicated transcript editor window.
At a glance
- Path:
src/lib/pages/HistoryPage.svelte - LOC: 974
- Imports (selected):
- Tauri:
invokeandconvertFileSrcfrom@tauri-apps/api/core. - Stores:
historyStorehelpers frompage.svelte.ts(history,loadHistory,deleteFromHistoryById,renameHistoryEntry),toasts,getPreferences. - Utils:
deriveAutoTags,buildFrontmatter,buildMarkdown,normaliseTag(frontmatter).saveTranscriptAsMarkdown,exportTranscriptsToDir(saveMarkdown).clampTextLines,measurePreWrap(textMeasure).bodyPretextLineHeight,pretextFontShorthand(accessibilityTypography).buildCumulativeOffsets,findVisibleRange(virtualList).formatTime,formatDuration(time).PLAYBACK_SPEEDS(constants). - Components:
Card,EmptyState. - External:
lucide-svelte(Search,Clock,Play,Pause,FileText,Mic,ChevronDown,ExternalLink,Star,Tag).
- Tauri:
What's in here
List + search
- Loads via
loadHistory(which callslist_transcriptsin Rust). - Search input filters client side (FTS happens server side via
search_transcriptsfor some flows; checkpage.svelte.ts). - Virtualised scrolling using
buildCumulativeOffsetsandfindVisibleRangefromutils/virtualList.ts. Row heights usemeasurePreWrapto compute pre wrap heights from the live preferences font. - Constants:
COLLAPSED_ROW_MIN_HEIGHT,COLLAPSED_ROW_VERTICAL_PADDING,EXPANDED_BASE_HEIGHT,EXPANDED_PADDING, etc.
Audio playback
convertFileSrc()maps the saved audio path to a webview URL.- Inline
<audio>element. Speed control usesPLAYBACK_SPEEDS([0.5, 1, 1.5, 2, 3, 5]). - A
requestAnimationFrameloop advancescurrentTime.cancelAnimationFrameon stop.
Per row actions
- Star (toggles
starredflag, persisted viaupdate_transcript). - Copy (
copy_to_clipboard). - Delete (confirms, then calls
delete_transcript). - Open in viewer window (
open_viewer_window, then handoff vialocalStorage). - Auto tag (calls
extract_content_tags_cmd, returns suggested tags merged intotags). - Rename via
renameHistoryEntrystore helper. - Export to markdown via
saveTranscriptAsMarkdown.
Bulk
- Bulk auto tag walks the visible list and calls
extract_content_tags_cmdper row. - Bulk export to directory via
exportTranscriptsToDir.
Tauri command surface
delete_transcript, copy_to_clipboard, open_viewer_window, extract_content_tags_cmd. Plus indirect commands from store helpers (add_transcript, update_transcript, etc) and the dialog plugin used by saveMarkdown.ts.
Watch outs
- Virtual scrolling assumes stable row heights once measured. Toggling preferences (font size, line height) invalidates the measure. The page recomputes on
getPreferences()change but watch for stutter on rapid changes. - The viewer handoff writes the transcript ID to
localStorage. The viewer window then loads from SQLite. Do not put transcript text inlocalStorage. - Auto tag is rate limited only by user clicks. Bulk over a large library can hammer the LLM. Consider a guard if scaling.
convertFileSrcpaths are valid only inside the Tauri webview. If the audio path is missing or moved,<audio>will silently fail; show an error state.
See also
- Pages: dictation. Where transcripts originate.
- Stores.
page.svelte.tshistory helpers. - Frontend ↔ Tauri bridge. Commands referenced.
- Windows and routes. The viewer window handoff.