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: meeting flow data shape mismatches and race conditions
Gabriel Stein0ccf12b9a699
diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsxindex 86810c40a..2e1424d6b 100644--- a/src/components/ControlPanel.tsx+++ b/src/components/ControlPanel.tsx@@ -194,6 +194,11 @@ export default function ControlPanel() {return () => cleanup?.();}, []);+ const handleMeetingRecordingRequestHandled = useCallback(+ () => setMeetingRecordingRequest(null),+ []+ );+const loadTranscriptions = async () => {try {setIsLoading(true);@@ -524,7 +529,7 @@ export default function ControlPanel() {setShowSettings(true);}}meetingRecordingRequest={meetingRecordingRequest}- onMeetingRecordingRequestHandled={() => setMeetingRecordingRequest(null)}+ onMeetingRecordingRequestHandled={handleMeetingRecordingRequestHandled}/></Suspense>)}diff --git a/src/components/MeetingNotificationOverlay.tsx b/src/components/MeetingNotificationOverlay.tsxindex 4e3f83b93..8542dbd25 100644--- a/src/components/MeetingNotificationOverlay.tsx+++ b/src/components/MeetingNotificationOverlay.tsx@@ -4,8 +4,10 @@ import { X } from "lucide-react";interface NotificationData {detectionId: string;source: string;+ key: string;title: string;body: string;+ event: any;}export default function MeetingNotificationOverlay() {@@ -21,8 +23,8 @@ export default function MeetingNotificationOverlay() {);window.electronAPI?.getMeetingNotificationData?.().then((pulled: NotificationData | null) => {- if (pulled && !data) {- setData(pulled);+ if (pulled) {+ setData((prev) => prev ?? pulled);setTimeout(() => setIsVisible(true), 50);}});diff --git a/src/components/notes/PersonalNotesView.tsx b/src/components/notes/PersonalNotesView.tsxindex 0a89384fa..910c05bf7 100644--- a/src/components/notes/PersonalNotesView.tsx+++ b/src/components/notes/PersonalNotesView.tsx@@ -88,6 +88,8 @@ export default function PersonalNotesView({startTranscription: startMeetingTranscription,stopTranscription: stopMeetingTranscription,} = useMeetingTranscription();+ const [activeMeetingEvent, setActiveMeetingEvent] = useState<any>(null);+ const meetingNoteIdRef = useRef<number | null>(null);const {folders,@@ -335,9 +337,16 @@ export default function PersonalNotesView({useEffect(() => {if (!meetingRecordingRequest || activeNoteId !== meetingRecordingRequest.noteId) return;+ setActiveMeetingEvent(meetingRecordingRequest.event);+ meetingNoteIdRef.current = meetingRecordingRequest.noteId;startMeetingTranscription();onMeetingRecordingRequestHandled?.();- }, [meetingRecordingRequest, activeNoteId]);+ }, [+ meetingRecordingRequest,+ activeNoteId,+ startMeetingTranscription,+ onMeetingRecordingRequestHandled,+ ]);const prevTranscribingRef = useRef(false);@@ -345,13 +354,15 @@ export default function PersonalNotesView({if (prevTranscribingRef.current &&!isMeetingTranscribing &&- activeNoteId &&+ meetingNoteIdRef.current &&meetingTranscript) {- window.electronAPI.updateNote(activeNoteId, { transcript: meetingTranscript });+ window.electronAPI.updateNote(meetingNoteIdRef.current, { transcript: meetingTranscript });+ meetingNoteIdRef.current = null;+ setActiveMeetingEvent(null);}prevTranscribingRef.current = isMeetingTranscribing;- }, [isMeetingTranscribing, activeNoteId, meetingTranscript]);+ }, [isMeetingTranscribing, meetingTranscript]);const editorNote = activeNote? { ...activeNote, title: localTitle, content: localContent }@@ -697,7 +708,7 @@ export default function PersonalNotesView({isMeetingTranscribing={isMeetingTranscribing}meetingTranscript={meetingTranscript}meetingPartialTranscript={meetingPartialTranscript}- meetingEvent={meetingRecordingRequest?.event}+ meetingEvent={activeMeetingEvent}onStopMeetingRecording={stopMeetingTranscription}actionProcessingState={actionProcessingState}actionName={actionName}diff --git a/src/helpers/meetingDetectionEngine.js b/src/helpers/meetingDetectionEngine.jsindex 213e1dfbf..b73ba15fc 100644--- a/src/helpers/meetingDetectionEngine.js+++ b/src/helpers/meetingDetectionEngine.js@@ -152,31 +152,35 @@ class MeetingDetectionEngine {async handleNotificationResponse(detectionId, action) {debugLogger.info("Notification response", { detectionId, action }, "meeting");- const detection = this.activeDetections.get(detectionId);-- if (action === "start" && detection) {- const eventSummary = detection.event?.summary || "Meeting";-- const noteResult = this.databaseManager.saveNote(eventSummary, "", "meeting");- const meetingsFolder = this.databaseManager.getMeetingsFolder();+ try {+ const detection = this.activeDetections.get(detectionId);- if (noteResult?.id && meetingsFolder?.id) {- await this.windowManager.createControlPanelWindow();- this.windowManager.snapControlPanelToMeetingMode();- this.windowManager.sendToControlPanel("navigate-to-meeting-note", {- noteId: noteResult.id,- folderId: meetingsFolder.id,- event: detection.event,- });- }- } else if (action === "dismiss") {- if (detection) {- this._dismiss(detection.source, detection.key);- detection.dismissed = true;+ if (action === "start" && detection) {+ const eventSummary = detection.event?.summary || "Meeting";++ const noteResult = this.databaseManager.saveNote(eventSummary, "", "meeting");+ const meetingsFolder = this.databaseManager.getMeetingsFolder();++ if (noteResult?.note?.id && meetingsFolder?.id) {+ await this.windowManager.createControlPanelWindow();+ this.windowManager.snapControlPanelToMeetingMode();+ this.windowManager.sendToControlPanel("navigate-to-meeting-note", {+ noteId: noteResult.note.id,+ folderId: meetingsFolder.id,+ event: detection.event,+ });+ }++ this.activeDetections.delete(detectionId);+ } else if (action === "dismiss") {+ if (detection) {+ this._dismiss(detection.source, detection.key);+ detection.dismissed = true;+ }}+ } finally {+ this.windowManager.dismissMeetingNotification();}-- this.windowManager.dismissMeetingNotification();}_dismiss(source, key) {diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.jsindex f160b2729..a3084eb89 100644--- a/src/helpers/windowManager.js+++ b/src/helpers/windowManager.js@@ -713,6 +713,7 @@ class WindowManager {}dismissMeetingNotification() {+ this._pendingNotificationData = null;if (this._notificationTimeout) {clearTimeout(this._notificationTimeout);this._notificationTimeout = null;