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
Tests: end-to-end checks follow the shared motion timings
Eric Brownrout86854aa0f963
diff --git a/app/e2e/agendaCard.spec.ts b/app/e2e/agendaCard.spec.tsindex f49b16c3..746c6a3e 100644--- a/app/e2e/agendaCard.spec.ts+++ b/app/e2e/agendaCard.spec.ts@@ -75,6 +75,7 @@ test('a bottom event opens above its row, tracks scrolling, flips without chatteawait page.keyboard.press('Tab')await expect(close).toBeFocused()expect(await close.evaluate(el => el.matches(':focus-visible'))).toBe(true)+ await card.evaluate(el => Promise.allSettled(el.getAnimations().map(a => a.finished)))const spacing = await card.evaluate(el => {const content = el.querySelector('.agenda-inspector-content')!, heading = el.querySelector('h3')!const time = el.querySelector('.agenda-inspector-time')!, people = el.querySelector('.agenda-inspector-scroll')!diff --git a/app/e2e/chat.spec.ts b/app/e2e/chat.spec.tsindex da9fba03..e76b163f 100644--- a/app/e2e/chat.spec.ts+++ b/app/e2e/chat.spec.ts@@ -294,7 +294,8 @@ test('an unacknowledged question cannot be sent twice, and a rejected request keawait expect(input).not.toBeEditable()await expect(input).toBeFocused()await expect(send).toBeDisabled()- expect(await app.evaluate(() => (globalThis as unknown as { __chatRequestTest: { calls: number } }).__chatRequestTest.calls)).toBe(1)+ await input.press('Enter')+ await expect.poll(() => app.evaluate(() => (globalThis as unknown as { __chatRequestTest: { calls: number } }).__chatRequestTest.calls)).toBe(1)await app.evaluate(() => (globalThis as unknown as { __chatRequestTest: { reject(): void } }).__chatRequestTest.reject())await expect(page.getByTestId('chat-send-error')).toHaveText("Couldn't save your changes")await expect(input).toHaveValue('Who owns the release notes?')diff --git a/app/e2e/deleteDialog.spec.ts b/app/e2e/deleteDialog.spec.tsindex 7c8aff81..c8964567 100644--- a/app/e2e/deleteDialog.spec.ts+++ b/app/e2e/deleteDialog.spec.ts@@ -1,3 +1,4 @@+import { motion } from '../src/renderer/src/motion'import { _electron as electron, expect, test } from '@playwright/test'import { mkdtempSync } from 'node:fs'import { tmpdir } from 'node:os'@@ -26,13 +27,10 @@ test('delete is centered over the whole workspace, traps focus safely and restorawait page.getByTestId('trash-row').first().hover()await opener.click()await expect(modal).toBeVisible()- // Only the shell stretches; text and focus remain at their final geometry.+ await modal.evaluate(el => Promise.allSettled(el.getAnimations().map(a => a.finished)))await expect(modal).toHaveCSS('transform', 'none')- await expect(modal.locator('.dialog-motion-content')).toHaveCSS('transform', 'none')- await expect(modal.locator('.dialog-motion-content')).toHaveCSS('filter', 'none')- const frames = await modal.locator('.dialog-motion-surface').evaluate(el => (el.getAnimations()[0]?.effect as KeyframeEffect)?.getKeyframes())- expect(frames?.[1].transform).toMatch(/scale\(1\.008,\s*1\.018\)/)- expect(frames?.[1].offset).toBe(0.72)+ await expect(modal).toHaveCSS('filter', 'none')+ await expect(modal).toHaveCSS('transition-duration', `${motion.surface / 1000}s, ${motion.surface / 1000}s`)const viewport = await page.evaluate(() => ({ width: innerWidth, height: innerHeight }))await expect.poll(async () => {const box = (await modal.boundingBox())!@@ -85,20 +83,22 @@ test('delete is centered over the whole workspace, traps focus safely and restorawait cancel.click()await expect(opener).toBeFocused()- // Search shares the same shell motion and keeps its input ready immediately.+ // Search uses the shared popup and keeps its input ready immediately.await page.keyboard.press('Meta+k')const search = page.getByTestId('search')await expect(page.getByTestId('search-input')).toBeFocused()+ await search.evaluate(el => Promise.allSettled(el.getAnimations().map(a => a.finished)))await expect(search).toHaveCSS('transform', 'none')- await expect(search.locator('.dialog-motion-content')).toHaveCSS('transform', 'none')- expect(await search.locator('.dialog-motion-surface').evaluate(el => el.getAnimations().length)).toBe(1)+ await expect(search).toHaveCSS('filter', 'none')+ await expect(search).toHaveCSS('transition-duration', `${motion.micro / 1000}s, ${motion.micro / 1000}s`)await page.keyboard.press('Escape')await expect(search).toHaveCount(0)await page.emulateMedia({ reducedMotion: 'reduce' })await page.getByTestId('trash-row').first().hover()await opener.click()await expect(cancel).toBeFocused()- expect(await modal.locator('.dialog-motion-surface').evaluate(el => el.getAnimations().length)).toBe(0)+ await expect(modal).toHaveCSS('transform', 'none')+ await expect(modal).toHaveCSS('transition-property', 'opacity')await page.keyboard.press('Escape')await expect(opener).toBeFocused()} finally { await app.close() }diff --git a/app/e2e/libraryChat.spec.ts b/app/e2e/libraryChat.spec.tsindex cd5068bd..6c5f0f65 100644--- a/app/e2e/libraryChat.spec.ts+++ b/app/e2e/libraryChat.spec.ts@@ -139,6 +139,7 @@ test('a follow-up stays in the chat; New chat starts another; chats can be renamconst recentTime = recentRow.locator('time')await expect(recentTime).toHaveCSS('opacity', '1')await expect(recentRow.getByTestId('chat-menu')).toHaveCSS('opacity', '0')+ await page.getByTestId('chat-recent-list').evaluate(el => Promise.allSettled(el.getAnimations().map(a => a.finished)))const timeBox = await recentTime.boundingBox()await page.getByTestId('chat-history-item').nth(1).hover()await expect(recentTime).toHaveCSS('opacity', '0')@@ -150,6 +151,7 @@ test('a follow-up stays in the chat; New chat starts another; chats can be renamawait expect(page.getByTestId('chat-rename-input')).toBeFocused()await expect(page.getByTestId('chat-rename-input')).toHaveCSS('outline-style', 'none')await expect(page.getByTestId('chat-rename-save')).toHaveClass(/\bprimary\b/)+ await page.getByTestId('chat-rename-dialog').evaluate(el => Promise.allSettled(el.getAnimations().map(a => a.finished)))const renameField = await page.getByTestId('chat-rename-dialog').locator('.people-add-field').boundingBox()const renameSave = await page.getByTestId('chat-rename-save').boundingBox()const renameDialog = await page.getByTestId('chat-rename-dialog').boundingBox()diff --git a/app/e2e/loadingAndFeedback.spec.ts b/app/e2e/loadingAndFeedback.spec.tsindex 077d9aba..f2a6a148 100644--- a/app/e2e/loadingAndFeedback.spec.ts+++ b/app/e2e/loadingAndFeedback.spec.ts@@ -94,7 +94,7 @@ test('toast yields to Ask Yogurt and returns without replacing its Undo action',return !!a && !!b && a.x + a.width + 10 <= b.x}).toBe(true)await toast.hover()- await page.getByTestId('chat-panel').evaluate(el => Promise.allSettled(el.getAnimations({ subtree: true }).map(a => a.finished)))+ await page.getByTestId('chat-panel').evaluate(el => Promise.allSettled([el, ...el.querySelectorAll('.chat-morph-surface,.chat-panel-contents')].flatMap(node => node.getAnimations()).map(a => a.finished)))await page.emulateMedia({ colorScheme: 'dark' })await page.screenshot({ path: testInfo.outputPath('toast-beside-chat.png') })await page.getByTestId('chat-close').click()@@ -106,7 +106,7 @@ test('toast yields to Ask Yogurt and returns without replacing its Undo action',const a = await toast.boundingBox(), b = await page.getByTestId('chat-panel').boundingBox()return !!a && !!b && b.y + b.height + 8 <= a.y}).toBe(true)- await page.getByTestId('chat-panel').evaluate(el => Promise.allSettled(el.getAnimations({ subtree: true }).map(a => a.finished)))+ await page.getByTestId('chat-panel').evaluate(el => Promise.allSettled([el, ...el.querySelectorAll('.chat-morph-surface,.chat-panel-contents')].flatMap(node => node.getAnimations()).map(a => a.finished)))await page.screenshot({ path: testInfo.outputPath('toast-narrow-chat.png') })await page.getByTestId('trash-undo').click()await expect(toast).toHaveCount(0)diff --git a/app/e2e/modalMotion.spec.ts b/app/e2e/modalMotion.spec.tsindex 139d7328..5165b617 100644--- a/app/e2e/modalMotion.spec.ts+++ b/app/e2e/modalMotion.spec.ts@@ -1,3 +1,4 @@+import { motion as timing } from '../src/renderer/src/motion'import { _electron as electron, expect, test } from '@playwright/test'import { mkdtempSync } from 'node:fs'import { tmpdir } from 'node:os'@@ -12,7 +13,7 @@ test('shared dialogs use one soft surface, keep focus safe, and dismiss withoutawait expect(page.getByTestId('home')).toBeVisible()await page.emulateMedia({ reducedMotion: 'no-preference' })const trigger = page.getByTestId('folder-create')- const capture = page.evaluate(async () => {+ const capture = page.evaluate(async duration => {let el: HTMLElement | null = null, animations: Animation[] = []for (let frame = 0; frame < 120; frame++) {await new Promise(requestAnimationFrame)@@ -24,7 +25,7 @@ test('shared dialogs use one soft surface, keep focus safe, and dismiss withoutanimations.forEach(a => a.pause())const durations = animations.map(a => a.effect!.getTiming().duration)const samples = []- for (const time of [0, 144, 240]) {+ for (const time of [0, duration * .6, duration]) {animations.forEach(a => { a.currentTime = time })await new Promise(requestAnimationFrame)const style = getComputedStyle(el), matrix = new DOMMatrix(style.transform)@@ -32,12 +33,12 @@ test('shared dialogs use one soft surface, keep focus safe, and dismiss without}animations.forEach(a => a.finish())return { durations, samples }- })+ }, timing.surface)await trigger.click()const modal = page.getByTestId('folder-name')await expect(modal).toBeVisible()const motion = await capture- expect(motion.durations.every(duration => duration === 240)).toBe(true)+ expect(motion.durations.every(duration => duration === timing.surface)).toBe(true)expect(motion.samples[0].scaleX).toBeCloseTo(.97, 3)expect(motion.samples[0].opacity).toBe(0)for (const sample of motion.samples) {@@ -60,7 +61,7 @@ test('shared dialogs use one soft surface, keep focus safe, and dismiss withoutawait expect(modal).toHaveCSS('transform', 'none')await expect(modal).toHaveCSS('filter', 'none')await expect(modal).toHaveCSS('transition-property', 'opacity')- await expect(modal).toHaveCSS('transition-duration', '0.12s')+ await expect(modal).toHaveCSS('transition-duration', `${timing.micro / 1000}s`)await page.getByTestId('folder-name-cancel').click()await expect(modal).toHaveCount(0)await expect(trigger).toBeFocused()diff --git a/app/e2e/noteCrossfade.spec.ts b/app/e2e/noteCrossfade.spec.tsindex 3902140f..209f4a71 100644--- a/app/e2e/noteCrossfade.spec.ts+++ b/app/e2e/noteCrossfade.spec.ts@@ -1,3 +1,4 @@+import { motion } from '../src/renderer/src/motion'import { _electron as electron, expect, test } from '@playwright/test'import { mkdtempSync } from 'node:fs'import { tmpdir } from 'node:os'@@ -56,11 +57,11 @@ for (const theme of ['light', 'dark'] as const) test(`note panels fade in alonereturn [old.display, old.animationName]})).toEqual(['none', 'none'])for (const a of animation) {- expect(a.duration).toBe(120)+ expect(a.duration).toBe(motion.micro)expect(a.frames.every(f => !f.transform && !f.scale && !f.translate && !f.filter)).toBe(true)}}- for (const ms of [0, 30, 60, 90, 120]) {+ for (const ms of [0, .25, .5, .75, 1].map(fraction => fraction * motion.micro)) {if (!before) await page.locator('.note-panels').evaluate((root, ms) => {root.getAnimations({ subtree: true }).filter(a => a instanceof CSSAnimation && a.animationName.startsWith('note-panel-')).forEach(a => { a.currentTime = ms })}, ms)diff --git a/app/e2e/noteNavigation.spec.ts b/app/e2e/noteNavigation.spec.tsindex 07378d26..41fa5596 100644--- a/app/e2e/noteNavigation.spec.ts+++ b/app/e2e/noteNavigation.spec.ts@@ -1,3 +1,4 @@+import { motion } from '../src/renderer/src/motion'import { selectNoteVersion } from './noteVersion'import { _electron as electron, expect, test } from '@playwright/test'import { mkdtempSync } from 'node:fs'@@ -125,8 +126,8 @@ test('the underline slides on pointer tab changes without moving the reading panconst old = getComputedStyle(el, '::view-transition-old(root)')const incoming = getComputedStyle(el, '::view-transition-new(root)')return [old.display, old.animationName, incoming.animationDuration, incoming.animationTimingFunction]- })).toEqual(['none', 'none', '0.12s', 'ease-out'])- await expect(bar).toHaveCSS('transition-duration', '0.18s, 0.18s')+ })).toEqual(['none', 'none', `${motion.micro / 1000}s`, motion.ease.replaceAll(',', ', ')])+ await expect(bar).toHaveCSS('transition-duration', `${motion.base / 1000}s, ${motion.base / 1000}s`)await expect.poll(async () => Math.abs((await bar.boundingBox())!.x - (await tab.boundingBox())!.x)).toBeLessThan(1)expect(Math.abs((await bar.boundingBox())!.width - (await tab.boundingBox())!.width)).toBeLessThan(1)}diff --git a/app/e2e/recordingReminder.spec.ts b/app/e2e/recordingReminder.spec.tsindex 538b987c..b08d27b2 100644--- a/app/e2e/recordingReminder.spec.ts+++ b/app/e2e/recordingReminder.spec.ts@@ -35,7 +35,7 @@ for (const theme of ['light', 'dark'] as const) test(`standard recording remindereturn !!a && !!b && a.x + a.width + 10 <= b.x}).toBe(true)await toast.hover()- await page.getByTestId('chat-panel').evaluate(el => Promise.allSettled(el.getAnimations({ subtree: true }).map(a => a.finished)))+ await page.getByTestId('chat-panel').evaluate(el => Promise.allSettled([el, ...el.querySelectorAll('.chat-morph-surface,.chat-panel-contents')].flatMap(node => node.getAnimations()).map(a => a.finished)))await page.screenshot({ path: info.outputPath(`reminder-${theme}-ask.png`) })await page.keyboard.press('F6')await toast.getByRole('button', { name: 'Close', exact: true }).focus()diff --git a/app/e2e/reviewPolish.spec.ts b/app/e2e/reviewPolish.spec.tsindex e33d2240..770d1cd7 100644--- a/app/e2e/reviewPolish.spec.ts+++ b/app/e2e/reviewPolish.spec.ts@@ -93,7 +93,7 @@ test('Ask shows progress through the first-token gap, then an attached copy acticonst id = await fake(app, 'bigMeeting', 10) as stringawait fake(app, 'go', `/note/${id}`)await page.getByTestId('chat-open').click()- await expect(page.getByTestId('chat-input')).toBeEnabled()+ await expect(page.getByTestId('chat-suggestion').first()).toBeEnabled()const view = await page.evaluate(async id => window.yogurt.conversations.get(await window.yogurt.conversations.current([{ kind: 'meeting', id }])), id)const send = (answer: string, status: string) => app.evaluate(({ BrowserWindow }, v) => {for (const w of BrowserWindow.getAllWindows()) w.webContents.send('conversations:changed', v)