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
feat(meeting): unify meeting prompts in the in-app overlay (#1182)
Gabriel Stein82e1cdc6b2e3
diff --git a/CLAUDE.md b/CLAUDE.mdindex 550876cfe..d7d71607e 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -566,13 +566,21 @@ Detects meetings via three independent sources, orchestrated by `MeetingDetectio- Linux: `pactl subscribe` — PulseAudio source-output events- All platforms: Graceful fallback to polling if native binary/command unavailable+**Calendar Reminders** (scheduled meetings):++- `GoogleCalendarManager` fires `meetingDetectionEngine.handleCalendarReminder(event)` 1 minute before the scheduled start (`MEETING_REMINDER_LEAD_MS`) — no native OS notifications; all meeting prompts use the in-app overlay so they survive Focus/DND and screen-share notification muting+- Calendar-sourced prompts show a Join primary action when the event has a meeting link (`getMeetingJoinUrl` in `src/helpers/meetingJoinUrl.js`, shared with the renderer's Upcoming Meetings join button) — Join opens the link and starts the note+**UX Rules**:+- All prompts render in one always-on-top overlay window (`MeetingNotificationCard`), content-protected so it never appears in screen shares+- Prompt copy is derived in the renderer from `{ variant, event, joinUrl }` (`meetingNotification.*` i18n keys); variants: `detected` (mic evidence), `starting` (calendar event not yet started), `underway` (event in progress)+- Per-source notification prefs: `notifyCalendarReminders` gates calendar prompts, `notifyMeetingDetection` gates mic/process prompts- During recording (tap-to-talk or push-to-talk): ALL notifications suppressed- After recording: 2.5s cooldown before showing queued notifications-- Multiple signals coalesced: process > audio priority, one notification shown-- Calendar-aware: if imminent calendar event exists, notification shows event name-- Active calendar meeting recording: all detections suppressed+- Multiple signals coalesced: one overlay at a time; a newer prompt replaces the current one+- Calendar-aware: if an ongoing or imminent calendar event exists, the prompt shows the event name and links the note to the event+- Active meeting recording (meeting mode): all detections suppressed**Binary Distribution**:diff --git a/main.js b/main.jsindex 92d739eee..5f2679a6f 100644--- a/main.js+++ b/main.js@@ -403,6 +403,7 @@ function initializeCoreManagers() {databaseManager);windowManager.meetingDetectionEngine = meetingDetectionEngine;+ googleCalendarManager.meetingDetectionEngine = meetingDetectionEngine;updateManager = new UpdateManager();updateManager.setWindowManager(windowManager);windowsKeyManager = new WindowsKeyManager();diff --git a/preload.js b/preload.jsindex ece054b34..828a3cabe 100644--- a/preload.js+++ b/preload.js@@ -928,18 +928,6 @@ contextBridge.exposeInMainWorld("electronAPI", {getMD5Hash: (text) => ipcRenderer.invoke("get-md5-hash", text),// Google Calendar event listeners- onGcalMeetingStarting: registerListener(- "gcal-meeting-starting",- (callback) => (_event, data) => callback(data)- ),- onGcalMeetingEnded: registerListener(- "gcal-meeting-ended",- (callback) => (_event, data) => callback(data)- ),- onGcalStartRecording: registerListener(- "gcal-start-recording",- (callback) => (_event, data) => callback(data)- ),onGcalConnectionChanged: registerListener("gcal-connection-changed",(callback) => (_event, data) => callback(data)@@ -961,14 +949,6 @@ contextBridge.exposeInMainWorld("electronAPI", {ipcRenderer.invoke("meeting-set-session-speaker-config", config),getWhisperVadConfig: () => ipcRenderer.invoke("whisper-vad-get-config"),setWhisperVadConfig: (config) => ipcRenderer.invoke("whisper-vad-set-config", config),- onMeetingDetected: registerListener(- "meeting-detected",- (callback) => (_event, data) => callback(data)- ),- onMeetingDetectedStartRecording: registerListener(- "meeting-detected-start-recording",- (callback) => (_event, data) => callback(data)- ),onMeetingNotificationData: registerListener("meeting-notification-data",(callback) => (_event, data) => callback(data)diff --git a/src/components/MeetingNotificationOverlay.tsx b/src/components/MeetingNotificationOverlay.tsxindex 7046b7464..b3a79d5a3 100644--- a/src/components/MeetingNotificationOverlay.tsx+++ b/src/components/MeetingNotificationOverlay.tsx@@ -1,16 +1,20 @@import { useState, useEffect, useCallback } from "react";+import { useTranslation } from "react-i18next";import { MeetingNotificationCard } from "./MeetingNotificationCard";+type PromptVariant = "detected" | "starting" | "underway";+interface NotificationData {detectionId: string;source: string;key: string;- title: string;- body: string;- event: any;+ event: { summary?: string | null } | null;+ variant: PromptVariant;+ joinUrl: string | null;}export default function MeetingNotificationOverlay() {+ const { t } = useTranslation();const [data, setData] = useState<NotificationData | null>(null);const [isVisible, setIsVisible] = useState(false);const [isHovered, setIsHovered] = useState(false);@@ -59,13 +63,16 @@ export default function MeetingNotificationOverlay() {window.electronAPI?.setNotificationInteractivity?.(false);}, []);+ const variant: PromptVariant = data?.variant ?? "detected";+ const title = (variant !== "detected" && data?.event?.summary) || t("meetingNotification.title");+return (<div className="meeting-notification-window w-full h-full bg-transparent p-3"><MeetingNotificationCard- title={data?.title ?? "Meeting Detected"}- body={data?.body ?? "Want to take notes?"}- startLabel="Start Recording"- onStart={() => respond("start")}+ title={title}+ body={t(`meetingNotification.body.${variant}`)}+ startLabel={data?.joinUrl ? t("meetingNotification.join") : t("meetingNotification.start")}+ onStart={() => respond(data?.joinUrl ? "join" : "start")}onDismiss={() => respond("dismiss")}closeVisible={isHovered}onMouseEnter={handleMouseEnter}diff --git a/src/components/UpcomingMeetings.tsx b/src/components/UpcomingMeetings.tsxindex 70d7fe997..17f17a409 100644--- a/src/components/UpcomingMeetings.tsx+++ b/src/components/UpcomingMeetings.tsx@@ -8,27 +8,13 @@ import { formatUpcomingDateGroup } from "../utils/dateFormatting";import { useSystemAudioPermission } from "../hooks/useSystemAudioPermission";import { useSettingsStore } from "../stores/settingsStore";import { canManageSystemAudioInApp } from "../utils/systemAudioAccess";+import { getMeetingJoinUrl } from "../helpers/meetingJoinUrl";interface UpcomingMeetingsProps {events: CalendarEvent[];isLoading: boolean;}-const getJoinUrl = (event: CalendarEvent): string | null => {- if (event.hangout_link) return event.hangout_link;- if (!event.conference_data) return null;- try {- const data = JSON.parse(event.conference_data);- return (- data?.entryPoints?.find(- (ep: { entryPointType: string; uri?: string }) => ep.entryPointType === "video"- )?.uri || null- );- } catch {- return null;- }-};-const openJoinUrl = (url: string) => {if (window.electronAPI?.openExternal) {window.electronAPI.openExternal(url);@@ -156,7 +142,7 @@ export default function UpcomingMeetings({ events, isLoading }: UpcomingMeetings</div><div className="space-y-1.5">{group.items.map((event) => {- const joinUrl = getJoinUrl(event);+ const joinUrl = getMeetingJoinUrl(event);const isNow = isHappeningNow(event);const isHovered = hoveredEventId === event.id;diff --git a/src/components/onboarding/MeetingSetupStep.tsx b/src/components/onboarding/MeetingSetupStep.tsxindex 8c349fb63..0a83c99f8 100644--- a/src/components/onboarding/MeetingSetupStep.tsx+++ b/src/components/onboarding/MeetingSetupStep.tsx@@ -53,9 +53,9 @@ export default function MeetingSetupStep({<div className="relative overflow-hidden rounded-lg border border-border-subtle bg-gradient-to-br from-surface-2/50 via-surface-1 to-primary/5 px-4 pt-4 pb-9"><div className="pointer-events-none select-none"><MeetingNotificationCard- title={t("onboarding.meeting.notification.title")}- body={t("onboarding.meeting.notification.body")}- startLabel={t("onboarding.meeting.notification.cta")}+ title={t("meetingNotification.title")}+ body={t("meetingNotification.body.detected")}+ startLabel={t("meetingNotification.start")}className="ml-auto w-full max-w-[300px] shadow-xl"/></div>diff --git a/src/helpers/googleCalendarManager.js b/src/helpers/googleCalendarManager.jsindex bd094555f..d2035f6c9 100644--- a/src/helpers/googleCalendarManager.js+++ b/src/helpers/googleCalendarManager.js@@ -1,8 +1,9 @@-const { net, Notification, BrowserWindow } = require("electron");+const { net, BrowserWindow } = require("electron");const debugLogger = require("./debugLogger");const GoogleCalendarOAuth = require("./googleCalendarOAuth");const CALENDAR_API_BASE = "https://www.googleapis.com/calendar/v3";+const MEETING_REMINDER_LEAD_MS = 60 * 1000;class GoogleCalendarManager {constructor(databaseManager, windowManager) {@@ -271,7 +272,7 @@ class GoogleCalendarManager {const next = upcoming.find((e) => !this.notifiedMeetings.has(e.id));if (!next) return;- const delay = new Date(next.start_time).getTime() - Date.now();+ const delay = new Date(next.start_time).getTime() - MEETING_REMINDER_LEAD_MS - Date.now();if (delay <= 0) {this.onMeetingStart(next);return;@@ -296,19 +297,8 @@ class GoogleCalendarManager {this.activeMeeting = event;this.notifiedMeetings.add(event.id);- const nPrefs = this.windowManager?.notificationPrefs || {};- if (nPrefs.notificationsEnabled !== false && nPrefs.notifyCalendarReminders !== false) {- const notif = new Notification({- title: event.summary || "Meeting",- body: "Meeting starting now",- });- notif.on("click", () => {- this.broadcastToWindows("gcal-start-recording", { event });- });- notif.show();- }-- this.broadcastToWindows("gcal-meeting-starting", { event });+ debugLogger.info("Calendar meeting reminder due", { summary: event.summary }, "gcal");+ this.meetingDetectionEngine?.handleCalendarReminder(event);if (this.meetingEndTimer) {clearTimeout(this.meetingEndTimer);@@ -324,7 +314,7 @@ class GoogleCalendarManager {}onMeetingEnd() {- this.broadcastToWindows("gcal-meeting-ended", { event: this.activeMeeting });+ debugLogger.info("Calendar meeting ended", { summary: this.activeMeeting?.summary }, "gcal");this.activeMeeting = null;if (this.meetingEndTimer) {clearTimeout(this.meetingEndTimer);diff --git a/src/helpers/meetingDetectionEngine.js b/src/helpers/meetingDetectionEngine.jsindex c42a0fb87..1f53fa352 100644--- a/src/helpers/meetingDetectionEngine.js+++ b/src/helpers/meetingDetectionEngine.js@@ -1,8 +1,28 @@-const { BrowserWindow } = require("electron");+const { BrowserWindow, shell } = require("electron");const debugLogger = require("./debugLogger");+const { getMeetingJoinUrl } = require("./meetingJoinUrl");const IMMINENT_THRESHOLD_MS = 5 * 60 * 1000;+const PLACEHOLDER_PREFIX = { __detected__: "detected", __manual__: "manual" };++function placeholderEvent(calendarId) {+ const now = Date.now();+ return {+ id: `${PLACEHOLDER_PREFIX[calendarId]}-${now}`,+ calendar_id: calendarId,+ summary: "New note",+ start_time: new Date(now).toISOString(),+ end_time: new Date(now + 3600000).toISOString(),+ is_all_day: 0,+ status: "confirmed",+ hangout_link: null,+ conference_data: null,+ organizer_email: null,+ attendees_count: 0,+ };+}+class MeetingDetectionEngine {constructor(googleCalendarManager,@@ -45,14 +65,29 @@ class MeetingDetectionEngine {});}+ // Calendar reminders enter the same pipeline as mic detections, so they share+ // the recording gates, queueing, cooldowns, and the overlay window.+ handleCalendarReminder(event) {+ this._handleDetection("calendar", event.id, { event, detectedAt: Date.now() });+ }+_handleDetection(source, key, data) {const detectionId = `${source}:${key}`;- if (!this.preferences.audioDetection) {+ if (source === "audio" && !this.preferences.audioDetection) {debugLogger.debug("Audio detection disabled, ignoring", { detectionId }, "meeting");return;}+ if (!this._notificationsEnabledFor(source)) {+ debugLogger.info(+ "Notification disabled by preference, ignoring",+ { detectionId, source },+ "meeting"+ );+ return;+ }+if (this.activeDetections.has(detectionId)) {debugLogger.debug("Detection already active, skipping", { detectionId }, "meeting");return;@@ -67,18 +102,6 @@ class MeetingDetectionEngine {return;}- const calendarState = this.googleCalendarManager?.getActiveMeetingState?.();- if (calendarState) {- if (calendarState.activeMeeting) {- debugLogger.info(- "Suppressing detection — active calendar meeting recording in progress",- { detectionId, activeMeeting: calendarState.activeMeeting?.summary },- "meeting"- );- return;- }- }-if (this._userRecording || this._postRecordingCooldown) {debugLogger.info("Detection queued — user is recording", { detectionId, source }, "meeting");this._notificationQueue.push({ source, key, data });@@ -86,80 +109,69 @@ class MeetingDetectionEngine {return;}- let imminentEvent = null;- if (calendarState?.upcomingEvents?.length > 0) {- const now = Date.now();- imminentEvent = calendarState.upcomingEvents.find((evt) => {+ debugLogger.info("Meeting detection triggered", { detectionId, source }, "meeting");+ this.activeDetections.set(detectionId, { source, key, data, dismissed: false });+ this._showPrompt(detectionId, source, key, data);+ }++ _notificationsEnabledFor(source) {+ const nPrefs = this.windowManager.notificationPrefs || {};+ if (nPrefs.notificationsEnabled === false) return false;+ const prefKey = source === "calendar" ? "notifyCalendarReminders" : "notifyMeetingDetection";+ return nPrefs[prefKey] !== false;+ }++ // activeMeeting only means the event's scheduled window is open — actual meeting+ // recordings are tracked by _meetingModeActive.+ _findCalendarEvent() {+ const calendarState = this.googleCalendarManager?.getActiveMeetingState?.();+ if (!calendarState) return null;+ if (calendarState.activeMeeting) return calendarState.activeMeeting;++ const now = Date.now();+ return (+ calendarState.upcomingEvents?.find((evt) => {const start = new Date(evt.start_time).getTime();return start - now <= IMMINENT_THRESHOLD_MS && start > now;- });- }-- debugLogger.info(- "Meeting detection triggered",- { detectionId, source, imminentEvent: imminentEvent?.summary ?? null },- "meeting"+ }) ?? null);- this.activeDetections.set(detectionId, { source, key, data, dismissed: false });- this._showPrompt(detectionId, source, key, data, imminentEvent);}- _showPrompt(detectionId, source, key, data, imminentEvent) {- let title, body;+ _showPrompt(detectionId, source, key, data) {+ const calendarEvent = data?.event ?? this._findCalendarEvent();+ const event = calendarEvent ?? placeholderEvent("__detected__");- if (imminentEvent) {- title = imminentEvent.summary || "Upcoming Meeting";- body = "Your meeting is starting. Want to take notes?";- } else {- title = "Meeting Detected";- body = "It sounds like you're in a meeting. Want to take notes?";+ let variant = "detected";+ if (calendarEvent) {+ const started = new Date(calendarEvent.start_time).getTime() <= Date.now();+ variant = started ? "underway" : "starting";}+ const joinUrl = source === "calendar" ? getMeetingJoinUrl(calendarEvent) : null;- debugLogger.info("Showing notification", { detectionId, title }, "meeting");-- let event;- if (imminentEvent) {- event = imminentEvent;- } else {- event = {- id: `detected-${Date.now()}`,- calendar_id: "__detected__",- summary: "New note",- start_time: new Date().toISOString(),- end_time: new Date(Date.now() + 3600000).toISOString(),- is_all_day: 0,- status: "confirmed",- hangout_link: null,- conference_data: null,- organizer_email: null,- attendees_count: 0,- };- }+ debugLogger.info(+ "Showing notification",+ {+ detectionId,+ source,+ variant,+ title: calendarEvent?.summary ?? null,+ hasJoinUrl: !!joinUrl,+ },+ "meeting"+ );const detection = this.activeDetections.get(detectionId);if (detection) {detection.event = event;}- const nPrefs = this.windowManager.notificationPrefs || {};- if (nPrefs.notificationsEnabled !== false && nPrefs.notifyMeetingDetection !== false) {- this.windowManager.showMeetingNotification({- detectionId,- source,- key,- title,- body,- event,- });- } else {- debugLogger.info("Meeting notification suppressed by user preference", {}, "meeting");- }-- this.broadcastToWindows("meeting-detected", {+ this.windowManager.showMeetingNotification({detectionId,source,- data,- imminentEvent,+ key,+ event,+ variant,+ joinUrl,});}@@ -168,7 +180,22 @@ class MeetingDetectionEngine {try {const detection = this.activeDetections.get(detectionId);- if (action === "start" && detection) {+ if ((action === "start" || action === "join") && detection) {+ if (action === "join") {+ const joinUrl = getMeetingJoinUrl(detection.event);+ if (joinUrl) {+ shell+ .openExternal(joinUrl)+ .catch((error) =>+ debugLogger.error(+ "Failed to open meeting link",+ { error: error.message, joinUrl },+ "meeting"+ )+ );+ }+ }+const eventSummary = detection.event?.summary || "New note";const noteResult = this.databaseManager.saveNote(eventSummary, "", "meeting");@@ -180,7 +207,6 @@ class MeetingDetectionEngine {{ noteId: noteResult?.note?.id, folderId: meetingsFolder?.id },"meeting");- this.activeDetections.delete(detectionId);return;}@@ -213,13 +239,10 @@ class MeetingDetectionEngine {});this.audioActivityDetector.resetPrompt();-- this.activeDetections.delete(detectionId);} else if (action === "dismiss") {if (detection) {this._dismiss();}- this.activeDetections.delete(detectionId);}} catch (error) {this._meetingModeActive = false;@@ -229,6 +252,9 @@ class MeetingDetectionEngine {"meeting");} finally {+ // One overlay at a time — a response settles every pending detection,+ // including any the responded prompt replaced.+ this.activeDetections.clear();this.windowManager.dismissMeetingNotification();}}@@ -243,19 +269,7 @@ class MeetingDetectionEngine {this._meetingModeActive = true;- const event = {- id: `manual-${Date.now()}`,- calendar_id: "__manual__",- summary: "New note",- start_time: new Date().toISOString(),- end_time: new Date(Date.now() + 3600000).toISOString(),- is_all_day: 0,- status: "confirmed",- hangout_link: null,- conference_data: null,- organizer_email: null,- attendees_count: 0,- };+ const event = placeholderEvent("__manual__");const noteResult = this.databaseManager.saveNote(event.summary, "", "meeting");const meetingsFolder = this.databaseManager.getMeetingsFolder();@@ -336,6 +350,9 @@ class MeetingDetectionEngine {if (this._meetingModeActive) {debugLogger.info("Dropping queued notifications — meeting mode active", {}, "meeting");+ for (const { source, key } of this._notificationQueue) {+ this.activeDetections.delete(`${source}:${key}`);+ }this._notificationQueue = [];return;}@@ -351,17 +368,7 @@ class MeetingDetectionEngine {const detection = this.activeDetections.get(detectionId);if (detection && !detection.dismissed) {- const calendarState = this.googleCalendarManager?.getActiveMeetingState?.();- let imminentEvent = null;- if (calendarState?.upcomingEvents?.length > 0) {- const now = Date.now();- imminentEvent = calendarState.upcomingEvents.find((evt) => {- const start = new Date(evt.start_time).getTime();- return start - now <= IMMINENT_THRESHOLD_MS && start > now;- });- }-- this._showPrompt(detectionId, best.source, best.key, best.data, imminentEvent);+ this._showPrompt(detectionId, best.source, best.key, best.data);}this._notificationQueue = [];diff --git a/src/helpers/meetingJoinUrl.js b/src/helpers/meetingJoinUrl.jsnew file mode 100644index 000000000..23e9f3241--- /dev/null+++ b/src/helpers/meetingJoinUrl.js@@ -0,0 +1,11 @@+export function getMeetingJoinUrl(event) {+ if (!event) return null;+ if (event.hangout_link) return event.hangout_link;+ if (!event.conference_data) return null;+ try {+ const data = JSON.parse(event.conference_data);+ return data?.entryPoints?.find((ep) => ep.entryPointType === "video")?.uri ?? null;+ } catch {+ return null;+ }+}diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.jsindex a78b3bf2e..d1c869ead 100644--- a/src/helpers/windowManager.js+++ b/src/helpers/windowManager.js@@ -1179,6 +1179,9 @@ class WindowManager {...position,});+ // Keep the prompt visible to the user but out of screen shares and recordings.+ this.notificationWindow.setContentProtection(true);+if (process.platform === "darwin") {this.notificationWindow.setIgnoreMouseEvents(true, { forward: true });}diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex 7322f79ec..85a4a4dc1 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -277,11 +277,6 @@"title": "Meeting-Notizen","description": "Erfasse und fasse deine Meetings zusammen","autoDetect": "OpenWhispr erkennt automatisch, wenn du in einem Meeting bist, und bietet an, Notizen zu starten — ohne dich wird nichts aufgenommen.",- "notification": {- "title": "Meeting erkannt",- "body": "Es klingt, als wärst du in einem Meeting. Notizen aufnehmen?",- "cta": "Aufnahme starten"- },"hotkeyLabel": "Meeting-Hotkey","hotkeyHint": "Optional — drücke ihn in jedem Meeting, um sofort eine Notiz zu starten."},@@ -2946,5 +2941,15 @@"successDescription": "Willkommen bei {{name}}.","errorTitle": "Einladung konnte nicht angenommen werden"}+ },+ "meetingNotification": {+ "title": "Meeting erkannt",+ "body": {+ "detected": "Es klingt, als wärst du in einem Meeting. Notizen aufnehmen?",+ "starting": "Dein Meeting beginnt gleich. Notizen aufnehmen?",+ "underway": "Es klingt, als wäre dein Meeting schon im Gange. Notizen aufnehmen?"+ },+ "start": "Aufnahme starten",+ "join": "Beitreten"}}diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex c7bdc302f..cbeea09d9 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -277,11 +277,6 @@"title": "Meeting notes","description": "Capture and summarize your meetings","autoDetect": "OpenWhispr automatically detects when you're in a meeting and offers to start notes — nothing is recorded without you.",- "notification": {- "title": "Meeting detected",- "body": "It sounds like you're in a meeting. Want to take notes?",- "cta": "Start Recording"- },"hotkeyLabel": "Meeting hotkey","hotkeyHint": "Optional — press it in any meeting to start a note instantly."},@@ -2946,5 +2941,15 @@"you": "You","others": "Others"}+ },+ "meetingNotification": {+ "title": "Meeting detected",+ "body": {+ "detected": "It sounds like you're in a meeting. Want to take notes?",+ "starting": "Your meeting is starting. Want to take notes?",+ "underway": "It sounds like your meeting is underway. Want to take notes?"+ },+ "start": "Start Recording",+ "join": "Join"}}diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex e7e78be58..089b40229 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -277,11 +277,6 @@"title": "Notas de reuniones","description": "Captura y resume tus reuniones","autoDetect": "OpenWhispr detecta automáticamente cuando estás en una reunión y te ofrece iniciar notas; no se graba nada sin tu permiso.",- "notification": {- "title": "Reunión detectada",- "body": "Parece que estás en una reunión. ¿Quieres tomar notas?",- "cta": "Empezar a grabar"- },"hotkeyLabel": "Atajo de reunión","hotkeyHint": "Opcional: púlsalo en cualquier reunión para iniciar una nota al instante."},@@ -2946,5 +2941,15 @@"successDescription": "Bienvenido a {{name}}.","errorTitle": "No se pudo aceptar la invitación"}+ },+ "meetingNotification": {+ "title": "Reunión detectada",+ "body": {+ "detected": "Parece que estás en una reunión. ¿Quieres tomar notas?",+ "starting": "Tu reunión está por comenzar. ¿Quieres tomar notas?",+ "underway": "Parece que tu reunión ya está en curso. ¿Quieres tomar notas?"+ },+ "start": "Empezar a grabar",+ "join": "Unirse"}}diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex 3c197ec13..0ae8d9b5f 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -277,11 +277,6 @@"title": "Notes de réunion","description": "Capturez et résumez vos réunions","autoDetect": "OpenWhispr détecte automatiquement quand vous êtes en réunion et vous propose de démarrer des notes — rien n'est enregistré sans vous.",- "notification": {- "title": "Réunion détectée",- "body": "On dirait que vous êtes en réunion. Vous voulez prendre des notes ?",- "cta": "Démarrer l'enregistrement"- },"hotkeyLabel": "Raccourci réunion","hotkeyHint": "Facultatif — appuyez dessus pendant une réunion pour démarrer une note instantanément."},@@ -2946,5 +2941,15 @@"successDescription": "Bienvenue dans {{name}}.","errorTitle": "Impossible d'accepter l'invitation"}+ },+ "meetingNotification": {+ "title": "Réunion détectée",+ "body": {+ "detected": "On dirait que vous êtes en réunion. Vous voulez prendre des notes ?",+ "starting": "Votre réunion va commencer. Vous voulez prendre des notes ?",+ "underway": "On dirait que votre réunion est déjà en cours. Vous voulez prendre des notes ?"+ },+ "start": "Démarrer l'enregistrement",+ "join": "Rejoindre"}}diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex b8f60c5b8..b5876bdf7 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -277,11 +277,6 @@"title": "Note delle riunioni","description": "Cattura e riassumi le tue riunioni","autoDetect": "OpenWhispr rileva automaticamente quando sei in riunione e ti propone di avviare le note — nulla viene registrato senza di te.",- "notification": {- "title": "Riunione rilevata",- "body": "Sembra che tu sia in riunione. Vuoi prendere appunti?",- "cta": "Avvia registrazione"- },"hotkeyLabel": "Scorciatoia riunione","hotkeyHint": "Facoltativa — premila in qualsiasi riunione per avviare subito una nota."},@@ -2946,5 +2941,15 @@"successDescription": "Bienvenue dans {{name}}.","errorTitle": "Impossible d'accepter l'invitation"}+ },+ "meetingNotification": {+ "title": "Riunione rilevata",+ "body": {+ "detected": "Sembra che tu sia in riunione. Vuoi prendere appunti?",+ "starting": "La tua riunione sta per iniziare. Vuoi prendere appunti?",+ "underway": "Sembra che la tua riunione sia già in corso. Vuoi prendere appunti?"+ },+ "start": "Avvia registrazione",+ "join": "Partecipa"}}diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex 806def69c..37d6961a3 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -277,11 +277,6 @@"title": "会議メモ","description": "会議を記録して要約します","autoDetect": "OpenWhispr は会議中であることを自動的に検出し、メモの開始を提案します。あなたの操作なしに録音されることはありません。",- "notification": {- "title": "会議を検出しました",- "body": "会議中のようです。メモを取りますか?",- "cta": "録音を開始"- },"hotkeyLabel": "会議ホットキー","hotkeyHint": "任意 — 会議中に押すとすぐにメモを開始できます。"},@@ -2946,5 +2941,15 @@"successDescription": "Bienvenido a {{name}}.","errorTitle": "No se pudo aceptar la invitación"}+ },+ "meetingNotification": {+ "title": "会議を検出しました",+ "body": {+ "detected": "会議中のようです。メモを取りますか?",+ "starting": "まもなく会議が始まります。メモを取りますか?",+ "underway": "会議はすでに進行中のようです。メモを取りますか?"+ },+ "start": "録音を開始",+ "join": "参加"}}diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex 7c8b4cf66..859116655 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -256,11 +256,6 @@"title": "Notas de reunião","description": "Capture e resuma suas reuniões","autoDetect": "O OpenWhispr detecta automaticamente quando você está em uma reunião e oferece iniciar notas — nada é gravado sem você.",- "notification": {- "title": "Reunião detectada",- "body": "Parece que você está em uma reunião. Quer fazer anotações?",- "cta": "Começar a gravar"- },"hotkeyLabel": "Atalho de reunião","hotkeyHint": "Opcional — pressione-o em qualquer reunião para iniciar uma nota na hora."},@@ -2946,5 +2941,15 @@"successDescription": "Bienvenido a {{name}}.","errorTitle": "No se pudo aceptar la invitación"}+ },+ "meetingNotification": {+ "title": "Reunião detectada",+ "body": {+ "detected": "Parece que você está em uma reunião. Quer fazer anotações?",+ "starting": "Sua reunião está começando. Quer fazer anotações?",+ "underway": "Parece que sua reunião já está em andamento. Quer fazer anotações?"+ },+ "start": "Começar a gravar",+ "join": "Entrar"}}diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex d43fe38f9..fafb45343 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -277,11 +277,6 @@"title": "Заметки встреч","description": "Записывайте и резюмируйте встречи","autoDetect": "OpenWhispr автоматически определяет, когда вы на встрече, и предлагает начать заметки — без вас ничего не записывается.",- "notification": {- "title": "Обнаружена встреча",- "body": "Похоже, вы на встрече. Хотите вести заметки?",- "cta": "Начать запись"- },"hotkeyLabel": "Горячая клавиша встречи","hotkeyHint": "Необязательно — нажмите её на любой встрече, чтобы сразу начать заметку."},@@ -2950,5 +2945,15 @@"successDescription": "Willkommen bei {{name}}.","errorTitle": "Einladung konnte nicht angenommen werden"}+ },+ "meetingNotification": {+ "title": "Обнаружена встреча",+ "body": {+ "detected": "Похоже, вы на встрече. Хотите вести заметки?",+ "starting": "Ваша встреча скоро начнётся. Хотите вести заметки?",+ "underway": "Похоже, ваша встреча уже идёт. Хотите вести заметки?"+ },+ "start": "Начать запись",+ "join": "Присоединиться"}}diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex fc7d63b96..15a13502a 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -277,11 +277,6 @@"title": "会议笔记","description": "捕捉并总结你的会议","autoDetect": "OpenWhispr 会自动检测你是否在开会,并提议开始记录 — 未经你确认不会录制任何内容。",- "notification": {- "title": "检测到会议",- "body": "你似乎正在开会。要开始记录吗?",- "cta": "开始录制"- },"hotkeyLabel": "会议快捷键","hotkeyHint": "可选 — 在任何会议中按下即可立即开始记录。"},@@ -2941,5 +2936,15 @@"successDescription": "Bienvenido a {{name}}.","errorTitle": "No se pudo aceptar la invitación"}+ },+ "meetingNotification": {+ "title": "检测到会议",+ "body": {+ "detected": "你似乎正在开会。要开始记录吗?",+ "starting": "你的会议即将开始。要开始记录吗?",+ "underway": "你的会议似乎已在进行中。要开始记录吗?"+ },+ "start": "开始录制",+ "join": "加入"}}diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex 06a865126..dcd9fef0c 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -277,11 +277,6 @@"title": "會議筆記","description": "擷取並總結你的會議","autoDetect": "OpenWhispr 會自動偵測你是否正在開會,並提議開始記錄 — 未經你確認不會錄製任何內容。",- "notification": {- "title": "偵測到會議",- "body": "你似乎正在開會。要開始記錄嗎?",- "cta": "開始錄製"- },"hotkeyLabel": "會議快捷鍵","hotkeyHint": "選填 — 在任何會議中按下即可立即開始記錄。"},@@ -2941,5 +2936,15 @@"successDescription": "Bienvenido a {{name}}.","errorTitle": "No se pudo aceptar la invitación"}+ },+ "meetingNotification": {+ "title": "偵測到會議",+ "body": {+ "detected": "你似乎正在開會。要開始記錄嗎?",+ "starting": "你的會議即將開始。要開始記錄嗎?",+ "underway": "你的會議似乎已在進行中。要開始記錄嗎?"+ },+ "start": "開始錄製",+ "join": "加入"}}diff --git a/src/types/calendar.ts b/src/types/calendar.tsindex 86cc612d3..39db58321 100644--- a/src/types/calendar.ts+++ b/src/types/calendar.ts@@ -37,17 +37,6 @@ export interface MeetingDetectionPreferences {audioDetection: boolean;}-export interface MeetingDetection {- detectionId: string;- source: "calendar" | "process" | "audio";- data: {- appName?: string;- durationMs?: number;- detectedAt: number;- };- imminentEvent?: CalendarEvent | null;-}-export interface CalendarAttendee {email: string;displayName: string | null;diff --git a/src/types/electron.ts b/src/types/electron.tsindex 8d63098ef..5fc79d0fe 100644--- a/src/types/electron.ts+++ b/src/types/electron.ts@@ -1863,9 +1863,6 @@ declare global {onDictationRealtimeSessionEnd?: (callback: (data: { text: string }) => void) => () => void;// Google Calendar event listeners- onGcalMeetingStarting?: (callback: (data: any) => void) => () => void;- onGcalMeetingEnded?: (callback: (data: any) => void) => () => void;- onGcalStartRecording?: (callback: (data: any) => void) => () => void;onGcalConnectionChanged?: (callback: (data: any) => void) => () => void;onGcalEventsSynced?: (callback: (data: any) => void) => () => void;@@ -1909,8 +1906,6 @@ declare global {speechPadMs?: number;samplesOverlap?: number;}) => Promise<{ success: boolean; config?: Record<string, unknown>; error?: string }>;- onMeetingDetected?: (callback: (data: any) => void) => () => void;- onMeetingDetectedStartRecording?: (callback: (data: any) => void) => () => void;onMeetingNotificationData?: (callback: (data: any) => void) => () => void;getMeetingNotificationData?: () => Promise<any>;meetingNotificationReady?: () => Promise<void>;diff --git a/test/helpers/meetingJoinUrl.test.js b/test/helpers/meetingJoinUrl.test.jsnew file mode 100644index 000000000..349a558fe--- /dev/null+++ b/test/helpers/meetingJoinUrl.test.js@@ -0,0 +1,49 @@+const test = require("node:test");+const assert = require("node:assert/strict");++const load = () => import("../../src/helpers/meetingJoinUrl.js");++test("prefers hangout_link when present", async () => {+ const { getMeetingJoinUrl } = await load();+ const event = {+ hangout_link: "https://meet.google.com/abc-defg-hij",+ conference_data: JSON.stringify({+ entryPoints: [{ entryPointType: "video", uri: "https://zoom.us/j/123" }],+ }),+ };+ assert.equal(getMeetingJoinUrl(event), "https://meet.google.com/abc-defg-hij");+});++test("falls back to the video entry point in conference_data", async () => {+ const { getMeetingJoinUrl } = await load();+ const event = {+ conference_data: JSON.stringify({+ entryPoints: [+ { entryPointType: "phone", uri: "tel:+15551234567" },+ { entryPointType: "video", uri: "https://zoom.us/j/123" },+ ],+ }),+ };+ assert.equal(getMeetingJoinUrl(event), "https://zoom.us/j/123");+});++test("returns null without a video entry point", async () => {+ const { getMeetingJoinUrl } = await load();+ const event = {+ conference_data: JSON.stringify({+ entryPoints: [{ entryPointType: "phone", uri: "tel:+15551234567" }],+ }),+ };+ assert.equal(getMeetingJoinUrl(event), null);+});++test("returns null for malformed conference_data", async () => {+ const { getMeetingJoinUrl } = await load();+ assert.equal(getMeetingJoinUrl({ conference_data: "not json" }), null);+});++test("returns null for missing event or links", async () => {+ const { getMeetingJoinUrl } = await load();+ assert.equal(getMeetingJoinUrl(null), null);+ assert.equal(getMeetingJoinUrl({}), null);+});