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
The recording pill no longer takes keyboard focus on Linux: a notification window that window managers never focus (#193)
christianmat74424be7c511
diff --git a/app/src/main/float.ts b/app/src/main/float.tsindex ad3754e4..4d38f0ce 100644--- a/app/src/main/float.ts+++ b/app/src/main/float.ts@@ -12,5 +12,8 @@ export function floatOverFullScreen(w: Floating): void {/*** The floating windows' type. A Mac: the widget and the Take notes card are non-activating panels, the stop card a plain window.* Windows and Linux have no panels: a tool window stays out of Alt+Tab and the taskbar; focusable: false keeps it from taking focus.+ * Linux (X11, XWayland on Wayland): some window managers still focus a tool window that refuses focus (Mango, #193), and+ * the keyboard then stays on Yogurt for every app. A window that never takes focus is a notification there, which they never focus.*/-export const floatingType = (os: string, mac?: 'panel'): 'panel' | 'toolbar' | undefined => (os === 'darwin' ? mac : 'toolbar')+export const floatingType = (os: string, mac?: 'panel', focusable = true): 'panel' | 'toolbar' | 'notification' | undefined =>+ os === 'darwin' ? mac : os === 'linux' && !focusable ? 'notification' : 'toolbar'diff --git a/app/src/main/prompts.ts b/app/src/main/prompts.tsindex 3d81d351..31893e14 100644--- a/app/src/main/prompts.ts+++ b/app/src/main/prompts.ts@@ -17,7 +17,7 @@ function createCard(kind: PromptView['kind'], os = 'darwin'): BrowserWindow {const background = () => nativeTheme.shouldUseDarkColors ? '#29292B' : '#FFFFFF'// A Mac: the Take notes card is a non-activating panel like the widget, so clicking it (its X included) never makes// Yogurt the active app and brings its window forward. The stop card takes keyboard focus, so it stays a plain window.- const type = floatingType(os, kind === 'start' ? 'panel' : undefined)+ const type = floatingType(os, kind === 'start' ? 'panel' : undefined, kind === 'stop')const w = new BrowserWindow({...(type ? { type } : {}),width, height, x: workArea.x + workArea.width - width - 16, y: workArea.y + 12,diff --git a/app/src/main/widget.ts b/app/src/main/widget.tsindex dcc729d0..386dd12a 100644--- a/app/src/main/widget.ts+++ b/app/src/main/widget.ts@@ -35,7 +35,7 @@ function createWindow(os = 'darwin'): BrowserWindow {const w = new BrowserWindow({...widgetLayout(bounds, screen.getDisplayMatching(bounds).workArea).bounds,// One open-sized window avoids native resizing during the morph; transparent space passes clicks through.- type: floatingType(os, 'panel'),+ type: floatingType(os, 'panel', false),// CSS owns the outline; macOS corner clipping cuts through its border.frame: false, transparent: true, roundedCorners: false, hasShadow: false, resizable: false, movable: false, minimizable: false, maximizable: false, fullscreenable: false,skipTaskbar: true, focusable: false, acceptFirstMouse: true, show: false,diff --git a/app/test/float.test.ts b/app/test/float.test.tsindex 60a6b9bb..a0f2c3aa 100644--- a/app/test/float.test.ts+++ b/app/test/float.test.ts@@ -23,5 +23,12 @@ describe('floating window type', () => {expect(floatingType(os, 'panel')).toBe('toolbar')expect(floatingType(os)).toBe('toolbar')}+ expect(floatingType('win32', 'panel', false)).toBe('toolbar')+ })+ it('Linux makes a window that never takes focus a notification, which window managers never focus (#193)', () => {+ // a toolbar that refuses focus still gets it on some (Mango on Wayland): the keyboard is then stuck on Yogurt+ expect(floatingType('linux', 'panel', false)).toBe('notification')+ expect(floatingType('linux', undefined, false)).toBe('notification')+ expect(floatingType('darwin', 'panel', false)).toBe('panel')})})diff --git a/app/test/promptWindow.test.ts b/app/test/promptWindow.test.tsindex 3216afab..5c710cb0 100644--- a/app/test/promptWindow.test.ts+++ b/app/test/promptWindow.test.ts@@ -53,6 +53,13 @@ it("a Mac's Take notes card is a non-activating panel, so its X never brings Yogpc.offer({key:'call',app:'Zoom',title:''} as any)expect(state.windows.at(-1).options).toMatchObject({type:'toolbar',focusable:false,skipTaskbar:true})pc.hide()+ const linux = createPrompts({windowVisible:()=>true,takeNotes:vi.fn(),stop:vi.fn(),dismissed:vi.fn(),keepGoing:vi.fn(),dismissStop:vi.fn(),open:vi.fn(),os:'linux'})+ // Linux: a card that never takes focus is a notification, which window managers never focus (#193); the stop card takes it+ linux.offer({key:'call',app:'Zoom',title:''} as any)+ expect(state.windows.at(-1).options).toMatchObject({type:'notification',focusable:false})+ linux.askStop({id:'meeting',title:'Design review'} as any)+ expect(state.windows.at(-1).options).toMatchObject({type:'toolbar',focusable:true})+ linux.hide()})it('uses the current app appearance and updates the native background without leaking listeners', () => {state.dark = truediff --git a/app/test/widgetWindow.test.ts b/app/test/widgetWindow.test.tsindex a9e7c07f..7597c1b3 100644--- a/app/test/widgetWindow.test.ts+++ b/app/test/widgetWindow.test.ts@@ -94,6 +94,12 @@ describe('floating recorder placement', () => {state.start!({ id: 'meeting2', title: 'Review', startedAt: 0 })expect(state.windows.at(-1).options).toMatchObject({ type: 'toolbar', focusable: false, skipTaskbar: true })})+ it('on Linux, never takes keyboard focus: a notification window, not a tool window (#193)', async () => {+ const { createWidget } = await import('../src/main/widget')+ createWidget({ open, stop: vi.fn(), foreground: () => false, windowOs: 'linux', platform: 'linux' })+ state.start!({ id: 'meeting2', title: 'Review', startedAt: 0 })+ expect(state.windows.at(-1).options).toMatchObject({ type: 'notification', focusable: false, skipTaskbar: true })+ })it('on Linux, hides a stopped pill and destroys it only once the next recording has its own', async () => {// X11: Electron crashes on a window destroyed while the X server still answers about its size (a quick stop)const { createWidget } = await import('../src/main/widget')