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
Menus, popovers and the search window are lightly frosted
Eric Brownroutb71725b4ba7c
diff --git a/app/e2e/backgroundPixel.ts b/app/e2e/backgroundPixel.tsnew file mode 100644index 00000000..d4dd82c1--- /dev/null+++ b/app/e2e/backgroundPixel.ts@@ -0,0 +1,9 @@+/** Read sRGB bytes for a CSS fill regardless of how Chromium serializes the color. */+export function backgroundPixel(element: Element): number[] {+ const canvas = document.createElement('canvas')+ canvas.width = canvas.height = 1+ const context = canvas.getContext('2d')!+ context.fillStyle = getComputedStyle(element).backgroundColor+ context.fillRect(0, 0, 1, 1)+ return Array.from(context.getImageData(0, 0, 1, 1).data)+}diff --git a/app/e2e/platform.spec.ts b/app/e2e/platform.spec.tsindex 225e6e94..66e8317a 100644--- a/app/e2e/platform.spec.ts+++ b/app/e2e/platform.spec.ts@@ -2,12 +2,39 @@ import { _electron as electron, expect, test } from '@playwright/test'import { mkdtempSync } from 'node:fs'import { tmpdir } from 'node:os'import { join } from 'node:path'+import { backgroundPixel } from './backgroundPixel'// @everywhere: these also run on the Windows and Linux CI. YOGURT_FAKE_PLATFORM lets the Mac try those screens too.const main = join(import.meta.dirname, '../out/main/index.js')const launch = (env: Record<string, string> = {}) =>electron.launch({ args: [main], env: { ...process.env, YOGURT_FAKE: '1', YOGURT_USER_DATA: mkdtempSync(join(tmpdir(), 'yogurt-e2e-')), ...env } })+test('@everywhere the search palette follows appearance and transparency preferences', async () => {+ const app = await launch()+ try {+ const page = await app.firstWindow()+ await page.getByTestId('search-open').click()+ const palette = page.getByTestId('search')+ const cdp = await page.context().newCDPSession(page)+ const defaults = { 'prefers-reduced-transparency': 'no-preference', 'prefers-contrast': 'no-preference', 'forced-colors': 'none' }+ const media = (changes: Record<string, string>) => cdp.send('Emulation.setEmulatedMedia', {+ features: Object.entries({ ...defaults, ...changes }).map(([name, value]) => ({ name, value })),+ })+ for (const [theme, tint] of [['light', .915], ['dark', .95]] as const) {+ await media({ 'prefers-color-scheme': theme })+ await expect(palette).toHaveCSS('backdrop-filter', /^blur\(22px\) saturate\((?:1\.065|106\.5%)\)$/)+ const [red, , , alpha] = await palette.evaluate(backgroundPixel)+ expect(Math.abs(red - (theme === 'light' ? 255 : 41))).toBeLessThanOrEqual(1)+ expect(Math.abs(alpha - 255 * tint)).toBeLessThanOrEqual(1)+ }+ for (const [name, value] of [['prefers-reduced-transparency', 'reduce'], ['prefers-contrast', 'more'], ['forced-colors', 'active']]) {+ await media({ [name]: value })+ await expect(palette).toHaveCSS('backdrop-filter', 'none')+ expect((await palette.evaluate(backgroundPixel))[3]).toBe(255)+ }+ } finally { await app.close() }+})+for (const platform of ['win32', 'linux']) {// Linux reads names from calls through AT-SPI and Windows through UI Automation: nothing to ask for, so it reads as onconst names = truediff --git a/app/e2e/transcript.spec.ts b/app/e2e/transcript.spec.tsindex bb7eb6db..09911522 100644--- a/app/e2e/transcript.spec.ts+++ b/app/e2e/transcript.spec.ts@@ -312,6 +312,9 @@ test('the transcript scrolls behind its pill and the final line can clear the coawait expect(page.getByTestId('player-toggle')).toHaveAttribute('aria-label', 'Pause')await page.getByTestId('player-speed').click()await expect(page.getByTestId('player-speed')).toHaveText('1.5×')+ await page.emulateMedia({ contrast: 'more' })+ await expect(player).toHaveCSS('backdrop-filter', 'none')+ await expect(player).toHaveCSS('background-color', /^rgb\(/)} finally { await app.close() }})/** replaces a track's stand-in file: seconds of silence, or bytes that are not audio, or nothing */diff --git a/app/e2e/trash.spec.ts b/app/e2e/trash.spec.tsindex 5804c3d9..4aab0831 100644--- a/app/e2e/trash.spec.ts+++ b/app/e2e/trash.spec.ts@@ -2,6 +2,7 @@ import { _electron as electron, expect, test, type ElectronApplication, type Pagimport { existsSync, mkdtempSync } from 'node:fs'import { tmpdir } from 'node:os'import { join } from 'node:path'+import { backgroundPixel } from './backgroundPixel'const main = join(import.meta.dirname, '../out/main/index.js')@@ -128,15 +129,14 @@ test('toasts follow appearance; the latest deletion can be undone from the keybotry {await withMeetings(app, page)for (const theme of ['light', 'dark'] as const) {- await page.emulateMedia({ colorScheme: theme, reducedMotion: 'reduce' })+ await page.emulateMedia({ colorScheme: theme, reducedMotion: 'reduce', forcedColors: 'none' })await del(page, 'Weekly sync')const toast = page.getByTestId('trash-toast')- const shade = await toast.evaluate(el => {- const style = getComputedStyle(el)- return { background: Number(style.backgroundColor.match(/\d+/)![0]), text: Number(style.color.match(/\d+/)![0]) }- })- if (theme === 'dark') { expect(shade.background).toBeLessThan(80); expect(shade.text).toBeGreaterThan(180) }- else { expect(shade.background).toBeGreaterThan(220); expect(shade.text).toBeLessThan(80) }+ const [red, , , alpha] = await toast.evaluate(backgroundPixel)+ if (theme === 'dark') expect(red).toBeLessThan(80)+ else expect(red).toBeGreaterThan(220)+ expect(alpha).toBeGreaterThan(230)+ await expect(toast).toHaveCSS('color', theme === 'dark' ? 'rgb(231, 230, 235)' : 'rgb(41, 41, 44)')await page.getByTestId('trash-undo').focus()await page.keyboard.press('Enter')await expect(toast).toHaveCount(0)diff --git a/app/e2e/windowChrome.spec.ts b/app/e2e/windowChrome.spec.tsindex 690dd05a..acb77278 100644--- a/app/e2e/windowChrome.spec.ts+++ b/app/e2e/windowChrome.spec.ts@@ -4,7 +4,7 @@ import { execFileSync } from 'node:child_process'import { tmpdir } from 'node:os'import { join } from 'node:path'-test('glass is limited to chrome, with solid reading surfaces and a reduced-transparency fallback', async ({}, info) => {+test('native glass stays in the window chrome, with solid reading surfaces and a reduced-transparency fallback', async ({}, info) => {const app = await electron.launch({ args: [join(import.meta.dirname, '../out/main/index.js')], env: {...process.env, YOGURT_FAKE: '1', YOGURT_USER_DATA: mkdtempSync(join(tmpdir(), 'yogurt-glass-')),} })diff --git a/app/src/renderer/src/styles.css b/app/src/renderer/src/styles.cssindex 6c7cddb1..efb29a35 100644--- a/app/src/renderer/src/styles.css+++ b/app/src/renderer/src/styles.css@@ -708,15 +708,12 @@ input::selection, textarea::selection, .note-prose ::selection { background: var.transcript-inline [data-testid="transcript"] { padding-inline:var(--transcript-inset);padding-top:22px; }[data-testid="transcript-panel"] [data-testid="transcript"] { padding-bottom:max(16px,var(--playback-inset));scroll-padding-bottom:var(--playback-inset); }.transcript-player-dock { position:absolute;inset-inline:max(16px, calc((100% - 412px)/2));bottom:12px;z-index:1;clip-path:inset(-16px -16px -12px); }-.transcript-player { padding:5px 8px;border:1px solid var(--line);border-radius:22px;background:color-mix(in srgb,var(--float) 96%,transparent);backdrop-filter:blur(12px);box-shadow:0 2px 8px #0000000D;opacity:1;transform:translateY(0);transition:opacity var(--dur-micro) var(--ease-out),transform var(--dur-player-return) var(--ease-player-return); }+.transcript-player { padding:5px 8px;border:1px solid var(--line);border-radius:22px;background:var(--float);box-shadow:0 2px 8px #0000000D;opacity:1;transform:translateY(0);transition:opacity var(--dur-micro) var(--ease-out),transform var(--dur-player-return) var(--ease-player-return); }.transcript-player-dock[data-hidden=true] .transcript-player { opacity:0;transform:translateY(calc(100% + 12px));pointer-events:none;transition:transform var(--dur-player-duck) var(--ease-player-duck),opacity calc(var(--dur-player-duck)/4) linear calc(var(--dur-player-duck)*.75); }@media (prefers-reduced-motion: reduce) {.transcript-player,.transcript-player-dock[data-hidden=true] .transcript-player { transform:none;transition:opacity var(--dur-micro) var(--ease-out); }}[data-testid="transcript-panel"] [data-testid="transcript-follow"] { bottom:calc(var(--playback-inset) + 8px); }-@media (prefers-reduced-transparency:reduce),(prefers-contrast:more) {- .transcript-player { background:var(--float);backdrop-filter:none; }-}html:not(.widget) .bg-accent { background-color:var(--primary); }html:not(.widget) button:focus-visible, html:not(.widget) input:focus-visible { outline-color:var(--focus); }@@ -1000,3 +997,36 @@ html:not(.widget) button:focus-visible, html:not(.widget) input:focus-visible {.audio-upload-submit-icon { position:absolute;inset:0;display:flex;align-items:center;justify-content:center; }.audio-upload-date-picker .audio-upload-month button:focus-visible { outline:none; }.transcription-notice-slot:empty { display:none; }++/* Floating surfaces keep their solid theme fills until the display permits transparency. */+@supports (backdrop-filter:blur(1px)) and (background:color-mix(in srgb,white,transparent)) {+ @media (prefers-reduced-transparency:no-preference) and (prefers-contrast:no-preference) and (forced-colors:none) {+ :root.main-window {+ --floating-blur:22px;+ --floating-saturation:106.5%;+ --floating-tint:91.5%;+ --floating-edge-alpha:11%;+ --floating-fill:color-mix(in srgb,var(--float) var(--floating-tint),transparent);+ --floating-edge:color-mix(in srgb,var(--ink) var(--floating-edge-alpha),transparent);+ }+ @media (prefers-color-scheme:dark) {+ :root.main-window { --floating-tint:95%; }+ }+ :root.main-window :is(+ .search-panel,.menu-entry,.ask-picker,.app-modal,.editor-toolbar,.transcript-player,+ .meeting-selection-bar,.app-toast,.finish-setup,.settings-jargon-suggest,.chat-morph-surface,+ .citation-mass,[role=tooltip],aside[data-testid=transcript-panel]+ ) {+ background:var(--floating-fill);+ border-color:var(--floating-edge);+ backdrop-filter:blur(var(--floating-blur)) saturate(var(--floating-saturation));+ }+ :root.main-window .citation-edge { border-color:var(--floating-edge); }+ :root.main-window .agenda-inspector-arrow {+ background:var(--floating-fill);+ border-color:var(--floating-edge);+ }+ /* A resting clip would prevent the player from sampling the transcript beneath it. */+ :root.main-window .transcript-player-dock:not([data-hidden=true]) { clip-path:none; }+ }+}diff --git a/app/test/floatingGlass.test.ts b/app/test/floatingGlass.test.tsnew file mode 100644index 00000000..dbae2120--- /dev/null+++ b/app/test/floatingGlass.test.ts@@ -0,0 +1,23 @@+import { readFileSync } from 'node:fs'+import { expect, it } from 'vitest'++const css = readFileSync(new URL('../src/renderer/src/styles.css', import.meta.url), 'utf8')++it('keeps small floating labels legible even over the opposite background in each theme', () => {+ const palettes = [...css.matchAll(/:root:not\(\.widget\)\s*\{([^}]+)\}/g)]+ const tints = [...css.matchAll(/--floating-tint:\s*([\d.]+)%/g)].map(match => Number(match[1]) / 100)+ expect(palettes).toHaveLength(2)+ expect(tints).toHaveLength(2)+ const luminance = (rgb: number[]) => {+ const [r, g, b] = rgb.map(n => n / 255).map(c => c <= .04045 ? c / 12.92 : ((c + .055) / 1.055) ** 2.4)+ return .2126 * r + .7152 * g + .0722 * b+ }+ for (const [i, [, palette]] of palettes.entries()) {+ const rgb = (token: string) => palette.match(new RegExp('--' + token + ':\\s*#([a-f0-9]{6});', 'i'))![1]+ .match(/../g)!.map(channel => parseInt(channel, 16))+ const backdrop = i === 0 ? 0 : 255+ const fill = rgb('float').map(channel => channel * tints[i] + backdrop * (1 - tints[i]))+ const [lo, hi] = [luminance(rgb('muted')), luminance(fill)].sort((a, b) => a - b)+ expect((hi + .05) / (lo + .05)).toBeGreaterThanOrEqual(4.5)+ }+})