Skip to content

Commit 592c886

Browse files
fix(devtools): add auto-stop confirmation notification (#5302)
Add a devtools button that previews the meeting-ended auto-stop prompt and uses the active live session when available.
1 parent 7948919 commit 592c886

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

apps/desktop/src/sidebar/devtool.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ import { TrialStartedDialog } from "~/billing/trial-started-dialog";
1313
import { getLatestVersion } from "~/changelog";
1414
import * as main from "~/store/tinybase/store/main";
1515
import { showBatchCompletedNotification } from "~/store/zustand/listener/general-batch";
16+
import { listenerStore } from "~/store/zustand/listener/instance";
1617
import { useTabs } from "~/store/zustand/tabs";
18+
import { createAutoStopEndedNotificationKey } from "~/stt/auto-stop-notification";
1719
import { commands } from "~/types/tauri.gen";
1820

1921
export function DevtoolView() {
@@ -302,6 +304,28 @@ function NotificationsCard() {
302304
});
303305
}, []);
304306

307+
const showAutoStopConfirmationNotification = useCallback(async () => {
308+
const sessionId =
309+
listenerStore.getState().live.sessionId ??
310+
`devtool-${crypto.randomUUID()}`;
311+
312+
await notificationCommands.showNotification({
313+
key: createAutoStopEndedNotificationKey(sessionId),
314+
title: "Did your meeting end?",
315+
message:
316+
"Google Chrome stopped using the microphone before the scheduled end time.",
317+
timeout: { secs: 60, nanos: 0 },
318+
source: null,
319+
start_time: null,
320+
participants: null,
321+
event_details: null,
322+
action_label: "Stop recording",
323+
options: null,
324+
footer: null,
325+
icon: { type: "bundle_id", bundle_id: "com.google.Chrome" },
326+
});
327+
}, []);
328+
305329
const showBatchNotification = useCallback(async () => {
306330
await showBatchCompletedNotification("devtool", { force: true });
307331
}, []);
@@ -342,6 +366,13 @@ function NotificationsCard() {
342366
>
343367
Mic detected with options
344368
</button>
369+
<button
370+
type="button"
371+
onClick={() => void showAutoStopConfirmationNotification()}
372+
className={btnClass}
373+
>
374+
Auto-stop confirmation
375+
</button>
345376
<button
346377
type="button"
347378
onClick={() => void showBatchNotification()}

0 commit comments

Comments
 (0)