Skip to content

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

feat: gate meeting features behind screen recording permission on macOS

Gabriel Steinacf1352fb17d
diff --git a/preload.js b/preload.js
index fb4639d29..37b009ea9 100644
--- a/preload.js
+++ b/preload.js
@@ -350,6 +350,7 @@ contextBridge.exposeInMainWorld("electronAPI", {
// System settings helpers for microphone/audio permissions
requestMicrophoneAccess: () => ipcRenderer.invoke("request-microphone-access"),
+ checkScreenRecordingAccess: () => ipcRenderer.invoke("check-screen-recording-access"),
openMicrophoneSettings: () => ipcRenderer.invoke("open-microphone-settings"),
openSoundInputSettings: () => ipcRenderer.invoke("open-sound-input-settings"),
openAccessibilitySettings: () => ipcRenderer.invoke("open-accessibility-settings"),
diff --git a/src/components/IntegrationsView.tsx b/src/components/IntegrationsView.tsx
index e67083718..c175d129d 100644
--- a/src/components/IntegrationsView.tsx
+++ b/src/components/IntegrationsView.tsx
@@ -3,7 +3,9 @@ import { useTranslation } from "react-i18next";
import { Loader2, Plus, X } from "lucide-react";
import { Button } from "./ui/button";
import { Badge } from "./ui/badge";
+import { ConfirmDialog } from "./ui/dialog";
import { useSettingsStore } from "../stores/settingsStore";
+import { useScreenRecordingPermission } from "../hooks/useScreenRecordingPermission";
import googleCalendarIcon from "../assets/icons/google-calendar.svg";
function SettingsPanel({ children }: { children: React.ReactNode }) {
@@ -23,9 +25,11 @@ export default function IntegrationsView() {
const { gcalAccounts, setGcalAccounts } = useSettingsStore();
const [isConnecting, setIsConnecting] = useState(false);
const [disconnectingEmail, setDisconnectingEmail] = useState<string | null>(null);
+ const [showPermissionDialog, setShowPermissionDialog] = useState(false);
+ const screenRecording = useScreenRecordingPermission();
const hasAccounts = gcalAccounts.length > 0;
- const handleConnect = useCallback(async () => {
+ const startOAuth = useCallback(async () => {
setIsConnecting(true);
try {
const result = await window.electronAPI?.gcalStartOAuth?.();
@@ -41,6 +45,21 @@ export default function IntegrationsView() {
}
}, [setGcalAccounts]);
+ const handleConnect = useCallback(async () => {
+ if (screenRecording.isMacOS && !screenRecording.granted) {
+ setShowPermissionDialog(true);
+ return;
+ }
+ await startOAuth();
+ }, [screenRecording.isMacOS, screenRecording.granted, startOAuth]);
+
+ const handleGrantAndConnect = useCallback(async () => {
+ const wasGranted = await screenRecording.request();
+ if (wasGranted) {
+ await startOAuth();
+ }
+ }, [screenRecording, startOAuth]);
+
const handleDisconnect = useCallback(
async (email: string) => {
if (!window.confirm(t("integrations.googleCalendar.disconnectConfirm", { email }))) return;
@@ -160,6 +179,15 @@ export default function IntegrationsView() {
</SettingsPanelRow>
)}
</SettingsPanel>
+
+ <ConfirmDialog
+ open={showPermissionDialog}
+ onOpenChange={setShowPermissionDialog}
+ title={t("integrations.googleCalendar.screenRecordingRequired")}
+ description={t("integrations.googleCalendar.screenRecordingDescription")}
+ confirmText={t("integrations.googleCalendar.grantPermission")}
+ onConfirm={handleGrantAndConnect}
+ />
</div>
);
}
diff --git a/src/components/UpcomingMeetings.tsx b/src/components/UpcomingMeetings.tsx
index cf8d85e0c..6b6d5dd8f 100644
--- a/src/components/UpcomingMeetings.tsx
+++ b/src/components/UpcomingMeetings.tsx
@@ -1,10 +1,11 @@
import { useState, useMemo } from "react";
import { useTranslation } from "react-i18next";
-import { Calendar, Loader2, Video } from "lucide-react";
+import { Calendar, Loader2, Monitor, Video } from "lucide-react";
import { Button } from "./ui/button";
import { cn } from "./lib/utils";
import type { CalendarEvent } from "../types/calendar";
import { formatUpcomingDateGroup } from "../utils/dateFormatting";
+import { useScreenRecordingPermission } from "../hooks/useScreenRecordingPermission";
interface UpcomingMeetingsProps {
events: CalendarEvent[];
@@ -37,6 +38,7 @@ const openJoinUrl = (url: string) => {
export default function UpcomingMeetings({ events, isLoading }: UpcomingMeetingsProps) {
const { t, i18n } = useTranslation();
const [hoveredEventId, setHoveredEventId] = useState<string | null>(null);
+ const screenRecording = useScreenRecordingPermission();
const now = useMemo(() => new Date(), []);
@@ -100,10 +102,29 @@ export default function UpcomingMeetings({ events, isLoading }: UpcomingMeetings
{/* Empty state */}
{!isLoading && events.length === 0 && (
<div className="flex flex-col items-center justify-center py-8 px-3">
- <Calendar size={24} className="text-muted-foreground/30 mb-2.5" />
- <p className="text-xs text-muted-foreground/60 text-center">
- {t("upcoming.noMoreMeetings")}
- </p>
+ {screenRecording.isMacOS && !screenRecording.granted ? (
+ <>
+ <Monitor size={24} className="text-muted-foreground/30 mb-2.5" />
+ <p className="text-xs text-muted-foreground/60 text-center mb-3">
+ {t("upcoming.screenRecordingRequired")}
+ </p>
+ <Button
+ size="sm"
+ variant="outline"
+ onClick={screenRecording.request}
+ className="text-xs h-7"
+ >
+ {t("upcoming.enablePermission")}
+ </Button>
+ </>
+ ) : (
+ <>
+ <Calendar size={24} className="text-muted-foreground/30 mb-2.5" />
+ <p className="text-xs text-muted-foreground/60 text-center">
+ {t("upcoming.noMoreMeetings")}
+ </p>
+ </>
+ )}
</div>
)}
diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.js
index b75a67ca3..f19fc5fc5 100644
--- a/src/helpers/ipcHandlers.js
+++ b/src/helpers/ipcHandlers.js
@@ -1899,6 +1899,15 @@ class IPCHandlers {
return { granted };
});
+ ipcMain.handle("check-screen-recording-access", () => {
+ if (process.platform !== "darwin") {
+ return { granted: true };
+ }
+ const { systemPreferences } = require("electron");
+ const status = systemPreferences.getMediaAccessStatus("screen");
+ return { granted: status === "granted" };
+ });
+
// Auth: clear all session cookies for sign-out.
// This clears every cookie in the renderer session rather than targeting
// individual auth cookies, which is acceptable because the app only sets
diff --git a/src/hooks/useScreenRecordingPermission.ts b/src/hooks/useScreenRecordingPermission.ts
new file mode 100644
index 000000000..b566f37f1
--- /dev/null
+++ b/src/hooks/useScreenRecordingPermission.ts
@@ -0,0 +1,28 @@
+import { useState, useCallback, useEffect } from "react";
+import { getCachedPlatform } from "../utils/platform";
+
+export function useScreenRecordingPermission() {
+ const isMacOS = getCachedPlatform() === "darwin";
+ const [granted, setGranted] = useState(!isMacOS);
+
+ useEffect(() => {
+ if (!isMacOS) return;
+ window.electronAPI?.checkScreenRecordingAccess?.().then((result) => {
+ setGranted(result?.granted ?? false);
+ });
+ }, [isMacOS]);
+
+ const request = useCallback(async (): Promise<boolean> => {
+ if (!isMacOS) return true;
+ try {
+ const stream = await navigator.mediaDevices.getDisplayMedia({ audio: true, video: true });
+ stream.getTracks().forEach((t) => t.stop());
+ setGranted(true);
+ return true;
+ } catch {
+ return false;
+ }
+ }, [isMacOS]);
+
+ return { granted, request, isMacOS };
+}
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index 55abfb791..fe3f12236 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -548,7 +548,9 @@
"noMoreMeetings": "No more meetings today",
"now": "Now",
"join": "Join",
- "untitledEvent": "Untitled event"
+ "untitledEvent": "Untitled event",
+ "screenRecordingRequired": "Enable Screen & Audio Recording to use meeting transcription.",
+ "enablePermission": "Enable Permission"
},
"cleanupPrompt": "Cleanup",
"developerSection": {
@@ -1731,7 +1733,10 @@
"addAnother": "Add another calendar",
"disconnect": "Disconnect",
"disconnectConfirm": "Disconnect {{email}}?",
- "disconnectDescription": "Meeting notes will no longer be recorded from this calendar."
+ "disconnectDescription": "Meeting notes will no longer be recorded from this calendar.",
+ "screenRecordingRequired": "Screen & Audio Recording Required",
+ "screenRecordingDescription": "Meeting transcription requires the Screen & Audio Recording permission to capture meeting audio. Grant the permission to continue.",
+ "grantPermission": "Grant Permission"
},
"plan": {
"title": "Your Plan",
@@ -1752,7 +1757,9 @@
"noMoreMeetings": "No more meetings today",
"now": "Now",
"join": "Join",
- "untitledEvent": "Untitled Event"
+ "untitledEvent": "Untitled Event",
+ "screenRecordingRequired": "Enable Screen & Audio Recording to use meeting transcription.",
+ "enablePermission": "Enable Permission"
},
"notesView": {
"searchPlaceholder": "Search notes…",
diff --git a/src/types/electron.ts b/src/types/electron.ts
index 5578448a4..52cc9eae7 100644
--- a/src/types/electron.ts
+++ b/src/types/electron.ts
@@ -702,6 +702,7 @@ declare global {
// System settings helpers
requestMicrophoneAccess?: () => Promise<{ granted: boolean }>;
+ checkScreenRecordingAccess?: () => Promise<{ granted: boolean }>;
openMicrophoneSettings?: () => Promise<{ success: boolean; error?: string }>;
openSoundInputSettings?: () => Promise<{ success: boolean; error?: string }>;
openAccessibilitySettings?: () => Promise<{ success: boolean; error?: string }>;