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: a notice stays in place when you switch pages
Eric Brownrout2fbc39da2dd7
diff --git a/app/e2e/loadingAndFeedback.spec.ts b/app/e2e/loadingAndFeedback.spec.tsindex be68ae4c..98c45514 100644--- a/app/e2e/loadingAndFeedback.spec.ts+++ b/app/e2e/loadingAndFeedback.spec.ts@@ -64,7 +64,7 @@ test('first reads have skeletons; a loaded transcript stays mounted across tabs'} finally { await app.close() }})-test('toast yields to Ask Yogurt and returns without replacing its Undo action', async ({}, testInfo) => {+test('Undo stays in its window corner across pages and above the modal backdrop', async ({}, testInfo) => {const { app, page } = await launch()try {await app.evaluate(({ BrowserWindow }) => BrowserWindow.getAllWindows().find(w => !w.isDestroyed())!.setSize(1280, 900))@@ -78,28 +78,44 @@ test('toast yields to Ask Yogurt and returns without replacing its Undo action',await removal.hover()await removal.getByTestId('past-note-more').click()await page.getByTestId('past-note-trash').click()- await expect(page.getByTestId('trash-toast')).toBeVisible()+ const toast = page.getByTestId('trash-toast')+ const expectCorner = () => expect.poll(() => toast.evaluate(el => {+ const rect = el.getBoundingClientRect()+ return [Math.round(innerWidth - rect.right), Math.round(innerHeight - rect.bottom)]+ })).toEqual([20, 20])+ await expectCorner()await page.getByTestId('nav-chat').click()await expect.poll(async () => {const toast = await page.getByTestId('trash-toast').boundingBox(), composer = await page.getByTestId('chat-page-box').boundingBox()return !!toast && !!composer && composer.y + composer.height < toast.y}).toBe(true)+ await expectCorner()+ await page.evaluate(() => window.yogurt.nav.go('/settings'))+ await expect(page.locator('.settings-screen')).toBeVisible()+ await expectCorner()+ await page.getByTestId('sidebar-collapse').click()+ await expectCorner()+ await page.emulateMedia({ reducedMotion: 'reduce' })+ await page.evaluate(() => window.yogurt.nav.go('/trash'))+ await expect(page.getByTestId('trash-page')).toBeVisible()+ await expectCorner()await page.evaluate(id => window.yogurt.nav.go(`/note/${id}`), ids[0])- const toast = page.getByTestId('trash-toast')+ await expect(page.getByTestId('chat-open')).toBeVisible()+ await expectCorner()await toast.hover()await page.screenshot({ path: testInfo.outputPath('toast-closed.png') })- const before = await toast.boundingBox()await page.getByTestId('chat-open').click()await expect.poll(async () => {const a = await toast.boundingBox(), b = await page.getByTestId('chat-panel').boundingBox()- return !!a && !!b && a.x + a.width + 10 <= b.x+ return !!a && !!b && b.y + b.height + 8 <= a.y}).toBe(true)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 page.screenshot({ path: testInfo.outputPath('toast-beside-chat.png') })+ await expectCorner()+ await page.screenshot({ path: testInfo.outputPath('toast-below-chat.png') })await page.getByTestId('chat-close').click()- await expect.poll(async () => Math.abs((await toast.boundingBox())!.x - before!.x)).toBeLessThan(2)+ await expectCorner()await app.evaluate(({ BrowserWindow }) => BrowserWindow.getAllWindows().find(w => !w.isDestroyed())!.setSize(820, 740))await page.getByTestId('chat-open').click()await expect(page.getByTestId('chat-panel')).toHaveAttribute('aria-modal', 'true')@@ -109,6 +125,7 @@ test('toast yields to Ask Yogurt and returns without replacing its Undo action',}).toBe(true)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 expectCorner()await page.getByTestId('trash-undo').click()await expect(toast).toHaveCount(0)} finally { await app.close() }diff --git a/app/e2e/note.spec.ts b/app/e2e/note.spec.tsindex 08c2a30e..d177b706 100644--- a/app/e2e/note.spec.ts+++ b/app/e2e/note.spec.ts@@ -75,7 +75,7 @@ test('Stop ends recording when its metadata cannot save, and Retry saves withoutawait page.getByTestId('past-note').click()await expect.poll(() => page.getByTestId('trash-toast').evaluate((toast) => {const footer = document.querySelector('.note-footer')!.getBoundingClientRect()- return footer.top - toast.getBoundingClientRect().bottom+ return toast.getBoundingClientRect().top - footer.bottom})).toBeGreaterThanOrEqual(12)await page.getByTestId('note-stop-retry').click()await expect(page.getByTestId('note-stop-unsaved')).toBeVisible()diff --git a/app/e2e/recordingReminder.spec.ts b/app/e2e/recordingReminder.spec.tsindex cb0bee37..08f40a1c 100644--- a/app/e2e/recordingReminder.spec.ts+++ b/app/e2e/recordingReminder.spec.ts@@ -33,7 +33,7 @@ for (const theme of ['light', 'dark'] as const) test(`standard recording remindeawait page.getByTestId('chat-open').click()await expect.poll(async () => {const a = await toast.boundingBox(), b = await page.getByTestId('chat-panel').boundingBox()- return !!a && !!b && a.x + a.width + 10 <= b.x+ return !!a && !!b && b.y + b.height + 8 <= a.y}).toBe(true)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)))diff --git a/app/src/renderer/src/components/TrashToast.tsx b/app/src/renderer/src/components/TrashToast.tsxindex bebc9f2c..4eff6092 100644--- a/app/src/renderer/src/components/TrashToast.tsx+++ b/app/src/renderer/src/components/TrashToast.tsx@@ -119,9 +119,24 @@ export function TrashToast({ go }: { go: (route: string) => void }) {</Toast.Provider>}+// Reserve the expanded stack so keyboard focus or hover can expose every action without covering the dock.+export function toastClearance(shown: ReadonlyArray<{ limited?: boolean; height?: number }>) {+ const visible = shown.filter(item => !item.limited)+ if (!visible.length) return ''+ const height = visible.reduce((sum, item) => sum + (item.height ?? 0), 0)+ // 20px below the stack, 12px above it, and Animate UI's gap between expanded cards.+ return `calc(${20 + height + 12}px + ${(visible.length - 1) * 0.75}rem)`+}+function ToastList() {const reduced = useReducedMotion()const { toasts: shown } = Toast.useToastManager<{ testId?: string; actionTestId?: string }>()+ const clearance = toastClearance(shown)+ useLayoutEffect(() => {+ if (!clearance) return+ document.body.style.setProperty('--toast-clearance', clearance)+ return () => { document.body.style.removeProperty('--toast-clearance') }+ }, [clearance])const front = shown.find(item => item.transitionStatus !== 'ending')return shown.map(item => <Toast.Root key={item.id} toast={item} className="app-toast" transition={{ duration: (reduced ? motion.micro : motion.surface) / 1000, ease: motion.softCurve }} exitTransition={{ duration: (reduced ? motion.micro : motion.base) / 1000, ease: motion.out }} swipeDirection={['down', 'right']}data-kind={item.data?.testId} data-testid={item.transitionStatus === 'ending' ? undefined : item.data?.testId ?? 'app-toast'}>diff --git a/app/src/renderer/src/screens/Note.tsx b/app/src/renderer/src/screens/Note.tsxindex 801cab0a..6fe26135 100644--- a/app/src/renderer/src/screens/Note.tsx+++ b/app/src/renderer/src/screens/Note.tsx@@ -72,16 +72,6 @@ export function Note({ id, onTitleChange, at, folderSuggestion, onSource, onResuconst retryNotes = useRef<() => void>(() => {})const retryRead = () => { if (meetingReadFailed) retryMeeting.current(); if (notesReadFailed) retryNotes.current() }const [m, setM] = useState<MeetingView>()- const [footer, setFooter] = useState<HTMLElement | null>(null)- useLayoutEffect(() => {- if (!footer) return- const position = () => document.body.style.setProperty('--note-footer-height', `${innerHeight - footer.getBoundingClientRect().top + 16}px`)- position()- const observer = new ResizeObserver(position)- observer.observe(footer)- window.addEventListener('resize', position)- return () => { observer.disconnect(); window.removeEventListener('resize', position); document.body.style.removeProperty('--note-footer-height') }- }, [footer])useEffect(() => { if (m) onTitleChange({ id: m.id, title: m.title }) }, [m?.id, m?.title, onTitleChange])const [retryingStop, setRetryingStop] = useState(false)const [starting, setStarting] = useState(false)@@ -473,7 +463,7 @@ export function Note({ id, onTitleChange, at, folderSuggestion, onSource, onResu</section>}</div></div>- <footer ref={setFooter} className="note-footer">+ <footer className="note-footer">{m.stopSavePending && (<InlineError testId="note-stop-unsaved" className="mt-5"><span>{t("Recording stopped. Yogurt couldn't save when it ended. Keep Yogurt open and try again.")}</span>diff --git a/app/src/renderer/src/styles.css b/app/src/renderer/src/styles.cssindex d6f4ae07..6a5e5b9e 100644--- a/app/src/renderer/src/styles.css+++ b/app/src/renderer/src/styles.css@@ -568,7 +568,7 @@ input::selection, textarea::selection, .note-prose ::selection { background: var.note-notes-body { padding-top:22px;padding-bottom:40px; }.note-transcript-pane { display:flex;contain:layout style;--transcript-inset:calc(max(0px,(100% - 860px)/2) + clamp(20px,calc(10cqw - 42px),48px)); }.transcript-turn { contain:layout style; }-.note-footer { flex:none;background:var(--bg);--note-footer-line:color-mix(in srgb,var(--line) 60%,var(--bg)); }+.note-footer { flex:none;margin-block-end:var(--toast-clearance,0px);background:var(--bg);--note-footer-line:color-mix(in srgb,var(--line) 60%,var(--bg)); }.note-footer-bar { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:var(--workspace-footer-height);padding:8px 24px;border-top:1px solid var(--note-footer-line); }.note-footer-bar:not(:first-child) { margin-top:8px; }@media (prefers-contrast:more) { .note-footer { --note-footer-line:var(--line); } }@@ -644,7 +644,7 @@ input::selection, textarea::selection, .note-prose ::selection { background: var.chat-panel::backdrop { background:rgb(0 0 0 / .16); }}@media(max-width:999px) and (max-height:420px) {- .chat-panel { inset-block:16px;height:calc(100dvh - 32px);max-height:calc(100dvh - 32px); }+ .chat-panel { inset-block:16px max(16px,var(--toast-clearance,0px));height:auto;max-height:none; }}.note-record-action { display:flex;align-items:center;justify-content:center;gap:6px;flex-shrink:0;padding-inline:12px;border:1px solid var(--line);border-radius:6px;background:var(--float);color:var(--ink);font-size:12px;font-weight:500;white-space:nowrap;transition:background-color var(--dur-micro) ease,color var(--dur-micro) ease; }.note-record-action:hover:not(:disabled) { background:var(--control-hover); }diff --git a/app/src/renderer/src/workspace.css b/app/src/renderer/src/workspace.cssindex 2d1bab59..9b3e2d8e 100644--- a/app/src/renderer/src/workspace.css+++ b/app/src/renderer/src/workspace.css@@ -272,8 +272,8 @@.agenda-status p { margin:5px 0 17px; }.trash-note { color:var(--muted);font-size:12px;line-height:1.6;margin:0 0 16px; }.trash-actions { display:flex;gap:4px; }-/* Move around the composer without relaying out the toast stack. */-.app-toast-viewport { position:fixed;bottom:20px;inset-inline-end:20px;--toast-x:0px;--toast-y:0px;translate:var(--toast-x) var(--toast-y);transition:translate var(--dur-surface) var(--ease-in-out);width:340px;max-width:calc(100% - 40px);z-index:90;outline:none;pointer-events:none; }+/* The stack stays anchored to the window as the workspace changes beneath it. */+.app-toast-viewport { position:fixed;bottom:20px;inset-inline-end:20px;width:340px;max-width:calc(100% - 40px);z-index:90;outline:none;pointer-events:none; }.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; }@@ -391,17 +391,6 @@.folder-choices button:disabled { opacity:.5; }@media (prefers-reduced-motion:reduce) { .folder-icon-grid button { transition:none; } }-body:has(.note-footer) .app-toast-viewport { --toast-y:calc(20px - var(--note-footer-height,76px)); }-body:has(.chat-page) .app-toast-viewport { --toast-y:-68px; }-body:has(.chat-panel[open]) .app-toast-viewport { --toast-x:-440px; }-body:has(.chat-panel[open]) .app-toast-viewport:dir(rtl) { --toast-x:440px; }-@media(max-width:999px) {- body:has(.chat-panel[open]) .app-toast-viewport { --toast-x:4px;--toast-y:4px; }- body:has(.chat-panel[open]) .app-toast-viewport:dir(rtl) { --toast-x:-4px; }- .chat-panel:has(.app-toast) { inset-block-end:84px;height:min(440px,calc(100dvh - 152px)); }-}-@media(prefers-reduced-motion:reduce) { .app-toast-viewport { transition:none; } }-/* Folder membership is a small label beside the time; the tile always identifies the meeting. */.native-library { container-type:inline-size;container-name:meeting-library; }.meeting-description { flex:1 1 220px; }@@ -439,10 +428,10 @@ body:has(.chat-panel[open]) .app-toast-viewport:dir(rtl) { --toast-x:440px; }/* Ask keeps one reading column and one composer in both surfaces. *//* a gutter held from the start: a scrollbar appearing as context grows would shift the centred page sideways */-.ask-page { contain:layout;height:100%;min-height:0;display:flex;flex-direction:column;overflow-y:auto;scrollbar-gutter:stable both-edges;padding:104px 32px 24px; }+.ask-page { contain:layout;height:100%;min-height:0;display:flex;flex-direction:column;overflow-y:auto;scrollbar-gutter:stable both-edges;padding:104px 32px max(24px,var(--toast-clearance,0px)); }.ask-page-toolbar { position:absolute;z-index:4;top:68px;inset-inline:24px;display:flex;align-items:center;justify-content:flex-end;gap:12px;height:28px; }.ask-back { margin-inline-end:auto; }-.ask-page:has(.ask-landing) { container-type:size;padding-bottom:clamp(104px,24vh,240px); }+.ask-page:has(.ask-landing) { container-type:size;padding-bottom:max(clamp(104px,24vh,240px),var(--toast-clearance,0px)); }.ask-page:has(.ask-landing) .ask-back { display:none; }.ask-conversation { display:flex;flex-direction:column;min-height:0;min-width:0;flex:1; }/* Anchor to the 194px empty composition; context and multiline drafts grow downward. */diff --git a/app/test/toastPosition.test.ts b/app/test/toastPosition.test.tsnew file mode 100644index 00000000..f4f40f79--- /dev/null+++ b/app/test/toastPosition.test.ts@@ -0,0 +1,22 @@+import { readFileSync } from 'node:fs'+import { expect, it } from 'vitest'+import { toastClearance } from '../src/renderer/src/components/TrashToast'++it('keeps one window anchor for a live toast across workspace routes, panel widths, sidebar states and reduced motion', () => {+ const css = ['styles.css', 'workspace.css'].map(file =>+ readFileSync(new URL(`../src/renderer/src/${file}`, import.meta.url), 'utf8')).join('\n')+ const rules = [...css.replace(/\/\*[\s\S]*?\*\//g, '').matchAll(/([^{}]*\.app-toast-viewport[^{}]*)\{([^{}]*)\}/g)]+ // Any second selector could move the very same portal as the DOM or a media query changes.+ expect(rules.map(rule => rule[1].trim())).toEqual(['.app-toast-viewport'])+ expect(rules[0][2]).toMatch(/position:\s*fixed;/)+ expect(rules[0][2]).toMatch(/bottom:\s*20px;/)+ expect(rules[0][2]).toMatch(/inset-inline-end:\s*20px;/)+ expect(rules[0][2]).not.toMatch(/(?:translate|transform):/)+})++it('reserves the measured stack for docked controls, including two wrapped cards at high zoom', () => {+ expect(toastClearance([])).toBe('')+ expect(toastClearance([{ height: 54 }])).toBe('calc(86px + 0rem)')+ expect(toastClearance([{ height: 70 }, { height: 89 }, { height: 54, limited: true }])).toBe('calc(191px + 0.75rem)')+ expect(toastClearance([{ height: 54, limited: true }])).toBe('')+})