Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

feat(meetings): keep active meetings visible, join from dashboard, and link calendar data on hotkey

Gabriel Stein8531ac57cdbf
diff --git a/preload.js b/preload.js
index 2d6eb7b5c..3d09ad5d7 100644
--- a/preload.js
+++ b/preload.js
@@ -705,6 +705,7 @@ contextBridge.exposeInMainWorld("electronAPI", {
meetingNotificationReady: () => ipcRenderer.invoke("meeting-notification-ready"),
meetingNotificationRespond: (detectionId, action) =>
ipcRenderer.invoke("meeting-notification-respond", detectionId, action),
+ joinCalendarMeeting: (eventId) => ipcRenderer.invoke("join-calendar-meeting", eventId),
onNavigateToMeetingNote: registerListener(
"navigate-to-meeting-note",
(callback) => (_event, data) => callback(data)
diff --git a/src/components/UpcomingMeetings.tsx b/src/components/UpcomingMeetings.tsx
index 36b2866b3..480e5cfcc 100644
--- a/src/components/UpcomingMeetings.tsx
+++ b/src/components/UpcomingMeetings.tsx
@@ -197,7 +197,10 @@ export default function UpcomingMeetings({ events, isLoading }: UpcomingMeetings
<Button
size="icon"
variant="ghost"
- onClick={() => openJoinUrl(joinUrl)}
+ onClick={() => {
+ openJoinUrl(joinUrl);
+ window.electronAPI?.joinCalendarMeeting?.(event.id);
+ }}
title={t("upcoming.join")}
className="h-6 w-6 rounded-sm text-muted-foreground hover:text-foreground hover:bg-foreground/10"
>
diff --git a/src/helpers/database.js b/src/helpers/database.js
index a84bdf2fa..52f407528 100644
--- a/src/helpers/database.js
+++ b/src/helpers/database.js
@@ -1240,7 +1240,7 @@ class DatabaseManager {
if (!this.db) throw new Error("Database not initialized");
return this.db
.prepare(
- "SELECT * FROM calendar_events WHERE datetime(start_time) > datetime('now') AND datetime(start_time) <= datetime('now', '+' || ? || ' minutes') AND is_all_day = 0 AND status = 'confirmed' ORDER BY start_time ASC"
+ "SELECT * FROM calendar_events WHERE ((datetime(start_time) > datetime('now') AND datetime(start_time) <= datetime('now', '+' || ? || ' minutes')) OR (datetime(start_time) <= datetime('now') AND datetime(end_time) > datetime('now'))) AND is_all_day = 0 AND status = 'confirmed' ORDER BY start_time ASC"
)
.all(windowMinutes);
} catch (error) {
diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.js
index de595f725..4bd0cb29b 100644
--- a/src/helpers/ipcHandlers.js
+++ b/src/helpers/ipcHandlers.js
@@ -4864,6 +4864,15 @@ class IPCHandlers {
}
});
+ ipcMain.handle("join-calendar-meeting", async (_event, eventId) => {
+ try {
+ await this.meetingDetectionEngine.joinCalendarMeeting(eventId);
+ return { success: true };
+ } catch (error) {
+ return { success: false, error: error.message };
+ }
+ });
+
ipcMain.handle("get-meeting-notification-data", async () => {
return this.windowManager?._pendingNotificationData ?? null;
});
diff --git a/src/helpers/meetingDetectionEngine.js b/src/helpers/meetingDetectionEngine.js
index 371597441..288c11b11 100644
--- a/src/helpers/meetingDetectionEngine.js
+++ b/src/helpers/meetingDetectionEngine.js
@@ -230,9 +230,15 @@ class MeetingDetectionEngine {
}
async startManualMeeting() {
- this._meetingModeActive = true;
debugLogger.info("Starting manual meeting", {}, "meeting");
+ const activeEvents = this.databaseManager.getActiveEvents();
+ if (activeEvents?.length > 0) {
+ return this.joinCalendarMeeting(activeEvents[0].id);
+ }
+
+ this._meetingModeActive = true;
+
const event = {
id: `manual-${Date.now()}`,
calendar_id: "__manual__",
@@ -256,6 +262,7 @@ class MeetingDetectionEngine {
{ noteId: noteResult?.note?.id, folderId: meetingsFolder?.id },
"meeting"
);
+ this._meetingModeActive = false;
return;
}
@@ -271,6 +278,48 @@ class MeetingDetectionEngine {
});
}
+ async joinCalendarMeeting(eventId) {
+ this._meetingModeActive = true;
+ debugLogger.info("Joining calendar meeting", { eventId }, "meeting");
+
+ const calEvent = this.databaseManager.getCalendarEventById(eventId);
+ if (!calEvent) {
+ debugLogger.error("Calendar event not found", { eventId }, "meeting");
+ this._meetingModeActive = false;
+ return;
+ }
+
+ const noteResult = this.databaseManager.saveNote(calEvent.summary || "New note", "", "meeting");
+ const meetingsFolder = this.databaseManager.getMeetingsFolder();
+
+ if (!noteResult?.note?.id || !meetingsFolder?.id) {
+ debugLogger.error(
+ "Join calendar meeting failed — missing note or folder",
+ { noteId: noteResult?.note?.id, folderId: meetingsFolder?.id },
+ "meeting"
+ );
+ this._meetingModeActive = false;
+ return;
+ }
+
+ const updates = { calendar_event_id: calEvent.id };
+ if (calEvent.attendees) {
+ updates.participants = calEvent.attendees;
+ }
+ const updateResult = this.databaseManager.updateNote(noteResult.note.id, updates);
+
+ this.broadcastToWindows("note-added", updateResult?.note || noteResult.note);
+
+ await this.windowManager.createControlPanelWindow();
+ await new Promise((resolve) => setTimeout(resolve, 50));
+ this.windowManager.snapControlPanelToMeetingMode();
+ this.windowManager.sendToControlPanel("navigate-to-meeting-note", {
+ noteId: noteResult.note.id,
+ folderId: meetingsFolder.id,
+ event: calEvent,
+ });
+ }
+
handleNotificationTimeout() {
for (const [detectionId, detection] of this.activeDetections) {
if (!detection.dismissed) {
diff --git a/src/types/electron.ts b/src/types/electron.ts
index b6207aaf3..b8dd63072 100644
--- a/src/types/electron.ts
+++ b/src/types/electron.ts
@@ -1249,9 +1249,7 @@ declare global {
}>;
// Contacts
- searchContacts: (
- query: string
- ) => Promise<{
+ searchContacts: (query: string) => Promise<{
success: boolean;
contacts: Array<{ email: string; display_name: string | null }>;
}>;
@@ -1345,6 +1343,7 @@ declare global {
detectionId: string,
action: string
) => Promise<{ success: boolean }>;
+ joinCalendarMeeting?: (eventId: string) => Promise<{ success: boolean }>;
onNavigateToMeetingNote?: (
callback: (data: { noteId: number; folderId: number; event: any }) => void
) => () => void;