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.

Recording: Pause and Stop are icon buttons with tooltips

Eric Brownrout4b598fb5b0a2
diff --git a/app/e2e/callControls.spec.ts b/app/e2e/callControls.spec.ts
index 8f1004ee..644cb6ad 100644
--- a/app/e2e/callControls.spec.ts
+++ b/app/e2e/callControls.spec.ts
@@ -16,10 +16,27 @@ test('paused recording controls fit the minimum window and keep focus inside eac
try {
await app.evaluate(({ BrowserWindow }) => BrowserWindow.getAllWindows()[0].setSize(720, 520))
await page.locator('#workspace-actions').getByRole('button', { name: 'Start recording', exact: true }).click()
+ const stop = page.getByTestId('note-stop'), pause = page.getByTestId('note-pause')
+ const tooltip = page.getByRole('tooltip')
+ await expect(pause).toHaveAccessibleName('Pause recording')
+ await pause.locator('svg[data-icon=Pause]').hover()
+ await expect(tooltip).toHaveText('Pause recording')
+ // Hold the exit so both popups are mounted during the handoff on every run.
+ const holdExit = await page.addStyleTag({ content: `
+ @keyframes hold-tooltip-exit { to { opacity: 0 } }
+ [role="tooltip"][data-closed] { animation: hold-tooltip-exit 1s paused; }
+ ` })
+ await stop.hover()
+ await expect(tooltip).toHaveText('Stop recording')
+ await expect(page.locator('[role="tooltip"][data-closed]')).toHaveText('Pause recording')
+ await holdExit.evaluate(style => { style.parentNode?.removeChild(style) })
await page.getByTestId('note-pause').click()
await expect(page.getByTestId('rec-mic')).toHaveText('Recording paused')
+ await page.getByTestId('note-title').hover()
+ await expect(tooltip).toHaveCount(0)
await page.keyboard.press('Tab')
await page.getByTestId('note-pause').focus()
+ await expect(tooltip).toHaveText('Resume recording')
await page.screenshot({ path: testInfo.outputPath('paused-minimum.png') })
await expect(page.getByTestId('rec-mic-chip').locator('[data-icon=Pause]')).toHaveAttribute('fill', 'currentColor')
await expect(page.getByTestId('note-pause')).toHaveCSS('outline-offset', '-2px')
@@ -40,7 +57,22 @@ test('paused recording controls fit the minimum window and keep focus inside eac
for (const button of await buttons.all()) {
expect(await button.evaluate(el => el.scrollWidth <= el.clientWidth)).toBe(true)
}
- await expect(page.getByTestId('note-stop')).toHaveText('Stop')
+ await expect(stop).toHaveAccessibleName('Stop recording')
+ await expect(tooltip).toHaveText('Stop recording')
+ const selected = await group.getAttribute('data-treatment')
+ expect(['neutral-icons', 'accent-icons', 'word']).toContain(selected)
+ for (const treatment of ['neutral-icons', 'accent-icons', 'word']) {
+ await group.evaluate((el, value) => { el.dataset.treatment = value }, treatment)
+ const withWord = treatment === 'word'
+ await expect(stop).toHaveText(withWord ? 'Stop' : '', { useInnerText: true })
+ const pauseBox = (await pause.boundingBox())!, stopBox = (await stop.boundingBox())!
+ expect(stopBox.height).toBe(pauseBox.height)
+ if (withWord) expect(stopBox.width).toBeGreaterThan(pauseBox.width)
+ else expect(stopBox.width).toBe(pauseBox.width)
+ const neutral = await stop.evaluate(el => getComputedStyle(el, '::before').backgroundColor === getComputedStyle(el).color)
+ expect(neutral).toBe(treatment === 'neutral-icons')
+ }
+ await group.evaluate((el, value) => { el.dataset.treatment = value! }, selected)
await page.getByTestId('note-pause').click()
await expect(page.getByTestId('note-state')).toHaveAttribute('data-paused', 'false')
await expect(page.getByTestId('note-wave')).toBeVisible()
diff --git a/app/src/renderer/src/components/RecordingAction.tsx b/app/src/renderer/src/components/RecordingAction.tsx
new file mode 100644
index 00000000..e7342ab5
--- /dev/null
+++ b/app/src/renderer/src/components/RecordingAction.tsx
@@ -0,0 +1,14 @@
+import { Tooltip } from '@base-ui/react/tooltip'
+import type { ButtonHTMLAttributes } from 'react'
+
+export function RecordingAction({ label, ...button }: ButtonHTMLAttributes<HTMLButtonElement> & { label: string }) {
+ return <Tooltip.Root>
+ <Tooltip.Trigger {...button} aria-label={label} delay={180} />
+ <Tooltip.Portal>
+ <Tooltip.Positioner side="top" sideOffset={6} className="z-[80]">
+ <Tooltip.Popup role="tooltip" render={(props, { open }) => <div {...props} aria-hidden={!open} inert={!open} />}
+ className="rounded-md border border-line bg-float px-2 py-1 text-xs whitespace-nowrap text-ink shadow-[var(--shadow)]">{label}</Tooltip.Popup>
+ </Tooltip.Positioner>
+ </Tooltip.Portal>
+ </Tooltip.Root>
+}
diff --git a/app/src/renderer/src/screens/Note.tsx b/app/src/renderer/src/screens/Note.tsx
index b9b02b9b..8660a0f7 100644
--- a/app/src/renderer/src/screens/Note.tsx
+++ b/app/src/renderer/src/screens/Note.tsx
@@ -23,6 +23,7 @@ import { Transcript } from '../components/Transcript'
import { Ask } from '../components/Chat'
import { LevelBars } from '../components/LevelBars'
import { RecordingTime } from '../components/RecordingTime'
+import { RecordingAction } from '../components/RecordingAction'
import { Mic, Pause, Play } from '../components/Icons'
import { ShareMenu } from '../components/ShareMenu'
import { NoteMenu, summaryAction } from '../components/NoteMenu'
@@ -41,6 +42,8 @@ import { FolderChip, FolderPicker, type FolderSuggestion } from '../components/F
import { FolderName } from '../components/FolderDialogs'
import { Swap, SwapText } from '../components/Swap'
+const RECORDING_CONTROL_TREATMENT: 'neutral-icons' | 'accent-icons' | 'word' = 'neutral-icons'
+
/** A revision is dirty until main acknowledges it; failed text also remains there across navigation/reload. */
function useAutosave(id: string, side: NoteSide, text: string, saved?: NoteSaveResult) {
const [, redraw] = useState(0)
@@ -393,15 +396,15 @@ export function Note({ id, onTitleChange, at, folderSuggestion, onSource, onResu
<LevelBars height={14} bars={3} testId="note-wave" paused={!!m.paused} className="text-muted" />
<RecordingTime view={recorder} />
</span>}
- <div data-testid="note-state" data-state={m.state} data-paused={!!m.paused} className="note-recording-group" data-recording={recording && !finishing} role="group" aria-label={recording ? m.paused ? t('Paused') : t('Recording') : t('Meeting controls')}>
+ <div data-testid="note-state" data-state={m.state} data-paused={!!m.paused} className="note-recording-group" data-treatment={RECORDING_CONTROL_TREATMENT} data-recording={recording && !finishing} role="group" aria-label={recording ? m.paused ? t('Paused') : t('Recording') : t('Meeting controls')}>
{recording && !finishing && <>
- <button data-testid="note-pause" disabled={pausing} onClick={() => { void togglePause() }}
- aria-label={m.paused ? t('Resume recording') : t('Pause recording')} title={m.paused ? t('Resume recording') : t('Pause recording')} className="note-record-action note-pause-action">
+ <RecordingAction data-testid="note-pause" disabled={pausing} onClick={() => { void togglePause() }}
+ label={m.paused ? t('Resume recording') : t('Pause recording')} className="note-record-action note-pause-action">
<Swap show={m.paused ? 'play' : 'pause'} options={{ pause: <Pause size={14} fill="currentColor" strokeWidth={0} />, play: <Play size={14} fill="currentColor" strokeWidth={0} /> }} />
- </button>
- <button data-testid="note-stop" onClick={(e) => { requestFinish(true); picked.current = true; setView('mine'); setFinishing(true); setTabPointer(e.detail > 0); window.yogurt.meetings.stop(id) }} aria-label={t('Stop recording')} title={t('Stop recording')} className="note-record-action note-finish-action primary">
- {t('Stop')}
- </button>
+ </RecordingAction>
+ <RecordingAction data-testid="note-stop" onClick={(e) => { requestFinish(true); picked.current = true; setView('mine'); setFinishing(true); setTabPointer(e.detail > 0); window.yogurt.meetings.stop(id) }} label={t('Stop recording')} className="note-record-action note-finish-action">
+ <span className="note-stop-label">{t('Stop')}</span>
+ </RecordingAction>
</>}
{finishing && <span data-testid="note-finishing" role="status" className="note-finishing">{t('Stopping…')}</span>}
{!finishing && (summaryPending || (!transcribing && m.source !== 'audio-file')) && (m.state === 'stopped' || m.state === 'done') && !m.stopSavePending && !trashed && <button data-testid="note-resume" disabled={starting && !summaryPending} onClick={() => { if (summaryPending) void window.yogurt.notes.stop(id).catch(console.error); else void resumeRecording() }}
diff --git a/app/src/renderer/src/styles.css b/app/src/renderer/src/styles.css
index fff6fab0..ed4fc331 100644
--- a/app/src/renderer/src/styles.css
+++ b/app/src/renderer/src/styles.css
@@ -589,8 +589,13 @@ input::selection, textarea::selection, .note-prose ::selection { background: var
.note-recording-group[data-recording=true] .note-record-action:last-child { border-start-end-radius:6px;border-end-end-radius:6px; }
.note-recording-group[data-recording=true] .note-record-action:hover:not(:disabled) { background:var(--control-hover);color:var(--ink); }
.note-recording-group[data-recording=true] .note-record-action:active:not(:disabled) { background:var(--control-pressed); }
-.note-recording-group[data-recording=true] .note-finish-action { --note-stop-icon:var(--accent);color:var(--ink); }
-.note-finish-action::before { content:"";width:8px;height:8px;border-radius:2px;background:var(--note-stop-icon); }
+.note-recording-group[data-recording=true] .note-finish-action { width:30px;padding:0; }
+.note-finish-action::before { content:"";width:8px;height:8px;border-radius:2px;background:currentColor; }
+.note-stop-label { display:none; }
+.note-recording-group:is([data-treatment=accent-icons],[data-treatment=word]) .note-finish-action::before { background:var(--accent); }
+.note-recording-group[data-treatment=word] .note-finish-action { width:auto;padding-inline:12px;color:var(--ink); }
+.note-recording-group[data-treatment=word] .note-stop-label { display:inline; }
+@media (forced-colors:active) { .note-recording-group[data-treatment] .note-finish-action::before { forced-color-adjust:none;background:ButtonText; } }
.note-finishing { display:flex;align-items:center;height:30px;padding-inline:10px;border:1px solid var(--line);border-radius:6px;color:var(--muted);font-size:12px; }
.workspace .note-record-action:focus-visible { outline-offset:-2px; }