@@ -13,7 +13,9 @@ import { TrialStartedDialog } from "~/billing/trial-started-dialog";
1313import { getLatestVersion } from "~/changelog" ;
1414import * as main from "~/store/tinybase/store/main" ;
1515import { showBatchCompletedNotification } from "~/store/zustand/listener/general-batch" ;
16+ import { listenerStore } from "~/store/zustand/listener/instance" ;
1617import { useTabs } from "~/store/zustand/tabs" ;
18+ import { createAutoStopEndedNotificationKey } from "~/stt/auto-stop-notification" ;
1719import { commands } from "~/types/tauri.gen" ;
1820
1921export 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