Repository navigation
Conversation
Deploying podnotes with
|
| Latest commit: |
e4ccd04
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://494a88dd.podnotes.pages.dev |
| Branch Preview URL: | https://feat-quickadd-capture.podnotes.pages.dev |
chhoumann
marked this pull request as ready for review
October 18, 2026 12:20
The QuickAdd choice row no longer takes a typed name. Choose... opens QuickAdd's choice picker, and PodNotes stores the picked choice's id, so a choice renamed in QuickAdd keeps working and the row shows its current name. The x button clears the setting and leaves QuickAdd alone. A capture runs the choice by its id. When QuickAdd is not installed, is disabled, predates choice picking, or no longer has the choice, the capture shows one notice that names the fix and writes nothing. The row's button says Install, Enable or Update QuickAdd, or Missing choice, and the first three open Community plugins. The unreleased timestamp.quickAddChoice (a name) becomes timestamp.quickAddChoiceId. src/quickAdd.ts is the one place that knows QuickAdd's API.
With no QuickAdd choice set, Create sits next to Choose.... It hands QuickAdd a one-choice package, Podcast capture with the fixed id podnotes-capture, and selects it. The choice captures to the episode note, creates the note when it is missing, and adds each timestamp at the end of its ## Notes section, creating the heading at the bottom. Its format is the timestamp alone, since the timestamp template already starts with a bullet. QuickAdd skips a choice id it already has, so a second Create selects the existing choice under its current name and overwrites nothing.
A screen reader read "Install QuickAdd QuickAdd choice". The QuickAdd choice button takes its row's name only while QuickAdd is ready, where it reads Choose... or the choice's name; Install, Enable and Update QuickAdd read as they are.
…te's text QuickAdd's picker is a prompt, not a .modal. A capture into a note QuickAdd creates ends without a trailing newline, and the next one starts on a new line. Both journeys now pass against the QuickAdd build with choice picking.
…d Choose...'s label while the picker is open On a phone or in a narrow window, a long choice name drew past its button and pushed Clear out of the row; beside the row's name it squeezed the name away. The button now ends the name in an ellipsis, and the row's control may shrink. Choose... no longer hands Obsidian the picker's promise, which swapped its label for a spinner while QuickAdd's picker was open. The picker covers the button, so it still takes no second click. The e2e checks the row's bounds at 900 px, 720 px and on a phone, and the label behind the open picker.
Obsidian closes Settings when it focuses a note, and PodNotes opens the episode note after creating it. A test that opened Settings once the file existed lost Settings to the note's focus about one run in ten, timing out on the PodNotes tab. noteAt now waits for the note's focus.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Captures can run a QuickAdd choice instead of writing the timestamp themselves, so the choice decides where each timestamp goes. Typing the choice's name was error-prone, broke on a rename, and left a new user to build the choice by hand. Now the user picks the choice in QuickAdd's own picker, or creates a ready-made one in one click. PodNotes stores the choice's id.
What changed
src/quickAdd.tsis the one place that knows QuickAdd's API and its state: not installed, disabled, too old, or ready.Install, Enable and Update open Community plugins. The row has no helper text in any state.
Create hands QuickAdd a one-choice package through
importPackage. The choice is a Capture named Podcast capture with the fixed idpodnotes-capture. It captures to{{VALUE:episodeNote}}, creates the note when it is missing, and inserts after## Notesat the end of the section, creating the heading at the bottom. Its format is{{VALUE:timestamp}}alone, because the timestamp template already starts with-. QuickAdd skips an id it already has, so a second Create selects the existing choice and overwrites nothing. If the import fails, a notice says "Could not create the QuickAdd choice".Scope
getChoice,pickChoice,executeChoice({ id }),importPackage). That API is feat(api): pick, look up, run by id and install choices from other plugins quickadd#2247. This PR merges only after that release is public. Its e2e then pins the release instead of the local build it reads fromOBSIDIAN_E2E_QUICKADD_DIR.Tradeoffs
Blast Radius
The QuickAdd row, and captures with a QuickAdd choice set.
timestamp.quickAddChoicewas never released, so it becomestimestamp.quickAddChoiceIdwith no migration. A 2.22.0 device keeps the id when it saves, because its codec copies timestamp fields it does not know. Captures with no choice set are unchanged. Bundle: 102,534 bytes gzip, +737 against 101,797 at 43b1aa6, 466 left of 103,000.Verification
Node v22.23.2, Linux, at e4ccd04:
npm run lint: 0 errors, "Svelte policies: 0 errors, 0 warnings."npm run format:check: "All matched files use the correct format."npm run typecheckandnpm run build: exit 0npm run test: svelte-check clean, 127 files, 2,813 tests passednpm run test:tooling: 41 tests passednpm run docs:build: Completenpm run size: 102,534 bytes gzip, budget 103,000npm run test:e2e -- tests/e2e/quickadd-capture.test.ts tests/e2e/settings-tab.test.tson a fresh vault, Obsidian 1.14.4, withOBSIDIAN_E2E_QUICKADD_DIRset to the QuickAdd build from feat(api): pick, look up, run by id and install choices from other plugins quickadd#2247 at 4804745: 2 files, 18 tests passed.tests/e2e/quickadd-capture.test.tsten more times in a row: 70 of 70 passed.The full e2e suite last ran at 971f16f:
npm run lint: 0 errors, "Svelte policies: 0 errors, 0 warnings."npm run format:check: "All matched files use the correct format."npm run typecheckandnpm run build: exit 0npm run test: svelte-check clean, 127 files, 2,813 tests passednpm run test:tooling: 41 tests passednpm run docs:build: Completenpm run test:e2eon a fresh vault, Obsidian 1.14.4, withOBSIDIAN_E2E_QUICKADD_DIRset to the QuickAdd build from feat(api): pick, look up, run by id and install choices from other plugins quickadd#2247 at 4804745 (digests checked against itsbuild.json): 33 files, 249 tests passed.tests/e2e/quickadd-capture.test.tsdrives real QuickAdd in real Obsidian:Logand Enter stores the choice's id, and the row shows its name.## Notesand one single-bullet line. The second adds its own line at the end of the section.A flaky test, fixed
The 2.32.1 case timed out on the PodNotes settings tab about one run in ten (1 of 10 here, and once for the verifier). Obsidian closes Settings when it focuses a note (
workspace.setActiveLeafcallsfocusLeaf, which closes it). PodNotes opens the new episode note after creating it, andnoteAtreturned once the file existed, so the note's focus sometimes landed just after the test opened Settings.noteAtnow waits until the note has focus, the same synchronous step that closes Settings. With PodNotes' note open delayed by 100 or 200 ms, the old wait fails every time with the same timeout and the new one passes the whole file.Mutations
Each wrong alternative was applied, the suites run, and the change reverted.
executeChoice(choice.name)commands.test.ts"runs it by its id once with the capture, and writes nothing itself", the segment case, and the headset caseexecuteChoiceon any loaded QuickAdd, 2.32.1 includedcommands.test.ts"says Update QuickAdd, and writes nothing, until QuickAdd can run the choice"; e2e "QuickAdd 2.32.1, from before choice picking, asks for an update and runs nothing" (no update notice)- {{VALUE:timestamp}}- - [00:00:30](...))overflow: hiddenandtext-overflow: ellipsis, so the name is clipped at both ends with no ellipsisoverflow: hiddenon the row's control instead of the buttonDocs at release
docs/src/content/docs/QuickAdd.md: add this section before "Capture a timestamp with a comment":docs/src/content/docs/settings.md: in the Notes table, add after Timestamp offset (s):docs/src/content/docs/timestamps.md: at the end of "Choose where a timestamp goes", add:docs/src/content/docs/commands.md: after "After each capture, a notice says where the timestamp went and offers Undo.", add "With QuickAdd choice set, the choice decides where it goes, and there is no Undo."Screenshots
A long choice name, before (971f16f) and after, on a phone (Obsidian's mobile emulation, 390 x 844):
In a 720 px window, where the row stacks:
In a 900 px window, where the name sits beside the controls:
QuickAdd's picker open over the row, before and after:
The rest are from
tests/e2e/quickadd-capture.test.ts, Obsidian 1.14.4.QuickAdd's picker, opened by Choose..., then after typing
Log:Nothing set:
Set, then renamed in QuickAdd, then deleted in QuickAdd:
QuickAdd not installed, disabled, and 2.32.1:
Note
Add QuickAdd choice support for captures
timestamp.quickAddChoiceIdis set in settings; the choice receives variables for timestamp text, formatted time, timestamp link, episode metadata, sanitized episode URL, and episode-note path. See CaptureService.ts.quickAddChoiceIdno longer write directly to an editor or episode note; they invoke QuickAdd and return no direct Capture result. An empty id keeps the old direct-write behavior. CheckCaptureService.captureandCaptureService.runQuickAdd.Macroscope summarized e4ccd04.
Note
Medium Risk
Configured captures change behavior (external QuickAdd writes, no undo) and depend on QuickAdd’s API/version; unset choice leaves the existing capture path unchanged.
Overview
Adds an optional QuickAdd choice for timestamp captures: when
timestamp.quickAddChoiceIdis set, every capture (commands, player button, headset) calls QuickAdd’sexecuteChoicewith template-derived variables instead of inserting into the focused editor or episode note—no PodNotes undo on that path.Settings → Notes gains a QuickAdd choice row: Choose... (QuickAdd’s picker), Create (imports a built-in “Podcast capture” package via
importPackage), and clear; the UI surfaces Install/Enable/Update/Missing choice when QuickAdd isn’t usable. Choice id is persisted insettingsCodecas an optional string.New
src/quickAdd.tscentralizes QuickAdd detection and the capture package.CaptureServicebuilds{{VALUE:…}}payloads (time, link, episode note path, etc.) with private-feed redaction; helpersresolveEpisodeUrl,getPodcastNotePath, andepisodeTimestampLinkare exported/shared for that. Unit, settings, command, and Obsidian e2e tests cover the integration and layout.Reviewed by Cursor Bugbot for commit e4ccd04. Bugbot is set up for automated code reviews on this repo. Configure here.