Skip to content

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

feat: enable hover-reveal dismiss circle on notification overlays

Gabriel Stein85a883a0a692
diff --git a/preload.js b/preload.js
index 5f0379f20..f2b824391 100644
--- a/preload.js
+++ b/preload.js
@@ -295,6 +295,8 @@ contextBridge.exposeInMainWorld("electronAPI", {
stopWindowDrag: () => ipcRenderer.invoke("stop-window-drag"),
setMainWindowInteractivity: (interactive) =>
ipcRenderer.invoke("set-main-window-interactivity", interactive),
+ setNotificationInteractivity: (interactive) =>
+ ipcRenderer.invoke("set-notification-interactivity", interactive),
resizeMainWindow: (sizeKey) => ipcRenderer.invoke("resize-main-window", sizeKey),
// Update functions
@@ -592,7 +594,10 @@ contextBridge.exposeInMainWorld("electronAPI", {
return () => ipcRenderer.removeListener("dictation-key-active", listener);
},
onWindowsPushToTalkUnavailable: registerListener("windows-ptt-unavailable"),
- onLinuxPttPermissionDenied: registerListener("linux-ptt-permission-denied", (callback) => () => callback()),
+ onLinuxPttPermissionDenied: registerListener(
+ "linux-ptt-permission-denied",
+ (callback) => () => callback()
+ ),
// Settings shortcut (Cmd+, / Ctrl+,)
onShowSettings: registerListener("show-settings", (callback) => () => callback()),
diff --git a/src/components/MeetingNotificationOverlay.tsx b/src/components/MeetingNotificationOverlay.tsx
index 7557d313e..170d5ba1c 100644
--- a/src/components/MeetingNotificationOverlay.tsx
+++ b/src/components/MeetingNotificationOverlay.tsx
@@ -13,6 +13,7 @@ interface NotificationData {
export default function MeetingNotificationOverlay() {
const [data, setData] = useState<NotificationData | null>(null);
const [isVisible, setIsVisible] = useState(false);
+ const [isHovered, setIsHovered] = useState(false);
useEffect(() => {
let shown = false;
@@ -48,8 +49,18 @@ export default function MeetingNotificationOverlay() {
[data]
);
+ const handleMouseEnter = useCallback(() => {
+ setIsHovered(true);
+ window.electronAPI?.setNotificationInteractivity?.(true);
+ }, []);
+
+ const handleMouseLeave = useCallback(() => {
+ setIsHovered(false);
+ window.electronAPI?.setNotificationInteractivity?.(false);
+ }, []);
+
return (
- <div className="meeting-notification-window w-full h-full bg-transparent p-2">
+ <div className="meeting-notification-window w-full h-full bg-transparent p-3">
<div
className={[
"relative",
@@ -61,12 +72,21 @@ export default function MeetingNotificationOverlay() {
? "translate-x-0 opacity-100 scale-100"
: "translate-x-[120%] opacity-0 scale-95",
].join(" ")}
+ onMouseEnter={handleMouseEnter}
+ onMouseLeave={handleMouseLeave}
>
<button
onClick={() => respond("dismiss")}
- className="absolute left-1 top-1 z-10 size-5 rounded-full flex items-center justify-center bg-black/8 dark:bg-white/10 text-muted-foreground/60 hover:text-foreground hover:bg-black/15 dark:hover:bg-white/20 transition-colors duration-150"
+ className={[
+ "absolute -left-2.5 -top-2.5 z-10 size-6 rounded-full",
+ "flex items-center justify-center",
+ "bg-card dark:bg-surface-2 border border-border/40 dark:border-border-subtle/40 shadow-sm",
+ "text-muted-foreground/70 hover:text-foreground hover:bg-muted",
+ "transition-all duration-150",
+ isHovered ? "opacity-100 scale-100" : "opacity-0 scale-75 pointer-events-none",
+ ].join(" ")}
>
- <X className="size-2.5" />
+ <X className="size-3" />
</button>
<div className="flex items-center gap-2.5">
diff --git a/src/components/UpdateNotificationOverlay.tsx b/src/components/UpdateNotificationOverlay.tsx
index c69449c00..8e85b238d 100644
--- a/src/components/UpdateNotificationOverlay.tsx
+++ b/src/components/UpdateNotificationOverlay.tsx
@@ -11,6 +11,7 @@ export default function UpdateNotificationOverlay() {
const { t } = useTranslation();
const [data, setData] = useState<UpdateNotificationData | null>(null);
const [isVisible, setIsVisible] = useState(false);
+ const [isHovered, setIsHovered] = useState(false);
useEffect(() => {
let shown = false;
@@ -48,8 +49,18 @@ export default function UpdateNotificationOverlay() {
[data]
);
+ const handleMouseEnter = useCallback(() => {
+ setIsHovered(true);
+ window.electronAPI?.setNotificationInteractivity?.(true);
+ }, []);
+
+ const handleMouseLeave = useCallback(() => {
+ setIsHovered(false);
+ window.electronAPI?.setNotificationInteractivity?.(false);
+ }, []);
+
return (
- <div className="meeting-notification-window w-full h-full bg-transparent p-2">
+ <div className="meeting-notification-window w-full h-full bg-transparent p-3">
<div
className={[
"relative",
@@ -61,12 +72,21 @@ export default function UpdateNotificationOverlay() {
? "translate-x-0 opacity-100 scale-100"
: "translate-x-[120%] opacity-0 scale-95",
].join(" ")}
+ onMouseEnter={handleMouseEnter}
+ onMouseLeave={handleMouseLeave}
>
<button
onClick={() => respond("dismiss")}
- className="absolute left-1 top-1 z-10 size-5 rounded-full flex items-center justify-center bg-black/8 dark:bg-white/10 text-muted-foreground/60 hover:text-foreground hover:bg-black/15 dark:hover:bg-white/20 transition-colors duration-150"
+ className={[
+ "absolute -left-2.5 -top-2.5 z-10 size-6 rounded-full",
+ "flex items-center justify-center",
+ "bg-card dark:bg-surface-2 border border-border/40 dark:border-border-subtle/40 shadow-sm",
+ "text-muted-foreground/70 hover:text-foreground hover:bg-muted",
+ "transition-all duration-150",
+ isHovered ? "opacity-100 scale-100" : "opacity-0 scale-75 pointer-events-none",
+ ].join(" ")}
>
- <X className="size-2.5" />
+ <X className="size-3" />
</button>
<div className="flex items-center gap-2.5">
diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.js
index 01596afb9..7a64b2f81 100644
--- a/src/helpers/ipcHandlers.js
+++ b/src/helpers/ipcHandlers.js
@@ -445,6 +445,11 @@ class IPCHandlers {
return { success: true };
});
+ ipcMain.handle("set-notification-interactivity", (event, interactive) => {
+ this.windowManager.setNotificationInteractivity(Boolean(interactive));
+ return { success: true };
+ });
+
ipcMain.handle("resize-main-window", (event, sizeKey) => {
return this.windowManager.resizeMainWindow(sizeKey);
});
@@ -988,14 +993,17 @@ class IPCHandlers {
const title = note.title || "Untitled";
const noteDate = new Date(note.created_at);
- const dateStr = noteDate.toLocaleDateString(undefined, {
- year: "numeric",
- month: "long",
- day: "numeric",
- }) + " " + noteDate.toLocaleTimeString(undefined, {
- hour: "2-digit",
- minute: "2-digit",
- });
+ const dateStr =
+ noteDate.toLocaleDateString(undefined, {
+ year: "numeric",
+ month: "long",
+ day: "numeric",
+ }) +
+ " " +
+ noteDate.toLocaleTimeString(undefined, {
+ hour: "2-digit",
+ minute: "2-digit",
+ });
let participants = [];
try {
const parsed = JSON.parse(note.participants || "[]");
@@ -1085,21 +1093,25 @@ class IPCHandlers {
const speakersSet = new Set();
for (const seg of merged) speakersSet.add(resolveSpeaker(seg));
const lastSeg = merged[merged.length - 1];
- exportContent = JSON.stringify({
- metadata: {
- title,
- date: dateStr,
- duration_seconds: lastSeg ? Math.round(lastSeg.timestamp) : 0,
- speaker_count: speakersSet.size,
- segment_count: merged.length,
+ exportContent = JSON.stringify(
+ {
+ metadata: {
+ title,
+ date: dateStr,
+ duration_seconds: lastSeg ? Math.round(lastSeg.timestamp) : 0,
+ speaker_count: speakersSet.size,
+ segment_count: merged.length,
+ },
+ speakers: [...speakersSet],
+ segments: merged.map((seg) => ({
+ speaker: resolveSpeaker(seg),
+ timestamp: seg.timestamp,
+ text: seg.text,
+ })),
},
- speakers: [...speakersSet],
- segments: merged.map((seg) => ({
- speaker: resolveSpeaker(seg),
- timestamp: seg.timestamp,
- text: seg.text,
- })),
- }, null, 2);
+ null,
+ 2
+ );
}
fs.writeFileSync(result.filePath, exportContent, "utf-8");
diff --git a/src/helpers/windowConfig.js b/src/helpers/windowConfig.js
index fdf6c2db9..4f278cb09 100644
--- a/src/helpers/windowConfig.js
+++ b/src/helpers/windowConfig.js
@@ -100,8 +100,8 @@ const CONTROL_PANEL_CONFIG = {
};
const NOTIFICATION_WINDOW_CONFIG = {
- width: 380,
- height: 88,
+ width: 392,
+ height: 92,
frame: false,
transparent: true,
alwaysOnTop: true,
diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.js
index 3d8abe8d2..0f21838f7 100644
--- a/src/helpers/windowManager.js
+++ b/src/helpers/windowManager.js
@@ -118,6 +118,17 @@ class WindowManager {
}
}
+ setNotificationInteractivity(interactive) {
+ if (!this.notificationWindow || this.notificationWindow.isDestroyed()) {
+ return;
+ }
+ if (interactive) {
+ this.notificationWindow.setIgnoreMouseEvents(false);
+ } else {
+ this.notificationWindow.setIgnoreMouseEvents(true, { forward: true });
+ }
+ }
+
resizeMainWindow(sizeKey) {
if (!this.mainWindow || this.mainWindow.isDestroyed()) {
return { success: false, message: "Window not available" };
@@ -1110,6 +1121,10 @@ class WindowManager {
...position,
});
+ if (process.platform === "darwin") {
+ this.notificationWindow.setIgnoreMouseEvents(true, { forward: true });
+ }
+
WindowPositionUtil.setupAlwaysOnTop(this.notificationWindow);
this._pendingNotificationData = promptData;
diff --git a/src/types/electron.ts b/src/types/electron.ts
index 535f3e0f0..7b4c28f20 100644
--- a/src/types/electron.ts
+++ b/src/types/electron.ts
@@ -724,6 +724,7 @@ declare global {
startWindowDrag: () => Promise<void>;
stopWindowDrag: () => Promise<void>;
setMainWindowInteractivity: (interactive: boolean) => Promise<void>;
+ setNotificationInteractivity: (interactive: boolean) => Promise<void>;
// App management
appQuit: () => Promise<void>;