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): resolve notification popup timing and detection lifecycle bugs
Gabriel Stein75b9e9c21c4a
diff --git a/preload.js b/preload.jsindex 8c943cec0..28b9ff09e 100644--- a/preload.js+++ b/preload.js@@ -85,7 +85,8 @@ contextBridge.exposeInMainWorld("electronAPI", {deleteNote: (id) => ipcRenderer.invoke("db-delete-note", id),exportNote: (noteId, format) => ipcRenderer.invoke("export-note", noteId, format),searchNotes: (query, limit) => ipcRenderer.invoke("db-search-notes", query, limit),- semanticSearchNotes: (query, limit) => ipcRenderer.invoke("db-semantic-search-notes", query, limit),+ semanticSearchNotes: (query, limit) =>+ ipcRenderer.invoke("db-semantic-search-notes", query, limit),semanticReindexAll: () => ipcRenderer.invoke("db-semantic-reindex-all"),onSemanticReindexProgress: (callback) => {const listener = (_event, data) => callback?.(data);@@ -660,8 +661,6 @@ contextBridge.exposeInMainWorld("electronAPI", {meetingDetectionGetPreferences: () => ipcRenderer.invoke("meeting-detection-get-preferences"),meetingDetectionSetPreferences: (prefs) =>ipcRenderer.invoke("meeting-detection-set-preferences", prefs),- meetingDetectionRespond: (detectionId, action) =>- ipcRenderer.invoke("meeting-detection-respond", detectionId, action),onMeetingDetected: registerListener("meeting-detected",(callback) => (_event, data) => callback(data)diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.jsindex 400f24abb..a8346448f 100644--- a/src/helpers/ipcHandlers.js+++ b/src/helpers/ipcHandlers.js@@ -4421,15 +4421,6 @@ class IPCHandlers {}});- ipcMain.handle("meeting-detection-respond", async (_event, detectionId, action) => {- try {- this.meetingDetectionEngine.handleUserResponse(detectionId, action);- return { success: true };- } catch (error) {- return { success: false, error: error.message };- }- });-ipcMain.handle("meeting-notification-respond", async (_event, detectionId, action) => {try {await this.meetingDetectionEngine.handleNotificationResponse(detectionId, action);diff --git a/src/helpers/meetingDetectionEngine.js b/src/helpers/meetingDetectionEngine.jsindex 69bcdf806..fd63666dd 100644--- a/src/helpers/meetingDetectionEngine.js+++ b/src/helpers/meetingDetectionEngine.js@@ -158,47 +158,47 @@ class MeetingDetectionEngine {});}- handleUserResponse(detectionId, action) {- debugLogger.info("User response to detection", { detectionId, action }, "meeting");- if (action === "dismiss") {- const detection = this.activeDetections.get(detectionId);- if (detection) {- this._dismiss();- detection.dismissed = true;- }- }- }-async handleNotificationResponse(detectionId, action) {debugLogger.info("Notification response", { detectionId, action }, "meeting");try {const detection = this.activeDetections.get(detectionId);if (action === "start" && detection) {- this._meetingModeActive = true;const eventSummary = detection.event?.summary || "New note";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,- });+ if (!noteResult?.note?.id || !meetingsFolder?.id) {+ debugLogger.error(+ "Meeting note creation failed",+ { noteId: noteResult?.note?.id, folderId: meetingsFolder?.id },+ "meeting"+ );+ this.activeDetections.delete(detectionId);+ return;}+ this._meetingModeActive = true;++ this.broadcastToWindows("note-added", noteResult.note);++ 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.audioActivityDetector.resetPrompt();this.activeDetections.delete(detectionId);} else if (action === "dismiss") {if (detection) {this._dismiss();- detection.dismissed = true;}+ this.activeDetections.delete(detectionId);}} catch (error) {this._meetingModeActive = false;diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.jsindex 4803f0ef2..b98756e89 100644--- a/src/helpers/windowManager.js+++ b/src/helpers/windowManager.js@@ -989,6 +989,8 @@ class WindowManager {WindowPositionUtil.setupAlwaysOnTop(this.notificationWindow);+ this._pendingNotificationData = promptData;+if (process.env.NODE_ENV === "development") {await DevServerManager.waitForDevServer();await this.notificationWindow.loadURL(@@ -1001,8 +1003,6 @@ class WindowManager {});}- this._pendingNotificationData = promptData;-this._notificationReadyFallback = setTimeout(() => {this._notificationReadyFallback = null;if (this.notificationWindow && !this.notificationWindow.isDestroyed()) {diff --git a/src/types/electron.ts b/src/types/electron.tsindex 8227680f5..4679ccc53 100644--- a/src/types/electron.ts+++ b/src/types/electron.ts@@ -1257,10 +1257,6 @@ declare global {meetingDetectionSetPreferences?: (prefs: Record<string, boolean>) => Promise<{ success: boolean }>;- meetingDetectionRespond?: (- detectionId: string,- action: string- ) => Promise<{ success: boolean }>;onMeetingDetected?: (callback: (data: any) => void) => () => void;onMeetingDetectedStartRecording?: (callback: (data: any) => void) => () => void;onMeetingNotificationData?: (callback: (data: any) => void) => () => void;