Skip to content

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.

Notes: a calmer title bar and transcript search

Eric Brownrout41c936ae8369
diff --git a/app/e2e/noteTools.spec.ts b/app/e2e/noteTools.spec.ts
index 279bebb7..4f3c7dd7 100644
--- a/app/e2e/noteTools.spec.ts
+++ b/app/e2e/noteTools.spec.ts
@@ -26,11 +26,15 @@ test('meeting tools expose all copy choices, an anchored search, and a multiline
expect(compact.x + compact.width).toBeCloseTo(tabs.x + tabs.width, 1)
await expect(page.getByTestId('transcript-copy')).toHaveCount(0)
await page.emulateMedia({ reducedMotion: 'no-preference' })
+ await expect(search).toHaveCSS('text-align', 'start')
await search.click()
- await expect(field).toHaveCSS('transition-duration', '0.22s, 0.22s, 0.14s, 0.14s')
- await expect.poll(async () => (await field.boundingBox())!.width).toBeGreaterThan(200)
+ expect((await field.boundingBox())!.width).toBe(224)
+ await expect(field).toHaveCSS('transition-property', 'background-color, border-color')
+ await expect(field).toHaveCSS('transition-duration', '0.1s, 0.1s')
+ await expect(field).toHaveCSS('box-shadow', 'none')
+ await expect(search).toHaveCSS('text-align', 'start')
await page.getByTestId('note-transcript-toggle').click()
- await expect.poll(async () => (await field.boundingBox())!.width).toBeLessThan(120)
+ expect((await field.boundingBox())!.width).toBe(compact.width)
await page.emulateMedia({ reducedMotion: 'reduce' })
await search.click()
await expect(field).toHaveCSS('transition-duration', '0s')
diff --git a/app/e2e/sidebarMotion.spec.ts b/app/e2e/sidebarMotion.spec.ts
index aaf02a6a..cc234c33 100644
--- a/app/e2e/sidebarMotion.spec.ts
+++ b/app/e2e/sidebarMotion.spec.ts
@@ -106,18 +106,28 @@ test('native titlebar drag regions leave the sidebar and toolbar controls clicka
} finally { await app.close() }
})
-test('titlebar chrome stays continuous throughout either sidebar direction', async ({}, testInfo) => {
+for (const reducedTransparency of ['no-preference', 'reduce']) test(`titlebar chrome stays continuous throughout either sidebar direction with transparency ${reducedTransparency}`, async ({}, testInfo) => {
const { app, page } = await launch()
try {
+ await app.evaluate(() => (globalThis as unknown as { __fake__: { manyMeetings(o: { n: number; clean: boolean }): void } }).__fake__.manyMeetings({ n: 1, clean: true }))
+ await page.reload()
+ await page.getByTestId('past-note').click()
+ await expect(page.getByTestId('note')).toBeVisible()
+ const cdp = await page.context().newCDPSession(page)
const divider = await page.locator('.workspace-sidebar').evaluate(el => ({ border: getComputedStyle(el).borderInlineEndColor, start: getComputedStyle(el, '::after').top }))
expect(divider).toEqual({ border: 'rgba(0, 0, 0, 0)', start: '52px' })
for (const colorScheme of ['light', 'dark'] as const) {
- await page.emulateMedia({ colorScheme })
+ await cdp.send('Emulation.setEmulatedMedia', { features: [
+ { name: 'prefers-color-scheme', value: colorScheme },
+ { name: 'prefers-reduced-transparency', value: reducedTransparency },
+ { name: 'prefers-contrast', value: 'no-preference' },
+ { name: 'prefers-reduced-motion', value: 'no-preference' },
+ ] })
for (const direction of ['ltr', 'rtl']) {
await page.evaluate((direction) => { document.documentElement.dir = direction }, direction)
for (let toggle = 0; toggle < 2; toggle++) {
await page.locator('.workspace-sidebar-toggle').click()
- for (const time of [0, 60, 120, 180, 239]) {
+ for (const time of [0, 60, 120, 180, 239, 300]) {
const chrome = await page.evaluate((time) => {
const workspace = document.querySelector('.workspace')!
for (const animation of workspace.getAnimations({ subtree: true })) {
@@ -138,6 +148,11 @@ test('titlebar chrome stays continuous throughout either sidebar direction', asy
edge = Math.max(edge, piece.right)
}
expect(edge).toBeGreaterThanOrEqual(chrome.width - 0.5)
+ // The loaded note must not paint over the title bar through its loading wrappers.
+ await expect(page.getByTestId('note')).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
+ await expect(page.getByTestId('note')).toHaveCSS('background-image', 'none')
+ await expect(page.locator('.workspace-content')).toHaveCSS('background-image', /rgba\(0, 0, 0, 0\) 52px/)
+ await expect(page.locator('.workspace')).toHaveCSS('background-image', /^linear-gradient\(rgb\(.+52px/)
if (direction === 'ltr' && time === 120) {
const name = `${colorScheme}-${toggle === 0 ? 'collapse' : 'expand'}`
const path = testInfo.outputPath(`${name}.png`)
@@ -146,11 +161,13 @@ test('titlebar chrome stays continuous throughout either sidebar direction', asy
}
}
await page.locator('.workspace').evaluate((el) => {
- for (const animation of el.getAnimations({ subtree: true })) animation.finish()
+ // a note page has endless animations (the level bars); only the sidebar's own transitions can finish
+ for (const animation of el.getAnimations({ subtree: true })) if (animation.effect?.getComputedTiming().endTime !== Infinity) animation.finish()
})
}
}
}
+ await cdp.detach()
} finally { await app.close() }
})
diff --git a/app/src/renderer/src/components/Transcript.tsx b/app/src/renderer/src/components/Transcript.tsx
index 969a5c2e..f899d57b 100644
--- a/app/src/renderer/src/components/Transcript.tsx
+++ b/app/src/renderer/src/components/Transcript.tsx
@@ -182,8 +182,6 @@ export function Transcript({ id, recording, inline = false, active = true, onClo
void window.yogurt.transcript.restore(id, [l.id]).catch(() => { restoreFocus.current = undefined; setRestoreError(true) })
}, [id])
const [query, setQuery] = useState('')
- const pointerSearch = useRef(false)
- const [animateSearch, setAnimateSearch] = useState(false)
useEffect(() => { setQuery(''); setRestoreError(false) }, [id])
// the recording is only playable once it is finished
@@ -364,9 +362,9 @@ export function Transcript({ id, recording, inline = false, active = true, onClo
const tools = (
<div className="transcript-toolbar">
- <label className="transcript-search-field" data-pointer={animateSearch} onPointerDown={() => { pointerSearch.current = true }}>
+ <label className="transcript-search-field">
<SearchIcon size={14} strokeWidth={1.75} aria-hidden="true" className="shrink-0 text-muted" />
- <input data-testid="transcript-search" value={query} onFocus={() => { setAnimateSearch(pointerSearch.current); pointerSearch.current = false }} onChange={(e) => setQuery(e.target.value)} placeholder={t('Search')} aria-label={t('Search the transcript')} spellCheck={false} />
+ <input data-testid="transcript-search" value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t('Search')} aria-label={t('Search the transcript')} spellCheck={false} />
</label>
{!inline && onClose && <div className="transcript-actions"><button data-testid="transcript-close" onClick={onClose} aria-label={t('Hide transcript')} title={t('Hide transcript')} className="ghost-btn !p-1.5"><ChevronDown size={15} aria-hidden="true" /></button></div>}
</div>
diff --git a/app/src/renderer/src/components/Workspace.tsx b/app/src/renderer/src/components/Workspace.tsx
index a25fc39b..135a33a5 100644
--- a/app/src/renderer/src/components/Workspace.tsx
+++ b/app/src/renderer/src/components/Workspace.tsx
@@ -2,7 +2,7 @@ import { toasts } from './TrashToast'
import { askDestination } from '../../../shared/askContext'
import * as Sidebar from '@animate-ui/react/primitives/sidebar'
import { useEffect, useState, type ReactNode } from 'react'
-import { ChevronLeft, ChevronRight, Slash, Trash2 } from 'lucide-react'
+import { ChevronLeft, ChevronRight, Trash2 } from 'lucide-react'
import type { MeetingView, Folder, WidgetView } from '../../../shared/types'
import { t } from '../../../shared/i18n'
import { command, keys, onMac } from '../keys'
@@ -101,9 +101,6 @@ export function Workspace({ route, meeting, folders, go, back, forward, search,
<button data-testid="nav-back" className="workspace-icon" disabled={!back && !note} onClick={back ?? (() => go(''))} aria-label={t('Back')} title={`${t('Back')} (${keys('⌘[')})`}><ChevronLeft size={14} strokeWidth={1.75} className="rtl:-scale-x-100" aria-hidden="true" /></button>
<button data-testid="nav-forward" className="workspace-icon" disabled={!forward} onClick={forward} aria-label={t('Forward')} title={`${t('Forward')} (${keys('⌘]')})`}><ChevronRight size={14} strokeWidth={1.75} className="rtl:-scale-x-100" aria-hidden="true" /></button>
</span>
- {note && <>
- <button className="workspace-parent" onClick={() => go('')}>{t('Meetings')}</button><Slash size={12} strokeWidth={1.4} className="workspace-parent-separator rtl:-scale-x-100" aria-hidden="true" />
- </>}
<span data-testid="workspace-heading" aria-current="page" title={label}>{label}</span>
</div>
{returnToRecording && <button className="workspace-recording-link no-drag" data-testid="recording-return" data-paused={recording.paused}
diff --git a/app/src/renderer/src/styles.css b/app/src/renderer/src/styles.css
index 26385438..a5b1d072 100644
--- a/app/src/renderer/src/styles.css
+++ b/app/src/renderer/src/styles.css
@@ -679,15 +679,14 @@ input::selection, textarea::selection, .note-prose ::selection { background: var
.note-primary-tools .transcript-actions { order:-1;margin-inline-start:0; }
.transcript-toolbar { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;padding:10px 12px;border-bottom:1px solid var(--line); }
.transcript-search-field { display:flex;align-items:center;gap:8px;flex:0 1 auto;width:68px;max-width:100%;min-width:32px;height:32px;padding-inline:0;border:1px solid transparent;border-radius:6px;background:transparent; }
-.transcript-search-field[data-pointer=true] { transition:width 220ms cubic-bezier(.23,1,.32,1),padding 220ms cubic-bezier(.23,1,.32,1),background-color 140ms ease,border-color 140ms ease; }
-@media(prefers-reduced-motion:reduce) { .transcript-search-field[data-pointer=true] { transition:none; } }
+.transcript-search-field { transition:background-color 100ms ease,border-color 100ms ease; }
+@media(prefers-reduced-motion:reduce) { .transcript-search-field { transition:none; } }
/* collapsed it reads as a button: a pointer, no hover box (with no padding yet it hugged the word); it opens on click */
.transcript-search-field,.transcript-search-field [data-testid="transcript-search"] { cursor:pointer; }
.transcript-search-field:focus-within [data-testid="transcript-search"],.transcript-search-field:has(input:not(:placeholder-shown)) [data-testid="transcript-search"] { cursor:text; }
.transcript-search-field:focus-within,.transcript-search-field:has(input:not(:placeholder-shown)) { width:224px;padding-inline:10px;border-color:var(--line);background:var(--control); }
-.transcript-search-field:focus-within { border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft); }
-[data-testid="transcript-search"] { min-width:0;width:100%;height:100%;padding:0;border:0;background:transparent;color:var(--ink);font-size:13px;font-weight:500;line-height:20px;text-align:end; }
-.transcript-search-field:focus-within input,.transcript-search-field:has(input:not(:placeholder-shown)) input { text-align:start; }
+.transcript-search-field:focus-within { border-color:var(--accent); }
+[data-testid="transcript-search"] { min-width:0;width:100%;height:100%;padding:0;border:0;background:transparent;color:var(--ink);font-size:13px;font-weight:500;line-height:20px;text-align:start; }
[data-testid="transcript-search"]::placeholder { color:var(--muted); }
[data-testid="transcript-search"]:focus-visible { outline:none;box-shadow:none; }
.transcript-actions { display:flex;align-items:center;gap:4px;margin-inline-start:auto; }
diff --git a/app/src/renderer/src/workspace.css b/app/src/renderer/src/workspace.css
index a6c35a48..9518d38d 100644
--- a/app/src/renderer/src/workspace.css
+++ b/app/src/renderer/src/workspace.css
@@ -83,16 +83,13 @@
.workspace-sidebar-footer { padding:9px var(--sidebar-inset) 0; }
.workspace-brand { display:flex;align-items:center;justify-content:flex-start;min-height:var(--workspace-footer-height);border-top:1px solid var(--line);margin-top:9px;margin-inline:calc(-1 * var(--sidebar-inset));padding:0 calc(var(--sidebar-inset) + var(--nav-inset)); }
.workspace-content { position:relative;z-index:1;contain:layout;flex:1;min-width:0;height:100%;background:var(--reading-surface);container-type:inline-size; }
-.workspace-content>.bg-bg { background:transparent; }
+.workspace-content>.bg-bg,.workspace-content .document-main { background:transparent; }
.document-body { padding-inline:clamp(20px,calc(10cqw - 42px),48px); }
.workspace-toolbar { position:absolute;inset-inline:0;top:0;height:52px;z-index:50;display:flex;align-items:center;padding:0 24px;border-bottom:1px solid var(--line);background:transparent; }
.workspace-toolbar[data-note=true] { padding-inline-end:185px; }
.workspace-breadcrumb { display:flex;gap:9px;align-items:center;min-width:0;color:var(--muted);font-size:13px;white-space:nowrap; }
.workspace-breadcrumb>svg { flex:none; }
.workspace-breadcrumb>[aria-current] { color:var(--ink);font-weight:500;overflow:hidden;text-overflow:ellipsis; }
-.workspace-parent { color:var(--muted);flex:none; }
-.workspace-parent:hover { color:var(--ink); }
-.workspace-parent-separator { color:var(--muted);opacity:.55; }
.workspace-history { display:flex;gap:2px;flex:none; }
.workspace-history button:disabled { opacity:.3;background:transparent; }
/* Keep chrome edge-to-edge while the canvas moves; only the controls need clearance. */