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
fix e2e issues
Elton C. Regoe503041c9504
diff --git a/app/e2e/chat.spec.ts b/app/e2e/chat.spec.tsindex ce5f7207..1db3cc1a 100644--- a/app/e2e/chat.spec.ts+++ b/app/e2e/chat.spec.ts@@ -159,8 +159,8 @@ test('asking about a finished meeting streams the answer in, word by word, and i})test('opening Ask on a meeting reads it in ahead, and a question says what it is doing until the answer starts', async () => {- // a slow first word, so each step can be seen- const { app, page } = await launch({ YOGURT_FAKE_LLM_MS: '4500' })+ // a first word well after the 4s step tick, so a slow machine still sees each step+ const { app, page } = await launch({ YOGURT_FAKE_LLM_MS: '8000' })try {const id = await fake<string>(app, 'bigMeeting', 12)await fake(app, 'go', `/note/${id}`)diff --git a/app/e2e/commands.spec.ts b/app/e2e/commands.spec.tsindex d2197ed4..faafc270 100644--- a/app/e2e/commands.spec.ts+++ b/app/e2e/commands.spec.ts@@ -48,8 +48,10 @@ test('the sidebar shortcut, native View menu, command palette and shortcut referawait expect(toggle).toHaveAttribute('aria-expanded', 'false')await page.keyboard.press('Escape')await expect(page.getByTestId('shortcuts-dialog')).toHaveCount(0)+ // innerWidth changes before the resize event lands, so wait for the event or it can close the sidebar opened below+ await page.evaluate(() => { (window as unknown as { narrowed: Promise<void> }).narrowed = new Promise(done => addEventListener('resize', function on() { if (innerWidth === 720) { removeEventListener('resize', on); done() } })) })await app.evaluate(({ BrowserWindow }) => BrowserWindow.getAllWindows().find(w => !w.webContents.getURL().includes('#'))!.setSize(720, 520))- await expect.poll(() => page.evaluate(() => innerWidth)).toBe(720)+ await page.evaluate(() => (window as unknown as { narrowed: Promise<void> }).narrowed)await expect(toggle).toHaveAttribute('aria-expanded', 'false')await page.keyboard.press('Control+Meta+s')await expect(toggle).toHaveAttribute('aria-expanded', 'true')diff --git a/app/e2e/summaryRim.spec.ts b/app/e2e/summaryRim.spec.tsindex 31866cba..846dba9f 100644--- a/app/e2e/summaryRim.spec.ts+++ b/app/e2e/summaryRim.spec.ts@@ -40,6 +40,7 @@ for (const theme of ['light', 'dark'] as const) for (const width of [420, 860])await expect(page.locator('.note-reading-frame')).toBeHidden()expect(await rim.evaluate(el => getComputedStyle(el, '::before').animationPlayState)).toBe('paused')await page.getByTestId('note-summary-tab').click()+ await expect(page.locator('.note-reading-frame')).toHaveAttribute('data-active', 'true')await pane.evaluate(el => { el.dispatchEvent(new WheelEvent('wheel', { deltaY: -400 })); el.scrollTop = 100 })await expect(latest).toBeVisible()await push('writing', text(22))diff --git a/app/src/renderer/src/followLatest.ts b/app/src/renderer/src/followLatest.tsindex 13c2737d..27591552 100644--- a/app/src/renderer/src/followLatest.ts+++ b/app/src/renderer/src/followLatest.ts@@ -2,20 +2,25 @@ import { followGlide } from './motion'/** Shared by growing answers and summaries; an idle or hidden pane schedules no work. */export function attachFollowLatest(el: HTMLElement, body: HTMLElement, stuck: { current: boolean }, behind: (value: boolean) => void) {- let glide: ReturnType<typeof followGlide> | undefined+ let glide: ReturnType<typeof followGlide> | undefined, last = el.scrollTopconst stop = () => { glide?.stop(); glide = undefined }const report = () => behind(el.scrollHeight - el.scrollTop - el.clientHeight >= 24)const follow = () => {if (document.hidden || !el.clientHeight) returnif (stuck.current) {if (glide?.active) glide.to(Math.max(0, el.scrollHeight - el.clientHeight))- else el.scrollTop = el.scrollHeight+ else { el.scrollTop = el.scrollHeight; last = el.scrollTop }}report()}+ // The scroll event lands a frame after we set scrollTop, by which time the body may have grown again,+ // so only a move up can stop following and only reaching the bottom can resume it.const scroll = () => {+ const up = el.scrollTop < last+ last = el.scrollTopif (glide?.active) return- stuck.current = el.scrollHeight - el.scrollTop - el.clientHeight < 24+ const near = el.scrollHeight - el.scrollTop - el.clientHeight < 24+ if (up || near) stuck.current = nearreport()}const touch = () => { stop() }diff --git a/app/test/followLatest.test.ts b/app/test/followLatest.test.tsindex fae136c3..7b444c2e 100644--- a/app/test/followLatest.test.ts+++ b/app/test/followLatest.test.ts@@ -83,3 +83,10 @@ it('does not move a collapsed pane', () => {expect(pane.scrollTop).toBe(800)follow.dispose()})+it('keeps following when the body grows again before the scroll from the last follow lands', () => {+ const { pane, state, follow } = setup()+ pane.scrollHeight = 1400; Resize.current.change(); pane.scrollHeight = 2000+ pane.dispatchEvent(new Event('scroll')); expect(state.current).toBe(true)+ Resize.current.change(); expect(pane.scrollTop).toBe(1600)+ follow.dispose()+})