Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
fix(notes): stop enhancement from using another note's transcript and renaming titled notes (#1119)
Gabriel Steinfde9a179532d
diff --git a/src/components/notes/PersonalNotesView.tsx b/src/components/notes/PersonalNotesView.tsxindex dc9ad5b8a..0f7a3e1ea 100644--- a/src/components/notes/PersonalNotesView.tsx+++ b/src/components/notes/PersonalNotesView.tsx@@ -480,11 +480,20 @@ export default function PersonalNotesView({runAction,} = useActionProcessing(activeNoteId ?? null);+ // The realtime transcript outlives its recording — only use it for the note it was recorded on.+ const activeNoteRawTranscript =+ (recordingNoteId === activeNote?.id ? realtimeTranscript : "") || activeNote?.transcript || "";+const isEnhancementStale = useMemo(() => {if (!activeNote?.enhanced_content || !activeNote?.enhanced_at_content_hash) return false;- const currentHash = makeContentHash(localContent);+ const currentHash = makeContentHash(`${localContent}\n${activeNoteRawTranscript}`);return currentHash !== activeNote.enhanced_at_content_hash;- }, [activeNote?.enhanced_content, activeNote?.enhanced_at_content_hash, localContent]);+ }, [+ activeNote?.enhanced_content,+ activeNote?.enhanced_at_content_hash,+ localContent,+ activeNoteRawTranscript,+ ]);const handleExportNote = useCallback(async (format: "md" | "txt") => {@@ -971,15 +980,14 @@ export default function PersonalNotesView({<ActionPickeronRunAction={(action) => {if (!editorNote) return;- const rawTranscript = realtimeTranscript || editorNote.transcript;const noteContent = editorNote.content;const hasNotes = !!noteContent.trim();- if (!hasNotes && !rawTranscript) return;+ if (!hasNotes && !activeNoteRawTranscript) return;let formattedTranscript = "";let isMeetingNote = false;- if (rawTranscript) {- const segments = parseTranscriptSegments(rawTranscript);+ if (activeNoteRawTranscript) {+ const segments = parseTranscriptSegments(activeNoteRawTranscript);if (segments.length > 0) {isMeetingNote = true;formattedTranscript = segments@@ -990,7 +998,7 @@ export default function PersonalNotesView({.join("\n");}if (!formattedTranscript) {- formattedTranscript = rawTranscript;+ formattedTranscript = activeNoteRawTranscript;}}@@ -1000,11 +1008,19 @@ export default function PersonalNotesView({].filter(Boolean).join("\n\n");- runAction(action, parts, makeContentHash(noteContent), {- isCloudMode,- modelId: effectiveModelId,- isMeetingNote,- });+ runAction(+ action,+ parts,+ makeContentHash(`${noteContent}\n${activeNoteRawTranscript}`),+ {+ isCloudMode,+ modelId: effectiveModelId,+ isMeetingNote,+ allowTitleGeneration:+ !editorNote.title.trim() ||+ editorNote.title === t("notes.list.untitledNote"),+ }+ );}}onManageActions={() => setShowActionManager(true)}disabled={diff --git a/src/stores/actionProcessingStore.ts b/src/stores/actionProcessingStore.tsindex 2e7085287..b7a5f7847 100644--- a/src/stores/actionProcessingStore.ts+++ b/src/stores/actionProcessingStore.ts@@ -88,6 +88,8 @@ export interface RunActionOptions {isCloudMode: boolean;modelId: string;isMeetingNote?: boolean;+ /** Opt-in so enhancement never renames a note the user has titled. */+ allowTitleGeneration?: boolean;}export interface RunActionLabels {@@ -150,7 +152,7 @@ export function runBackgroundAction(if (cancelledFlags.get(noteId)) return;let title: string | undefined;- if (getSettings().autoGenerateNoteTitle) {+ if (options.allowTitleGeneration && getSettings().autoGenerateNoteTitle) {const generated = await generateNoteTitle(enhanced, modelId, providerOverrides);if (generated) title = generated;}