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
Toasts: while Ask is docked, toasts sit to its left, aligned with its bottom edge, and the Share menu stays clickable above it
Eric Brownrout77a8dc780293
diff --git a/app/e2e/loadingAndFeedback.spec.ts b/app/e2e/loadingAndFeedback.spec.tsindex ce559f3d..5119983b 100644--- a/app/e2e/loadingAndFeedback.spec.ts+++ b/app/e2e/loadingAndFeedback.spec.ts@@ -1,4 +1,5 @@import { openFromCorner } from './cornerNavigation'+import { expectBesideAsk } from './toastPosition'import { _electron as electron, expect, test } from '@playwright/test'import { mkdtempSync } from 'node:fs'import { tmpdir } from 'node:os'@@ -116,12 +117,16 @@ test('the same Undo toast clears docked controls across pages and stays reachablawait toast.hover()await page.screenshot({ path: testInfo.outputPath('toast-closed.png') })await page.getByTestId('chat-open').click()- await expectPosition('.chat-composer')+ await expectBesideAsk(toast)+ expect(await page.locator('.app-toast-viewport').evaluate(el => el.getAnimations().length)).toBe(0)+ await page.evaluate(() => document.documentElement.dir = 'rtl')+ await expectBesideAsk(toast)+ await page.evaluate(() => document.documentElement.dir = 'ltr')await toast.hover()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 expectPosition('.chat-composer')- await page.screenshot({ path: testInfo.outputPath('toast-above-composer.png') })+ await expectBesideAsk(toast)+ await page.screenshot({ path: testInfo.outputPath('toast-beside-ask.png') })await page.getByTestId('chat-close').click()await app.evaluate(({ BrowserWindow }) => BrowserWindow.getAllWindows().find(w => !w.isDestroyed())!.setSize(820, 740))await expect(page.getByTestId('chat-open')).toHaveAttribute('aria-expanded', 'false')diff --git a/app/e2e/recordingReminder.spec.ts b/app/e2e/recordingReminder.spec.tsindex 47e7cba5..95b3ad55 100644--- a/app/e2e/recordingReminder.spec.ts+++ b/app/e2e/recordingReminder.spec.ts@@ -1,4 +1,5 @@import { openFromCorner } from './cornerNavigation'+import { expectBesideAsk } from './toastPosition'import { _electron as electron, expect, test } from '@playwright/test'import { mkdtempSync } from 'node:fs'import { tmpdir } from 'node:os'@@ -31,10 +32,7 @@ for (const theme of ['light', 'dark'] as const) test(`standard recording remindeawait toast.hover()await page.screenshot({ path: info.outputPath(`reminder-${theme}-closed.png`) })await page.getByTestId('chat-open').click()- await expect.poll(async () => {- const reminder = await toast.boundingBox(), composer = await page.locator('.chat-composer').boundingBox()- return !!reminder && !!composer && Math.round(composer.y - reminder.y - reminder.height) === 12- }).toBe(true)+ await expectBesideAsk(toast)await toast.hover()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`) })diff --git a/app/e2e/share.spec.ts b/app/e2e/share.spec.tsindex f65003e0..b683e8f4 100644--- a/app/e2e/share.spec.ts+++ b/app/e2e/share.spec.ts@@ -1,4 +1,5 @@import { _electron as electron, expect, test, type ElectronApplication, type Page } from '@playwright/test'+import { expectBesideAsk } from './toastPosition'import { mkdtempSync, readFileSync, existsSync } from 'node:fs'import { tmpdir } from 'node:os'import { join } from 'node:path'@@ -193,6 +194,8 @@ for (const theme of ['light', 'dark'] as const) test(`a failed export can be retconst { app, page } = await launch()try {await page.emulateMedia({ colorScheme: theme, reducedMotion: 'reduce' })+ const win = await app.browserWindow(page)+ await win.evaluate(w => w.setContentSize(1200, 720))await finished(app, page)await page.getByTestId('note-transcript-toggle').click()await expect(page.getByTestId('transcript-line').first()).toBeVisible()@@ -224,15 +227,71 @@ for (const theme of ['light', 'dark'] as const) test(`a failed export can be retexpect(await footer.boundingBox()).toEqual(before)expect(await player.boundingBox()).toEqual(playerBefore)await page.screenshot({ path: info.outputPath(`toast-footer-${theme}-after.png`) })+ const panel = page.getByTestId('chat-panel')+ await page.keyboard.press('Meta+j')+ await expect(panel).toBeVisible()await page.getByTestId('share-button').click()await page.getByTestId('share-export').click()- await expect(toast).toBeVisible()+ await expectBesideAsk(toast)+ const retry = toast.getByRole('button', { name: 'Try again' })+ await page.keyboard.press('F6')+ await expect(page.locator('.app-toast-viewport')).toBeFocused()+ await page.keyboard.press('Tab')+ await expect(toast).toBeFocused()+ await page.keyboard.press('Tab')+ await expect(retry).toBeFocused()+ await retry.click({ trial: true })+ await page.getByTestId('chat-close').click()+ await expect(panel).toHaveCount(0)+ await expect.poll(() => toast.boundingBox()).toEqual(notice)await page.getByTestId('note-summary-tab').click()await expect(player).toHaveCount(0)- await expect.poll(() => toast.evaluate(el =>- Math.round(document.querySelector('.note-footer')!.getBoundingClientRect().top - el.getBoundingClientRect().bottom)- )).toBe(12)- await toast.getByRole('button', { name: 'Try again' }).click()+ await expect.poll(() => toast.evaluate(el => {+ const box = el.getBoundingClientRect(), footer = document.querySelector('.note-footer')!.getBoundingClientRect()+ return [Math.round(innerWidth - box.right), Math.round(footer.top - box.bottom)]+ })).toEqual([20, 12])+ const normal = (await toast.boundingBox())!+ await page.screenshot({ path: info.outputPath(`toast-no-player-${theme}.png`) })++ await page.emulateMedia({ colorScheme: theme, reducedMotion: 'no-preference' })+ const slides = await page.locator('.app-toast-viewport').evaluateHandle(el => {+ const slides: Animation[] = [], animate = el.animate.bind(el)+ el.animate = (...args) => { const slide = animate(...args); slides.push(slide); return slide }+ return slides+ })+ await page.keyboard.press('Meta+j')+ await expectBesideAsk(toast)+ await page.screenshot({ path: info.outputPath(`toast-ask-open-${theme}.png`) })+ const docked = (await toast.boundingBox())!+ // Sample both real animations at the same instant, independent of CI screenshot latency.+ const closing = await panel.evaluateHandle(el => {+ el.querySelector<HTMLButtonElement>('[data-testid=chat-close]')!.click()+ const nodes = [document.querySelector('.app-toast-viewport')!, el.querySelector('.chat-morph-surface')!,+ el.querySelector('.chat-panel-contents')!, document.getElementById('meeting-ask')!]+ const animations = nodes.flatMap(node => node.getAnimations())+ for (const animation of animations) { animation.pause(); animation.currentTime = 60 }+ return animations+ })+ const transitions = await slides.evaluate(animations => animations.map(animation => {+ const effect = animation.effect as KeyframeEffect+ return { duration: effect.getTiming().duration, properties: Object.keys(effect.getKeyframes()[0])+ .filter(key => !['offset', 'computedOffset', 'easing', 'composite'].includes(key)) }+ }))+ expect(transitions).toEqual(Array(2).fill({ duration: 240, properties: ['transform'] }))+ const midway = (await toast.boundingBox())!+ expect(midway.x).toBeGreaterThan(docked.x)+ expect(midway.x).toBeLessThan(normal.x)+ expect(await toast.evaluate(el => {+ const toast = el.getBoundingClientRect(), surface = document.querySelector('.chat-morph-surface')!.getBoundingClientRect()+ const left = Math.max(toast.left, surface.left), right = Math.min(toast.right, surface.right)+ const top = Math.max(toast.top, surface.top), bottom = Math.min(toast.bottom, surface.bottom)+ return left >= right || top >= bottom || !el.contains(document.elementFromPoint((left + right) / 2, (top + bottom) / 2))+ })).toBe(true)+ await page.screenshot({ path: info.outputPath(`toast-ask-closing-${theme}.png`) })+ await closing.evaluate(animations => animations.forEach(animation => animation.play()))+ await expect(panel).toHaveCount(0)+ await expect.poll(() => toast.boundingBox()).toEqual(normal)+ await retry.click()await expect(page.getByTestId('share-said')).toHaveText('Saved')} finally { await app.close() }})diff --git a/app/e2e/toastPosition.ts b/app/e2e/toastPosition.tsnew file mode 100644index 00000000..58476ab4--- /dev/null+++ b/app/e2e/toastPosition.ts@@ -0,0 +1,11 @@+import { expect, type Locator } from '@playwright/test'++export function expectBesideAsk(toast: Locator) {+ return expect.poll(() => toast.evaluate(el => {+ const panel = document.querySelector('.chat-panel[open]')+ if (!panel) return null+ const chat = panel.getBoundingClientRect(), notice = el.getBoundingClientRect()+ const gap = getComputedStyle(panel).direction === 'rtl' ? notice.left - chat.right : chat.left - notice.right+ return [Math.round(gap), Math.round(chat.bottom - notice.bottom)]+ })).toEqual([12, 0])+}diff --git a/app/src/renderer/src/components/Chat.tsx b/app/src/renderer/src/components/Chat.tsxindex 8b8104d2..1fb0d18c 100644--- a/app/src/renderer/src/components/Chat.tsx+++ b/app/src/renderer/src/components/Chat.tsx@@ -43,6 +43,7 @@ export function Ask({ id, recording, anchor, onSource }: { id: string; recordingconst morph = (expand: boolean, animate = true) => {const shell = surface.current, body = contents.current, dialog = panel.current, button = trigger.currentif (!shell || !body || !dialog || !button) return+ setToastDialog(dialog, expand && !narrow, animate)const running = animations.current.some(animation => animation.playState === 'running')const style = getComputedStyle(shell)const interrupted = running ? { '--ask-left': style.left, '--ask-top': style.top, width: style.width, height: style.height, borderRadius: style.borderRadius } : undefined@@ -97,7 +98,6 @@ export function Ask({ id, recording, anchor, onSource }: { id: string; recordingposition()// Native modal behavior makes the covered note inert at narrow widths; desktop stays editable.if (narrow) dialog.showModal(); else dialog.show()- setToastDialog(narrow ? dialog : null)dialog.querySelector('textarea')?.focus({ preventScroll: true })morph(true, animateOpen.current)animateOpen.current = false@@ -113,6 +113,7 @@ export function Ask({ id, recording, anchor, onSource }: { id: string; recordingconst done = () => {if (!closing.current) returnclosing.current = false+ setToastDialog(null)panel.current?.close(); setOpen(false)trigger.current?.focus({ preventScroll: true })}diff --git a/app/src/renderer/src/components/ShareMenu.tsx b/app/src/renderer/src/components/ShareMenu.tsxindex 738fee23..6518a917 100644--- a/app/src/renderer/src/components/ShareMenu.tsx+++ b/app/src/renderer/src/components/ShareMenu.tsx@@ -114,7 +114,7 @@ export function ShareMenu({ id, shown, status, hasEnhanced, beforeUse }: { id: s</button>{presence.value && (<div data-testid="share-menu" {...presence.props} role="menu" aria-label={t('Share')} onKeyDown={onMenuKey}- className="menu-entry absolute end-0 top-full z-30 mt-2 w-60 rounded-xl border border-line bg-float p-1.5 text-ink shadow-[var(--shadow)]">+ className="menu-entry absolute end-0 top-full z-[80] mt-2 w-60 rounded-xl border border-line bg-float p-1.5 text-ink shadow-[var(--shadow)]"><button ref={(el) => { items.current[0] = el }} role="menuitem" data-testid="share-copy-summary" disabled={!hasEnhanced && !writing}onClick={() => run(() => void copy('notes', 'enhanced'))} className={`${row} disabled:opacity-40`}><Copy size={15} aria-hidden="true" className="flex-none text-muted" />{t('Copy summary')}diff --git a/app/src/renderer/src/components/TrashToast.tsx b/app/src/renderer/src/components/TrashToast.tsxindex bebc9f2c..9eb65377 100644--- a/app/src/renderer/src/components/TrashToast.tsx+++ b/app/src/renderer/src/components/TrashToast.tsx@@ -9,9 +9,24 @@ import { changeMeetingRows } from '../meetingRowMotion'import { trashMeetings, restoreMeetings } from '../trashMeetings'let toastHost: HTMLDivElement | undefined-// Keep Undo reachable when Ask uses the native modal top layer on smaller windows.-export function setToastDialog(dialog: HTMLDialogElement | null) {- if (toastHost) (dialog ?? document.body).append(toastHost)+// Keep one live stack as Ask opens, including in the native modal top layer.+export function setToastDialog(dialog: HTMLDialogElement | null, beside = false, animate = false) {+ const host = toastHost+ if (!host) return+ const parent = dialog ?? document.body+ const changedSide = host.hasAttribute('data-beside-ask') !== beside+ if (!changedSide && host.parentElement === parent) return+ const viewport = host.querySelector<HTMLElement>('.app-toast-viewport')+ const from = changedSide && animate && viewport?.querySelector('.app-toast') &&+ !window.matchMedia('(prefers-reduced-motion: reduce)').matches ? viewport.getBoundingClientRect() : null+ if (changedSide) viewport?.getAnimations().forEach(animation => animation.cancel())+ if (host.parentElement !== parent) parent.append(host)+ host.toggleAttribute('data-beside-ask', beside)+ if (from && viewport) {+ const to = viewport.getBoundingClientRect()+ viewport.animate([{ transform: `translate(${from.x - to.x}px, ${from.y - to.y}px)` }, { transform: 'none' }],+ { duration: motion.surface, easing: motion.ease })+ }}type Shown = { ids: string[]; bulk?: boolean; error?: string; /** the note it was moved from: Undo opens it again */ from?: string }diff --git a/app/src/renderer/src/styles.css b/app/src/renderer/src/styles.cssindex ac44e12b..df8c8139 100644--- a/app/src/renderer/src/styles.css+++ b/app/src/renderer/src/styles.css@@ -625,11 +625,14 @@ input::selection, textarea::selection, .note-prose ::selection { background: var.chat-panel { position:fixed;z-index:70;inset-block:auto var(--chat-bottom,72px);inset-inline:auto 24px;width:420px;max-width:calc(100% - 32px);height:min(440px,var(--chat-height,440px),calc(100dvh - var(--chat-bottom,72px) - 68px));min-height:0;max-height:none;margin:0;padding:0;overflow:visible;border:1px solid var(--line);border-radius:12px;background:var(--float);color:var(--ink);box-shadow:0 16px 48px rgb(0 0 0 / .18),0 4px 12px rgb(0 0 0 / .08); }.chat-panel[open] { display:flex;flex-direction:column; }+.chat-panel[open]:not([aria-modal=true]) { anchor-name:--docked-ask; }.chat-panel { background:transparent;border-color:transparent;box-shadow:none; }/* Keep the full-size contents at the dialog origin while their parent moves and clips them. */@property --ask-left { syntax:"<length>";inherits:true;initial-value:-1px; }@property --ask-top { syntax:"<length>";inherits:true;initial-value:-1px; }.chat-panel-viewport { position:absolute;inset:0;container-type:size;border-radius:inherit; }+/* The panel surface paints over the passing toast during the open and close morph. */+.chat-panel:not([aria-modal=true]) .chat-panel-viewport { z-index:1; }.chat-morph-surface { position:absolute;inset:var(--ask-top) auto auto var(--ask-left);width:calc(100% + 2px);height:calc(100% + 2px);border:1px solid var(--line);border-radius:inherit;background:var(--float);box-shadow:0 16px 48px rgb(0 0 0 / .18),0 4px 12px rgb(0 0 0 / .08); }.chat-panel-contents { position:absolute;left:calc(-1px - var(--ask-left));top:calc(-1px - var(--ask-top));width:100cqw;height:100cqh;display:flex;flex-direction:column; }.chat-trigger[aria-expanded=true] { opacity:0; }diff --git a/app/src/renderer/src/workspace.css b/app/src/renderer/src/workspace.cssindex 166ccfdf..050b3681 100644--- a/app/src/renderer/src/workspace.css+++ b/app/src/renderer/src/workspace.css@@ -304,6 +304,8 @@bottom:max(20px,12px + max(anchor(--note-footer top,0px),anchor(--ask-composer top,0px),anchor(--transcript-player top,0px)));width:340px;max-width:calc(100% - 40px);z-index:90;outline:none;pointer-events:none;}+.chat-panel:not([aria-modal=true]) .app-toast-viewport { z-index:0; }+[data-beside-ask] .app-toast-viewport { inset-inline-end:calc(anchor(--docked-ask start) + 12px);bottom:anchor(--docked-ask bottom); }.app-toast { position:absolute;inset-block-end:0;inset-inline:0;width:100%;height:var(--toast-frontmost-height,var(--toast-height));border:1px solid var(--line);border-radius:11px;background:var(--float);color:var(--ink);box-shadow:0 8px 24px #0000001F,0 1px 3px #00000014;pointer-events:auto;outline:none;--gap:10px;z-index:calc(100 - var(--toast-index,0)); }.app-toast[data-expanded] { height:var(--toast-height); }.app-toast[data-limited] { opacity:0; }@@ -486,7 +488,7 @@.ask-turn:last-child { margin-bottom:0; }.ask-question { width:fit-content;max-width:80%;margin:0;margin-inline-start:auto;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:12px;background:var(--control);padding:8px 12px;font-size:14px;line-height:20px; }.ask-composer { flex:none;min-width:0;container-type:inline-size; }-.ask-conversation:not(.ask-landing) .ask-composer { anchor-name:--ask-composer; }+:is(.ask-page,.chat-panel[aria-modal=true]) .ask-conversation:not(.ask-landing) .ask-composer { anchor-name:--ask-composer; }.ask-box { position:relative;min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--float); }/* Composers are never lit; a short tapered flare invites typing instead. */.ask-tracer { position:absolute;inset:-1px;width:calc(100% + 2px);height:calc(100% + 2px);overflow:visible;pointer-events:none;opacity:0;fill:none;stroke:var(--accent);stroke-width:3;stroke-linecap:round;filter:drop-shadow(0 0 4px color-mix(in srgb,var(--accent) 70%,transparent)) drop-shadow(0 0 10px color-mix(in srgb,var(--accent) 35%,transparent)); }diff --git a/app/test/toastPosition.test.ts b/app/test/toastPosition.test.tsindex f3ae6c31..2e9bcf1b 100644--- a/app/test/toastPosition.test.ts+++ b/app/test/toastPosition.test.ts@@ -4,13 +4,14 @@ import { expect, it } from 'vitest'const css = ['styles.css', 'workspace.css'].map(file =>readFileSync(new URL(`../src/renderer/src/${file}`, import.meta.url), 'utf8')).join('\n')-it('uses one fixed toast stack across workspace routes, panel widths, sidebar states and reduced motion', () => {- const rules = [...css.replace(/\/\*[\s\S]*?\*\//g, '').matchAll(/([^{}]*\.app-toast-viewport[^{}]*)\{([^{}]*)\}/g)]- expect(rules.map(rule => rule[1].trim())).toEqual(['.app-toast-viewport'])- expect(rules[0][2]).toMatch(/position:\s*fixed;/)- expect(rules[0][2]).toContain('bottom:max(20px,12px + max(anchor(--note-footer top,0px),anchor(--ask-composer top,0px),anchor(--transcript-player top,0px)))')- expect(rules[0][2]).toMatch(/inset-inline-end:\s*20px;/)- expect(rules[0][2]).not.toMatch(/(?:translate|transform):/)+it('anchors the fixed stack to the window or the bottom inline-start corner of docked Ask', () => {+ const normal = css.match(/^\.app-toast-viewport \{([^}]+)\}/m)![1]+ expect(normal).toContain('position:fixed;inset-inline-end:20px;')+ expect(normal).toContain('bottom:max(20px,12px + max(anchor(--note-footer top,0px),anchor(--ask-composer top,0px),anchor(--transcript-player top,0px)))')+ expect(css).toContain('.chat-panel[open]:not([aria-modal=true]) { anchor-name:--docked-ask; }')+ const beside = css.match(/\[data-beside-ask\] \.app-toast-viewport \{([^}]+)\}/)![1]+ expect(beside).toContain('inset-inline-end:calc(anchor(--docked-ask start) + 12px)')+ expect(beside).toContain('bottom:anchor(--docked-ask bottom)')})it('clears the footer, docked composer and visible player without reserving space in the page', () => {