Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.
TypeScript ai-meeting-assistantai-notetakerelectrongranola-alternativelinuxllama-cpplocal-ailocal-firstmacosmcpmeeting-minutesmeeting-notesoffline-firstopen-sourceprivacyspeech-to-texttranscriptionwhisperwhisper-cppwindows
no 'Meeting captured' banner when you just ended the meeting yourself; it still shows when a meeting ends in the background
Eric Brownrout3775ab9b12c9
diff --git a/app/src/main/widget.ts b/app/src/main/widget.tsindex 08288e6a..95dde3f0 100644--- a/app/src/main/widget.ts+++ b/app/src/main/widget.ts@@ -66,6 +66,8 @@ export function createWidget(d: { open(meetingId: string): void; stop(meetingId:let dragPosition: { x: number; y: number } | null = nulllet noteTimer: NodeJS.Timeout | undefinedlet notifyOnChange = false+ /** the person just ended it (the app was in front, or they pressed the pill), so a success banner would only repeat it */+ let stoppedHere = false, stopPressed = falselet notice: { title: string; body: string; meetingId: string } | null = nulllet notification: Notification | undefined/** what a test can see: the window itself is hidden in tests */@@ -131,7 +133,7 @@ export function createWidget(d: { open(meetingId: string): void; stop(meetingId:}onMeetingStart((m) => {- notifyOnChange = false; notice = null+ notifyOnChange = false; notice = null; stopPressed = falsemodel.start({ id: m.id, title: m.title, startedAt: m.resume ? m.resume.startedAt - m.resume.capturedMs : m.startedAt })open(); push()})@@ -140,6 +142,7 @@ export function createWidget(d: { open(meetingId: string): void; stop(meetingId:// The following change event reports whether the stopped metadata was saved.model.stop(Date.now())notifyOnChange = true+ stoppedHere = stopPressed || d.foreground(); stopPressed = falseclose(); push()})// renamed in the note while it records@@ -151,11 +154,12 @@ export function createWidget(d: { open(meetingId: string): void; stop(meetingId:if (notifyOnChange && view?.kind === 'captured') {notifyOnChange = falseconst completed = { title: view.note?.text ?? (view.crashed ? t('Recording stopped. Your notes are safe.') : t('Meeting captured')), body: m.title, meetingId: m.id }+ const quiet = stoppedHere && !view.note && !view.crashedvoid recordingFinished(m.id).then(() => {// The call-ended prompt already owns its native notification.if (view.callEnded) returnnotice = completed- if (BACKGROUND || isFake() || !Notification.isSupported()) return+ if (quiet || BACKGROUND || isFake() || !Notification.isSupported()) returnnotification?.close()notification = new Notification({ title: completed.title, body: completed.body, silent: true })notification.on('click', () => d.open(completed.meetingId))@@ -187,7 +191,7 @@ export function createWidget(d: { open(meetingId: string): void; stop(meetingId:if (win && !win.isDestroyed()) win.hide()d.open(id)})- ipcMain.on('widget:stop', () => { const id = model.meetingId; if (id && model.view(Date.now())?.kind === 'recording') d.stop(id) })+ ipcMain.on('widget:stop', () => { const id = model.meetingId; if (id && model.view(Date.now())?.kind === 'recording') { stopPressed = true; d.stop(id) } })ipcMain.on('widget:preview', (_e, on: unknown) => {if (typeof on !== 'boolean') returnclearTimeout(previewTimer)diff --git a/app/test/widgetWindow.test.ts b/app/test/widgetWindow.test.tsindex ca34d1fd..33604488 100644--- a/app/test/widgetWindow.test.ts+++ b/app/test/widgetWindow.test.ts@@ -254,6 +254,25 @@ describe('finished meeting notifications', () => {await Promise.resolve()expect(state.notifications).toHaveLength(1)})+ it('skips the success banner when the person ended it from the pill, but keeps the in-app notice', async () => {+ send('widget:stop')+ finish(); await Promise.resolve()+ expect(widget.snapshot().notice).toMatchObject({ title: 'Meeting captured', body: 'Review' })+ expect(state.notifications).toHaveLength(0)+ })+ it('skips the success banner when Yogurt was in front, but still warns', async () => {+ vi.resetModules()+ const { createWidget } = await import('../src/main/widget')+ widget = createWidget({ open, stop: vi.fn(), foreground: () => true })+ state.start!({ id: 'meeting', title: 'Review', startedAt: 0 })+ finish(); await Promise.resolve()+ expect(widget.snapshot().notice).toMatchObject({ title: 'Meeting captured' })+ expect(state.notifications).toHaveLength(0)+ state.start!({ id: 'meeting', title: 'Review', startedAt: 0 })+ state.recording!({ t: 'gave-up' })+ finish(); await Promise.resolve()+ expect(state.notifications).toHaveLength(1)+ })it('uses the existing save warning and does not notify again when Retry succeeds', async () => {state.stopPending = truefinish(); await Promise.resolve()