Repository navigation
Conversation
Persist audio-processing state in PostgreSQL and run it through pg-boss so transcriptions are saved before embeddings or AI post-processing
begin.
- append completed transcripts without overwriting concurrent note edits
- retain partial successes and provide retry/skip controls with visible status
- prevent duplicate processing and fence stale workers after restart or timeout
- use the selected voice provider's explicit OpenAI-compatible endpoint
- distinguish recorded voice notes from ordinary audio uploads
- add regression coverage for delays, failures, retries, conflicts, and provider routing
- require Node 22 because the supported pg-boss version requires Node >= 22.12
Fix voice recording downloads and make AI-generated tag processing accept the textual formats that tagging models commonly return. - keep the voice download action visible inside the audio player - prevent download and delete controls from toggling playback or opening the note - add a translated tooltip, accessible label, and keyboard focus styling - support comma-, whitespace-, and newline-separated hashtags - support Unicode and hierarchical tags such as #Parent/Child - discard explanatory prose, code blocks, URLs, and malformed tag paths - deduplicate generated tags and retain the five-tag limit - preserve existing note tags when appending generated tags
…removal
Prevent dialog rerenders from restarting voice recordings and make voice attachments removable with mouse,
keyboard, and touch.
- show the existing removal X on hover or focus for mouse users and keep it visible for touch-primary devices
- retain captured audio across visibility changes and unexpected recorder stops
- resume browser-paused sessions without overriding manual pauses
- request a screen wake lock while recording and release it on stop
- use one elapsed-time counter and preserve the duration after stopping
- add tests for interruptions, delayed permissions, wake locks, and attachment removal
Save Smart Edit tool calls and plain-text responses as replacement note bodies, without comment fallbacks or mandatory visible copies of source transcripts. Preserve audio, metadata, revision history and independent tag relations. Restore Both's original comment-plus-tags behavior and expose Smart Edit plus Tags explicitly. Git history confirms that c76381e introduced Both before Smart Edit existed; 1d12409 later added a third stage and a second comment. Document this provenance without inferring undocumented developer intent. Add explicit Custom result actions, canonical relational tagging, and tag preservation/display when note bodies contain no hashtags. Validation: 36 focused regression tests passed, including real Mastra/OpenAI SDK response handling. Existing LiteLLM, audio and upload checks also passed. Full typechecks remain incomplete due to memory growth; builds are blocked by Windows directory access errors. No live Docker/model validation.
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.
This PR fixes AI post-processing that could leave the original note unchanged while adding two AI comments. It makes each processing mode perform its selected action and adds an explicit Smart Edit + Tags option.
This PR builds on the changes in #1245. It is a follow-up to that work and should be reviewed and merged after it. Until #1245 is merged, a comparison against main also includes those earlier changes.
The intended workflow is straightforward: record a voice note, transcribe it, replace the note text with the cleaned-up version, keep the audio, and add real tags; without additional AI comments.
Why “Both” produced two comments
The Git history explains how this behavior developed:
As a result, a model could return a perfectly usable rewritten note, but Blinko would leave the transcript in the main note and display the rewrite as another comment. Even a successful editing-tool call could become a suggestion because of the transcript-preservation rule.
The historical commits establish the original meaning of Both. They do not explain why Smart Edit was later added to it. This PR restores the original Comment + Tags combination and gives editing plus tagging its own clearly named option.
Changes to the processing options
bothsetting remains compatible.For automatic editing and tagging, select the new Smart Edit + Tags option and put the editing instructions in the Smart Edit prompt field. The existing Comment prompt is not silently reused for editing.
Preserving the note and its attachments
Smart Edit now uses editing instructions rather than the Comment Assistant's emoji and length guidelines. It offers only the current-note update tool and also accepts a normal text response as the replacement, so success does not depend on the model choosing a tool call.
Audio attachments, metadata and existing tags remain attached to the same note. The previous text is saved in revision history; the source transcript does not have to be copied into the visible note. Independent tags remain intact after later text edits and are displayed separately from the note body.
AI updates do not start another round of post-processing. Completed steps are not repeated on retry, and a concurrent manual edit prevents an outdated AI result from overwriting it. This follow-up requires no additional database migration beyond the changes in #1245.
Validation
Added pipeline regression tests and OpenAI-compatible response tests, and extended the existing tag tests. The focused suite passes 36 tests, including existing hashtag-parsing coverage:
Run the focused suite from
serverwithbun run test:note-processing. Existing LiteLLM provider, audio-recorder and file-upload checks also passed. Changed TypeScript files passed syntax/transpilation checks, andgit diff --checkpassed.I have also manually tested the updated behavior in my self-hosted Blinko instance.