Skip to content

feat(transcripts): show the saved transcript note in the player's Transcript panel - #562

Merged
chhoumann merged 4 commits into
masterfrom
chhoumann/feat-transcript-panel-local-note
Nov 30, 2026
Merged

chhoumann merged 4 commits into
masterfrom
chhoumann/feat-transcript-panel-local-note

Conversation

@chhoumann

@chhoumann chhoumann commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

When an episode's feed publishes no transcript, or its transcript does not load (including offline), the full player's Transcript panel now shows the episode's saved transcript note. Its lines get times to play from, Follow, Find and speaker names. Before this, the panel showed only Open note, so a transcript made with your own Whisper server could not follow playback. The panel's head reads Saved note without the Free tag, and keeps Open note. A feed transcript still comes first.

  • Times. A line's time comes from the obsidian://podnotes?...&time= link that PodNotes writes, so a timestamp format such as mm:ss, which leaves out the hours, still plays from the right second. Without a link, a leading clock works: [00:12:34], - 12:34 (always minutes and seconds) or 1:02:03. A note with no time at all shows as paragraphs, which Find can search but which cannot be selected.
  • Text. Frontmatter, headings and the template's header above the first timed line are left out. A line without a time joins the line before it. The backslash escapes PodNotes writes are removed, only before ASCII punctuation as CommonMark does, so C:\Users keeps its backslash. Speaker labels are read with the current Speaker template. If the template changed since the note was saved, the old label stays in the text.
  • Freshness. The panel reads the note again when it is created, moved or edited (vault modify). A transcription that just finished therefore shows without reopening the panel, and the current lines stay on screen while the note is re-read. An edit re-reads only the note. The feed is not asked again, so a feed transcript that failed is not refetched on every save, and a feed transcript on screen stays there. A note edited down to no text loads again from the start. Only the feed's transcript is cached; the note is read with vault.cachedRead.

parseTranscriptNote (src/services/publishedTranscript/note.ts) returns the existing ParsedTranscript type, so it adds nothing for the UI layer to import. It reads speaker labels with the same formatSpeakerLabel that writes them. Everything runs on Obsidian APIs that mobile also has, with no Node APIs.

Fixes #561

Verification

Obsidian 1.14.4 and 1.13.7, Linux (isolated worktree instance, headless).

Reporter's flow, driven by hand with .claude/skills/verify. A local file Fixtures/Local Fixture.wav (60 s) was played with Play with PodNotes from the file explorer. Transcription provider was set to OpenAI-compatible server, pointing at the verify fixture server http://podnotes.test:<port>/v1 in place of a local Whisper server. I set this provider through the plugin settings object, not the Settings tab. Selecting Transcribe with your server in the panel wrote transcripts/local file/Local Fixture.md with linked times 0 and 12. The panel then switched from "No transcript yet" to Saved note with both lines. Selecting the 0:12 line played from 12 s (currentTime 13.99 two seconds later), and dev:errors reported "No errors captured."

Before transcribing (320 px sidebar) Saved note after (320 px sidebar)
before saved note

820 px pane, dark theme:

saved note in a wide pane

Commands, all passing on the final head: npm run lint, npm run format:check, npm run typecheck, npm run build, npm run size, npm run test (126 files, 3,015 tests), npm run test:tooling (9 files, 56 tests), npm run docs:build. After the re-read fix, the new E2E journey passed again on 1.14.4.

E2E:

  • npm run test:e2e -- tests/e2e/journey-transcript.test.ts: 15/15 on 1.14.4, including the new journey. That journey plays a local file with Play with PodNotes next to a saved PodNotes-format note, selects a line and checks playback position, then edits the note with app.vault.modify and checks the panel.
  • PODNOTES_OBSIDIAN_APP=/opt/Obsidian/obsidian npm run test:e2e -- ... -t "saved transcript note shows in the panel": passes on 1.13.7.

Plants (npm run plant; each test failed on the plant and passed once it was restored):

Plant Caught by
Revert: the panel never passes the note to loadTranscript panel test "shows its lines when the feed publishes none…", and the new E2E journey (expected [] to deeply equal [...])
Drop the unescape "text the writer escaped reads as it was spoken"
Read the link's displayed clock instead of time= "an mm:ss timestamp past an hour still plays from the link's exact time"
Ignore vault modify of the note panel test "shows an edit to the note…", and the new E2E journey
Show "Loading transcript" while re-reading after an edit "shows an edit to the note, keeping its lines on screen…"
Never offref the modify listener "stops listening for edits once the note is gone or the panel closes"
Note before feed "gives way to the transcript the feed publishes"
No note fallback when the feed's transcript fails "reads the note when the feed's transcript did not load"
Keep frontmatter "a note without times is its paragraphs, without frontmatter or headings"
An edit runs the whole load again (Bugbot's finding) "shows an edit without asking the feed again when the note stands in for a failed feed" (expected "vi.fn()" to be called 1 times, but got 2 times on the code before the fix)
An edit re-reads the note while a feed transcript is shown "gives way to the transcript the feed publishes, also once the note is edited"
A note edited down to no text keeps its old lines "a note edited down to no text shows no transcript"

Release impact

No settings, storage, API or URI changes.

  • Bundle size. The two build(size) commits raise both npm run size budgets by exactly what this feature measures: +2,782 raw bytes and +1,104 gzip bytes (the feature +2,488 / +1,038, then the re-read fix +294 / +66), measured against a separate origin/master export at 333,899 / 109,091. This follows the convention in scripts/size-baseline.md. The gzip-growth case in scripts/size.test.ts moves from 110,000 to 111,000 random bytes, because 110,000 random bytes now fit under the new gzip budget. The parser and loader minify to about 1.4 KB and the rest is the panel. Please confirm the raise.
  • Docs. Not in this PR. docs/STYLE.md says docs describe only the latest published release. docs/src/content/docs/player.md ("The panel shows only transcripts that feeds publish, so it does not show the note's lines") and transcripts.md need updating after the release that ships this.
  • Reviewer note. At 320 px the head's Saved note icon and the icon-only Open note button are both file-text, so the same page icon shows twice side by side (see the screenshot). The icon matches the agreed spec. A different source icon would be a one-word change.

Note

Medium Risk
Touches core transcript loading, vault I/O, and playback seek timing in the player UI, with moderate bundle growth but no settings or persistence schema changes.

Overview
The full player Transcript panel can now render an episode's saved transcript note when the feed has no transcript or the feed fetch fails (including offline). Feed transcripts still win when present; the header switches to Saved note (no Free tag) when the note is the source, with seekable lines, Find, Follow, and speakers where parsing allows.

A new parseTranscriptNote module recovers timed cues from PodNotes obsidian://podnotes?time= links, bare/list clocks, and speaker templates, with untimed fallback for notes without times. loadTranscript / readNote wire that into the panel; vault modify re-reads the note only (no feed refetch on edit) while feed results stay cached.

main.js size budgets rise to 336,681 raw and 110,195 gzip, with matching updates in docs, size.mjs, and tests. Unit, panel, and E2E coverage exercise note fallback, live edits, and precedence over failed feeds.

Reviewed by Cursor Bugbot for commit 1df29ed. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Show saved transcript note in the player's Transcript panel

  • Adds parseTranscriptNote in note.ts, which parses saved note Markdown into timed cues or untimed paragraphs. Timestamps come from timestamp links (including PodNotes Obsidian URLs) or leading clocks; speaker labels match the configured speaker template; returns undefined when the note has no transcript text.
  • loadTranscript in transcript.ts now returns a source-and-transcript pair: it prefers the feed transcript and falls back to the saved note when the feed has none or fails. A feed failure still rejects when the note is empty.
  • TranscriptPanel.svelte displays note-sourced lines with a Saved note label, rereads the note after it is modified, and cleans up its vault listener and active request.
  • Raises bundle-size budgets to 336,681 raw and 110,195 gzip bytes in size.mjs and updates the baseline docs in size-baseline.md for this feature's size increase.
  • Behavioral Change: loadTranscript's return shape changed to ShownTranscript, and transcript lines now use TranscriptCue instead of TranscriptParagraph.

Macroscope summarized 1df29ed.

…nscript panel

When an episode's feed publishes no transcript, or its transcript does
not load, the Transcript panel now reads the episode's transcript note
from the vault and shows its lines, with times to play from, Follow,
Find and speaker names. The panel's head reads "Saved note" and keeps
Open note. A feed transcript still comes first.

The note's times come from the obsidian://podnotes links PodNotes writes,
so a format such as mm:ss that leaves out the hours still plays from
the right second. A note without links falls back to a leading clock
such as [00:12:34], 12:34 or 1:02:03, and a note without any time shows
as paragraphs. Frontmatter, headings and the template's header are left
out, and the escapes PodNotes writes are undone.

The panel reads the note again when it is saved, moved or edited, so a
transcription that just finished shows at once. Only the feed's
transcript is cached.

Fixes #561
@chhoumann
chhoumann marked this pull request as ready for review November 30, 2026 16:48
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Deploying podnotes with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1df29ed
Status: ✅  Deploy successful!
Preview URL: https://d7690719.podnotes.pages.dev
Branch Preview URL: https://chhoumann-feat-transcript-pa.podnotes.pages.dev

View logs

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 75441d3. Configure here.

When the note stood in for a feed transcript that did not load, every
save of the note ran the whole load again. The feed's failure is not
cached, so each save fetched the feed transcript again, up to its
timeout, before the edit showed. An edit now re-reads the note alone,
and leaves a feed transcript on screen. A note edited down to no text
loads again from the start.
@chhoumann
chhoumann merged commit 20c19d9 into master Nov 30, 2026
20 checks passed
@chhoumann
chhoumann deleted the chhoumann/feat-transcript-panel-local-note branch November 30, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Load saved local transcript notes in the player's Transcript panel

1 participant