Skip to content

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

chore(meetings): remove the auto-end restart card pipeline (#2197)

Gabriel Steinf0b6adce6759
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7c3eb4baa..01020fa03 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -115,6 +115,7 @@ The desktop app gets a new look: an inset content container with a top bar and
### Meetings
+- **No more post-meeting card.** When a meeting recording stops on its own, the 30-second **Restart recording** card and its fallback toasts no longer appear. The recording still stops and the transcript is saved, and the note offers **Generate AI Summary** as before. The card's main-process, overlay, preload and translation code has been removed with it. (#2192, #2197)
- **Recording works again after a reload.** A renderer reload mid-recording left the main process holding the session, so every later start failed with "Operation in progress" until the app restarted. The session now stops when its window navigates away, and a restart from the same window retires the stale session first.
- **Smoother notification swipe.** The meeting notification card follows your pointer, fades as it goes, and leaves through the edge you dragged it toward. The window no longer shows scrollbars mid-animation, and on macOS it now sits above every other window, including OpenWhispr's own floating panels.
- **Meeting recordings that went silent partway through on macOS.** The macOS audio tap is built once against the devices present when recording starts and never follows the machine afterwards, so a route change — headphones connecting, a device going away — could stop capture while the helper process stayed alive. Nothing noticed: no exit, no error, and silence from a dead tap is indistinguishable from a quiet call, so the rest of the meeting was lost. A watchdog now restarts the helper when no audio arrives for 6 seconds or the pinned device reports that it changed, up to three attempts, and tells you either way. A genuinely quiet call only warns, since restarting a working capture would cost real audio. (#2040, thanks @alekc)
diff --git a/preload.js b/preload.js
index a273b14bc..86640d5e9 100644
--- a/preload.js
+++ b/preload.js
@@ -1328,14 +1328,6 @@ contextBridge.exposeInMainWorld("electronAPI", {
"meeting-auto-end-requested",
(callback) => (_event, data) => callback(data)
),
- meetingAutoEndCompleted: (sessionId) =>
- ipcRenderer.invoke("meeting-auto-end-completed", sessionId),
- meetingAutoEndRespond: (sessionId, action) =>
- ipcRenderer.invoke("meeting-auto-end-respond", sessionId, action),
- onMeetingAutoEndRestartRequested: registerListener(
- "meeting-auto-end-restart-requested",
- (callback) => (_event, data) => callback(data)
- ),
getMeetingNotificationData: () => ipcRenderer.invoke("get-meeting-notification-data"),
meetingNotificationReady: () => ipcRenderer.invoke("meeting-notification-ready"),
meetingNotificationRespond: (detectionId, action) =>
diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsx
index c94ecda35..74ca937af 100644
--- a/src/components/ControlPanel.tsx
+++ b/src/components/ControlPanel.tsx
@@ -418,15 +418,9 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
if (data.folderId) {
setActiveFolderId(data.folderId);
initializeNotes(null, 50, data.folderId);
- } else if (data.generateSummary) {
- // The editor mounts only for a loaded note, and one that sits outside any
- // folder belongs to no container this panel has fetched. Without this the
- // summary request would arm and never reach an editor.
- initializeNotes(null, 50, null);
}
setActiveNoteId(data.noteId);
setActiveView("personal-notes");
- if (data.generateSummary) setSummaryRequest({ noteId: data.noteId });
};
drain();
const cleanup = window.electronAPI?.onNoteNavigationPending?.(drain);
@@ -466,22 +460,6 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
[]
);
- // Set by the auto-end card's summary action, which routes through the note
- // navigation queue so the panel is surfaced and the note opened first.
- const [summaryRequest, setSummaryRequest] = useState<{ noteId: number } | null>(null);
- const handleSummaryRequestHandled = useCallback(() => setSummaryRequest(null), []);
- // A request the editor never consumed must not stay armed: once the user is
- // looking at another note, or has left Notes altogether, generating a summary
- // for the auto-ended one would be a surprise they no longer asked for.
- // Cancelling needs an already-armed request, so the drain's own updates
- // (note, view and request together) never trip it.
- useEffect(() => {
- if (!summaryRequest) return;
- if (activeNoteId !== summaryRequest.noteId || activeView !== "personal-notes") {
- setSummaryRequest(null);
- }
- }, [activeNoteId, activeView, summaryRequest]);
-
// The side-panel layout is shared by meeting mode and by a note opened in a
// narrow window, so leaving it means different things in each case.
const handleExitSidePanel = useCallback(() => {
@@ -1223,8 +1201,6 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
}}
meetingRecordingRequest={meetingRecordingRequest}
onMeetingRecordingRequestHandled={handleMeetingRecordingRequestHandled}
- summaryRequest={summaryRequest}
- onSummaryRequestHandled={handleSummaryRequestHandled}
invitationEntry={invitationNotesEntry}
onInvitationEntryHandled={() => setInvitationNotesEntry(null)}
topBarActions={topBarActions}
diff --git a/src/components/MeetingNotificationCard.tsx b/src/components/MeetingNotificationCard.tsx
index 5395585f0..778715097 100644
--- a/src/components/MeetingNotificationCard.tsx
+++ b/src/components/MeetingNotificationCard.tsx
@@ -7,13 +7,9 @@ interface MeetingNotificationCardProps {
body: string;
startLabel: string;
onStart?: () => void;
- /** Optional second action, stacked under the primary one. Omitted by the detection card. */
- secondaryLabel?: string;
- onSecondary?: () => void;
onDismiss?: () => void;
/** Controls the close button's hover fade. Ignored when `onDismiss` is absent. */
closeVisible?: boolean;
- allowTitleWrap?: boolean;
className?: string;
onMouseEnter?: () => void;
onMouseLeave?: () => void;
@@ -30,11 +26,8 @@ export function MeetingNotificationCard({
body,
startLabel,
onStart,
- secondaryLabel,
- onSecondary,
onDismiss,
closeVisible = true,
- allowTitleWrap = false,
className = "",
onMouseEnter,
onMouseLeave,
@@ -79,12 +72,7 @@ export function MeetingNotificationCard({
</div>
<div className="flex-1 min-w-0">
- <p
- className={[
- "text-[12px] font-semibold text-foreground leading-tight",
- allowTitleWrap ? "whitespace-normal break-words" : "truncate",
- ].join(" ")}
- >
+ <p className="truncate text-[12px] font-semibold text-foreground leading-tight">
{title}
</p>
<p className="text-[11px] text-muted-foreground leading-tight mt-0.5 break-words">
@@ -92,29 +80,15 @@ export function MeetingNotificationCard({
</p>
</div>
- <div className="flex shrink-0 flex-col gap-1">
- <button
- onClick={onStart}
- className={cn(
- BRAND_GLASS_SURFACE,
- "whitespace-nowrap rounded-full px-2.5 py-1 text-[11px] font-medium transition-[filter] hover:brightness-110 active:brightness-95"
- )}
- >
- {startLabel}
- </button>
- {secondaryLabel && (
- <button
- onClick={onSecondary}
- className={cn(
- "whitespace-nowrap rounded-full px-2.5 py-1 text-[11px] font-medium",
- "border border-border/70 bg-card/70 text-foreground/80 dark:border-border-subtle/60 dark:bg-surface-3/70",
- "transition-colors duration-150 hover:bg-muted hover:text-foreground"
- )}
- >
- {secondaryLabel}
- </button>
+ <button
+ onClick={onStart}
+ className={cn(
+ BRAND_GLASS_SURFACE,
+ "shrink-0 whitespace-nowrap rounded-full px-2.5 py-1 text-[11px] font-medium transition-[filter] hover:brightness-110 active:brightness-95"
)}
- </div>
+ >
+ {startLabel}
+ </button>
</div>
</div>
);
diff --git a/src/components/MeetingNotificationOverlay.tsx b/src/components/MeetingNotificationOverlay.tsx
index 53de64fea..e8350a167 100644
--- a/src/components/MeetingNotificationOverlay.tsx
+++ b/src/components/MeetingNotificationOverlay.tsx
@@ -8,14 +8,12 @@ import {
type ReactElement,
} from "react";
import { useTranslation } from "react-i18next";
-import type { MeetingAutoEndAction, MeetingNotificationData } from "../types/electron";
+import type { MeetingNotificationData } from "../types/electron";
import { MeetingNotificationCard } from "./MeetingNotificationCard";
import {
getMeetingNotificationPresentation,
initializeMeetingNotificationOverlay,
shouldDismissMeetingNotificationSwipe,
- shouldRestoreAutoEndCard,
- subscribeMeetingAutoEndCountdown,
} from "./meetingNotificationModel";
interface PointerSwipe {
@@ -32,7 +30,6 @@ export default function MeetingNotificationOverlay(): ReactElement {
const [data, setData] = useState<MeetingNotificationData | null>(null);
const [isVisible, setIsVisible] = useState(false);
const [isHovered, setIsHovered] = useState(false);
- const [secondsRemaining, setSecondsRemaining] = useState(0);
// Live pointer offset while swiping; null when the card is at rest.
const [dragX, setDragX] = useState<number | null>(null);
// Which edge the card leaves through: +1 right (also the enter side), -1 left.
@@ -52,16 +49,11 @@ export default function MeetingNotificationOverlay(): ReactElement {
});
}, []);
- useEffect(() => {
- if (data?.kind !== "auto-end") return;
- return subscribeMeetingAutoEndCountdown(data.expiresAt, setSecondsRemaining);
- }, [data]);
-
- const presentation = getMeetingNotificationPresentation(data, secondsRemaining);
+ const presentation = getMeetingNotificationPresentation(data);
const respond = useCallback(
async (action: string): Promise<void> => {
- if (data?.kind !== "detection") return;
+ if (!data) return;
setIsVisible(false);
await new Promise<void>((resolve) => setTimeout(resolve, 200));
window.electronAPI?.meetingNotificationRespond?.(data.detectionId, action);
@@ -69,28 +61,9 @@ export default function MeetingNotificationOverlay(): ReactElement {
[data]
);
- const respondToAutoEnd = useCallback(
- async (action: MeetingAutoEndAction): Promise<void> => {
- if (data?.kind !== "auto-end") return;
- setIsVisible(false);
- // Main closes this window when it accepts the response. Anything else —
- // a rejection, a throw, a preload without the method — leaves it open, so
- // put the card back instead of stranding an invisible, unclickable
- // always-on-top overlay.
- try {
- const result = await window.electronAPI?.meetingAutoEndRespond?.(data.sessionId, action);
- if (shouldRestoreAutoEndCard(result)) setIsVisible(true);
- } catch {
- setIsVisible(true);
- }
- },
- [data]
- );
-
const dismiss = useCallback((): void => {
- if (data?.kind === "auto-end") void respondToAutoEnd("dismiss");
- else void respond("dismiss");
- }, [data, respond, respondToAutoEnd]);
+ void respond("dismiss");
+ }, [respond]);
const handleMouseEnter = useCallback((): void => {
setIsHovered(true);
@@ -166,16 +139,8 @@ export default function MeetingNotificationOverlay(): ReactElement {
[isHovered]
);
- const title = "title" in presentation ? presentation.title : t(presentation.titleKey);
- const body =
- "bodyValues" in presentation
- ? t(presentation.bodyKey, presentation.bodyValues)
- : t(presentation.bodyKey);
- const handleAction =
- presentation.action === "restart"
- ? () => void respondToAutoEnd("restart")
- : () => respond(presentation.action);
- const secondary = presentation.action === "restart" ? presentation.secondary : undefined;
+ const title = presentation.title ?? t(presentation.titleKey);
+ const body = t(presentation.bodyKey);
const isDragging = dragX !== null;
const motionStyle: CSSProperties = isDragging
@@ -210,12 +175,9 @@ export default function MeetingNotificationOverlay(): ReactElement {
title={title}
body={body}
startLabel={t(presentation.actionKey)}
- onStart={handleAction}
- secondaryLabel={secondary ? t(secondary.key) : undefined}
- onSecondary={secondary ? () => void respondToAutoEnd(secondary.action) : undefined}
+ onStart={() => respond(presentation.action)}
onDismiss={presentation.dismissible ? dismiss : undefined}
closeVisible={isHovered}
- allowTitleWrap={presentation.allowTitleWrap}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
/>
diff --git a/src/components/MeetingRecordingMount.tsx b/src/components/MeetingRecordingMount.tsx
index e387ad4cf..2cf7cfa25 100644
--- a/src/components/MeetingRecordingMount.tsx
+++ b/src/components/MeetingRecordingMount.tsx
@@ -47,18 +47,13 @@ export default function MeetingRecordingMount(): null {
useEffect(() => {
const unsubscribeStop = window.electronAPI?.onMeetingAutoEndRequested?.((request) => {
- requestMeetingRecordingAutoEnd(
- request,
- stopRecording,
- () => undefined,
- (error, sessionId) => {
- logger.error(
- "Meeting auto-end stop failed; recording is still running",
- { error: error instanceof Error ? error.message : String(error), sessionId },
- "meeting"
- );
- }
- );
+ requestMeetingRecordingAutoEnd(request, stopRecording, (error, sessionId) => {
+ logger.error(
+ "Meeting auto-end stop failed; recording is still running",
+ { error: error instanceof Error ? error.message : String(error), sessionId },
+ "meeting"
+ );
+ });
});
return () => {
diff --git a/src/components/meetingNotificationModel.ts b/src/components/meetingNotificationModel.ts
index 5a1314748..e3a5678d4 100644
--- a/src/components/meetingNotificationModel.ts
+++ b/src/components/meetingNotificationModel.ts
@@ -1,31 +1,6 @@
-import type { MeetingAutoEndReason, MeetingNotificationData } from "../types/electron";
+import type { MeetingNotificationData } from "../types/electron";
-type AutoEndBodyKey =
- | "meetingNotification.autoEnd.body.micReleased"
- | "meetingNotification.autoEnd.body.silence"
- | "meetingNotification.autoEnd.body.processExit";
-
-const AUTO_END_BODY_KEYS: Record<MeetingAutoEndReason, AutoEndBodyKey> = {
- "mic-released": "meetingNotification.autoEnd.body.micReleased",
- silence: "meetingNotification.autoEnd.body.silence",
- "process-exit": "meetingNotification.autoEnd.body.processExit",
-};
-
-interface AutoEndPresentation {
- titleKey: "meetingNotification.autoEnd.title";
- bodyKey: AutoEndBodyKey;
- bodyValues: { seconds: number };
- actionKey: "meetingNotification.autoEnd.restart";
- action: "restart";
- /** Only present when the auto-ended note has something to summarize. The label
- * and the response travel together, so the card can never show an offer it
- * cannot answer. */
- secondary?: { key: "meetingNotification.autoEnd.summary"; action: "summary" };
- dismissible: true;
- allowTitleWrap: true;
-}
-
-interface DetectionPresentation {
+export interface MeetingNotificationPresentation {
title?: string;
titleKey?: "meetingNotification.title";
bodyKey:
@@ -35,11 +10,8 @@ interface DetectionPresentation {
actionKey: "meetingNotification.start" | "meetingNotification.join";
action: "start" | "join";
dismissible: true;
- allowTitleWrap: false;
}
-export type MeetingNotificationPresentation = AutoEndPresentation | DetectionPresentation;
-
const MEETING_NOTIFICATION_SWIPE_DISTANCE_PX = 80;
export function shouldDismissMeetingNotificationSwipe(
@@ -50,30 +22,8 @@ export function shouldDismissMeetingNotificationSwipe(
}
export function getMeetingNotificationPresentation(
- data: MeetingNotificationData | null,
- secondsRemaining: number
+ data: MeetingNotificationData | null
): MeetingNotificationPresentation {
- if (data?.kind === "auto-end") {
- return {
- titleKey: "meetingNotification.autoEnd.title",
- bodyKey:
- AUTO_END_BODY_KEYS[data.reason ?? "mic-released"] ?? AUTO_END_BODY_KEYS["mic-released"],
- bodyValues: { seconds: secondsRemaining },
- actionKey: "meetingNotification.autoEnd.restart",
- action: "restart",
- ...(data.canSummarize
- ? {
- secondary: {
- key: "meetingNotification.autoEnd.summary" as const,
- action: "summary" as const,
- },
- }
- : {}),
- dismissible: true,
- allowTitleWrap: true,
- };
- }
-
const variant = data?.variant ?? "detected";
const eventTitle = variant !== "detected" ? data?.event?.summary : null;
return {
@@ -82,7 +32,6 @@ export function getMeetingNotificationPresentation(
actionKey: data?.joinUrl ? "meetingNotification.join" : "meetingNotification.start",
action: data?.joinUrl ? "join" : "start",
dismissible: true,
- allowTitleWrap: false,
};
}
@@ -137,40 +86,3 @@ export function initializeMeetingNotificationOverlay({
}
};
}
-
-interface CountdownClock {
- now: () => number;
- setInterval: (callback: () => void, delay: number) => ReturnType<typeof setInterval>;
- clearInterval: (timer: ReturnType<typeof setInterval>) => void;
-}
-
-const defaultCountdownClock: CountdownClock = {
- now: Date.now,
- setInterval: (callback, delay) => setInterval(callback, delay),
- clearInterval: (timer) => clearInterval(timer),
-};
-
-// Main closes the notification window when it accepts a response. Anything
-// else — a rejected response, or a preload without the method — leaves the
-// window alive, so the optimistically hidden card must be restored.
-export function shouldRestoreAutoEndCard(result: { success: boolean } | null | undefined): boolean {
- return result?.success !== true;
-}
-
-export function getMeetingAutoEndSecondsRemaining(expiresAt: number, now: number): number {
- return Math.max(0, Math.ceil((expiresAt - now) / 1000));
-}
-
-export function subscribeMeetingAutoEndCountdown(
- expiresAt: number,
- onSecondsChanged: (seconds: number) => void,
- clock: CountdownClock = defaultCountdownClock
-): () => void {
- const update = (): void => {
- onSecondsChanged(getMeetingAutoEndSecondsRemaining(expiresAt, clock.now()));
- };
-
- update();
- const timer = clock.setInterval(update, 250);
- return () => clock.clearInterval(timer);
-}
diff --git a/src/components/notes/PersonalNotesView.tsx b/src/components/notes/PersonalNotesView.tsx
index 7a8345949..2f07f89a2 100644
--- a/src/components/notes/PersonalNotesView.tsx
+++ b/src/components/notes/PersonalNotesView.tsx
@@ -125,9 +125,6 @@ interface PersonalNotesViewProps {
event: any;
} | null;
onMeetingRecordingRequestHandled?: () => void;
- /** Set by the auto-end card's summary action, routed through note navigation. */
- summaryRequest?: { noteId: number } | null;
- onSummaryRequestHandled?: () => void;
invitationEntry?: { workspaceId: string; teamIds: string[] } | null;
onInvitationEntryHandled?: () => void;
/** The topbar slot the New note button portals into; null while the topbar hides it. */
@@ -140,8 +137,6 @@ export default function PersonalNotesView({
onOpenSettings,
meetingRecordingRequest,
onMeetingRecordingRequestHandled,
- summaryRequest,
- onSummaryRequestHandled,
invitationEntry,
onInvitationEntryHandled,
topBarActions,
@@ -759,27 +754,10 @@ export default function PersonalNotesView({
),
});
};
- const summaryAction = actions.find((a) => a.translation_key === DETAILED_NOTES_KEY);
const generateSummary = () => {
- if (summaryAction) void runNoteAction(summaryAction);
+ const action = actions.find((a) => a.translation_key === DETAILED_NOTES_KEY);
+ if (action) void runNoteAction(action);
};
- // The auto-end card's summary action arrives through note navigation, so it
- // waits for its note to be the one on screen and for the built-in action to
- // have loaded: actions load asynchronously (ActionPicker's initializeActions),
- // and a control panel opened by the card boots from cold.
- const summaryRequestReady =
- !!summaryRequest && !!summaryAction && summaryRequest.noteId === editorNote?.id;
- // Held in a ref, like MeetingRecordingMount does with its notifiers, so the
- // effect fires on readiness alone rather than on every render.
- const generateSummaryRef = useRef(generateSummary);
- useEffect(() => {
- generateSummaryRef.current = generateSummary;
- });
- useEffect(() => {
- if (!summaryRequestReady) return;
- generateSummaryRef.current();
- onSummaryRequestHandled?.();
- }, [summaryRequestReady, onSummaryRequestHandled]);
if (!isOnboardingComplete) {
return (
diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.js
index df5d0e907..cdeaf31fb 100644
--- a/src/helpers/ipcHandlers.js
+++ b/src/helpers/ipcHandlers.js
@@ -100,7 +100,6 @@ const AudioStorageManager = require("./audioStorage");
const LocalModelDownloadStatus = require("./localModelDownloadStatus");
const AgentStreamRequestRegistry = require("./agentStreamRequestRegistry");
const createMeetingTranscriptionLifecycle = require("./meetingTranscriptionLifecycle");
-const { registerMeetingAutoEndLifecycleHandlers } = require("./meetingAutoEndLifecycle");
const liveSpeakerIdentifier = require("./liveSpeakerIdentifier");
const { supportsLiveSpeakerIdentification } = require("./liveSpeakerIdPolicy");
const MeetingEchoLeakDetector = require("./meetingEchoLeakDetector");
@@ -11522,8 +11521,6 @@ class IPCHandlers {
}
});
- registerMeetingAutoEndLifecycleHandlers(ipcMain, () => this.meetingDetectionEngine);
-
ipcMain.handle("join-calendar-meeting", async (_event, eventId) => {
try {
await this.meetingDetectionEngine.joinCalendarMeeting(eventId);
diff --git a/src/helpers/meetingAutoEndController.js b/src/helpers/meetingAutoEndController.js
index 6db2012f8..7f27b83d1 100644
--- a/src/helpers/meetingAutoEndController.js
+++ b/src/helpers/meetingAutoEndController.js
@@ -68,16 +68,6 @@ const createMeetingAutoEndController = ({ now = Date.now, onStop }) => {
if (!session || !session.eligible || session.stopped) return;
const nowMs = now();
- // A session the user explicitly restarted carries a grace period: they have
- // just told us the meeting is still live, so hold every stop path and keep
- // the quiet clocks reset, so the grace expiring cannot stop instantly.
- if (nowMs < session.suppressUntil) {
- session.quietSince = nowMs;
- session.fastArmAt = null;
- session.ownershipQuietSince = null;
- return;
- }
-
if (session.mode === "ownership") {
// Any contradicting evidence — the mic coming back, or remote audio
// resuming — restarts the window rather than merely deferring the stop.
@@ -106,7 +96,6 @@ const createMeetingAutoEndController = ({ now = Date.now, onStop }) => {
externalMicActive,
micActive = false,
systemActive = false,
- suppressUntil = 0,
}) => {
const nowMs = now();
lastSeenAt = nowMs;
@@ -122,7 +111,6 @@ const createMeetingAutoEndController = ({ now = Date.now, onStop }) => {
quietSince: nowMs,
fastArmAt: null,
ownershipQuietSince: null,
- suppressUntil,
stopped: false,
};
evaluate();
diff --git a/src/helpers/meetingAutoEndLifecycle.js b/src/helpers/meetingAutoEndLifecycle.js
deleted file mode 100644
index a825c80fa..000000000
--- a/src/helpers/meetingAutoEndLifecycle.js
+++ /dev/null
@@ -1,65 +0,0 @@
-const isValidSessionId = (sessionId) =>
- typeof sessionId === "string" && sessionId.trim().length > 0;
-
-const MEETING_AUTO_END_ACTIONS = new Set(["restart", "summary", "dismiss"]);
-
-async function completeMeetingAutoEndSession(engine, sessionId, sender) {
- if (!isValidSessionId(sessionId)) {
- return { success: false, reason: "invalid-session" };
- }
- if ((await engine?.completeAutoEndSession(sessionId, sender)) !== true) {
- return { success: false, reason: "stale-session" };
- }
- return { success: true };
-}
-
-function respondToMeetingAutoEndNotification(engine, sessionId, action, sender) {
- if (!isValidSessionId(sessionId)) {
- return { success: false, reason: "invalid-session" };
- }
- if (!MEETING_AUTO_END_ACTIONS.has(action)) {
- return { success: false, reason: "invalid-action" };
- }
- if (engine?.respondToAutoEndNotification(sessionId, action, sender) !== true) {
- return { success: false, reason: "stale-session" };
- }
- return { success: true };
-}
-
-function getErrorMessage(error) {
- return error instanceof Error ? error.message : String(error);
-}
-
-function registerMeetingAutoEndLifecycleHandlers(ipcMain, getMeetingDetectionEngine) {
- ipcMain.handle("meeting-auto-end-completed", async (event, sessionId) => {
- try {
- return await completeMeetingAutoEndSession(
- getMeetingDetectionEngine(),
- sessionId,
- event.sender
- );
- } catch (error) {
- return { success: false, error: getErrorMessage(error) };
- }
- });
-
- ipcMain.handle("meeting-auto-end-respond", async (event, sessionId, action) => {
- try {
- return respondToMeetingAutoEndNotification(
- getMeetingDetectionEngine(),
- sessionId,
- action,
- event.sender
- );
- } catch (error) {
- return { success: false, error: getErrorMessage(error) };
- }
- });
-}
-
-module.exports = {
- MEETING_AUTO_END_ACTIONS,
- completeMeetingAutoEndSession,
- respondToMeetingAutoEndNotification,
- registerMeetingAutoEndLifecycleHandlers,
-};
diff --git a/src/helpers/meetingDetectionEngine.js b/src/helpers/meetingDetectionEngine.js
index 77cd4a8b5..02e173383 100644
--- a/src/helpers/meetingDetectionEngine.js
+++ b/src/helpers/meetingDetectionEngine.js
@@ -2,22 +2,11 @@ const debugLogger = require("./debugLogger");
const { openExternalUrl } = require("./externalUrlOpener");
const { getMeetingJoinUrl } = require("./meetingJoinUrl");
const createMeetingAutoEndController = require("./meetingAutoEndController");
-const { MEETING_AUTO_END_ACTIONS } = require("./meetingAutoEndLifecycle");
const { createMeetingAudioActivityMonitor } = require("./meetingAudioActivityMonitor");
const { broadcastToWindows } = require("./windowBroadcast");
const IMMINENT_THRESHOLD_MS = 5 * 60 * 1000;
const AUTO_END_TICK_MS = 1000;
-const AUTO_END_RESTART_WINDOW_MS = 30_000;
-// Clicking Restart is the user saying the meeting is still live. Honour that for
-// a while, or the same silence that just ended the recording ends it again a
-// minute later and they have to keep clicking.
-const AUTO_END_RESTART_GRACE_MS = 5 * 60_000;
-// The grace belongs to the recording the user restarted, which starts within a
-// second or two. Main cannot see a restart the renderer drops (its context died
-// with a reload, or a manual recording won the race), so an unclaimed grace has
-// to lapse rather than wait to be taken by whatever recording starts next.
-const AUTO_END_RESTART_CLAIM_MS = 30_000;
const PLACEHOLDER_PREFIX = { __detected__: "detected", __manual__: "manual" };
@@ -65,8 +54,6 @@ class MeetingDetectionEngine {
this._notificationQueue = [];
this._postRecordingCooldown = null;
this._recordingSession = null;
- this._pendingAutoEnd = null;
- this._autoEndRestartGrace = null;
this._now = now;
this._setInterval = setInterval;
this._clearInterval = clearInterval;
@@ -151,19 +138,9 @@ class MeetingDetectionEngine {
);
const ownerWebContents = session.ownerWebContents;
if (!ownerWebContents || ownerWebContents.isDestroyed?.()) return;
- this._clearAutoEndRecovery();
- this._pendingAutoEnd = {
- sessionId,
- reason,
- ownerWebContents,
- // Carried so the recovery card can offer this note's AI summary.
- noteId: session.noteId ?? null,
- expiresAt: null,
- };
try {
ownerWebContents.send("meeting-auto-end-requested", { sessionId, reason });
} catch (error) {
- this._pendingAutoEnd = null;
debugLogger.error(
"Failed to request meeting auto-end from recording renderer",
{ error: error?.message, sessionId },
@@ -172,178 +149,6 @@ class MeetingDetectionEngine {
}
}
- // Time-bounded on purpose: the window manager destroys a notification window
- // on paths that cannot notify us (_hideNormalAppSurfaces, a late detection
- // response landing on a replaced card), and this gate holds every meeting
- // prompt. Without the deadline one of those silently kills detection for the
- // rest of the app session.
- _hasLiveAutoEndOffer() {
- const expiresAt = this._pendingAutoEnd?.expiresAt;
- return expiresAt != null && this._now() < expiresAt;
- }
-
- _clearAutoEndRecovery({ dismiss = true } = {}) {
- const pending = this._pendingAutoEnd;
- this._pendingAutoEnd = null;
- if (dismiss && pending?.expiresAt != null) {
- this.windowManager.dismissMeetingAutoEndNotification?.(pending.sessionId);
- }
- }
-
- async completeAutoEndSession(sessionId, ownerWebContents) {
- const pending = this._pendingAutoEnd;
- if (
- !pending ||
- pending.sessionId !== sessionId ||
- pending.ownerWebContents !== ownerWebContents ||
- pending.expiresAt !== null ||
- this._recordingSession !== null ||
- ownerWebContents?.isDestroyed?.()
- ) {
- return false;
- }
-
- const expiresAt = this._now() + AUTO_END_RESTART_WINDOW_MS;
- pending.expiresAt = expiresAt;
- try {
- const shown = await this.windowManager.showMeetingAutoEndNotification?.({
- sessionId,
- reason: pending.reason,
- expiresAt,
- canSummarize: this._canSummarizeNote(pending.noteId),
- });
- if (this._pendingAutoEnd !== pending) return false;
- // Only an explicit success offers the restart: anything else (a missing
- // window manager method, a load aborted by a replacement) means the card
- // the user would click never appeared.
- if (shown !== true) {
- this._clearAutoEndRecovery({ dismiss: false });
- return false;
- }
- debugLogger.info(
- "Meeting recording auto-ended; restart window shown",
- { sessionId, reason: pending.reason, expiresAt },
- "meeting"
- );
- return true;
- } catch (error) {
- if (this._pendingAutoEnd === pending) {
- this._clearAutoEndRecovery({ dismiss: false });
- }
- debugLogger.error(
- "Failed to show meeting auto-end recovery notification",
- { error: error?.message, sessionId },
- "meeting"
- );
- return false;
- }
- }
-
- // The renderer persists the final transcript before it acknowledges the stop,
- // so the database is the authority on whether there is anything to summarize.
- _canSummarizeNote(noteId) {
- if (noteId == null) return false;
- try {
- const note = this.databaseManager?.getNote?.(noteId);
- return !!note?.transcript && !note?.enhanced_content;
- } catch (error) {
- debugLogger.error(
- "Could not check whether the auto-ended note can be summarized",
- { error: error?.message, noteId },
- "meeting"
- );
- return false;
- }
- }
-
- // Routed through the note-navigation queue so the control panel is created,
- // surfaced and pointed at the note before the notes view runs the action.
- async _openNoteForSummary(noteId) {
- if (noteId == null) return;
- try {
- const note = this.databaseManager?.getNote?.(noteId);
- await this.windowManager.queueNoteNavigation?.({
- noteId,
- folderId: note?.folder_id ?? null,
- generateSummary: true,
- });
- } catch (error) {
- debugLogger.error(
- "Failed to open the auto-ended note for its AI summary",
- { error: error?.message, noteId },
- "meeting"
- );
- }
- }
-
- respondToAutoEndNotification(sessionId, action, responderWebContents) {
- if (
- !MEETING_AUTO_END_ACTIONS.has(action) ||
- !this.windowManager.isMeetingNotificationSender?.(responderWebContents)
- ) {
- return false;
- }
-
- const pending = this._pendingAutoEnd;
- if (!pending || pending.sessionId !== sessionId || pending.expiresAt === null) return false;
- if (this._now() >= pending.expiresAt || this._recordingSession !== null) {
- this._clearAutoEndRecovery();
- this._flushNotificationQueue();
- return false;
- }
-
- const ownerWebContents = pending.ownerWebContents;
- this._clearAutoEndRecovery();
- if (action === "dismiss") {
- this._flushNotificationQueue();
- return true;
- }
-
- // Summary ends the offer like a dismissal — the recording is staying
- // stopped — and additionally opens the note to generate its summary.
- if (action === "summary") {
- this._flushNotificationQueue();
- void this._openNoteForSummary(pending.noteId);
- return true;
- }
-
- // A delivered restart deliberately does not flush: the user chose the old
- // meeting, and the recording about to start gates the queue again anyway.
- // One that cannot be delivered starts nothing, so the detections held
- // behind the offer have to go out.
- if (!ownerWebContents || ownerWebContents.isDestroyed?.()) {
- this._flushNotificationQueue();
- return false;
- }
-
- try {
- ownerWebContents.send("meeting-auto-end-restart-requested", { sessionId });
- const nowMs = this._now();
- this._autoEndRestartGrace = {
- suppressUntil: nowMs + AUTO_END_RESTART_GRACE_MS,
- claimUntil: nowMs + AUTO_END_RESTART_CLAIM_MS,
- };
- return true;
- } catch (error) {
- debugLogger.error(
- "Failed to request meeting recording restart",
- { error: error?.message, sessionId },
- "meeting"
- );
- this._flushNotificationQueue();
- return false;
- }
- }
-
- // `flushQueued` is false when a replacement notification is already being
- // shown: flushing there would re-enter showMeetingNotification.
- handleAutoEndNotificationClosed(sessionId, { flushQueued = true } = {}) {
- if (this._pendingAutoEnd?.sessionId !== sessionId) return false;
- this._clearAutoEndRecovery({ dismiss: false });
- if (flushQueued) this._flushNotificationQueue();
- return true;
- }
-
// Hot path — called for every meeting PCM chunk of both channels.
recordMeetingAudioChunk(source, buffer) {
if (!this._autoEndActive) return;
@@ -414,15 +219,11 @@ class MeetingDetectionEngine {
"meeting"
);
this._audioActivityMonitor.reset();
- const grace = this._autoEndRestartGrace;
- this._autoEndRestartGrace = null;
- const suppressUntil = grace && this._now() < grace.claimUntil ? grace.suppressUntil : 0;
this._autoEndController.beginSession({
sessionId,
eligible: true,
reliable: externalMicState.reliable,
externalMicActive: externalMicState.externalMicActive,
- suppressUntil,
...this._audioActivityMonitor.getState(),
});
this._autoEndActive = true;
@@ -436,7 +237,6 @@ class MeetingDetectionEngine {
systemAudioAvailable = false,
noteId = null,
}) {
- this._clearAutoEndRecovery();
if (this._recordingSession) this._deactivateAutoEnd();
this._recordingSession = {
@@ -556,12 +356,7 @@ class MeetingDetectionEngine {
// clears it while the recording is still live; the tracked session is the
// gate that cannot be reset from outside. A prompt shown then could replace
// the recording UI while the tracked recording is still active.
- if (
- this._userRecording ||
- this._postRecordingCooldown ||
- this._recordingSession ||
- this._hasLiveAutoEndOffer()
- ) {
+ if (this._userRecording || this._postRecordingCooldown || this._recordingSession) {
debugLogger.info("Detection queued — user is recording", { detectionId, source }, "meeting");
this._notificationQueue.push({ source, key, data });
this.activeDetections.set(detectionId, { source, key, data });
@@ -624,7 +419,6 @@ class MeetingDetectionEngine {
}
this.windowManager.showMeetingNotification({
- kind: "detection",
detectionId,
source,
key,
@@ -848,12 +642,7 @@ class MeetingDetectionEngine {
if (flushQueued) this._flushNotificationQueue();
}
- handleNotificationTimeout(notification = null) {
- if (notification?.kind === "auto-end") {
- this.handleAutoEndNotificationClosed(notification.sessionId);
- return;
- }
-
+ handleNotificationTimeout() {
// Expiring unanswered is not a decline, so no dismissal cooldown starts:
// the detector's hasPrompted flag already keeps the ongoing call from
// re-prompting, while a call starting right after the timeout still
@@ -882,14 +671,6 @@ class MeetingDetectionEngine {
return;
}
- // The post-recording cooldown fires 2.5s after an auto-end stop, while the
- // restart card still has most of its window left. Showing a prompt here
- // would replace that card and silently void the restart offer.
- if (this._hasLiveAutoEndOffer()) {
- debugLogger.info("Holding queued notifications — restart offer live", {}, "meeting");
- return;
- }
-
debugLogger.info(
"Flushing notification queue",
{ count: this._notificationQueue.length },
@@ -969,8 +750,6 @@ class MeetingDetectionEngine {
stop() {
debugLogger.info("Meeting detection engine stopped", {}, "meeting");
- this._clearAutoEndRecovery();
- this._autoEndRestartGrace = null;
this._deactivateAutoEnd();
this._recordingSession = null;
this.meetingProcessDetector.stop();
@@ -986,6 +765,3 @@ class MeetingDetectionEngine {
}
module.exports = MeetingDetectionEngine;
-module.exports.AUTO_END_RESTART_WINDOW_MS = AUTO_END_RESTART_WINDOW_MS;
-module.exports.AUTO_END_RESTART_GRACE_MS = AUTO_END_RESTART_GRACE_MS;
-module.exports.AUTO_END_RESTART_CLAIM_MS = AUTO_END_RESTART_CLAIM_MS;
diff --git a/src/helpers/meetingRecordingSession.ts b/src/helpers/meetingRecordingSession.ts
index 58c60095a..bd1b861f4 100644
--- a/src/helpers/meetingRecordingSession.ts
+++ b/src/helpers/meetingRecordingSession.ts
@@ -1,5 +1,4 @@
-import type { StartRecordingArgs, TranscriptSegment } from "../stores/meetingRecordingStore";
-import type { MeetingAutoEndRestartRequest, NoteItem } from "../types/electron";
+import type { NoteItem } from "../types/electron";
export function createMeetingRecordingSessionId(
randomUUID: () => string = () => crypto.randomUUID()
@@ -16,130 +15,16 @@ export function canStopMeetingRecordingSession(
export function requestMeetingRecordingAutoEnd(
payload: { sessionId?: unknown } | null | undefined,
- stopRecording: (sessionId: string) => Promise<{ stopped: boolean }> | { stopped: boolean },
- // Always called once the stop settles. `stopped` is false when the recording
- // ended without a persisted result — the caller still has to tell the user,
- // because no restart card will be offered for it.
- onStopSettled: (sessionId: string, stopped: boolean) => Promise<unknown> | unknown,
+ stopRecording: (sessionId: string) => unknown,
onError: (error: unknown, sessionId: string) => void
): boolean {
const sessionId = payload?.sessionId;
if (typeof sessionId !== "string" || sessionId.trim().length === 0) return false;
- void Promise.resolve(stopRecording(sessionId))
- .then((result) => onStopSettled(sessionId, result.stopped))
- .catch((error) => onError(error, sessionId));
+ void Promise.resolve(stopRecording(sessionId)).catch((error) => onError(error, sessionId));
return true;
}
-interface MeetingAutoEndRestartState {
- recordingNoteId: number | null;
- recordingNoteTitle: string | null;
- recordingFolderId: number | null;
- sessionDiarizationEnabled: boolean;
- sessionExpectedCount: number;
- userTouchedStepper: boolean;
- segments: TranscriptSegment[];
-}
-
-export interface MeetingAutoEndRestartContext {
- sessionId: string;
- args: StartRecordingArgs;
-}
-
-export function createMeetingAutoEndRestartContext(
- sessionId: string,
- activeSessionId: string | null,
- state: MeetingAutoEndRestartState
-): MeetingAutoEndRestartContext | null {
- if (activeSessionId !== sessionId) return null;
-
- return {
- sessionId,
- args: {
- noteId: state.recordingNoteId,
- noteTitle: state.recordingNoteTitle,
- folderId: state.recordingFolderId,
- seedSegments: state.segments,
- diarizationEnabled: state.sessionDiarizationEnabled,
- expectedCount: state.sessionExpectedCount,
- expectedCountIsExplicit: state.userTouchedStepper,
- autoEndEligible: true,
- },
- };
-}
-
-type MeetingAutoEndRestartNote = Pick<NoteItem, "transcript" | "deleted_at">;
-
-export type MeetingAutoEndRestartSeed =
- { ok: true; seedSegments: TranscriptSegment[] } | { ok: false; reason: "note-missing" };
-
-// The live segments the renderer holds are the pre-diarization copy: background
-// speaker identification writes its enrichment to the note, never back into the
-// store. Reseeding from the store would overwrite those labels at the next stop,
-// so the note is the source of truth — and reading it is also what catches a
-// note deleted during the restart window, which must not be resurrected.
-export function resolveMeetingAutoEndRestartSeed(
- noteId: number | null,
- note: MeetingAutoEndRestartNote | null | undefined,
- parseSegments: (transcript: string) => TranscriptSegment[],
- liveSegments: TranscriptSegment[]
-): MeetingAutoEndRestartSeed {
- if (noteId == null) return { ok: true, seedSegments: liveSegments };
- if (!note || note.deleted_at) return { ok: false, reason: "note-missing" };
- return { ok: true, seedSegments: note.transcript ? parseSegments(note.transcript) : [] };
-}
-
-export interface MeetingAutoEndRestartDeps {
- getActiveSessionId: () => string | null;
- getLatestSegments: () => TranscriptSegment[];
- getNote: (noteId: number) => Promise<MeetingAutoEndRestartNote | null | undefined>;
- parseSegments: (transcript: string) => TranscriptSegment[];
- startRecording: (args: StartRecordingArgs) => Promise<boolean>;
-}
-
-export type MeetingAutoEndRestartOutcome =
- | { status: "started" }
- | {
- status: "aborted";
- reason: "no-context" | "already-recording" | "note-missing" | "start-refused";
- };
-
-// Every abort is named rather than swallowed: main closes the card and reports
-// success the moment it hands the restart to this renderer, so a drop here is
-// invisible to the user unless the caller tells them.
-export async function runMeetingAutoEndRestart(
- request: MeetingAutoEndRestartRequest,
- context: MeetingAutoEndRestartContext | null,
- deps: MeetingAutoEndRestartDeps
-): Promise<MeetingAutoEndRestartOutcome> {
- if (!context || context.sessionId !== request.sessionId) {
- return { status: "aborted", reason: "no-context" };
- }
- if (deps.getActiveSessionId() !== null) {
- return { status: "aborted", reason: "already-recording" };
- }
-
- const args: StartRecordingArgs = { ...context.args, seedSegments: deps.getLatestSegments() };
- const note = args.noteId == null ? null : await deps.getNote(args.noteId);
- const seed = resolveMeetingAutoEndRestartSeed(
- args.noteId,
- note,
- deps.parseSegments,
- args.seedSegments ?? []
- );
- if (!seed.ok) return { status: "aborted", reason: "note-missing" };
-
- // Re-checked after the note read: a manual recording can win the race across
- // that await, and starting here would adopt the auto-ended note under it.
- if (deps.getActiveSessionId() !== null) {
- return { status: "aborted", reason: "already-recording" };
- }
-
- const started = await deps.startRecording({ ...args, seedSegments: seed.seedSegments });
- return started ? { status: "started" } : { status: "aborted", reason: "start-refused" };
-}
-
export function isMeetingAutoEndEligible(
note: Pick<NoteItem, "note_type"> | null | undefined
): boolean {
diff --git a/src/helpers/windowConfig.js b/src/helpers/windowConfig.js
index b0d6c5892..032e88682 100644
--- a/src/helpers/windowConfig.js
+++ b/src/helpers/windowConfig.js
@@ -285,23 +285,6 @@ const NOTIFICATION_WINDOW_CONFIG = {
type: OVERLAY_WINDOW_TYPES.notification,
};
-const AUTO_END_NOTIFICATION_WINDOW_SIZE = {
- width: 480,
- // Taller than the countdown copy alone needs: the card stacks a second action
- // (the note's AI summary) beside a body that wraps further in some locales.
- height: 144,
-};
-
-function getMeetingNotificationWindowSize(promptData) {
- if (promptData?.kind === "auto-end") {
- return AUTO_END_NOTIFICATION_WINDOW_SIZE;
- }
- return {
- width: NOTIFICATION_WINDOW_CONFIG.width,
- height: NOTIFICATION_WINDOW_CONFIG.height,
- };
-}
-
class WindowPositionUtil {
static getMainWindowPosition(display, customSize = null, position = "bottom-right") {
const { width, height } = customSize || WINDOW_SIZES.BASE;
@@ -342,8 +325,8 @@ class WindowPositionUtil {
};
}
- static getNotificationPosition(display, customSize = null) {
- const { width, height } = customSize || NOTIFICATION_WINDOW_CONFIG;
+ static getNotificationPosition(display) {
+ const { width, height } = NOTIFICATION_WINDOW_CONFIG;
const MARGIN = 16;
const workArea = display.workArea || display.bounds;
// Same negative-origin trap as getMainWindowPosition: clamp to the display,
@@ -404,8 +387,6 @@ module.exports = {
fitDictationErrorContentWindowToWorkArea,
fitDictationErrorWindowToWorkArea,
resolveHorizontalWindowDirection,
- AUTO_END_NOTIFICATION_WINDOW_SIZE,
- getMeetingNotificationWindowSize,
WINDOW_SIZES,
WindowPositionUtil,
resolveOverlayWindowType,
diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.js
index 5d9d1e323..97ee04273 100644
--- a/src/helpers/windowManager.js
+++ b/src/helpers/windowManager.js
@@ -24,7 +24,6 @@ const {
shouldBlockDictationWhilePanelOpen,
} = require("./dictationLifecycle");
const { DEV_SERVER_PORT } = DevServerManager;
-const AUTO_END_NOTIFICATION_LOAD_TIMEOUT_MS = 10_000;
const DRAG_MOVE_TOLERANCE_PX = 2;
const {
MAIN_WINDOW_CONFIG,
@@ -36,7 +35,6 @@ const {
fitDictationErrorContentWindowToWorkArea,
fitDictationErrorWindowToWorkArea,
resolveHorizontalWindowDirection,
- getMeetingNotificationWindowSize,
WINDOW_SIZES,
WindowPositionUtil,
} = require("./windowConfig");
@@ -69,19 +67,13 @@ class WindowManager {
this._agentDictationPillSize = AGENT_DICTATION_PILL_SIZE;
this._agentDictationPillHorizontalDirection = "left";
this._agentDictationPillScreenListener = null;
- this._notificationLoadTimeout = null;
this._notificationDismissTimer = new NotificationDismissTimer(() => {
- const notification = this._pendingNotificationData;
- // Dismiss first: an expiring restart offer lets the engine flush the
- // detections it was holding, and a prompt raised from that handler must
- // not be closed by this dismissal. The engine is not told the card closed
- // either — handleNotificationTimeout below settles this expiry, and a
- // close report here would flush the queue into a card that handler is
- // about to clear.
+ // Dismiss first: a prompt raised from the timeout handler must not be
+ // closed by this dismissal. The engine is not told the card closed either —
+ // handleNotificationTimeout below settles this expiry, and a close report
+ // here would flush the queue into a card that handler is about to clear.
this.dismissMeetingNotification({ notifyEngine: false });
- if (this.meetingDetectionEngine) {
- this.meetingDetectionEngine.handleNotificationTimeout(notification);
- }
+ this.meetingDetectionEngine?.handleNotificationTimeout();
});
this.notificationPrefs = {
notificationsEnabled: true,
@@ -270,13 +262,12 @@ class WindowManager {
// begin with, so on Linux leave the hit-testing alone and move the
// countdown alone.
const togglesClickThrough = process.platform !== "linux";
- const hasFixedExpiry = this._pendingNotificationData?.kind === "auto-end";
if (interactive) {
if (togglesClickThrough) win.setIgnoreMouseEvents(false);
- if (!hasFixedExpiry) this._notificationDismissTimer.pause();
+ this._notificationDismissTimer.pause();
} else {
if (togglesClickThrough) win.setIgnoreMouseEvents(true, { forward: true });
- if (!hasFixedExpiry) this._notificationDismissTimer.resume();
+ this._notificationDismissTimer.resume();
}
}
@@ -2001,40 +1992,25 @@ class WindowManager {
}
}
- async showMeetingNotification(promptData, { autoDismiss = true, autoDismissAt = null } = {}) {
+ async showMeetingNotification(promptData, { autoDismiss = true } = {}) {
if (this._onboardingActive) return false;
if (this.notificationWindow && !this.notificationWindow.isDestroyed()) {
const previousWindow = this.notificationWindow;
- const replacedAutoEndSessionId =
- this._pendingNotificationData?.kind === "auto-end"
- ? this._pendingNotificationData.sessionId
- : null;
this.notificationWindow = null;
this._pendingNotificationData = null;
previousWindow.close();
- if (replacedAutoEndSessionId) {
- this.meetingDetectionEngine?.handleAutoEndNotificationClosed?.(replacedAutoEndSessionId, {
- flushQueued: false,
- });
- }
}
this._notificationDismissTimer.cancel();
- if (this._notificationLoadTimeout) {
- clearTimeout(this._notificationLoadTimeout);
- this._notificationLoadTimeout = null;
- }
if (this._notificationReadyFallback) {
clearTimeout(this._notificationReadyFallback);
this._notificationReadyFallback = null;
}
const display = screen.getPrimaryDisplay();
- const notificationSize = getMeetingNotificationWindowSize(promptData);
- const position = WindowPositionUtil.getNotificationPosition(display, notificationSize);
+ const position = WindowPositionUtil.getNotificationPosition(display);
const win = new BrowserWindow({
...NOTIFICATION_WINDOW_CONFIG,
- ...notificationSize,
...position,
});
this.notificationWindow = win;
@@ -2043,25 +2019,15 @@ class WindowManager {
// after the replacement already took over the reference and the countdown.
win.on("closed", () => {
if (this.notificationWindow !== win) return;
- const closedNotification = this._pendingNotificationData;
- const closedAutoEndSessionId =
- closedNotification?.kind === "auto-end" ? closedNotification.sessionId : null;
- const closedDetectionId =
- closedNotification?.kind === "detection" ? closedNotification.detectionId : null;
+ const closedDetectionId = this._pendingNotificationData?.detectionId ?? null;
this.notificationWindow = null;
this._pendingNotificationData = null;
this._notificationDismissTimer.cancel();
- if (this._notificationLoadTimeout) {
- clearTimeout(this._notificationLoadTimeout);
- this._notificationLoadTimeout = null;
- }
if (this._notificationReadyFallback) {
clearTimeout(this._notificationReadyFallback);
this._notificationReadyFallback = null;
}
- if (closedAutoEndSessionId) {
- this.meetingDetectionEngine?.handleAutoEndNotificationClosed?.(closedAutoEndSessionId);
- } else if (closedDetectionId) {
+ if (closedDetectionId) {
this.meetingDetectionEngine?.handleDetectionNotificationClosed?.(closedDetectionId);
}
});
@@ -2081,35 +2047,16 @@ class WindowManager {
// Everything past the load addresses `win` directly: a replacement taking
// over mid-load must not have this prompt's data, countdown or force-show
// applied to its window.
- let loadTimeout = null;
try {
- const loadNotification = async () => {
- if (process.env.NODE_ENV === "development") {
- await DevServerManager.waitForDevServer();
- if (this.notificationWindow !== win) return;
- await win.loadURL(`${DevServerManager.DEV_SERVER_URL}?meeting-notification=true`);
- return;
- }
-
+ if (process.env.NODE_ENV === "development") {
+ await DevServerManager.waitForDevServer();
+ if (this.notificationWindow !== win) return false;
+ await win.loadURL(`${DevServerManager.DEV_SERVER_URL}?meeting-notification=true`);
+ } else {
const fileInfo = DevServerManager.getAppFilePath(false);
await win.loadFile(fileInfo.path, {
query: { ...fileInfo.query, "meeting-notification": "true" },
});
- };
- const loadPromise = loadNotification();
- if (promptData?.kind === "auto-end") {
- const timeoutPromise = new Promise((_, reject) => {
- loadTimeout = setTimeout(() => {
- if (this._notificationLoadTimeout === loadTimeout) {
- this._notificationLoadTimeout = null;
- }
- reject(new Error("Meeting auto-end notification load timed out"));
- }, AUTO_END_NOTIFICATION_LOAD_TIMEOUT_MS);
- this._notificationLoadTimeout = loadTimeout;
- });
- await Promise.race([loadPromise, timeoutPromise]);
- } else {
- await loadPromise;
}
} catch (error) {
// A load aborted by our own replacement or dismissal is not a failure —
@@ -2117,11 +2064,6 @@ class WindowManager {
if (this.notificationWindow !== win) return false;
this.dismissMeetingNotification();
throw error;
- } finally {
- if (loadTimeout && this._notificationLoadTimeout === loadTimeout) {
- clearTimeout(loadTimeout);
- this._notificationLoadTimeout = null;
- }
}
if (this.notificationWindow !== win) return false;
if (this._onboardingActive) {
@@ -2140,11 +2082,7 @@ class WindowManager {
this._notificationReadyFallback = readyFallback;
if (autoDismiss) {
- this._notificationDismissTimer.start(
- autoDismissAt === null
- ? getNotificationTimeoutMs(promptData.source)
- : Math.max(0, autoDismissAt - Date.now())
- );
+ this._notificationDismissTimer.start(getNotificationTimeoutMs(promptData.source));
}
return true;
}
@@ -2176,44 +2114,16 @@ class WindowManager {
this._notificationReadyFallback = null;
}
this._notificationDismissTimer.cancel();
- if (this._notificationLoadTimeout) {
- clearTimeout(this._notificationLoadTimeout);
- this._notificationLoadTimeout = null;
- }
const win = this.notificationWindow;
this.notificationWindow = null;
if (win && !win.isDestroyed()) win.close();
- if (notifyEngine && notification?.kind === "detection") {
+ if (notifyEngine && notification?.detectionId) {
this.meetingDetectionEngine?.handleDetectionNotificationClosed?.(notification.detectionId, {
flushQueued,
});
}
}
- showMeetingAutoEndNotification({ sessionId, expiresAt, reason, canSummarize }) {
- return this.showMeetingNotification(
- // This object is the payload the overlay fetches verbatim, so a field left
- // out here is a field the card can never render.
- { kind: "auto-end", sessionId, expiresAt, reason, ...(canSummarize ? { canSummarize } : {}) },
- { autoDismissAt: expiresAt }
- );
- }
-
- dismissMeetingAutoEndNotification(sessionId) {
- if (
- this._pendingNotificationData?.kind !== "auto-end" ||
- this._pendingNotificationData.sessionId !== sessionId
- ) {
- return;
- }
- this.dismissMeetingNotification();
- }
-
- isMeetingNotificationSender(sender) {
- const win = this.notificationWindow;
- return !!win && !win.isDestroyed() && win.webContents === sender;
- }
-
sendToControlPanel(channel, data) {
const win = this.controlPanelWindow;
if (!win || win.isDestroyed()) return;
diff --git a/src/locales/ar/translation.json b/src/locales/ar/translation.json
index fe0c81f0f..c4ba72632 100644
--- a/src/locales/ar/translation.json
+++ b/src/locales/ar/translation.json
@@ -1722,7 +1722,6 @@
"description": "نصوص مفرَّغة وملخصات مهيكلة",
"back": "رجوع",
"restrictedByOrg": "تفريغ الاجتماعات مقيد بواسطة مؤسستك.",
- "restartFailed": "تعذرت إعادة تشغيل تسجيل الاجتماع.",
"systemAudioSilent": {
"title": "لم يتم اكتشاف صوت الاجتماع بعد",
"description": "لم يلتقط الصوت حتى الآن سوى ميكروفونك. هل أنت في مكالمة فيديو؟ تحقق من أن صوت الاجتماع يُشغَّل على هذا الكمبيوتر وأنه غير مكتوم. هل تسجّل اجتماعًا حضوريًا؟ يمكنك تجاهل هذا — فالميكروفون يلتقط صوت الغرفة."
@@ -1730,7 +1729,6 @@
"unsupportedSelfHosted": "لا يمكن لتسجيل الملاحظات استخدام نقطة نهاية مستضافة ذاتيًا بعد. افتح الإعدادات واختر «محلي» أو مزودًا يدعم البث.",
"unsupportedProvider": "لا يمكن لتسجيل الملاحظات استخدام {{provider}} للتفريغ المباشر. افتح الإعدادات واختر «محلي» أو مزودًا يدعم البث.",
"noProviderSelected": "لم يتم اختيار أي مزود لتسجيل الملاحظات. افتح الإعدادات واختر «محلي» أو مزودًا يدعم البث.",
- "autoEnded": "توقف التسجيل تلقائيًا بعد انتهاء اجتماعك.",
"systemAudioInterrupted": {
"title": "انقطع صوت الاجتماع",
"description": "توقف التقاط صوت النظام وتجري إعادة تشغيله. قد تفقد بضع ثوانٍ من المكالمة في النص المفرَّغ."
@@ -4250,16 +4248,6 @@
"underway": "يبدو أن اجتماعك جارٍ بالفعل. هل ترغب في تدوين الملاحظات؟"
},
"start": "تدوين الملاحظات",
- "join": "انضمام وتفريغ صوتي",
- "autoEnd": {
- "title": "انتهى تسجيل الاجتماع",
- "body": {
- "micReleased": "لا يستخدم أي تطبيق آخر ميكروفونك، لذا توقف التسجيل تلقائيًا. أعد تشغيل التسجيل خلال {{seconds}} ث.",
- "silence": "لم يُكتشف أي صوت، لذا توقف التسجيل تلقائيًا. أعد تشغيل التسجيل خلال {{seconds}} ث.",
- "processExit": "أُغلق تطبيق الاجتماع، لذا توقف التسجيل تلقائيًا. أعد تشغيل التسجيل خلال {{seconds}} ث."
- },
- "restart": "إعادة تشغيل التسجيل",
- "summary": "إنشاء ملخص بالذكاء الاصطناعي"
- }
+ "join": "انضمام وتفريغ صوتي"
}
}
diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json
index bdc79c0a7..a93b48384 100644
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@ -3384,8 +3384,6 @@
"unsupportedSelfHosted": "Die Notizaufnahme kann noch keinen selbst gehosteten Endpunkt verwenden. Öffne die Einstellungen und wähle Lokal oder einen Streaming-Anbieter.",
"unsupportedProvider": "Die Notizaufnahme kann {{provider}} nicht für die Live-Transkription verwenden. Öffne die Einstellungen und wähle Lokal oder einen Streaming-Anbieter.",
"noProviderSelected": "Für die Notizaufnahme ist kein Anbieter ausgewählt. Öffne die Einstellungen und wähle Lokal oder einen Streaming-Anbieter.",
- "autoEnded": "Die Aufnahme wurde nach dem Ende des Meetings automatisch beendet.",
- "restartFailed": "Die Meeting-Aufnahme konnte nicht neu gestartet werden.",
"systemAudioSilent": {
"title": "Noch kein Meeting-Ton erkannt",
"description": "Bisher hat nur Ihr Mikrofon Ton aufgenommen. Sie sind in einem Videoanruf? Prüfen Sie, ob der Meeting-Ton auf diesem Computer wiedergegeben wird und nicht stummgeschaltet ist. Sie nehmen vor Ort auf? Dann können Sie diesen Hinweis ignorieren – Ihr Mikrofon nimmt den Raum auf."
@@ -4124,16 +4122,6 @@
"underway": "Es klingt, als wäre dein Meeting schon im Gange. Notizen aufnehmen?"
},
"start": "Notizen aufnehmen",
- "join": "Beitreten & transkribieren",
- "autoEnd": {
- "title": "Meeting-Aufnahme beendet",
- "body": {
- "micReleased": "Keine andere App nutzt Ihr Mikrofon, daher wurde die Aufnahme automatisch beendet. Neustart innerhalb von {{seconds}} s.",
- "silence": "Es wurde kein Ton erkannt, daher wurde die Aufnahme automatisch beendet. Neustart innerhalb von {{seconds}} s.",
- "processExit": "Ihre Meeting-App wurde geschlossen, daher wurde die Aufnahme automatisch beendet. Neustart innerhalb von {{seconds}} s."
- },
- "restart": "Aufnahme neu starten",
- "summary": "KI-Zusammenfassung erstellen"
- }
+ "join": "Beitreten & transkribieren"
}
}
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index e8f6aaea7..4854966ff 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -3384,8 +3384,6 @@
"unsupportedSelfHosted": "Note Recording can't use a self-hosted endpoint yet. Open Settings and choose Local or a streaming provider.",
"unsupportedProvider": "Note Recording can't use {{provider}} for live transcription. Open Settings and choose Local or a streaming provider.",
"noProviderSelected": "No provider is selected for Note Recording. Open Settings and choose Local or a streaming provider.",
- "autoEnded": "Recording stopped automatically after your meeting ended.",
- "restartFailed": "Couldn't restart the meeting recording.",
"systemAudioSilent": {
"title": "No meeting audio detected yet",
"description": "Only your microphone has picked up sound so far. On a video call? Check that the meeting audio is playing on this computer and isn't muted. Recording in person? You can ignore this — your microphone captures the room."
@@ -4124,16 +4122,6 @@
"underway": "It sounds like your meeting is underway. Want to take notes?"
},
"start": "Take notes",
- "join": "Join & transcribe",
- "autoEnd": {
- "title": "Meeting recording ended",
- "body": {
- "micReleased": "No other app is using your microphone, so recording stopped automatically. Restart within {{seconds}}s.",
- "silence": "No audio was detected, so recording stopped automatically. Restart within {{seconds}}s.",
- "processExit": "Your meeting app closed, so recording stopped automatically. Restart within {{seconds}}s."
- },
- "restart": "Restart recording",
- "summary": "Generate AI Summary"
- }
+ "join": "Join & transcribe"
}
}
diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json
index ef3769028..34c5967f9 100644
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@ -3094,8 +3094,6 @@
"unsupportedSelfHosted": "La grabación de notas aún no puede usar un servidor propio. Abre Ajustes y elige Local o un proveedor de streaming.",
"unsupportedProvider": "La grabación de notas no puede usar {{provider}} para transcripción en vivo. Abre Ajustes y elige Local o un proveedor de streaming.",
"noProviderSelected": "No hay ningún proveedor seleccionado para la grabación de notas. Abre Ajustes y elige Local o un proveedor de streaming.",
- "autoEnded": "La grabación se detuvo automáticamente cuando terminó la reunión.",
- "restartFailed": "No se pudo reiniciar la grabación de la reunión.",
"systemAudioSilent": {
"title": "Aún no se detecta el audio de la reunión",
"description": "Hasta ahora solo tu micrófono ha captado sonido. ¿Estás en una videollamada? Comprueba que el audio de la reunión se reproduce en este equipo y no está silenciado. ¿Estás grabando en persona? Puedes ignorar este aviso: tu micrófono capta la sala."
@@ -4124,16 +4122,6 @@
"underway": "Parece que tu reunión ya está en curso. ¿Quieres tomar notas?"
},
"start": "Tomar notas",
- "join": "Unirse y transcribir",
- "autoEnd": {
- "title": "La grabación de la reunión terminó",
- "body": {
- "micReleased": "Ninguna otra app está usando el micrófono, así que la grabación se detuvo automáticamente. Reiníciala en {{seconds}} s.",
- "silence": "No se detectó audio, así que la grabación se detuvo automáticamente. Reiníciala en {{seconds}} s.",
- "processExit": "La app de reuniones se cerró, así que la grabación se detuvo automáticamente. Reiníciala en {{seconds}} s."
- },
- "restart": "Reiniciar grabación",
- "summary": "Generar resumen con IA"
- }
+ "join": "Unirse y transcribir"
}
}
diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json
index 2d0412aec..e2d4048f3 100644
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@ -3384,8 +3384,6 @@
"unsupportedSelfHosted": "L'enregistrement de notes ne peut pas encore utiliser un serveur auto-hébergé. Ouvrez les Réglages et choisissez Local ou un fournisseur en streaming.",
"unsupportedProvider": "L'enregistrement de notes ne peut pas utiliser {{provider}} pour la transcription en direct. Ouvrez les Réglages et choisissez Local ou un fournisseur en streaming.",
"noProviderSelected": "Aucun fournisseur n'est sélectionné pour l'enregistrement de notes. Ouvrez les Réglages et choisissez Local ou un fournisseur en streaming.",
- "autoEnded": "L'enregistrement s'est arrêté automatiquement à la fin de votre réunion.",
- "restartFailed": "Impossible de redémarrer l'enregistrement de la réunion.",
"systemAudioSilent": {
"title": "Aucun son de réunion détecté pour le moment",
"description": "Seul votre microphone a capté du son jusqu'à présent. Vous êtes en visioconférence ? Vérifiez que le son de la réunion est diffusé sur cet ordinateur et qu'il n'est pas coupé. Vous enregistrez en présentiel ? Vous pouvez ignorer ce message : votre microphone capte la salle."
@@ -4124,16 +4122,6 @@
"underway": "On dirait que votre réunion est déjà en cours. Vous voulez prendre des notes ?"
},
"start": "Prendre des notes",
- "join": "Rejoindre et transcrire",
- "autoEnd": {
- "title": "L’enregistrement de la réunion est terminé",
- "body": {
- "micReleased": "Aucune autre app n’utilise votre micro, donc l’enregistrement s’est arrêté automatiquement. Redémarrez-le dans les {{seconds}} s.",
- "silence": "Aucun son n’a été détecté, donc l’enregistrement s’est arrêté automatiquement. Redémarrez-le dans les {{seconds}} s.",
- "processExit": "Votre app de réunion s’est fermée, donc l’enregistrement s’est arrêté automatiquement. Redémarrez-le dans les {{seconds}} s."
- },
- "restart": "Redémarrer l’enregistrement",
- "summary": "Générer un résumé IA"
- }
+ "join": "Rejoindre et transcrire"
}
}
diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json
index c30cbf946..1267751d3 100644
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@ -3041,8 +3041,6 @@
"unsupportedSelfHosted": "La registrazione delle note non può ancora usare un endpoint self-hosted. Apri le Impostazioni e scegli Locale o un provider in streaming.",
"unsupportedProvider": "La registrazione delle note non può usare {{provider}} per la trascrizione dal vivo. Apri le Impostazioni e scegli Locale o un provider in streaming.",
"noProviderSelected": "Nessun provider selezionato per la registrazione delle note. Apri le Impostazioni e scegli Locale o un provider in streaming.",
- "autoEnded": "La registrazione si è interrotta automaticamente al termine della riunione.",
- "restartFailed": "Impossibile riavviare la registrazione della riunione.",
"systemAudioSilent": {
"title": "Nessun audio della riunione rilevato finora",
"description": "Finora solo il tuo microfono ha captato suoni. Sei in una videochiamata? Verifica che l'audio della riunione venga riprodotto su questo computer e non sia disattivato. Stai registrando di persona? Puoi ignorare questo avviso: il tuo microfono cattura la stanza."
@@ -4124,16 +4122,6 @@
"underway": "Sembra che la tua riunione sia già in corso. Vuoi prendere appunti?"
},
"start": "Prendi appunti",
- "join": "Partecipa e trascrivi",
- "autoEnd": {
- "title": "Registrazione della riunione terminata",
- "body": {
- "micReleased": "Nessun’altra app sta usando il microfono, quindi la registrazione si è interrotta automaticamente. Riavviala entro {{seconds}} s.",
- "silence": "Non è stato rilevato audio, quindi la registrazione si è interrotta automaticamente. Riavviala entro {{seconds}} s.",
- "processExit": "L’app della riunione è stata chiusa, quindi la registrazione si è interrotta automaticamente. Riavviala entro {{seconds}} s."
- },
- "restart": "Riavvia registrazione",
- "summary": "Genera riepilogo AI"
- }
+ "join": "Partecipa e trascrivi"
}
}
diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.json
index 5d924fcd7..1d19a10dc 100644
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@ -3034,8 +3034,6 @@
"unsupportedSelfHosted": "ノート録音はまだセルフホストのエンドポイントを利用できません。設定を開き、ローカルまたはストリーミング対応プロバイダーを選択してください。",
"unsupportedProvider": "ノート録音ではライブ文字起こしに {{provider}} を利用できません。設定を開き、ローカルまたはストリーミング対応プロバイダーを選択してください。",
"noProviderSelected": "ノート録音のプロバイダーが選択されていません。設定を開き、ローカルまたはストリーミング対応プロバイダーを選択してください。",
- "autoEnded": "会議の終了後、録音は自動的に停止しました。",
- "restartFailed": "会議の録音を再開できませんでした。",
"systemAudioSilent": {
"title": "会議の音声がまだ検出されていません",
"description": "これまでのところ、音声を拾っているのはマイクのみです。ビデオ会議中の場合は、会議の音声がこのコンピューターで再生されており、ミュートになっていないことを確認してください。対面で録音している場合は、この通知は無視してかまいません。マイクが室内の音を拾います。"
@@ -4124,16 +4122,6 @@
"underway": "会議はすでに進行中のようです。メモを取りますか?"
},
"start": "メモを取る",
- "join": "参加して文字起こし",
- "autoEnd": {
- "title": "会議の録音が終了しました",
- "body": {
- "micReleased": "ほかのアプリがマイクを使用していないため、録音を自動停止しました。{{seconds}}秒以内に再開できます。",
- "silence": "音声が検出されなかったため、録音を自動停止しました。{{seconds}}秒以内に再開できます。",
- "processExit": "会議アプリが終了したため、録音を自動停止しました。{{seconds}}秒以内に再開できます。"
- },
- "restart": "録音を再開",
- "summary": "AI要約を生成"
- }
+ "join": "参加して文字起こし"
}
}
diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json
index 9192ae571..d84c6228e 100644
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@ -3041,8 +3041,6 @@
"unsupportedSelfHosted": "A gravação de notas ainda não pode usar um endpoint auto-hospedado. Abra as Configurações e escolha Local ou um provedor de streaming.",
"unsupportedProvider": "A gravação de notas não pode usar {{provider}} para transcrição ao vivo. Abra as Configurações e escolha Local ou um provedor de streaming.",
"noProviderSelected": "Nenhum provedor está selecionado para a gravação de notas. Abra as Configurações e escolha Local ou um provedor de streaming.",
- "autoEnded": "A gravação parou automaticamente após o fim da reunião.",
- "restartFailed": "Não foi possível reiniciar a gravação da reunião.",
"systemAudioSilent": {
"title": "Nenhum áudio da reunião detectado até agora",
"description": "Até agora, apenas o seu microfone captou som. Está em uma videochamada? Verifique se o áudio da reunião está sendo reproduzido neste computador e não está silenciado. Está gravando presencialmente? Você pode ignorar este aviso: seu microfone capta o ambiente."
@@ -4124,16 +4122,6 @@
"underway": "Parece que sua reunião já está em andamento. Quer fazer anotações?"
},
"start": "Fazer anotações",
- "join": "Entrar e transcrever",
- "autoEnd": {
- "title": "Gravação da reunião encerrada",
- "body": {
- "micReleased": "Nenhum outro app está usando o microfone, então a gravação parou automaticamente. Reinicie em até {{seconds}} s.",
- "silence": "Nenhum áudio foi detectado, então a gravação parou automaticamente. Reinicie em até {{seconds}} s.",
- "processExit": "Seu app de reunião foi fechado, então a gravação parou automaticamente. Reinicie em até {{seconds}} s."
- },
- "restart": "Reiniciar gravação",
- "summary": "Gerar resumo com IA"
- }
+ "join": "Entrar e transcrever"
}
}
diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json
index 595b5f385..5be698102 100644
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@ -3063,8 +3063,6 @@
"unsupportedSelfHosted": "Запись заметок пока не может использовать собственный сервер. Откройте настройки и выберите локальный режим или потоковый провайдер.",
"unsupportedProvider": "Запись заметок не может использовать {{provider}} для live-расшифровки. Откройте настройки и выберите локальный режим или потоковый провайдер.",
"noProviderSelected": "Для записи заметок не выбран провайдер. Откройте настройки и выберите локальный режим или потоковый провайдер.",
- "autoEnded": "Запись автоматически остановлена после завершения встречи.",
- "restartFailed": "Не удалось возобновить запись встречи.",
"systemAudioSilent": {
"title": "Звук встречи пока не обнаружен",
"description": "Пока звук поступает только с вашего микрофона. Вы на видеозвонке? Убедитесь, что звук встречи воспроизводится на этом компьютере и не отключён. Записываете встречу вживую? Это предупреждение можно игнорировать — ваш микрофон улавливает звук в помещении."
@@ -4172,16 +4170,6 @@
"underway": "Похоже, ваша встреча уже идёт. Хотите вести заметки?"
},
"start": "Вести заметки",
- "join": "Присоединиться и вести заметки",
- "autoEnd": {
- "title": "Запись встречи завершена",
- "body": {
- "micReleased": "Другие приложения не используют микрофон, поэтому запись остановлена автоматически. Перезапустите её в течение {{seconds}} с.",
- "silence": "Звук не обнаружен, поэтому запись остановлена автоматически. Перезапустите её в течение {{seconds}} с.",
- "processExit": "Приложение для встреч закрыто, поэтому запись остановлена автоматически. Перезапустите её в течение {{seconds}} с."
- },
- "restart": "Перезапустить запись",
- "summary": "Создать ИИ-сводку"
- }
+ "join": "Присоединиться и вести заметки"
}
}
diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json
index 2d0edade0..d248e5160 100644
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@ -3041,8 +3041,6 @@
"unsupportedSelfHosted": "笔记录音暂不支持自托管端点。请打开设置,选择本地或支持流式传输的服务商。",
"unsupportedProvider": "笔记录音无法使用 {{provider}} 进行实时转录。请打开设置,选择本地或支持流式传输的服务商。",
"noProviderSelected": "尚未为笔记录音选择服务商。请打开设置,选择本地或支持流式传输的服务商。",
- "autoEnded": "会议结束后,录音已自动停止。",
- "restartFailed": "无法重新开始会议录音。",
"systemAudioSilent": {
"title": "尚未检测到会议音频",
"description": "到目前为止,只有您的麦克风采集到声音。正在进行视频通话?请检查会议音频是否正在此电脑上播放且未被静音。正在进行现场录音?您可以忽略此提示——您的麦克风会采集房间内的声音。"
@@ -4124,16 +4122,6 @@
"underway": "你的会议似乎已在进行中。要开始记录吗?"
},
"start": "开始记录",
- "join": "加入并转录",
- "autoEnd": {
- "title": "会议录音已结束",
- "body": {
- "micReleased": "没有其他应用在使用麦克风,因此录音已自动停止。请在 {{seconds}} 秒内重新开始录音。",
- "silence": "未检测到音频,因此录音已自动停止。请在 {{seconds}} 秒内重新开始录音。",
- "processExit": "会议应用已关闭,因此录音已自动停止。请在 {{seconds}} 秒内重新开始录音。"
- },
- "restart": "重新开始录音",
- "summary": "生成 AI 摘要"
- }
+ "join": "加入并转录"
}
}
diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json
index f312e5c46..00adbb5e4 100644
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@ -3041,8 +3041,6 @@
"unsupportedSelfHosted": "筆記錄音尚不支援自架端點。請開啟設定,選擇本機或支援串流的服務商。",
"unsupportedProvider": "筆記錄音無法使用 {{provider}} 進行即時轉錄。請開啟設定,選擇本機或支援串流的服務商。",
"noProviderSelected": "尚未為筆記錄音選擇服務商。請開啟設定,選擇本機或支援串流的服務商。",
- "autoEnded": "會議結束後,錄音已自動停止。",
- "restartFailed": "無法重新開始會議錄音。",
"systemAudioSilent": {
"title": "尚未偵測到會議音訊",
"description": "到目前為止,只有您的麥克風收到聲音。正在進行視訊通話?請檢查會議音訊是否正在此電腦上播放且未被靜音。正在進行現場錄音?您可以忽略此提示——您的麥克風會收錄房間內的聲音。"
@@ -4124,16 +4122,6 @@
"underway": "你的會議似乎已在進行中。要開始記錄嗎?"
},
"start": "開始記錄",
- "join": "加入並轉錄",
- "autoEnd": {
- "title": "會議錄音已結束",
- "body": {
- "micReleased": "沒有其他應用程式在使用麥克風,因此錄音已自動停止。請在 {{seconds}} 秒內重新開始錄音。",
- "silence": "未偵測到音訊,因此錄音已自動停止。請在 {{seconds}} 秒內重新開始錄音。",
- "processExit": "會議應用程式已關閉,因此錄音已自動停止。請在 {{seconds}} 秒內重新開始錄音。"
- },
- "restart": "重新開始錄音",
- "summary": "產生 AI 摘要"
- }
+ "join": "加入並轉錄"
}
}
diff --git a/src/stores/meetingRecordingStore.ts b/src/stores/meetingRecordingStore.ts
index 8226d1f4f..a3663c05f 100644
--- a/src/stores/meetingRecordingStore.ts
+++ b/src/stores/meetingRecordingStore.ts
@@ -1653,8 +1653,8 @@ export async function stopRecording(expectedSessionId?: string): Promise<StopRec
logger.info("Meeting transcription stopped", {}, "meeting");
// Reaching here means this call ended a live recording and its transcript
- // was written above, so its note is resumable. A failed main-side teardown
- // is surfaced by reportMeetingError and must not void the restart offer.
+ // was written above. A failed main-side teardown is surfaced by
+ // reportMeetingError and must not be reported as a recording that never stopped.
return { diarizationSessionId, stopped: true };
});
}
diff --git a/src/types/electron.ts b/src/types/electron.ts
index 884d5fcd4..e5a497610 100644
--- a/src/types/electron.ts
+++ b/src/types/electron.ts
@@ -78,8 +78,7 @@ export type TranscriptionErrorCode =
export type MeetingPromptVariant = "detected" | "starting" | "underway";
-export interface MeetingDetectionNotificationData {
- kind: "detection";
+export interface MeetingNotificationData {
detectionId: string;
source: string;
key: string;
@@ -91,36 +90,11 @@ export interface MeetingDetectionNotificationData {
/** Why auto-end concluded the meeting is over. */
export type MeetingAutoEndReason = "mic-released" | "silence" | "process-exit";
-export interface MeetingAutoEndNotificationData {
- kind: "auto-end";
- sessionId: string;
- expiresAt: number;
- reason?: MeetingAutoEndReason;
- /** True when the auto-ended note has a transcript and no AI summary yet, which
- * is when the card also offers to generate one. */
- canSummarize?: boolean;
-}
-
-export type MeetingNotificationData =
- MeetingDetectionNotificationData | MeetingAutoEndNotificationData;
-
export interface MeetingAutoEndRequest {
sessionId: string;
reason?: MeetingAutoEndReason;
}
-export type MeetingAutoEndAction = "restart" | "summary" | "dismiss";
-
-export interface MeetingAutoEndRestartRequest {
- sessionId: string;
-}
-
-export interface MeetingAutoEndLifecycleResult {
- success: boolean;
- reason?: "invalid-session" | "invalid-action" | "stale-session";
- error?: string;
-}
-
/**
* Proxied-transcription IPC results. `ipcMain.handle` drops custom error props on
* rejection, so these handlers resolve with a serialized error instead of throwing.
@@ -3149,14 +3123,6 @@ declare global {
onMeetingAutoEndRequested?: (
callback: (request: MeetingAutoEndRequest) => void
) => () => void;
- meetingAutoEndCompleted?: (sessionId: string) => Promise<MeetingAutoEndLifecycleResult>;
- meetingAutoEndRespond?: (
- sessionId: string,
- action: MeetingAutoEndAction
- ) => Promise<MeetingAutoEndLifecycleResult>;
- onMeetingAutoEndRestartRequested?: (
- callback: (request: MeetingAutoEndRestartRequest) => void
- ) => () => void;
getMeetingNotificationData?: () => Promise<MeetingNotificationData | null>;
meetingNotificationReady?: () => Promise<void>;
meetingNotificationRespond?: (
@@ -3175,8 +3141,6 @@ declare global {
getPendingNoteNavigation?: () => Promise<{
noteId: number;
folderId: number | null;
- /** Set by the auto-end card's summary action: open the note and run its AI summary. */
- generateSummary?: boolean;
} | null>;
onNoteNavigationPending?: (callback: () => void) => () => void;
onPreviewText?: (callback: (text: string) => void) => () => void;
diff --git a/test/components/meetingInterruptionWarning.test.js b/test/components/meetingInterruptionWarning.test.js
index 6026bef31..05bc19449 100644
--- a/test/components/meetingInterruptionWarning.test.js
+++ b/test/components/meetingInterruptionWarning.test.js
@@ -15,7 +15,6 @@ async function setup(t) {
if (root) await React.act(async () => root.unmount());
delete globalThis.__interruptionToasts;
delete globalThis.__interruptionDismissals;
- delete globalThis.__autoEndCompletions;
});
const listeners = {};
const noop = () => () => {};
@@ -59,10 +58,6 @@ async function setup(t) {
if (listeners.autoEnd === callback) listeners.autoEnd = null;
};
},
- meetingAutoEndCompleted: async (sessionId) => {
- globalThis.__autoEndCompletions.push(sessionId);
- return { success: false, reason: "notification-disabled" };
- },
};
installBrowserGlobals(t, { window: { electronAPI: api } });
installMicCaptureGlobals(t);
@@ -89,7 +84,6 @@ async function setup(t) {
};
globalThis.__interruptionToasts = [];
globalThis.__interruptionDismissals = [];
- globalThis.__autoEndCompletions = [];
const vite = await createRendererServer(t, {
cachePrefix: "pr2040-renderer-warning-review-",
mockModules: {
@@ -136,13 +130,12 @@ async function setup(t) {
return { store, render, interrupt, resume, autoEnd, focus, reveal, i18n };
}
-test("an automatic meeting stop does not request or render a post-meeting notification", async (t) => {
+test("an automatic meeting stop ends the recording without a toast", async (t) => {
const { store, autoEnd } = await setup(t);
await autoEnd();
assert.equal(store.useMeetingRecordingStore.getState().isRecording, false);
- assert.deepEqual(globalThis.__autoEndCompletions, []);
assert.deepEqual(globalThis.__interruptionToasts, []);
});
diff --git a/test/helpers/meetingAutoEndLifecycle.test.js b/test/helpers/meetingAutoEndLifecycle.test.js
deleted file mode 100644
index 274888013..000000000
--- a/test/helpers/meetingAutoEndLifecycle.test.js
+++ /dev/null
@@ -1,121 +0,0 @@
-const test = require("node:test");
-const assert = require("node:assert/strict");
-
-const {
- completeMeetingAutoEndSession,
- respondToMeetingAutoEndNotification,
- registerMeetingAutoEndLifecycleHandlers,
-} = require("../../src/helpers/meetingAutoEndLifecycle");
-
-test("stop-completion validation rejects invalid, stale, and non-owning sessions", async () => {
- const owner = { id: "owner" };
- const calls = [];
- const engine = {
- completeAutoEndSession: async (sessionId, sender) => {
- calls.push({ sessionId, sender });
- return sessionId === "meeting-2" && sender === owner;
- },
- };
-
- assert.deepEqual(await completeMeetingAutoEndSession(engine, "", owner), {
- success: false,
- reason: "invalid-session",
- });
- assert.deepEqual(await completeMeetingAutoEndSession(engine, "meeting-1", owner), {
- success: false,
- reason: "stale-session",
- });
- assert.deepEqual(await completeMeetingAutoEndSession(engine, "meeting-2", {}), {
- success: false,
- reason: "stale-session",
- });
- assert.deepEqual(await completeMeetingAutoEndSession(engine, "meeting-2", owner), {
- success: true,
- });
- assert.deepEqual(calls, [
- { sessionId: "meeting-1", sender: owner },
- { sessionId: "meeting-2", sender: {} },
- { sessionId: "meeting-2", sender: owner },
- ]);
-});
-
-test("overlay response validation accepts restart, summary or dismiss for a live offer", () => {
- const overlay = { id: "overlay" };
- const calls = [];
- const engine = {
- respondToAutoEndNotification: (sessionId, action, sender) => {
- calls.push({ sessionId, action, sender });
- return (
- sessionId === "meeting-2" &&
- (action === "restart" || action === "summary") &&
- sender === overlay
- );
- },
- };
-
- assert.deepEqual(respondToMeetingAutoEndNotification(engine, "", "restart", overlay), {
- success: false,
- reason: "invalid-session",
- });
- assert.deepEqual(respondToMeetingAutoEndNotification(engine, "meeting-2", "keep", overlay), {
- success: false,
- reason: "invalid-action",
- });
- assert.deepEqual(respondToMeetingAutoEndNotification(engine, "meeting-1", "dismiss", overlay), {
- success: false,
- reason: "stale-session",
- });
- assert.deepEqual(respondToMeetingAutoEndNotification(engine, "meeting-2", "restart", overlay), {
- success: true,
- });
- assert.deepEqual(respondToMeetingAutoEndNotification(engine, "meeting-2", "summary", overlay), {
- success: true,
- });
- assert.deepEqual(calls, [
- { sessionId: "meeting-1", action: "dismiss", sender: overlay },
- { sessionId: "meeting-2", action: "restart", sender: overlay },
- { sessionId: "meeting-2", action: "summary", sender: overlay },
- ]);
-});
-
-test("main IPC resolves the current engine and scopes both actions to event.sender", async () => {
- const handlers = new Map();
- const ipcMain = {
- handle: (channel, handler) => handlers.set(channel, handler),
- };
- const sender = { id: "renderer" };
- const calls = [];
- let engine = {
- completeAutoEndSession: async () => false,
- respondToAutoEndNotification: () => false,
- };
- registerMeetingAutoEndLifecycleHandlers(ipcMain, () => engine);
-
- assert.deepEqual(
- await handlers.get("meeting-auto-end-completed")({ sender }, "meeting-1"),
- { success: false, reason: "stale-session" }
- );
-
- engine = {
- completeAutoEndSession: async (sessionId, eventSender) => {
- calls.push(["completed", sessionId, eventSender]);
- return true;
- },
- respondToAutoEndNotification: (sessionId, action, eventSender) => {
- calls.push(["respond", sessionId, action, eventSender]);
- return true;
- },
- };
- assert.deepEqual(
- await handlers.get("meeting-auto-end-completed")({ sender }, "meeting-2"),
- { success: true }
- );
- assert.deepEqual(
- await handlers.get("meeting-auto-end-respond")({ sender }, "meeting-2", "dismiss"),
- { success: true }
- );
- assert.deepEqual(calls, [
- ["completed", "meeting-2", sender],
- ["respond", "meeting-2", "dismiss", sender],
- ]);
-});
diff --git a/test/helpers/meetingDetectionEngineAutoEnd.test.js b/test/helpers/meetingDetectionEngineAutoEnd.test.js
index dde32f1d9..2c437196a 100644
--- a/test/helpers/meetingDetectionEngineAutoEnd.test.js
+++ b/test/helpers/meetingDetectionEngineAutoEnd.test.js
@@ -21,11 +21,6 @@ const { SILENCE_WINDOW_MS, FAST_SILENCE_MS, OWNERSHIP_MIN_ACTIVE_MS, OWNERSHIP_C
createMeetingAutoEndController;
const TICK_MS = 1000;
-const {
- AUTO_END_RESTART_WINDOW_MS: RESTART_WINDOW_MS,
- AUTO_END_RESTART_GRACE_MS,
- AUTO_END_RESTART_CLAIM_MS,
-} = MeetingDetectionEngine;
const createClock = () => {
let now = 10_000;
@@ -115,23 +110,13 @@ class FakeMeetingProcessDetector extends EventEmitter {
}
}
-function createEngine(windowManagerOverrides = {}, { databaseManager = {} } = {}) {
+function createEngine(windowManagerOverrides = {}) {
const clock = createClock();
const audioActivityDetector = new FakeAudioActivityDetector();
const meetingProcessDetector = new FakeMeetingProcessDetector();
- const autoEndNotifications = [];
- const dismissedAutoEndNotifications = [];
const shownNotifications = [];
- const overlayWebContents = { kind: "meeting-notification" };
const windowManager = {
notificationPrefs: {},
- showMeetingAutoEndNotification: async (notification) => {
- autoEndNotifications.push(notification);
- return true;
- },
- dismissMeetingAutoEndNotification: (sessionId) =>
- dismissedAutoEndNotifications.push(sessionId),
- isMeetingNotificationSender: (sender) => sender === overlayWebContents,
showMeetingNotification: (notification) => shownNotifications.push(notification),
...windowManagerOverrides,
};
@@ -140,7 +125,7 @@ function createEngine(windowManagerOverrides = {}, { databaseManager = {} } = {}
meetingProcessDetector,
audioActivityDetector,
windowManager,
- databaseManager,
+ {},
{
now: clock.now,
setInterval: clock.setInterval,
@@ -158,24 +143,20 @@ function createEngine(windowManagerOverrides = {}, { databaseManager = {} } = {}
return {
audioActivityDetector,
- autoEndNotifications,
clock,
- dismissedAutoEndNotifications,
engine,
meetingProcessDetector,
micState,
- overlayWebContents,
owner,
shownNotifications,
};
}
-async function triggerOwnershipStop(engineHarness, ownerWebContents, { noteId = null } = {}) {
+async function triggerOwnershipStop(engineHarness, ownerWebContents) {
await engineHarness.engine.beginRecordingSession({
sessionId: "meeting-1",
autoEndEligible: true,
ownerWebContents,
- noteId,
systemAudioAvailable: true,
});
engineHarness.clock.advance(OWNERSHIP_MIN_ACTIVE_MS);
@@ -183,7 +164,7 @@ async function triggerOwnershipStop(engineHarness, ownerWebContents, { noteId =
engineHarness.clock.advance(OWNERSHIP_CONFIRM_MS);
}
-test("detection prompts retain their existing payload with a detection discriminator", () => {
+test("detection prompts carry the detection payload", () => {
const { engine, shownNotifications } = createEngine();
const event = {
id: "calendar-1",
@@ -195,7 +176,6 @@ test("detection prompts retain their existing payload with a detection discrimin
assert.deepEqual(shownNotifications, [
{
- kind: "detection",
detectionId: "calendar:calendar-1",
source: "calendar",
key: "calendar-1",
@@ -277,7 +257,7 @@ test("does not arm auto-end until system audio capture is confirmed", async () =
harness.engine.stop();
});
-test("reliable mic release requests an immediate stop without showing the recovery notice", async () => {
+test("reliable mic release requests an immediate stop", async () => {
const harness = createEngine();
const messages = [];
@@ -289,7 +269,6 @@ test("reliable mic release requests an immediate stop without showing the recove
payload: { sessionId: "meeting-1", reason: "mic-released" },
},
]);
- assert.deepEqual(harness.autoEndNotifications, []);
harness.engine.stop();
});
@@ -372,260 +351,6 @@ test("only the last tracked meeting process exiting arms the fast stop", async (
harness.engine.stop();
});
-test("the recovery notice appears only after the owning renderer confirms stop completion", async () => {
- const harness = createEngine();
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
-
- assert.deepEqual(harness.autoEndNotifications, []);
- harness.engine.endRecordingSession("meeting-1");
-
- assert.equal(
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents),
- true
- );
- assert.deepEqual(harness.autoEndNotifications, [
- {
- sessionId: "meeting-1",
- reason: "mic-released",
- expiresAt: harness.clock.now() + RESTART_WINDOW_MS,
- // This harness has no database, so the card cannot offer a summary.
- canSummarize: false,
- },
- ]);
- harness.engine.stop();
-});
-
-test("stop completion rejects a stale session, wrong owner, or still-live recording", async () => {
- const harness = createEngine();
- const ownerWebContents = harness.owner();
- await triggerOwnershipStop(harness, ownerWebContents);
-
- assert.equal(await harness.engine.completeAutoEndSession("other", ownerWebContents), false);
- assert.equal(await harness.engine.completeAutoEndSession("meeting-1", harness.owner()), false);
- assert.equal(await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents), false);
-
- harness.engine.endRecordingSession("meeting-1");
- assert.equal(await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents), true);
- harness.engine.stop();
-});
-
-test("restart response is owner-scoped, single-use, and dismisses the notice", async () => {
- const harness = createEngine();
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
- harness.engine.endRecordingSession("meeting-1");
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
-
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "restart",
- harness.overlayWebContents
- ),
- true
- );
- assert.deepEqual(messages.at(-1), {
- channel: "meeting-auto-end-restart-requested",
- payload: { sessionId: "meeting-1" },
- });
- assert.deepEqual(harness.dismissedAutoEndNotifications, ["meeting-1"]);
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "restart",
- harness.overlayWebContents
- ),
- false
- );
- harness.engine.stop();
-});
-
-test("dismiss response clears the recovery offer without restarting", async () => {
- const harness = createEngine();
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
- harness.engine.endRecordingSession("meeting-1");
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
-
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "dismiss",
- harness.overlayWebContents
- ),
- true
- );
- assert.equal(
- messages.some(({ channel }) => channel === "meeting-auto-end-restart-requested"),
- false
- );
- assert.deepEqual(harness.dismissedAutoEndNotifications, ["meeting-1"]);
- harness.engine.stop();
-});
-
-// The card's summary offer follows the note, not the auto-end reason: a note with
-// nothing transcribed, or one that already has a summary, must not be offered one.
-test("the auto-end card offers a summary only for an unsummarized transcript", async () => {
- const summarizable = createEngine(
- {},
- { databaseManager: { getNote: () => ({ id: 7, transcript: "SPEAKER_00: hi", folder_id: 3 }) } }
- );
- const owner = summarizable.owner([]);
- await triggerOwnershipStop(summarizable, owner, { noteId: 7 });
- summarizable.engine.endRecordingSession("meeting-1");
- await summarizable.engine.completeAutoEndSession("meeting-1", owner);
-
- assert.equal(summarizable.autoEndNotifications.at(-1).canSummarize, true);
- summarizable.engine.stop();
-
- const alreadySummarized = createEngine(
- {},
- {
- databaseManager: {
- getNote: () => ({ id: 7, transcript: "SPEAKER_00: hi", enhanced_content: "# Notes" }),
- },
- }
- );
- const secondOwner = alreadySummarized.owner([]);
- await triggerOwnershipStop(alreadySummarized, secondOwner, { noteId: 7 });
- alreadySummarized.engine.endRecordingSession("meeting-1");
- await alreadySummarized.engine.completeAutoEndSession("meeting-1", secondOwner);
-
- assert.equal(alreadySummarized.autoEndNotifications.at(-1).canSummarize, false);
- alreadySummarized.engine.stop();
-});
-
-test("the summary response opens the note for its summary and ends the offer", async () => {
- const navigations = [];
- const harness = createEngine(
- { queueNoteNavigation: async (payload) => navigations.push(payload) },
- { databaseManager: { getNote: () => ({ id: 7, transcript: "SPEAKER_00: hi", folder_id: 3 }) } }
- );
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents, { noteId: 7 });
- harness.engine.endRecordingSession("meeting-1");
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
-
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "summary",
- harness.overlayWebContents
- ),
- true
- );
- assert.deepEqual(navigations, [{ noteId: 7, folderId: 3, generateSummary: true }]);
- // A summary leaves the recording stopped, so nothing restarts.
- assert.equal(
- messages.some(({ channel }) => channel === "meeting-auto-end-restart-requested"),
- false
- );
- assert.deepEqual(harness.dismissedAutoEndNotifications, ["meeting-1"]);
- // Single-use, like the restart and dismiss responses.
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "summary",
- harness.overlayWebContents
- ),
- false
- );
- harness.engine.stop();
-});
-
-test("expired, wrong-sender, and invalid auto-end responses are rejected", async () => {
- const harness = createEngine();
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
- harness.engine.endRecordingSession("meeting-1");
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
-
- assert.equal(
- harness.engine.respondToAutoEndNotification("meeting-1", "restart", {}),
- false
- );
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "unknown",
- harness.overlayWebContents
- ),
- false
- );
- harness.clock.advance(RESTART_WINDOW_MS);
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "restart",
- harness.overlayWebContents
- ),
- false
- );
- assert.equal(
- messages.some(({ channel }) => channel === "meeting-auto-end-restart-requested"),
- false
- );
- assert.deepEqual(harness.dismissedAutoEndNotifications, ["meeting-1"]);
- harness.engine.stop();
-});
-
-test("starting another recording invalidates an offered restart", async () => {
- const harness = createEngine();
- const firstOwner = harness.owner();
- await triggerOwnershipStop(harness, firstOwner);
- harness.engine.endRecordingSession("meeting-1");
- await harness.engine.completeAutoEndSession("meeting-1", firstOwner);
-
- await harness.engine.beginRecordingSession({
- sessionId: "meeting-2",
- autoEndEligible: true,
- ownerWebContents: harness.owner(),
- systemAudioAvailable: true,
- });
-
- assert.deepEqual(harness.dismissedAutoEndNotifications, ["meeting-1"]);
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "restart",
- harness.overlayWebContents
- ),
- false
- );
- harness.engine.stop();
-});
-
-test("notification load failure invalidates the completed restart offer", async () => {
- const harness = createEngine({
- showMeetingAutoEndNotification: async () => {
- throw new Error("notification load failed");
- },
- });
- const ownerWebContents = harness.owner();
- await triggerOwnershipStop(harness, ownerWebContents);
- harness.engine.endRecordingSession("meeting-1");
-
- assert.equal(
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents),
- false
- );
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "restart",
- harness.overlayWebContents
- ),
- false
- );
- harness.engine.stop();
-});
-
test("a legacy autoEnd preference cannot disable eligible meeting auto-end", async () => {
const harness = createEngine();
const messages = [];
@@ -807,171 +532,6 @@ test("meeting mode still suppresses prompts while a detection-started recording
engine.stop();
});
-test("an explicit restart grants the new session a grace period before auto-end can fire again", async () => {
- const harness = createEngine();
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
- harness.engine.endRecordingSession("meeting-1");
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "restart",
- harness.overlayWebContents
- ),
- true
- );
-
- messages.length = 0;
- harness.audioActivityDetector.externalMicState = {
- reliable: true,
- externalMicActive: false,
- };
- await harness.engine.beginRecordingSession({
- sessionId: "meeting-2",
- autoEndEligible: true,
- ownerWebContents,
- systemAudioAvailable: true,
- });
-
- // The user just said the meeting is still live; silence alone must not
- // immediately undo that.
- harness.clock.advance(AUTO_END_RESTART_GRACE_MS - TICK_MS);
- assert.deepEqual(messages, []);
-
- harness.clock.advance(SILENCE_WINDOW_MS + TICK_MS);
- assert.deepEqual(messages, [
- {
- channel: "meeting-auto-end-requested",
- payload: { sessionId: "meeting-2", reason: "silence" },
- },
- ]);
- harness.engine.stop();
-});
-
-test("the restart grace is single-use and does not leak into an unrelated later recording", async () => {
- const harness = createEngine();
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
- harness.engine.endRecordingSession("meeting-1");
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "restart",
- harness.overlayWebContents
- );
-
- harness.audioActivityDetector.externalMicState = {
- reliable: true,
- externalMicActive: false,
- };
- await harness.engine.beginRecordingSession({
- sessionId: "meeting-2",
- autoEndEligible: true,
- ownerWebContents,
- systemAudioAvailable: true,
- });
- harness.engine.endRecordingSession("meeting-2");
-
- messages.length = 0;
- await harness.engine.beginRecordingSession({
- sessionId: "meeting-3",
- autoEndEligible: true,
- ownerWebContents,
- systemAudioAvailable: true,
- });
- harness.clock.advance(SILENCE_WINDOW_MS + TICK_MS);
- assert.deepEqual(messages, [
- {
- channel: "meeting-auto-end-requested",
- payload: { sessionId: "meeting-3", reason: "silence" },
- },
- ]);
- harness.engine.stop();
-});
-
-test("a queued detection cannot replace a live restart offer", async () => {
- const harness = createEngine();
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
-
- // A back-to-back meeting reminder arriving mid-recording is queued, not shown.
- harness.engine.handleCalendarReminder({
- id: "calendar-next",
- summary: "Next call",
- start_time: new Date(harness.clock.now()).toISOString(),
- });
- assert.deepEqual(harness.shownNotifications, []);
-
- harness.engine.endRecordingSession("meeting-1");
- harness.engine.setUserRecording(false);
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
- assert.equal(harness.autoEndNotifications.length, 1);
-
- // What the post-recording cooldown does when it fires 2.5s after the stop.
- harness.engine._flushNotificationQueue();
- assert.deepEqual(harness.shownNotifications, []);
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "restart",
- harness.overlayWebContents
- ),
- true
- );
- harness.engine.stop();
-});
-
-test("a detection queued behind a restart offer is delivered once the offer resolves", async () => {
- const harness = createEngine();
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
-
- harness.engine.handleCalendarReminder({
- id: "calendar-next",
- summary: "Next call",
- start_time: new Date(harness.clock.now()).toISOString(),
- });
- harness.engine.endRecordingSession("meeting-1");
- harness.engine.setUserRecording(false);
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
- harness.engine._flushNotificationQueue();
- assert.deepEqual(harness.shownNotifications, []);
-
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "dismiss",
- harness.overlayWebContents
- );
-
- assert.equal(harness.shownNotifications.length, 1);
- assert.equal(harness.shownNotifications[0].detectionId, "calendar:calendar-next");
- harness.engine.stop();
-});
-
-test("a recovery notice that does not report success invalidates the restart offer", async () => {
- const harness = createEngine({ showMeetingAutoEndNotification: async () => undefined });
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
- harness.engine.endRecordingSession("meeting-1");
-
- assert.equal(await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents), false);
- assert.equal(
- harness.engine.respondToAutoEndNotification(
- "meeting-1",
- "restart",
- harness.overlayWebContents
- ),
- false
- );
- harness.engine.stop();
-});
-
// endRecordingSession returns false only when a *different* session is live —
// the one case where the caller must not tear down shared capture. A stale stop
// arriving after a replacement (the old renderer unwinding) would otherwise
@@ -1011,151 +571,3 @@ test("a stale end request is refused and leaves the replacement session recordin
]);
harness.engine.stop();
});
-
-// The window manager destroys a notification window on paths that cannot tell
-// the engine about it (_hideNormalAppSurfaces on re-auth, a late detection
-// response landing on a replaced card): dismissMeetingNotification() nulls its
-// window reference before close(), so the "closed" handler early-returns, and
-// it cancels the dismiss timer, so the timeout handler never runs either. The
-// offer therefore has to expire on its own clock, or it gates every meeting
-// prompt for the rest of the app session.
-test("an offer whose card vanished without notice stops gating the queue once it expires", async () => {
- const harness = createEngine();
- const ownerWebContents = harness.owner([]);
- await triggerOwnershipStop(harness, ownerWebContents);
-
- harness.engine.handleCalendarReminder({
- id: "calendar-next",
- summary: "Next call",
- start_time: new Date(harness.clock.now()).toISOString(),
- });
- harness.engine.endRecordingSession("meeting-1");
- harness.engine.setUserRecording(false);
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
-
- harness.engine._flushNotificationQueue();
- assert.deepEqual(harness.shownNotifications, []);
-
- harness.clock.advance(RESTART_WINDOW_MS + TICK_MS);
- harness.engine._flushNotificationQueue();
- assert.equal(harness.shownNotifications.length, 1);
- assert.equal(harness.shownNotifications[0].detectionId, "calendar:calendar-next");
- harness.engine.stop();
-});
-
-// No setUserRecording here: its 2.5s cooldown is itself a queue gate, and this
-// test is about the offer gate alone.
-test("an expired offer no longer queues a fresh detection", async () => {
- const harness = createEngine();
- const ownerWebContents = harness.owner([]);
- await triggerOwnershipStop(harness, ownerWebContents);
- harness.engine.endRecordingSession("meeting-1");
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
-
- harness.clock.advance(RESTART_WINDOW_MS + TICK_MS);
- harness.engine.handleCalendarReminder({
- id: "calendar-late",
- summary: "Later call",
- start_time: new Date(harness.clock.now()).toISOString(),
- });
-
- assert.equal(harness.shownNotifications.length, 1);
- assert.equal(harness.shownNotifications[0].detectionId, "calendar:calendar-late");
- harness.engine.stop();
-});
-
-// The renderer can drop a restart it accepted (its context died with a reload,
-// or a manual recording won the race). Main cannot see that, so the grace it
-// banks has to lapse on its own rather than waiting to be claimed by whatever
-// recording happens to start next.
-test("a restart grace nobody claims in time does not suppress a later recording", async () => {
- const harness = createEngine();
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
- harness.engine.endRecordingSession("meeting-1");
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
- assert.equal(
- harness.engine.respondToAutoEndNotification("meeting-1", "restart", harness.overlayWebContents),
- true
- );
-
- // The restart never reaches startRecording; the user opens an unrelated
- // meeting note well after the restart could plausibly have begun.
- harness.clock.advance(AUTO_END_RESTART_CLAIM_MS + TICK_MS);
- harness.audioActivityDetector.externalMicState = { reliable: true, externalMicActive: false };
- messages.length = 0;
- await harness.engine.beginRecordingSession({
- sessionId: "meeting-2",
- autoEndEligible: true,
- ownerWebContents,
- systemAudioAvailable: true,
- });
-
- harness.clock.advance(SILENCE_WINDOW_MS + TICK_MS);
- assert.deepEqual(messages, [
- {
- channel: "meeting-auto-end-requested",
- payload: { sessionId: "meeting-2", reason: "silence" },
- },
- ]);
- harness.engine.stop();
-});
-
-test("a restart claimed inside the claim window still suppresses auto-end", async () => {
- const harness = createEngine();
- const messages = [];
- const ownerWebContents = harness.owner(messages);
- await triggerOwnershipStop(harness, ownerWebContents);
- harness.engine.endRecordingSession("meeting-1");
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
- harness.engine.respondToAutoEndNotification("meeting-1", "restart", harness.overlayWebContents);
-
- harness.clock.advance(AUTO_END_RESTART_CLAIM_MS - TICK_MS);
- harness.audioActivityDetector.externalMicState = { reliable: true, externalMicActive: false };
- messages.length = 0;
- await harness.engine.beginRecordingSession({
- sessionId: "meeting-2",
- autoEndEligible: true,
- ownerWebContents,
- systemAudioAvailable: true,
- });
-
- harness.clock.advance(SILENCE_WINDOW_MS + TICK_MS);
- assert.deepEqual(messages, []);
- harness.engine.stop();
-});
-
-// A restart is the one response that deliberately skips the flush, because the
-// recording it starts gates the queue again. When it cannot be delivered at
-// all, nothing will start, so the detections held behind it have to go out.
-test("a restart that cannot reach its renderer releases the detections it was holding", async () => {
- const harness = createEngine();
- let ownerDestroyed = false;
- const ownerWebContents = {
- isDestroyed: () => ownerDestroyed,
- send: () => {},
- };
- await triggerOwnershipStop(harness, ownerWebContents);
-
- harness.engine.handleCalendarReminder({
- id: "calendar-next",
- summary: "Next call",
- start_time: new Date(harness.clock.now()).toISOString(),
- });
- harness.engine.endRecordingSession("meeting-1");
- harness.engine.setUserRecording(false);
- await harness.engine.completeAutoEndSession("meeting-1", ownerWebContents);
- harness.engine._flushNotificationQueue();
- assert.deepEqual(harness.shownNotifications, []);
-
- ownerDestroyed = true;
- assert.equal(
- harness.engine.respondToAutoEndNotification("meeting-1", "restart", harness.overlayWebContents),
- false
- );
-
- assert.equal(harness.shownNotifications.length, 1);
- assert.equal(harness.shownNotifications[0].detectionId, "calendar:calendar-next");
- harness.engine.stop();
-});
diff --git a/test/helpers/meetingNotificationModel.test.js b/test/helpers/meetingNotificationModel.test.js
index 56037d1cb..66192e73b 100644
--- a/test/helpers/meetingNotificationModel.test.js
+++ b/test/helpers/meetingNotificationModel.test.js
@@ -3,83 +3,24 @@ const assert = require("node:assert/strict");
const load = () => import("../../src/components/meetingNotificationModel.ts");
-test("auto-end presentation has countdown copy, Restart action, and dismissal", async () => {
- const { getMeetingNotificationPresentation } = await load();
-
- assert.deepEqual(
- getMeetingNotificationPresentation(
- { kind: "auto-end", sessionId: "meeting-2", expiresAt: 40_001, reason: "mic-released" },
- 30
- ),
- {
- titleKey: "meetingNotification.autoEnd.title",
- bodyKey: "meetingNotification.autoEnd.body.micReleased",
- bodyValues: { seconds: 30 },
- actionKey: "meetingNotification.autoEnd.restart",
- action: "restart",
- dismissible: true,
- allowTitleWrap: true,
- }
- );
-});
-
-// Main sets canSummarize from the note itself, so the card only offers a summary
-// when there is a transcript to summarize and no summary already.
-test("auto-end presentation offers the AI summary only when the note can be summarized", async () => {
- const { getMeetingNotificationPresentation } = await load();
- const presentationFor = (canSummarize) =>
- getMeetingNotificationPresentation(
- { kind: "auto-end", sessionId: "meeting-2", expiresAt: 40_001, canSummarize },
- 12
- );
-
- assert.deepEqual(presentationFor(true).secondary, {
- key: "meetingNotification.autoEnd.summary",
- action: "summary",
- });
- // The restart offer is unchanged by the addition.
- assert.equal(presentationFor(true).action, "restart");
- assert.equal("secondary" in presentationFor(false), false);
- assert.equal("secondary" in presentationFor(undefined), false);
-});
-
-test("auto-end presentation picks body copy by reason and defaults to mic-released", async () => {
- const { getMeetingNotificationPresentation } = await load();
- const bodyFor = (reason) =>
- getMeetingNotificationPresentation(
- { kind: "auto-end", sessionId: "meeting-2", expiresAt: 40_001, reason },
- 5
- ).bodyKey;
-
- assert.equal(bodyFor("silence"), "meetingNotification.autoEnd.body.silence");
- assert.equal(bodyFor("process-exit"), "meetingNotification.autoEnd.body.processExit");
- assert.equal(bodyFor(undefined), "meetingNotification.autoEnd.body.micReleased");
- assert.equal(bodyFor("unknown-reason"), "meetingNotification.autoEnd.body.micReleased");
-});
-
test("detection presentation preserves event title, join action, and dismissal", async () => {
const { getMeetingNotificationPresentation } = await load();
assert.deepEqual(
- getMeetingNotificationPresentation(
- {
- kind: "detection",
- detectionId: "calendar:event-1",
- source: "calendar",
- key: "event-1",
- event: { summary: "Weekly planning" },
- variant: "starting",
- joinUrl: "https://meet.example/event-1",
- },
- 0
- ),
+ getMeetingNotificationPresentation({
+ detectionId: "calendar:event-1",
+ source: "calendar",
+ key: "event-1",
+ event: { summary: "Weekly planning" },
+ variant: "starting",
+ joinUrl: "https://meet.example/event-1",
+ }),
{
title: "Weekly planning",
bodyKey: "meetingNotification.body.starting",
actionKey: "meetingNotification.join",
action: "join",
dismissible: true,
- allowTitleWrap: false,
}
);
});
@@ -100,43 +41,6 @@ test("non-dismissible meeting notifications ignore horizontal swipes", async ()
assert.equal(shouldDismissMeetingNotificationSwipe(false, 200), false);
});
-test("countdown rounds up and emits updated seconds until expiration", async () => {
- const { subscribeMeetingAutoEndCountdown } = await load();
- let now = 10_000;
- let tick;
- let clearedTimer;
- const seconds = [];
-
- const unsubscribe = subscribeMeetingAutoEndCountdown(
- 12_001,
- (nextSeconds) => {
- seconds.push(nextSeconds);
- },
- {
- now: () => now,
- setInterval: (callback, delay) => {
- assert.equal(delay, 250);
- tick = callback;
- return 7;
- },
- clearInterval: (timer) => {
- clearedTimer = timer;
- },
- }
- );
-
- now = 10_002;
- tick();
- now = 11_002;
- tick();
- now = 12_001;
- tick();
- unsubscribe();
-
- assert.deepEqual(seconds, [3, 2, 1, 0]);
- assert.equal(clearedTimer, 7);
-});
-
test("overlay initialization cleanup cancels reveal and invalidates a pending pull", async () => {
const { initializeMeetingNotificationOverlay } = await load();
let subscribed;
@@ -176,31 +80,16 @@ test("overlay initialization cleanup cancels reveal and invalidates a pending pu
},
});
- subscribed({ kind: "auto-end", sessionId: "meeting-1", expiresAt: 70_000 });
+ subscribed({ detectionId: "calendar:first" });
cleanup();
reveal();
- resolvePendingData({ kind: "auto-end", sessionId: "meeting-2", expiresAt: 80_000 });
+ resolvePendingData({ detectionId: "calendar:second" });
await pendingData;
await Promise.resolve();
- assert.deepEqual(received, [{ kind: "auto-end", sessionId: "meeting-1", expiresAt: 70_000 }]);
+ assert.deepEqual(received, [{ detectionId: "calendar:first" }]);
assert.equal(canceledTimer, 11);
assert.equal(visibleCount, 0);
assert.equal(readyCount, 0);
assert.equal(unsubscribeCount, 1);
});
-
-// The overlay hides its card optimistically and relies on main closing the
-// window. Anything short of an explicit success leaves the window open, so the
-// card has to come back or the user is left with an invisible, unclickable
-// always-on-top window over their screen.
-test("only an explicit success keeps the auto-end card hidden", async () => {
- const { shouldRestoreAutoEndCard } = await load();
-
- assert.equal(shouldRestoreAutoEndCard({ success: true }), false);
- assert.equal(shouldRestoreAutoEndCard({ success: false, reason: "stale-session" }), true);
- // The IPC method is optional on the preload surface: an older or partially
- // wired bridge resolves undefined, which is not a success.
- assert.equal(shouldRestoreAutoEndCard(undefined), true);
- assert.equal(shouldRestoreAutoEndCard(null), true);
-});
diff --git a/test/helpers/meetingRecordingSession.test.js b/test/helpers/meetingRecordingSession.test.js
index 9debde283..ef772461a 100644
--- a/test/helpers/meetingRecordingSession.test.js
+++ b/test/helpers/meetingRecordingSession.test.js
@@ -35,46 +35,25 @@ test("accepts legacy stops but rejects an expected ID for another active session
assert.equal(canStopMeetingRecordingSession(null, "meeting-1"), false);
});
-test("auto-end stop requests acknowledge only a completed scoped stop", async () => {
+test("auto-end stop requests stop only sessions with a usable ID", async () => {
const { requestMeetingRecordingAutoEnd } = await load();
const requestedSessions = [];
- const completedSessions = [];
const errors = [];
const stopRecording = async (sessionId) => {
requestedSessions.push(sessionId);
- return { stopped: sessionId === "meeting-2" };
};
- const onStopped = (sessionId, stopped) => completedSessions.push({ sessionId, stopped });
const onError = (error, sessionId) => errors.push({ error, sessionId });
assert.equal(
- requestMeetingRecordingAutoEnd(
- { sessionId: "meeting-2" },
- stopRecording,
- onStopped,
- onError
- ),
+ requestMeetingRecordingAutoEnd({ sessionId: "meeting-2" }, stopRecording, onError),
true
);
- assert.equal(
- requestMeetingRecordingAutoEnd({ sessionId: "meeting-1" }, stopRecording, onStopped, onError),
- true
- );
- assert.equal(
- requestMeetingRecordingAutoEnd({ sessionId: "" }, stopRecording, onStopped, onError),
- false
- );
- assert.equal(requestMeetingRecordingAutoEnd(null, stopRecording, onStopped, onError), false);
+ assert.equal(requestMeetingRecordingAutoEnd({ sessionId: "" }, stopRecording, onError), false);
+ assert.equal(requestMeetingRecordingAutoEnd(null, stopRecording, onError), false);
await Promise.resolve();
await Promise.resolve();
- assert.deepEqual(requestedSessions, ["meeting-2", "meeting-1"]);
- // Both settle: the caller must learn about a stop that completed without a
- // persisted result, or an auto-end ends the recording with no feedback.
- assert.deepEqual(completedSessions, [
- { sessionId: "meeting-2", stopped: true },
- { sessionId: "meeting-1", stopped: false },
- ]);
+ assert.deepEqual(requestedSessions, ["meeting-2"]);
assert.deepEqual(errors, []);
});
@@ -87,11 +66,8 @@ test("a rejected auto-end stop is reported instead of swallowed", async () => {
};
assert.equal(
- requestMeetingRecordingAutoEnd(
- { sessionId: "meeting-2" },
- stopRecording,
- () => undefined,
- (error, sessionId) => errors.push({ error, sessionId })
+ requestMeetingRecordingAutoEnd({ sessionId: "meeting-2" }, stopRecording, (error, sessionId) =>
+ errors.push({ error, sessionId })
),
true
);
@@ -101,48 +77,6 @@ test("a rejected auto-end stop is reported instead of swallowed", async () => {
assert.deepEqual(errors, [{ error: stopFailure, sessionId: "meeting-2" }]);
});
-test("restart context preserves note identity and session speaker settings", async () => {
- const { createMeetingAutoEndRestartContext } = await load();
- const seedSegments = [{ id: "segment-1", text: "Hello", source: "mic" }];
-
- assert.deepEqual(
- createMeetingAutoEndRestartContext("meeting-2", "meeting-2", {
- recordingNoteId: 42,
- recordingNoteTitle: "Planning",
- recordingFolderId: 8,
- sessionDiarizationEnabled: false,
- sessionExpectedCount: 5,
- userTouchedStepper: true,
- segments: seedSegments,
- }),
- {
- sessionId: "meeting-2",
- args: {
- noteId: 42,
- noteTitle: "Planning",
- folderId: 8,
- seedSegments,
- diarizationEnabled: false,
- expectedCount: 5,
- expectedCountIsExplicit: true,
- autoEndEligible: true,
- },
- }
- );
- assert.equal(
- createMeetingAutoEndRestartContext("meeting-1", "meeting-2", {
- recordingNoteId: 42,
- recordingNoteTitle: "Planning",
- recordingFolderId: 8,
- sessionDiarizationEnabled: true,
- sessionExpectedCount: 2,
- userTouchedStepper: false,
- segments: [],
- }),
- null
- );
-});
-
test("only meeting notes are eligible for automatic ending", async () => {
const { isMeetingAutoEndEligible } = await load();
@@ -394,192 +328,3 @@ test("main-start rejection releases cancellation and replacement after one scope
assert.equal(scopedStopCount, 1);
assert.deepEqual(events, ["main-start:meeting-1", "main-stop:meeting-1", "capture:meeting-2"]);
});
-
-const parseSegments = (raw) => JSON.parse(raw);
-
-test("restart seeds from the note's persisted transcript, not the stale live segments", async () => {
- const { resolveMeetingAutoEndRestartSeed } = await load();
- const diarized = [{ id: "a", text: "hello", speaker: "Ada" }];
- const stale = [{ id: "a", text: "hello", speaker: null }];
-
- const result = resolveMeetingAutoEndRestartSeed(
- 7,
- { transcript: JSON.stringify(diarized), deleted_at: null },
- parseSegments,
- stale
- );
-
- assert.deepEqual(result, { ok: true, seedSegments: diarized });
-});
-
-test("restart refuses a note that was deleted during the restart window", async () => {
- const { resolveMeetingAutoEndRestartSeed } = await load();
-
- assert.deepEqual(
- resolveMeetingAutoEndRestartSeed(
- 7,
- { transcript: "[]", deleted_at: "2026-08-27T00:00:00Z" },
- parseSegments,
- []
- ),
- { ok: false, reason: "note-missing" }
- );
-});
-
-test("restart refuses a note that no longer exists", async () => {
- const { resolveMeetingAutoEndRestartSeed } = await load();
-
- assert.deepEqual(resolveMeetingAutoEndRestartSeed(7, null, parseSegments, []), {
- ok: false,
- reason: "note-missing",
- });
-});
-
-test("restart without a note keeps the live segments it captured", async () => {
- const { resolveMeetingAutoEndRestartSeed } = await load();
- const live = [{ id: "a", text: "hello" }];
-
- assert.deepEqual(resolveMeetingAutoEndRestartSeed(null, null, parseSegments, live), {
- ok: true,
- seedSegments: live,
- });
-});
-
-test("restart starts empty when the note has no transcript yet", async () => {
- const { resolveMeetingAutoEndRestartSeed } = await load();
-
- assert.deepEqual(
- resolveMeetingAutoEndRestartSeed(7, { transcript: "", deleted_at: null }, parseSegments, [
- { id: "a", text: "stale" },
- ]),
- { ok: true, seedSegments: [] }
- );
-});
-
-// runMeetingAutoEndRestart owns every abort path, so the component can toast on
-// all of them instead of dropping some silently.
-function createRestartDeps(overrides = {}) {
- const started = [];
- return {
- started,
- deps: {
- getActiveSessionId: () => null,
- getLatestSegments: () => [],
- getNote: async () => ({ transcript: "[]", deleted_at: null }),
- parseSegments,
- startRecording: async (args) => {
- started.push(args);
- return true;
- },
- ...overrides,
- },
- };
-}
-
-const restartContext = (sessionId = "meeting-1", args = {}) => ({
- sessionId,
- args: { noteId: 7, noteTitle: "Standup", folderId: 3, seedSegments: [], ...args },
-});
-
-test("a delivered restart starts a recording seeded from the note", async () => {
- const { runMeetingAutoEndRestart } = await load();
- const { deps, started } = createRestartDeps({
- getNote: async () => ({
- transcript: JSON.stringify([{ id: "a", text: "hi" }]),
- deleted_at: null,
- }),
- });
-
- const outcome = await runMeetingAutoEndRestart(
- { sessionId: "meeting-1" },
- restartContext(),
- deps
- );
-
- assert.deepEqual(outcome, { status: "started" });
- assert.equal(started.length, 1);
- assert.deepEqual(started[0].seedSegments, [{ id: "a", text: "hi" }]);
- assert.equal(started[0].noteId, 7);
-});
-
-test("a restart whose context died reports an abort instead of failing silently", async () => {
- const { runMeetingAutoEndRestart } = await load();
- const { deps, started } = createRestartDeps();
-
- assert.deepEqual(await runMeetingAutoEndRestart({ sessionId: "meeting-1" }, null, deps), {
- status: "aborted",
- reason: "no-context",
- });
- assert.deepEqual(
- await runMeetingAutoEndRestart({ sessionId: "meeting-9" }, restartContext(), deps),
- { status: "aborted", reason: "no-context" }
- );
- assert.equal(started.length, 0);
-});
-
-test("a restart racing an already-live recording aborts before it starts one", async () => {
- const { runMeetingAutoEndRestart } = await load();
- const { deps, started } = createRestartDeps({ getActiveSessionId: () => "meeting-other" });
-
- assert.deepEqual(
- await runMeetingAutoEndRestart({ sessionId: "meeting-1" }, restartContext(), deps),
- { status: "aborted", reason: "already-recording" }
- );
- assert.equal(started.length, 0);
-});
-
-// The note read is awaited, so a manual recording can win the race after the
-// first guard passed. Starting anyway would adopt the old note under the user's
-// new recording.
-test("a recording that starts while the note is being read cancels the restart", async () => {
- const { runMeetingAutoEndRestart } = await load();
- let activeSessionId = null;
- const noteRead = createDeferred();
- const { deps, started } = createRestartDeps({
- getActiveSessionId: () => activeSessionId,
- getNote: () => noteRead.promise,
- });
-
- const outcome = runMeetingAutoEndRestart({ sessionId: "meeting-1" }, restartContext(), deps);
- activeSessionId = "meeting-manual";
- noteRead.resolve({ transcript: "[]", deleted_at: null });
-
- assert.deepEqual(await outcome, { status: "aborted", reason: "already-recording" });
- assert.equal(started.length, 0);
-});
-
-test("a restart whose note vanished aborts without starting a recording", async () => {
- const { runMeetingAutoEndRestart } = await load();
- const { deps, started } = createRestartDeps({ getNote: async () => null });
-
- assert.deepEqual(
- await runMeetingAutoEndRestart({ sessionId: "meeting-1" }, restartContext(), deps),
- { status: "aborted", reason: "note-missing" }
- );
- assert.equal(started.length, 0);
-});
-
-test("a restart that startRecording refuses reports an abort", async () => {
- const { runMeetingAutoEndRestart } = await load();
- const { deps } = createRestartDeps({ startRecording: async () => false });
-
- assert.deepEqual(
- await runMeetingAutoEndRestart({ sessionId: "meeting-1" }, restartContext(), deps),
- { status: "aborted", reason: "start-refused" }
- );
-});
-
-test("a restart without a note keeps the segments captured at the stop", async () => {
- const { runMeetingAutoEndRestart } = await load();
- const live = [{ id: "a", text: "in person" }];
- const { deps, started } = createRestartDeps({ getLatestSegments: () => live });
-
- const outcome = await runMeetingAutoEndRestart(
- { sessionId: "meeting-1" },
- restartContext("meeting-1", { noteId: null }),
- deps
- );
-
- assert.deepEqual(outcome, { status: "started" });
- assert.deepEqual(started[0].seedSegments, live);
-});
diff --git a/test/helpers/preloadAuthBridge.test.js b/test/helpers/preloadAuthBridge.test.js
index 48acad92f..ee47125b4 100644
--- a/test/helpers/preloadAuthBridge.test.js
+++ b/test/helpers/preloadAuthBridge.test.js
@@ -101,27 +101,6 @@ test("meeting auto-end listener strips the event and can unsubscribe", () => {
assert.equal(listeners.has("meeting-auto-end-requested"), false);
});
-test("meeting auto-end lifecycle bridges completion, overlay responses, and restart", async () => {
- const { api, invocations, listeners } = loadPreloadApi();
- const restartPayload = { sessionId: "meeting-2" };
- let receivedRestart;
- const unsubscribe = api.onMeetingAutoEndRestartRequested((request) => {
- receivedRestart = request;
- });
-
- await api.meetingAutoEndCompleted("meeting-2");
- await api.meetingAutoEndRespond("meeting-2", "restart");
- listeners.get("meeting-auto-end-restart-requested")?.({ sender: "ipc" }, restartPayload);
-
- assert.deepEqual(invocations, [
- ["meeting-auto-end-completed", "meeting-2"],
- ["meeting-auto-end-respond", "meeting-2", "restart"],
- ]);
- assert.equal(receivedRestart, restartPayload);
- unsubscribe();
- assert.equal(listeners.has("meeting-auto-end-restart-requested"), false);
-});
-
test("assistant busy state is forwarded to the main-process hotkey guard", async () => {
const { api, invocations } = loadPreloadApi();
diff --git a/test/helpers/pushToTalkForceStop.test.js b/test/helpers/pushToTalkForceStop.test.js
index ddf50223d..9b1437e9d 100644
--- a/test/helpers/pushToTalkForceStop.test.js
+++ b/test/helpers/pushToTalkForceStop.test.js
@@ -41,8 +41,6 @@ Module._load = function loadWindowManagerWithStubs(request, parent, isMain) {
MAIN_WINDOW_CONFIG: {},
CONTROL_PANEL_CONFIG: {},
NOTIFICATION_WINDOW_CONFIG: {},
- AUTO_END_NOTIFICATION_WINDOW_SIZE: { width: 620, height: 116 },
- getMeetingNotificationWindowSize: () => ({ width: 392, height: 92 }),
WINDOW_SIZES: { BASE: { width: 96, height: 96 } },
ONBOARDING_WINDOW_SIZES: { COMPACT: {}, EXPANDED: {} },
WindowPositionUtil: {
diff --git a/test/helpers/windowConfigMeetingNotification.test.js b/test/helpers/windowConfigMeetingNotification.test.js
index 46e1af3bd..3bb3ac5f1 100644
--- a/test/helpers/windowConfigMeetingNotification.test.js
+++ b/test/helpers/windowConfigMeetingNotification.test.js
@@ -1,78 +1,9 @@
const test = require("node:test");
const assert = require("node:assert/strict");
-const {
- AUTO_END_NOTIFICATION_WINDOW_SIZE,
- NOTIFICATION_WINDOW_CONFIG,
- WindowPositionUtil,
- getMeetingNotificationWindowSize,
-} = require("../../src/helpers/windowConfig");
+const { NOTIFICATION_WINDOW_CONFIG } = require("../../src/helpers/windowConfig");
test("meeting notifications accept the first macOS click with Electron's documented option", () => {
assert.equal(NOTIFICATION_WINDOW_CONFIG.acceptFirstMouse, true);
assert.equal(Object.hasOwn(NOTIFICATION_WINDOW_CONFIG, "acceptsFirstMouse"), false);
});
-
-test("auto-end uses a larger positioned window while detection keeps its existing size", () => {
- const detectionSize = getMeetingNotificationWindowSize({ kind: "detection" });
- const autoEndSize = getMeetingNotificationWindowSize({ kind: "auto-end" });
- const display = { workArea: { x: 100, y: 50, width: 1400, height: 900 } };
-
- assert.deepEqual(detectionSize, { width: 392, height: 92 });
- assert.deepEqual(autoEndSize, AUTO_END_NOTIFICATION_WINDOW_SIZE);
- // Wider than a detection prompt because of the countdown copy and the Restart
- // action, but not so wide that a single line runs the width of the screen.
- assert.ok(autoEndSize.width > detectionSize.width);
- assert.ok(autoEndSize.width <= 480);
- assert.deepEqual(WindowPositionUtil.getNotificationPosition(display, autoEndSize), {
- x: 1004,
- y: 66,
- width: autoEndSize.width,
- height: autoEndSize.height,
- });
-});
-
-test("auto-end dimensions fit every supported localized title, body, and action", () => {
- const locales = ["en", "es", "fr", "de", "pt", "it", "ru", "ja", "zh-CN", "zh-TW", "ar"];
- const translations = locales.map(
- (locale) => require(`../../src/locales/${locale}/translation.json`).meetingNotification.autoEnd
- );
- const displayColumns = (value) =>
- [...value].reduce(
- (columns, character) =>
- columns +
- (/\p{Script=Han}|\p{Script=Hiragana}|\p{Script=Katakana}/u.test(character) ? 2 : 1),
- 0
- );
- // Restart and the summary offer stack vertically, so the wider label is what
- // narrows the text column.
- const longestActionColumns = Math.max(
- ...translations.flatMap(({ restart, summary }) => [
- displayColumns(restart),
- displayColumns(summary),
- ])
- );
-
- // Reserve the card's outer padding, icon/gaps, and the full non-wrapping action.
- const actionWidth = longestActionColumns * 6 + 20;
- const textWidth = AUTO_END_NOTIFICATION_WINDOW_SIZE.width - 24 - 20 - 26 - 20 - actionWidth;
- const columnsPerLine = Math.floor(textWidth / 6);
- // Every reason-specific body must fit, not just the longest per locale.
- const worstCase = translations.flatMap(({ title, body }, index) =>
- Object.entries(body).map(([reason, text]) => ({
- locale: locales[index],
- reason,
- lines:
- Math.ceil(displayColumns(title) / columnsPerLine) +
- Math.ceil(displayColumns(text) / columnsPerLine),
- }))
- );
- const maximumTextLines = Math.max(...worstCase.map(({ lines }) => lines));
- const requiredHeight = 24 + 20 + maximumTextLines * 14;
-
- assert.ok(columnsPerLine > 0);
- assert.ok(
- requiredHeight <= AUTO_END_NOTIFICATION_WINDOW_SIZE.height,
- `overflow: ${JSON.stringify(worstCase.filter(({ lines }) => lines === maximumTextLines))}`
- );
-});
diff --git a/test/helpers/windowManagerAssistantPanel.test.js b/test/helpers/windowManagerAssistantPanel.test.js
index 15e7fecfc..710478a69 100644
--- a/test/helpers/windowManagerAssistantPanel.test.js
+++ b/test/helpers/windowManagerAssistantPanel.test.js
@@ -127,8 +127,6 @@ Module._load = function loadWindowManagerWithStubs(request, parent, isMain) {
MAIN_WINDOW_CONFIG: {},
CONTROL_PANEL_CONFIG: {},
NOTIFICATION_WINDOW_CONFIG: {},
- AUTO_END_NOTIFICATION_WINDOW_SIZE: { width: 620, height: 116 },
- getMeetingNotificationWindowSize: () => ({ width: 392, height: 92 }),
WINDOW_SIZES: { BASE: { width: 96, height: 96 } },
ONBOARDING_WINDOW_SIZES: {
COMPACT: { width: 480, height: 624 },
diff --git a/test/helpers/windowManagerMeetingNotification.test.js b/test/helpers/windowManagerMeetingNotification.test.js
index 62dcad7cf..216c177c6 100644
--- a/test/helpers/windowManagerMeetingNotification.test.js
+++ b/test/helpers/windowManagerMeetingNotification.test.js
@@ -108,20 +108,16 @@ Module._load = function loadWindowManagerWithStubs(request, parent, isMain) {
if (request === "./dockManager") return {};
if (request === "./i18nMain") return { i18nMain: { t: (key) => key } };
if (request === "./windowConfig") {
- const detectionSize = { width: 392, height: 92 };
- const autoEndSize = { width: 620, height: 116 };
+ const notificationSize = { width: 392, height: 92 };
return {
MAIN_WINDOW_CONFIG: {},
CONTROL_PANEL_CONFIG: {},
- NOTIFICATION_WINDOW_CONFIG: { ...detectionSize, acceptFirstMouse: true },
- AUTO_END_NOTIFICATION_WINDOW_SIZE: autoEndSize,
- getMeetingNotificationWindowSize: (data) =>
- data?.kind === "auto-end" ? autoEndSize : detectionSize,
+ NOTIFICATION_WINDOW_CONFIG: { ...notificationSize, acceptFirstMouse: true },
WINDOW_SIZES: {},
WindowPositionUtil: {
- getNotificationPosition: (_display, size = detectionSize) => ({
- ...size,
- x: 1000 - size.width,
+ getNotificationPosition: () => ({
+ ...notificationSize,
+ x: 1000 - notificationSize.width,
y: 16,
}),
setupAlwaysOnTop: () => undefined,
@@ -131,6 +127,7 @@ Module._load = function loadWindowManagerWithStubs(request, parent, isMain) {
return originalLoad.call(this, request, parent, isMain);
};
const WindowManager = require("../../src/helpers/windowManager");
+const { getNotificationTimeoutMs } = require("../../src/helpers/notificationTimer");
Module._load = originalLoad;
const notificationWindowFor = (index) => createdWindows[index];
@@ -357,16 +354,12 @@ test("window manager starts fail-closed and suppresses normal-app popup surfaces
assert.deepEqual(createdWindows, []);
});
-test("window creation uses the auto-end dimensions and variant-aware position", async () => {
+test("window creation uses the notification dimensions and position", async () => {
const manager = createNormalWindowManager();
+ const notification = { detectionId: "calendar:next", source: "calendar" };
try {
- const showPromise = manager.showMeetingAutoEndNotification({
- sessionId: "meeting-1",
- expiresAt: 70_000,
- reason: "silence",
- canSummarize: true,
- });
+ const showPromise = manager.showMeetingNotification(notification, { autoDismiss: false });
const notificationWindow = createdWindows[0];
assert.deepEqual(
@@ -377,17 +370,10 @@ test("window creation uses the auto-end dimensions and variant-aware position",
x: notificationWindow.options.x,
y: notificationWindow.options.y,
},
- { acceptFirstMouse: true, width: 620, height: 116, x: 380, y: 16 }
+ { acceptFirstMouse: true, width: 392, height: 92, x: 608, y: 16 }
);
- // The reason and the summary offer both ride along in the pending payload the
- // overlay will fetch: dropping either here leaves the card unable to render it.
- assert.deepEqual(manager._pendingNotificationData, {
- kind: "auto-end",
- sessionId: "meeting-1",
- expiresAt: 70_000,
- reason: "silence",
- canSummarize: true,
- });
+ // The payload the overlay fetches is stored verbatim.
+ assert.deepEqual(manager._pendingNotificationData, notification);
notificationWindow.loadDeferred.resolve();
await showPromise;
@@ -396,122 +382,6 @@ test("window creation uses the auto-end dimensions and variant-aware position",
}
});
-test("unexpected auto-end window closure invalidates that restart offer", async () => {
- const manager = createNormalWindowManager();
- const closedSessions = [];
- manager.meetingDetectionEngine = {
- handleAutoEndNotificationClosed: (sessionId) => closedSessions.push(sessionId),
- };
-
- const showPromise = manager.showMeetingAutoEndNotification({
- sessionId: "meeting-1",
- expiresAt: 70_000,
- reason: "silence",
- });
- const notificationWindow = createdWindows[0];
- notificationWindow.loadDeferred.resolve();
- await showPromise;
-
- notificationWindow.close();
-
- assert.deepEqual(closedSessions, ["meeting-1"]);
-});
-
-test("replacing an auto-end notification invalidates its restart offer", async () => {
- const manager = createNormalWindowManager();
- const closedSessions = [];
- manager.meetingDetectionEngine = {
- handleAutoEndNotificationClosed: (sessionId) => closedSessions.push(sessionId),
- };
-
- const autoEndPromise = manager.showMeetingAutoEndNotification({
- sessionId: "meeting-1",
- expiresAt: Date.now() + 30_000,
- reason: "silence",
- });
- createdWindows[0].loadDeferred.resolve();
- await autoEndPromise;
-
- const replacementPromise = manager.showMeetingNotification(
- { kind: "detection", detectionId: "calendar:next", source: "calendar" },
- { autoDismiss: false }
- );
-
- try {
- assert.deepEqual(closedSessions, ["meeting-1"]);
- } finally {
- createdWindows[1].loadDeferred.resolve();
- await replacementPromise;
- manager.dismissMeetingNotification();
- }
-});
-
-test("auto-end notification loading has a fail-safe timeout", async () => {
- const timers = installFakeTimers();
- const manager = createNormalWindowManager();
- const showPromise = manager.showMeetingAutoEndNotification({
- sessionId: "meeting-1",
- expiresAt: 70_000,
- reason: "silence",
- });
- const notificationWindow = createdWindows[0];
-
- try {
- assert.equal(timers.pendingCount(), 1);
- timers.runAll();
-
- await assert.rejects(showPromise, /timed out/i);
- assert.equal(notificationWindow.isDestroyed(), true);
- assert.equal(manager.notificationWindow, null);
- } finally {
- manager.dismissMeetingNotification();
- notificationWindow.loadDeferred.resolve();
- await showPromise.catch(() => undefined);
- timers.restore();
- }
-});
-
-test("auto-end recovery subtracts load time from its expiry and hover cannot extend it", async () => {
- const timers = installFakeTimers();
- const manager = createNormalWindowManager();
- const originalDateNow = Date.now;
- const timedOutNotifications = [];
- let now = 40_000;
- Date.now = () => now;
- manager.meetingDetectionEngine = {
- handleNotificationTimeout: (notification) => timedOutNotifications.push(notification),
- handleAutoEndNotificationClosed: () => undefined,
- };
-
- const notification = {
- kind: "auto-end",
- sessionId: "meeting-1",
- expiresAt: 70_000,
- reason: "silence",
- };
- const showPromise = manager.showMeetingAutoEndNotification(notification);
- const notificationWindow = createdWindows[0];
-
- try {
- now = 45_000;
- notificationWindow.loadDeferred.resolve();
- await showPromise;
- assert.equal(timers.pendingDelays().includes(25_000), true);
-
- manager.setNotificationInteractivity(notificationWindow.webContents, true);
- manager.setNotificationInteractivity(notificationWindow.webContents, false);
- assert.equal(timers.pendingDelays().includes(25_000), true);
-
- timers.runDelay(25_000);
- assert.deepEqual(timedOutNotifications, [notification]);
- assert.equal(notificationWindow.isDestroyed(), true);
- } finally {
- Date.now = originalDateNow;
- manager.dismissMeetingNotification();
- timers.restore();
- }
-});
-
test("a replaced deferred notification cannot send its payload to the newer window", async () => {
const timers = installFakeTimers();
const manager = createNormalWindowManager();
@@ -629,66 +499,32 @@ test("a stale ready callback cannot show the replacement notification window", a
}
});
-test("an auto-end notification dismissed while loading reports that it was not shown", async () => {
- const manager = createNormalWindowManager();
-
- const showPromise = manager.showMeetingAutoEndNotification({
- sessionId: "meeting-1",
- expiresAt: Date.now() + 30_000,
- reason: "silence",
- });
- manager.dismissMeetingNotification();
- createdWindows[0].loadDeferred.resolve();
-
- assert.equal(await showPromise, false);
-});
-
-test("an auto-end notification whose load fails after dismissal reports that it was not shown", async () => {
- const manager = createNormalWindowManager();
-
- const showPromise = manager.showMeetingAutoEndNotification({
- sessionId: "meeting-1",
- expiresAt: Date.now() + 30_000,
- reason: "silence",
- });
- manager.dismissMeetingNotification();
- createdWindows[0].loadDeferred.reject(new Error("load failed"));
-
- assert.equal(await showPromise, false);
-});
-
-// The engine flushes its queued detections when an expiring restart offer
-// releases them, so a prompt raised from the timeout handler must outlive the
-// dismissal that closes the expired card.
+// The engine may raise the next queued prompt from its timeout handler, so that
+// prompt must outlive the dismissal that closes the expired card.
test("a notification raised from the timeout handler survives the dismissal that follows", async () => {
const timers = installFakeTimers();
const manager = createNormalWindowManager();
- const originalDateNow = Date.now;
- let now = 40_000;
- Date.now = () => now;
let replacementPromise = null;
manager.meetingDetectionEngine = {
handleNotificationTimeout: () => {
replacementPromise = manager.showMeetingNotification(
- { kind: "detection", detectionId: "calendar:next", source: "calendar" },
+ { detectionId: "calendar:next", source: "calendar" },
{ autoDismiss: false }
);
},
- handleAutoEndNotificationClosed: () => undefined,
+ handleDetectionNotificationClosed: () => undefined,
};
- const showPromise = manager.showMeetingAutoEndNotification({
- kind: "auto-end",
- sessionId: "meeting-1",
- expiresAt: 70_000,
- reason: "silence",
+ const showPromise = manager.showMeetingNotification({
+ detectionId: "calendar:first",
+ source: "calendar",
});
try {
notificationWindowFor(0).loadDeferred.resolve();
await showPromise;
- timers.runDelay(30_000);
+ timers.runDelay(getNotificationTimeoutMs("calendar"));
notificationWindowFor(1).loadDeferred.resolve();
await replacementPromise;
@@ -696,7 +532,6 @@ test("a notification raised from the timeout handler survives the dismissal that
assert.equal(notificationWindowFor(1).isDestroyed(), false);
assert.equal(manager.notificationWindow, notificationWindowFor(1));
} finally {
- Date.now = originalDateNow;
manager.dismissMeetingNotification();
timers.restore();
}
@@ -710,7 +545,6 @@ test("unexpected detection card closure releases that detection", async () => {
};
const showPromise = manager.showMeetingNotification({
- kind: "detection",
detectionId: "audio:sustained-audio",
source: "audio",
});
@@ -737,7 +571,6 @@ test("an expired detection reports the timeout once, not also as a close", async
};
const showPromise = manager.showMeetingNotification({
- kind: "detection",
detectionId: "audio:sustained-audio",
source: "audio",
});
@@ -762,7 +595,6 @@ test("a detection card whose load fails releases that detection", async () => {
};
const showPromise = manager.showMeetingNotification({
- kind: "detection",
detectionId: "audio:sustained-audio",
source: "audio",
});
diff --git a/test/locales/translationCoverage.test.js b/test/locales/translationCoverage.test.js
index 181b6d7f1..53d1593f5 100644
--- a/test/locales/translationCoverage.test.js
+++ b/test/locales/translationCoverage.test.js
@@ -49,12 +49,6 @@ const ARABIC_NUMBER_NEUTRAL_TEMPLATES = {
"عدد الأجزاء الصوتية التي تعذر تفريغها: {{failed}} من أصل {{total}}.",
"settingsPage.account.planDescriptions.trial": "عدد الأيام المتبقية: {{days}} - تفريغ غير محدود",
"emailVerification.resendIn": "إعادة الإرسال بعد {{seconds}} ث",
- "meetingNotification.autoEnd.body.micReleased":
- "لا يستخدم أي تطبيق آخر ميكروفونك، لذا توقف التسجيل تلقائيًا. أعد تشغيل التسجيل خلال {{seconds}} ث.",
- "meetingNotification.autoEnd.body.silence":
- "لم يُكتشف أي صوت، لذا توقف التسجيل تلقائيًا. أعد تشغيل التسجيل خلال {{seconds}} ث.",
- "meetingNotification.autoEnd.body.processExit":
- "أُغلق تطبيق الاجتماع، لذا توقف التسجيل تلقائيًا. أعد تشغيل التسجيل خلال {{seconds}} ث.",
"insights.wpmCoverage": "استنادًا إلى نسبة {{count}}% من الكلمات المقاسة",
"dictionary.promptLimitNotice":
"عدد أحرف قاموسك: {{chars}}. لا تقرأ نماذج Groq وWhisper سوى بضع مئات من الأحرف الأخيرة منه، لذا تعمل القوائم الأقصر بشكل أفضل معها. أما النماذج الأخرى فتحصل على القائمة كاملة.",
diff --git a/test/stores/meetingRecordingStoreAutoEndStop.test.js b/test/stores/meetingRecordingStoreAutoEndStop.test.js
index ea58a3a4b..235925393 100644
--- a/test/stores/meetingRecordingStoreAutoEndStop.test.js
+++ b/test/stores/meetingRecordingStoreAutoEndStop.test.js
@@ -6,10 +6,10 @@ const {
installMicCaptureGlobals,
} = require("../lib/rendererTestHarness");
-// `stopped` is what gates the auto-end restart card: true means this call ended
-// a live recording, so resuming its note is safe. It must not be conditioned on
-// main's teardown result — the transcript is written from the renderer before
-// that IPC is even awaited, so a teardown error still leaves a resumable note.
+// `stopped` is true only when this call ended a live recording. It must not be
+// conditioned on main's teardown result — the transcript is written from the
+// renderer before that IPC is even awaited, so a teardown error still leaves a
+// persisted note.
const START_ARGS = {
noteId: 11,
@@ -22,7 +22,6 @@ function createElectronAPI({ stopResult }) {
const noopListener = () => () => {};
const notes = new Map([[11, { id: 11, transcript: "", deleted_at: null }]]);
return {
- updatedTranscripts: [],
api: {
checkSystemAudioAccess: async () => ({
granted: true,
@@ -93,8 +92,8 @@ test("a session stamps its start time and clears it on stop", async (t) => {
});
// The renderer has already run cleanup and written the transcript by the time
-// main's result is read, so a teardown failure must not cost the user their
-// restart offer.
+// main's result is read, so a teardown failure must not be reported as a
+// recording that never stopped.
test("a stop whose main-side teardown fails still reports the recording ended", async (t) => {
const { api } = createElectronAPI({
stopResult: () => ({ success: false, error: "audio tap teardown failed" }),