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.

Settings: an option to hide the floating recording pill

Eric Brownrout42fb7957c4ae
diff --git a/app/src/main/backup.ts b/app/src/main/backup.ts
index faf011ec..313b6af3 100644
--- a/app/src/main/backup.ts
+++ b/app/src/main/backup.ts
@@ -15,8 +15,8 @@ import { pack, unpack } from './zip'
* Importing adds the meetings that are not here yet and never changes or removes one that is.
*/
export const BACKUP_FORMAT = backupFormat.format
-export type Manifest = { format: number; app: string; createdAt: number; meetings: number }
-export type ImportResult = { ok: true; added: number; skipped: number } | { ok: false; error: 'newer' | 'invalid' | 'failed' }
+export type Manifest = { format: number; app: string; createdAt: number; meetings: number; showRecordingPill?: boolean }
+export type ImportResult = { ok: true; added: number; skipped: number; showRecordingPill?: boolean } | { ok: false; error: 'newer' | 'invalid' | 'failed' }
type Row = Record<string, string | number | bigint | null | Uint8Array>
const q = (name: string) => `"${name.replace(/"/g, '""')}"`
@@ -144,7 +144,7 @@ const scratch = (name: string) => name.endsWith('.f32')
const cleanup = (dir: string) => rm(dir, { recursive: true, force: true }).catch((e) => console.warn('backup cleanup failed', dir, e))
/** Everything to one zip: a snapshot of the database (safe while Yogurt runs), each meeting's recordings, and a manifest */
-export async function exportBackup(o: { db: DatabaseSync; meetingsDir: string; out: string; appVersion: string; now?: number }): Promise<{ meetings: number }> {
+export async function exportBackup(o: { db: DatabaseSync; meetingsDir: string; out: string; appVersion: string; now?: number; showRecordingPill?: boolean }): Promise<{ meetings: number }> {
const work = await mkdtemp(join(tmpdir(), 'yogurt-export-'))
let staging: string | undefined
try {
@@ -168,7 +168,7 @@ export async function exportBackup(o: { db: DatabaseSync; meetingsDir: string; o
if ((e as NodeJS.ErrnoException).code !== 'ENOENT') throw e
}
}
- const manifest: Manifest = { format: BACKUP_FORMAT, app: o.appVersion, createdAt: o.now ?? Date.now(), meetings: ids.length }
+ const manifest: Manifest = { format: BACKUP_FORMAT, app: o.appVersion, createdAt: o.now ?? Date.now(), meetings: ids.length, showRecordingPill: o.showRecordingPill }
await writeFile(join(work, 'manifest.json'), JSON.stringify(manifest, null, 2))
// Keep the previous backup until its replacement is complete. Stage beside the
// destination so the final rename stays atomic, including on an external disk.
@@ -218,7 +218,8 @@ export async function importBackup(o: { db: DatabaseSync; meetingsDir: string; z
await cp(src, dest, { recursive: true, filter: plainOnly })
}
const r = mergeBackup(o.db, from)
- return { ok: true, added: r.added.length, skipped: r.skipped }
+ const pill = (raw as Manifest).showRecordingPill
+ return { ok: true, added: r.added.length, skipped: r.skipped, ...(typeof pill === 'boolean' && { showRecordingPill: pill }) }
} catch (e) {
console.error('import failed', e)
for (const d of copied) await cleanup(d)
diff --git a/app/src/main/backupIpc.ts b/app/src/main/backupIpc.ts
index 919fb94e..32be5f1e 100644
--- a/app/src/main/backupIpc.ts
+++ b/app/src/main/backupIpc.ts
@@ -12,7 +12,7 @@ const today = (d = new Date()) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-$
* Backup in Settings. The window only says export or import; the file always comes from the Mac's own save or open
* panel (tests name it with YOGURT_BACKUP_PATH), and Show in Finder shows only the file just written.
*/
-export function hookBackup(d: { db: DatabaseSync; meetingsDir: string; window: () => BrowserWindow | undefined; recording: () => boolean; changed: () => void; beforeExport: () => string | undefined }) {
+export function hookBackup(d: { db: DatabaseSync; meetingsDir: string; window: () => BrowserWindow | undefined; recording: () => boolean; getRecordingPill(): boolean; setRecordingPill(on: boolean): void; changed: () => void; beforeExport: () => string | undefined }) {
let last: string | undefined
const fakePath = () => (isFake() ? process.env.YOGURT_BACKUP_PATH : undefined)
ipcMain.handle('backup:status', () => ({ recording: d.recording() }))
@@ -32,7 +32,7 @@ export function hookBackup(d: { db: DatabaseSync; meetingsDir: string; window: (
if (d.recording()) return { ok: false, error: 'recording' }
unsaved = d.beforeExport()
if (unsaved) return { ok: false, error: 'unsaved', meetingId: unsaved }
- const r = await exportBackup({ db: d.db, meetingsDir: d.meetingsDir, out: path, appVersion: app.getVersion() })
+ const r = await exportBackup({ db: d.db, meetingsDir: d.meetingsDir, out: path, appVersion: app.getVersion(), showRecordingPill: d.getRecordingPill() })
last = path
return { ok: true, meetings: r.meetings }
} catch (e) {
@@ -57,6 +57,7 @@ export function hookBackup(d: { db: DatabaseSync; meetingsDir: string; window: (
if (r.ok && r.added) {
try { d.changed() } catch (e) { console.warn('backup imported; window refresh failed', e) }
}
+ if (r.ok) d.setRecordingPill(r.showRecordingPill !== false)
return r
} catch (e) {
console.error('backup import failed', e)
diff --git a/app/src/main/index.ts b/app/src/main/index.ts
index d12a24d1..9f36b45b 100644
--- a/app/src/main/index.ts
+++ b/app/src/main/index.ts
@@ -127,6 +127,7 @@ function openExternally(url: string) {
}
let updateWidgetVisibility = () => {}
+let recordingPillChanged = (_on: boolean) => {}
let sendWidgetTranscript = (_channel: string, _value: unknown) => {}
function createWindow() {
win = new BrowserWindow({
@@ -321,7 +322,11 @@ function startDetection() {
open: (id) => goTo(`/note/${id}`),
os: process.platform,
})
+ const preferences = loadSettings(join(userDataDir(), 'settings.json'))
+ const visibility = visibilityOf(preferences, platform)
+ let showRecordingPill = visibility.showRecordingPill
const widget = createWidget({
+ showRecordingPill: () => showRecordingPill,
os: platform, windowOs: process.platform,
open: (id) => goTo(`/note/${id}`),
stop: (id) => { stopMeeting(id) },
@@ -402,9 +407,9 @@ function startDetection() {
ipcMain.handle('meetings:set-paused', (_e, id: unknown, paused: unknown) => pauseRecording(id, paused))
ipcMain.handle('meetings:retry-stop-save', (_e, id: unknown) => isId(id) && retryStopSave(id))
// the menu bar: open, new note or stop, quit; Yogurt stays there with its window closed
- const preferences = loadSettings(join(userDataDir(), 'settings.json'))
const tray = createTray({
- show: !BACKGROUND, visible: preferences.showInMenuBar, showNextMeeting: preferences.showNextMeeting,
+ show: !BACKGROUND, visible: visibility.showInMenuBar, showNextMeeting: preferences.showNextMeeting,
+ showRecordingPill: () => showRecordingPill,
open: () => { presented++; showMain() },
newNote: () => { if (!activeMeeting()) begin({ title: '', event: null, app: null }) },
stop: (id) => { stopMeeting(id) },
@@ -427,6 +432,11 @@ function startDetection() {
})
refreshCalendarConsumers = () => { signals.invalidateCalendar(); void tray.refreshCalendar() }
menuBar = tray
+ recordingPillChanged = (on) => {
+ showRecordingPill = on
+ widget.visibilityChanged()
+ tray.refresh()
+ }
// cheap, and only while Yogurt runs; more often while recording, so the end of a quiet call is noticed promptly
let timer: NodeJS.Timeout | undefined
const watchLoop = () => { timer = setTimeout(() => { void watcher.tick().catch((e) => console.error('detect failed', e)).finally(watchLoop) }, watchEveryMs(!!activeMeeting())) }
@@ -474,9 +484,14 @@ app.whenReady().then(() => {
// Local Electron launches need the same Dock icon as the packaged application.
if (!app.isPackaged && process.platform === 'darwin') app.dock?.setIcon(join(__dirname, '../../build/icon.png'))
const settings = loadSettings(join(userDataDir(), 'settings.json'))
- // a settings file edited by hand can leave no visible entry point: heal it before the window shows
- const visible = visibilityOf(settings)
- if (visible.showInDock && settings.showInDock === false) updateSettings(join(userDataDir(), 'settings.json'), { showInDock: undefined })
+ // Repair conflicting saved choices before the first window or recording.
+ const visible = visibilityOf(settings, platform)
+ if ((visible.showInDock && settings.showInDock === false) || (visible.showRecordingPill && settings.showRecordingPill === false)) {
+ updateSettings(join(userDataDir(), 'settings.json'), {
+ ...(visible.showInDock && { showInDock: undefined }),
+ ...(visible.showRecordingPill && { showRecordingPill: undefined }),
+ })
+ }
setDockVisible(visible.showInDock)
// the theme picked in Settings; the system's when none
nativeTheme.themeSource = settings.theme ?? 'system'
@@ -499,7 +514,8 @@ app.whenReady().then(() => {
: sealed.startsWith('b:') ? Buffer.from(sealed.slice(2), 'base64').toString() : sealed.replace(/^p:/, '')),
}) : null
if (calendarLinks) setCalendarLinkSource(calendarLinks, { alongside: !caps.calendarLink })
- hookPreferences({
+ const preferences = hookPreferences({
+ recordingPillChanged: on => recordingPillChanged(on),
file: join(userDataDir(), 'settings.json'), permissions, kinds: supportedKinds(caps), os: platform,
...(calendarLinks && caps.calendarLink ? { calendarLinked: () => calendarLinks.status() === 'granted' } : {}),
// fake mode asks the first-run questions only when a test sets the permissions
@@ -808,7 +824,8 @@ app.whenReady().then(() => {
hookShare({ store, window: () => win })
hookFolders({ store, changed: () => { win?.webContents.send('folders:changed'); folderSuggestions.refresh() } })
// every meeting to one file and back; what an import adds shows up on home
- hookBackup({ db: store.db, meetingsDir: join(userDataDir(), 'meetings'), window: () => win, recording: () => !!activeMeeting() || !!resumingId,
+ hookBackup({ getRecordingPill: () => visibilityOf(loadSettings(settingsFile), platform).showRecordingPill,
+ setRecordingPill: preferences.setRecordingPill, db: store.db, meetingsDir: join(userDataDir(), 'meetings'), window: () => win, recording: () => !!activeMeeting() || !!resumingId,
changed: () => { win?.webContents.send('meetings:changed'); win?.webContents.send('conversations:list', conversations.list()); void indexer.refresh(); folderSuggestions.refresh() },
beforeExport: () => { notes.retryDrafts(); return notes.pendingDraftId() } })
void hookMcp({
diff --git a/app/src/main/preferences.ts b/app/src/main/preferences.ts
index 83427d0e..6577f9b6 100644
--- a/app/src/main/preferences.ts
+++ b/app/src/main/preferences.ts
@@ -23,6 +23,7 @@ export function hookPreferences(d: { file: string; permissions: Permissions; ask
relaunch(): boolean
/** fake mode: a slow start, so tests see the launch screen */
slowStartMs?: number
+ recordingPillChanged?(on: boolean): void
/** the spoken language changed: the meeting being recorded follows it where it can */
onSpoken?: (v: Spoken) => void
/** the permissions this computer has (supportedKinds in platform.ts); a Mac has them all */
@@ -55,11 +56,11 @@ export function hookPreferences(d: { file: string; permissions: Permissions; ask
ipcMain.handle('permissions:open', (_e, k: unknown) => { if (isKind(k)) return d.permissions.openSettings(k) })
ipcMain.handle('settings:get', () => {
const s = loadSettings(d.file)
- const visible = visibilityOf(s)
+ const visible = visibilityOf(s, os)
// what the Mac says, so a change in System Settings shows here
// locale: every window (main, card, widget) shows the interface language
// language: the one picked ('' is the Mac's); locale: the one in use; systemLocale: the Mac's, for the picker
- return { theme: s.theme ?? 'system', openAtLogin: d.loginOn(s.openAtLogin), showInMenuBar: visible.showInMenuBar, showNextMeeting: s.showNextMeeting !== false, appVisibility: !visible.showInMenuBar ? 'dock' : visible.showInDock ? 'both' : 'menu-bar', language: isLocale(s.language) ? s.language : '', locale: localeOf(s, systemLocale()), systemLocale: systemLocale(), myName: s.myName?.trim() || d.macName(), macName: d.macName(), stopWhenCallEnds: stopsWhenCallEnds(s), recordingReminder: recordingReminderOn(s), keepRecordings: s.keepRecordings !== false, jargon: cleanJargon(s.jargon), spoken: spokenSetting(s), summaryLanguage: summaryLanguageSetting(s) }
+ return { theme: s.theme ?? 'system', openAtLogin: d.loginOn(s.openAtLogin), showInMenuBar: visible.showInMenuBar, showNextMeeting: s.showNextMeeting !== false, showRecordingPill: visible.showRecordingPill, appVisibility: !visible.showInMenuBar ? 'dock' : visible.showInDock ? 'both' : 'menu-bar', language: isLocale(s.language) ? s.language : '', locale: localeOf(s, systemLocale()), systemLocale: systemLocale(), myName: s.myName?.trim() || d.macName(), macName: d.macName(), stopWhenCallEnds: stopsWhenCallEnds(s), recordingReminder: recordingReminderOn(s), keepRecordings: s.keepRecordings !== false, jargon: cleanJargon(s.jargon), spoken: spokenSetting(s), summaryLanguage: summaryLanguageSetting(s) }
})
// what the person is called in meetings (who "You" is when naming voices); blank: the Mac's full name again
ipcMain.handle('settings:name', (_e, v: unknown) => {
@@ -121,14 +122,30 @@ export function hookPreferences(d: { file: string; permissions: Permissions; ask
updateSettings(d.file, { showNextMeeting: on ? undefined : false })
d.setShowNextMeeting(on)
})
+ const setRecordingPill = (on: boolean) => {
+ const settings = loadSettings(d.file)
+ const visible = visibilityOf({ ...settings, showRecordingPill: on }, os).showRecordingPill
+ if ((settings.showRecordingPill !== false) === visible) return
+ updateSettings(d.file, { showRecordingPill: visible ? undefined : false })
+ d.recordingPillChanged?.(visible)
+ }
+ ipcMain.handle('settings:recording-pill', (_e, on: unknown) => {
+ if (os === 'darwin' && typeof on === 'boolean') setRecordingPill(on)
+ })
ipcMain.handle('settings:visibility', (_e, choice: unknown) => {
if (os !== 'darwin' || (choice !== 'both' && choice !== 'menu-bar' && choice !== 'dock')) return
const menuBar = choice !== 'dock', dock = choice !== 'menu-bar'
// Show the kept entry points before saving or hiding either one.
if (menuBar) d.setTrayVisible(true)
if (dock) d.setDockVisible(true)
- updateSettings(d.file, { showInMenuBar: menuBar ? undefined : false, showInDock: dock ? undefined : false })
- if (!menuBar) d.setTrayVisible(false)
+ updateSettings(d.file, {
+ showInMenuBar: menuBar ? undefined : false, showInDock: dock ? undefined : false,
+ ...(!menuBar && { showRecordingPill: undefined }),
+ })
+ if (!menuBar) {
+ d.recordingPillChanged?.(true)
+ d.setTrayVisible(false)
+ }
if (!dock) d.setDockVisible(false)
})
ipcMain.handle('settings:login', (_e, on: unknown) => {
@@ -136,5 +153,6 @@ export function hookPreferences(d: { file: string; permissions: Permissions; ask
updateSettings(d.file, { openAtLogin: yes })
d.setLogin(yes)
})
+ return { setRecordingPill }
}
diff --git a/app/src/main/settings.ts b/app/src/main/settings.ts
index 84ab00b8..6958d3ab 100644
--- a/app/src/main/settings.ts
+++ b/app/src/main/settings.ts
@@ -20,6 +20,8 @@ export type Settings = { theme?: 'light' | 'dark'; language?: string; /** what t
showInMenuBar?: boolean
/** Show a meeting title beside the icon or in its tooltip. Defaults on. */
showNextMeeting?: boolean
+ /** the floating recording control; on by default */
+ showRecordingPill?: boolean
/** the Dock icon; on unless turned off */
showInDock?: boolean
/** Legacy flag, ignored: it may have come from a different app bundle. Removed after a confirmed post. */
@@ -68,11 +70,12 @@ export const keepsRecording = (s: Settings, endedAt: number | null): boolean =>
export const autoUpdateOn = (s: Settings): boolean => s.autoUpdate !== false
/** The Dock icon and the menu bar icon, as the person sees them: at least one stays visible, so the app always has an entry point. */
-export type Visibility = { showInMenuBar: boolean; showInDock: boolean }
-/** A hand-edited file with both icons off restores the Dock. */
-export function visibilityOf(s: Settings): Visibility {
+export type Visibility = { showInMenuBar: boolean; showInDock: boolean; showRecordingPill: boolean }
+/** Restore the Dock if both entry points are hidden. Only the Mac menu bar can replace the recording pill. */
+export function visibilityOf(s: Settings, os: string = process.platform): Visibility {
const showInMenuBar = s.showInMenuBar !== false
- return { showInMenuBar, showInDock: !showInMenuBar || s.showInDock !== false }
+ return { showInMenuBar, showInDock: !showInMenuBar || s.showInDock !== false,
+ showRecordingPill: os !== 'darwin' || !showInMenuBar || s.showRecordingPill !== false }
}
export function loadSettings(path: string): Settings {
diff --git a/app/src/main/tray.ts b/app/src/main/tray.ts
index 7d65f68f..8f0ac1bc 100644
--- a/app/src/main/tray.ts
+++ b/app/src/main/tray.ts
@@ -36,7 +36,7 @@ export const linuxTrayHost = (): Promise<boolean> => new Promise((done) => {
* Yogurt in the menu bar (the notification area on Windows, the tray on Linux): it keeps running there with its window closed, so it still notices calls.
* The menu says what is recording. Tests run without it on screen (show: false) and read the menu through items().
*/
-export function createTray(d: { show: boolean; visible?: boolean; showNextMeeting?: boolean; open(): void; newNote(): void; stop(id: string): void
+export function createTray(d: { show: boolean; visible?: boolean; showNextMeeting?: boolean; showRecordingPill?(): boolean; open(): void; newNote(): void; stop(id: string): void
pause(id: string, paused: boolean): void; ask(): void; settings(): void; openNote(id: string): void
events(): Promise<CalEvent[]>; event(event: CalEvent, join: boolean): void | Promise<void>
recent(): { id: string; title: string; startedAt: number }[]; elapsed(): number; now?: () => number
@@ -54,6 +54,7 @@ export function createTray(d: { show: boolean; visible?: boolean; showNextMeetin
let tray: Tray | undefined
let items: TrayItem[] = []
let events: CalEvent[] = []
+ let fallingBehindId: string | undefined
const now = d.now ?? Date.now
const recordEvent = async (eventId: string, join: boolean) => {
const candidates = (await d.events()).filter(e => matchesEvent(e, eventId))
@@ -108,7 +109,9 @@ export function createTray(d: { show: boolean; visible?: boolean; showNextMeetin
if (tray && m && !paused) clock ??= setInterval(updateLook, 1000).unref()
else { clearInterval(clock); clock = undefined }
const at = now()
- items = trayItems(m ? { id: m.id, title: m.title, paused } : null, showNextMeeting ? nextTrayEvent(events, at) : undefined, d.recent(), at, os, systemTrayTime)
+ if (m?.id !== fallingBehindId) fallingBehindId = undefined
+ const fallingBehind = !!m && fallingBehindId === m.id && d.showRecordingPill?.() === false
+ items = trayItems(m ? { id: m.id, title: m.title, paused, fallingBehind } : null, showNextMeeting ? nextTrayEvent(events, at) : undefined, d.recent(), at, os, systemTrayTime)
if (!tray) return
tray.setContextMenu(Menu.buildFromTemplate(template(items)))
updateLook()
@@ -157,10 +160,16 @@ export function createTray(d: { show: boolean; visible?: boolean; showNextMeetin
app.on('will-quit', () => { clearInterval(clock); clearTimeout(calendar); clearTimeout(boundary); powerMonitor.off('resume', tick) })
onMeetingChange(refresh)
onLanguage(refresh)
- onRecordingEvent((e) => { if (e.t === 'paused') refresh() })
+ onRecordingEvent((e) => {
+ if (e.t === 'paused') refresh()
+ if (e.t === 'warn' && e.code === 'falling-behind' && !fallingBehindId) {
+ fallingBehindId = activeMeeting()?.id
+ if (fallingBehindId && d.showRecordingPill?.() === false) refresh()
+ }
+ })
return {
setVisible, setShowNextMeeting: (on: boolean) => { showNextMeeting = on; refresh() },
- refreshCalendar, items: () => { refresh(); return items.map((i) => i.label) },
+ refresh, refreshCalendar, items: () => { refresh(); return items.map((i) => i.label) },
click: (id: TrayItem['id']) => act(id, items.find(i => i.id === id)?.eventId),
/** whether the person can see the icon (on in Settings, and a tray to show it in): closing hides the window only then */
shown: () => visible && hosted,
diff --git a/app/src/main/trayMenu.ts b/app/src/main/trayMenu.ts
index b86392a0..badb1718 100644
--- a/app/src/main/trayMenu.ts
+++ b/app/src/main/trayMenu.ts
@@ -3,7 +3,7 @@ import { dayLabel, daysAgo } from '../shared/dates'
import { formatElapsed } from '../shared/wave'
import type { CalEvent } from './calendar'
-export type TrayItem = { id: 'status' | 'open' | 'new' | 'stop' | 'pause' | 'ask' | 'next' | 'record' | 'join' | 'recent' | 'settings' | 'quit' | 'sep' | `note:${string}`; label: string; enabled: boolean; eventId?: string; accelerator?: string; submenu?: TrayItem[] }
+export type TrayItem = { id: 'status' | 'warning' | 'open' | 'new' | 'stop' | 'pause' | 'ask' | 'next' | 'record' | 'join' | 'recent' | 'settings' | 'quit' | 'sep' | `note:${string}`; label: string; enabled: boolean; eventId?: string; accelerator?: string; submenu?: TrayItem[] }
type Recent = { id: string; title: string; startedAt: number }
/** Include the full seventh local date so next week's meeting can be seen all day. */
@@ -52,7 +52,7 @@ export function trayTitle(active: { elapsedMs: number; paused: boolean } | null,
}
/** Keep native and hidden-test menus identical; only the native icon is optional. */
-export function trayItems(active: { id?: string; title: string; paused?: boolean } | null, next?: CalEvent, recent: Recent[] = [], now = Date.now(), os = 'darwin', clock = formatTrayTime): TrayItem[] {
+export function trayItems(active: { id?: string; title: string; paused?: boolean; fallingBehind?: boolean } | null, next?: CalEvent, recent: Recent[] = [], now = Date.now(), os = 'darwin', clock = formatTrayTime): TrayItem[] {
const sep: TrayItem = { id: 'sep', label: '', enabled: true }
const open: TrayItem = { id: 'open', label: t('Open Yogurt'), enabled: true }
const ask: TrayItem = { id: 'ask', label: t('Ask Yogurt'), enabled: true }
@@ -75,6 +75,7 @@ export function trayItems(active: { id?: string; title: string; paused?: boolean
}
return [
{ id: 'status', label: active.paused ? t('Paused · {title}', { title: active.title }) : t('Recording · {title}', { title: active.title }), enabled: false },
+ ...(active.fallingBehind ? [{ id: 'warning' as const, label: t('Yogurt is falling behind. Some lines may be missing.'), enabled: false }] : []),
{ id: 'pause', label: active.paused ? t('Resume recording') : t('Pause recording'), enabled: true },
{ id: 'stop', label: t('Stop recording'), enabled: true }, sep,
ask, open, history, settings, sep, quit,
diff --git a/app/src/main/widget.ts b/app/src/main/widget.ts
index d85bb4b8..a4c791bc 100644
--- a/app/src/main/widget.ts
+++ b/app/src/main/widget.ts
@@ -55,7 +55,7 @@ const broadcast = (channel: string, v: unknown) => { for (const w of BrowserWind
* The recording-only pill grows into its transcript and warning. Finished
* meetings use a native notification; paused meetings keep no floating surface.
*/
-export function createWidget(d: { open(meetingId: string): void; stop(meetingId: string): void; foreground(): boolean; os?: string
+export function createWidget(d: { open(meetingId: string): void; stop(meetingId: string): void; foreground(): boolean; showRecordingPill?(): boolean; os?: string
/** the computer the windows are made for (a Mac's panel, a tool window elsewhere) */
windowOs?: string }) {
const model = new WidgetModel(d.os)
@@ -107,7 +107,7 @@ export function createWidget(d: { open(meetingId: string): void; stop(meetingId:
const visibilityChanged = () => {
const view = model.view(Date.now())
- shown = view?.kind === 'recording' && !view.paused && !d.foreground()
+ shown = view?.kind === 'recording' && !view.paused && !d.foreground() && d.showRecordingPill?.() !== false
if (!shown) { clearTimeout(pointerTimer); pressed = false; win?.webContents.send('widget:reset') }
hitTest(); poll()
if (!win || win.isDestroyed()) return
diff --git a/app/src/preload/index.ts b/app/src/preload/index.ts
index 85832ee4..40f9a4a5 100644
--- a/app/src/preload/index.ts
+++ b/app/src/preload/index.ts
@@ -246,6 +246,7 @@ const api: YogurtApi = {
setTheme: (v) => ipcRenderer.invoke('settings:theme', v),
setShowInMenuBar: (on) => ipcRenderer.invoke('settings:menu-bar', on),
setShowNextMeeting: (on) => ipcRenderer.invoke('settings:next-meeting', on),
+ setShowRecordingPill: (on) => ipcRenderer.invoke('settings:recording-pill', on),
setAppVisibility: (choice) => ipcRenderer.invoke('settings:visibility', choice),
setOpenAtLogin: (on) => ipcRenderer.invoke('settings:login', on),
setName: (name) => ipcRenderer.invoke('settings:name', name),
diff --git a/app/src/renderer/src/screens/Settings.tsx b/app/src/renderer/src/screens/Settings.tsx
index daa25d82..4bced17e 100644
--- a/app/src/renderer/src/screens/Settings.tsx
+++ b/app/src/renderer/src/screens/Settings.tsx
@@ -119,6 +119,14 @@ export function Settings({ revision = 0, focus }: { revision?: number; focus?: s
await window.yogurt.settings.setShowInMenuBar(!prefs.showInMenuBar)
setPrefs(await window.yogurt.settings.get())
}
+ const recordingPill = () => {
+ if (!prefs?.showInMenuBar || general.busy) return
+ const on = !prefs.showRecordingPill
+ void general.save(async () => {
+ await window.yogurt.settings.setShowRecordingPill(on)
+ setPrefs(await window.yogurt.settings.get())
+ }, 'recording-pill-retry')
+ }
const visibility = async (choice: AppVisibility) => {
await window.yogurt.settings.setAppVisibility(choice)
setPrefs(await window.yogurt.settings.get())
@@ -182,6 +190,15 @@ export function Settings({ revision = 0, focus }: { revision?: number; focus?: s
await window.yogurt.settings.setShowNextMeeting(on)
setPrefs(p => p && { ...p, showNextMeeting: on })
}} />
+ {onMac() && <div className="settings-row">
+ <div className="settings-row-copy">
+ <label htmlFor="recording-pill-toggle" className="settings-label">{t('Show floating recording pill')}</label>
+ {prefs && !prefs.showInMenuBar && <p id="recording-pill-reason" className="settings-description">{t('Show Yogurt in the menu bar to hide the pill.')}</p>}
+ </div>
+ <button id="recording-pill-toggle" data-testid="recording-pill-toggle" role="switch" disabled={general.busy} aria-checked={prefs?.showRecordingPill ?? true}
+ aria-disabled={!prefs?.showInMenuBar} aria-describedby={prefs && !prefs.showInMenuBar ? 'recording-pill-reason' : undefined}
+ className="settings-toggle" onClick={recordingPill}><span className="settings-toggle-knob" /></button>
+ </div>}
<div className="settings-row">
<div className="settings-row-copy">
<p className="settings-label">{t('Stop recording when the call ends')}</p>
@@ -224,7 +241,7 @@ export function Settings({ revision = 0, focus }: { revision?: number; focus?: s
<Jargon />
</div>
- <Backup />
+ <Backup onImported={() => { void window.yogurt.settings.get().then(setPrefs) }} />
<AiApps />
@@ -371,7 +388,7 @@ export function PermissionRow({ kind, status, onAsk }: { kind: PermissionKind; s
type Said = { kind: 'exported'; count: number } | { kind: 'imported'; added: number; skipped: number } | { kind: 'error'; text: string; meetingId?: string }
/** every meeting to one file, and back: for a new Mac or after reinstalling */
-function Backup() {
+function Backup({ onImported }: { onImported(): void }) {
const [recording, setRecording] = useState(false)
const [busy, setBusy] = useState<'export' | 'import' | null>(null)
const [said, setSaid] = useState<Said | null>(null)
@@ -394,7 +411,7 @@ function Backup() {
const importAll = async () => {
setBusy('import'); setSaid(null)
const r = await window.yogurt.backup.import().catch(() => ({ ok: false, error: 'failed' } as const)).finally(() => setBusy(null))
- if (r.ok) { setSaid({ kind: 'imported', added: r.added, skipped: r.skipped }); return }
+ if (r.ok) { onImported(); setSaid({ kind: 'imported', added: r.added, skipped: r.skipped }); return }
const text = {
cancelled: '', recording: t('You can import once the recording stops.'),
newer: t('This backup is from a newer Yogurt. Update Yogurt, then try again.'),
diff --git a/app/src/renderer/src/setup.css b/app/src/renderer/src/setup.css
index a15bc02a..37f9281f 100644
--- a/app/src/renderer/src/setup.css
+++ b/app/src/renderer/src/setup.css
@@ -30,14 +30,15 @@
.settings-select:focus-visible { outline:2px solid var(--focus);outline-offset:2px; }
.settings-name-field:focus-visible { outline:2px solid var(--focus);outline-offset:2px; }
.settings-toggle { position:relative;flex:none;width:38px;height:22px;border:1px solid var(--control-border);border-radius:12px;background:var(--control-pressed);box-shadow:inset 0 1px 2px #00000014;transition:background-color var(--dur-micro) ease,border-color var(--dur-micro) ease; }
+.settings-toggle[aria-disabled=true] { opacity:.5;cursor:default; }
.settings-toggle[aria-checked=true] { background:var(--primary);border-color:var(--primary); }
.settings-toggle-knob { position:absolute;inset-block-start:2px;inset-inline-start:2px;width:16px;height:16px;border-radius:50%;background:linear-gradient(#fff,#f5f5f7);box-shadow:0 1px 3px #0003,inset 0 0 0 .5px #0000000a;transition:transform var(--dur-base) var(--ease-soft),width var(--dur-micro) var(--ease-out); }
.settings-toggle[aria-checked=true] .settings-toggle-knob { transform:translateX(16px); }
.settings-toggle:dir(rtl)[aria-checked=true] .settings-toggle-knob { transform:translateX(-16px); }
/* the knob slides past and settles, and stretches toward where it's going while pressed */
-.settings-toggle:active:not(:disabled) .settings-toggle-knob { width:20px; }
-.settings-toggle[aria-checked=true]:active:not(:disabled) .settings-toggle-knob { transform:translateX(12px); }
-.settings-toggle:dir(rtl)[aria-checked=true]:active:not(:disabled) .settings-toggle-knob { transform:translateX(-12px); }
+.settings-toggle:active:not(:disabled,[aria-disabled=true]) .settings-toggle-knob { width:20px; }
+.settings-toggle[aria-checked=true]:active:not(:disabled,[aria-disabled=true]) .settings-toggle-knob { transform:translateX(12px); }
+.settings-toggle:dir(rtl)[aria-checked=true]:active:not(:disabled,[aria-disabled=true]) .settings-toggle-knob { transform:translateX(-12px); }
.settings-spoken { display:inline-grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:none;max-width:100%;gap:2px;padding:3px;border:1px solid var(--line);border-radius:8px;background:var(--control); }
.settings-spoken-choice { white-space:nowrap;min-width:0;min-height:30px;padding:5px 10px;border:1px solid transparent;border-radius:5px;text-align:center;font-size:12px;line-height:18px;font-weight:500;color:var(--muted); }
.settings-spoken-choice[aria-checked=true] { color:var(--ink);background:var(--float);border-color:var(--line);box-shadow:0 1px 2px #0000000d; }
diff --git a/app/src/shared/locales/ar.json b/app/src/shared/locales/ar.json
index f64018cf..7cea5c7c 100644
--- a/app/src/shared/locales/ar.json
+++ b/app/src/shared/locales/ar.json
@@ -735,6 +735,8 @@
"Yogurt couldn't finish deleting this note.": "تعذّر على Yogurt إكمال حذف هذه الملاحظة.",
"Yogurt couldn't save this folder.": "تعذّر على Yogurt حفظ هذا المجلد.",
"Your edits to the summary will be replaced.": "سيتم استبدال تعديلاتك على الملخص.",
+ "Show floating recording pill": "إظهار شريط التسجيل العائم",
+ "Show Yogurt in the menu bar to hide the pill.": "أظهر Yogurt في شريط القوائم لإخفاء شريط التسجيل.",
"Show Yogurt in": "إظهار Yogurt في",
"Show the next meeting": "إظهار الاجتماع القادم",
"Menu bar and Dock": "شريط القوائم وDock",
diff --git a/app/src/shared/locales/bn.json b/app/src/shared/locales/bn.json
index e659661f..880212af 100644
--- a/app/src/shared/locales/bn.json
+++ b/app/src/shared/locales/bn.json
@@ -667,6 +667,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt এই নোট মোছা শেষ করতে পারেনি।",
"Yogurt couldn't save this folder.": "Yogurt এই ফোল্ডার সেভ করতে পারেনি।",
"Your edits to the summary will be replaced.": "সারাংশে আপনার সম্পাদনা বদলে যাবে।",
+ "Show floating recording pill": "ভাসমান রেকর্ডিং বার দেখান",
+ "Show Yogurt in the menu bar to hide the pill.": "রেকর্ডিং বার লুকাতে মেনু বারে Yogurt দেখান।",
"Show Yogurt in": "Yogurt দেখানোর স্থান",
"Show the next meeting": "পরবর্তী মিটিং দেখান",
"Menu bar and Dock": "মেনু বার এবং Dock",
diff --git a/app/src/shared/locales/cs.json b/app/src/shared/locales/cs.json
index 40bf9879..ab76f056 100644
--- a/app/src/shared/locales/cs.json
+++ b/app/src/shared/locales/cs.json
@@ -710,6 +710,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt nemohl dokončit mazání této poznámky.",
"Yogurt couldn't save this folder.": "Yogurt nemohl uložit tuto složku.",
"Your edits to the summary will be replaced.": "Vaše úpravy souhrnu budou nahrazeny.",
+ "Show floating recording pill": "Zobrazit plovoucí panel nahrávání",
+ "Show Yogurt in the menu bar to hide the pill.": "Chcete-li skrýt panel nahrávání, zobrazte Yogurt v řádku nabídek.",
"Show Yogurt in": "Zobrazovat Yogurt v",
"Show the next meeting": "Zobrazit příští schůzku",
"Menu bar and Dock": "Řádek nabídek a Dock",
diff --git a/app/src/shared/locales/da.json b/app/src/shared/locales/da.json
index 5e862652..f1396a30 100644
--- a/app/src/shared/locales/da.json
+++ b/app/src/shared/locales/da.json
@@ -679,6 +679,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt kunne ikke slette denne note færdig.",
"Yogurt couldn't save this folder.": "Yogurt kunne ikke gemme denne mappe.",
"Your edits to the summary will be replaced.": "Dine ændringer i resuméet bliver erstattet.",
+ "Show floating recording pill": "Vis flydende optagelinje",
+ "Show Yogurt in the menu bar to hide the pill.": "Vis Yogurt på menulinjen for at skjule optagelinjen.",
"Show Yogurt in": "Vis Yogurt i",
"Show the next meeting": "Vis det næste møde",
"Menu bar and Dock": "Menulinje og Dock",
diff --git a/app/src/shared/locales/de.json b/app/src/shared/locales/de.json
index 004ae13f..68a9e678 100644
--- a/app/src/shared/locales/de.json
+++ b/app/src/shared/locales/de.json
@@ -679,6 +679,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt konnte diese Notiz nicht fertig löschen.",
"Yogurt couldn't save this folder.": "Yogurt konnte diesen Ordner nicht sichern.",
"Your edits to the summary will be replaced.": "Deine Änderungen an der Zusammenfassung werden ersetzt.",
+ "Show floating recording pill": "Schwebende Aufnahmeleiste anzeigen",
+ "Show Yogurt in the menu bar to hide the pill.": "Zeige Yogurt in der Menüleiste an, um die Aufnahmeleiste auszublenden.",
"Show Yogurt in": "Yogurt anzeigen in",
"Show the next meeting": "Nächstes Meeting anzeigen",
"Menu bar and Dock": "Menüleiste und Dock",
diff --git a/app/src/shared/locales/el.json b/app/src/shared/locales/el.json
index 4bd46e48..0c20aabd 100644
--- a/app/src/shared/locales/el.json
+++ b/app/src/shared/locales/el.json
@@ -682,6 +682,8 @@
"Yogurt couldn't finish deleting this note.": "Το Yogurt δεν μπόρεσε να ολοκληρώσει τη διαγραφή αυτής της σημείωσης.",
"Yogurt couldn't save this folder.": "Το Yogurt δεν μπόρεσε να αποθηκεύσει αυτόν τον φάκελο.",
"Your edits to the summary will be replaced.": "Οι αλλαγές σας στη σύνοψη θα αντικατασταθούν.",
+ "Show floating recording pill": "Εμφάνιση αιωρούμενης μπάρας εγγραφής",
+ "Show Yogurt in the menu bar to hide the pill.": "Για να κρύψετε την μπάρα εγγραφής, εμφανίστε το Yogurt στη γραμμή μενού.",
"Show Yogurt in": "Εμφάνιση Yogurt σε",
"Show the next meeting": "Εμφάνιση της επόμενης συνάντησης",
"Menu bar and Dock": "Γραμμή μενού και Dock",
diff --git a/app/src/shared/locales/en.json b/app/src/shared/locales/en.json
index 9a47b480..523d6614 100644
--- a/app/src/shared/locales/en.json
+++ b/app/src/shared/locales/en.json
@@ -214,6 +214,8 @@
"Your next recording will use both the microphone and call audio.": "Your next recording will use both the microphone and call audio.",
"Your question is waiting for Yogurt's AI to download.": "Your question is waiting for Yogurt's AI to download.",
"Your summary is waiting for Yogurt's AI to download.": "Your summary is waiting for Yogurt's AI to download.",
+ "Show floating recording pill": "Show floating recording pill",
+ "Show Yogurt in the menu bar to hide the pill.": "Show Yogurt in the menu bar to hide the pill.",
"Show Yogurt in": "Show Yogurt in",
"Show the next meeting": "Show the next meeting",
"Menu bar and Dock": "Menu bar and Dock",
diff --git a/app/src/shared/locales/es.json b/app/src/shared/locales/es.json
index 72852d62..6a185d97 100644
--- a/app/src/shared/locales/es.json
+++ b/app/src/shared/locales/es.json
@@ -692,6 +692,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt no pudo terminar de eliminar esta nota.",
"Yogurt couldn't save this folder.": "Yogurt no pudo guardar esta carpeta.",
"Your edits to the summary will be replaced.": "Se reemplazarán tus cambios en el resumen.",
+ "Show floating recording pill": "Mostrar la barra flotante de grabación",
+ "Show Yogurt in the menu bar to hide the pill.": "Muestra Yogurt en la barra de menús para ocultar la barra de grabación.",
"Show Yogurt in": "Mostrar Yogurt en",
"Show the next meeting": "Mostrar la próxima reunión",
"Menu bar and Dock": "Barra de menús y Dock",
diff --git a/app/src/shared/locales/fi.json b/app/src/shared/locales/fi.json
index 2462e3ce..01f12c69 100644
--- a/app/src/shared/locales/fi.json
+++ b/app/src/shared/locales/fi.json
@@ -685,6 +685,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt ei voinut viimeistellä tämän muistiinpanon poistamista.",
"Yogurt couldn't save this folder.": "Yogurt ei voinut tallentaa tätä kansiota.",
"Your edits to the summary will be replaced.": "Yhteenvetoon tekemäsi muutokset korvataan.",
+ "Show floating recording pill": "Näytä kelluva tallennuspalkki",
+ "Show Yogurt in the menu bar to hide the pill.": "Voit piilottaa tallennuspalkin näyttämällä Yogurtin valikkorivillä.",
"Show Yogurt in": "Yogurtin sijainti",
"Show the next meeting": "Näytä seuraava kokous",
"Menu bar and Dock": "Valikkorivi ja Dock",
diff --git a/app/src/shared/locales/fil.json b/app/src/shared/locales/fil.json
index 20a1e73e..85510a03 100644
--- a/app/src/shared/locales/fil.json
+++ b/app/src/shared/locales/fil.json
@@ -679,6 +679,8 @@
"Yogurt couldn't finish deleting this note.": "Hindi natapos ng Yogurt ang pag-delete sa note na ito.",
"Yogurt couldn't save this folder.": "Hindi ma-save ng Yogurt ang folder na ito.",
"Your edits to the summary will be replaced.": "Papalitan ang mga edit mo sa buod.",
+ "Show floating recording pill": "Ipakita ang lumulutang na recording bar",
+ "Show Yogurt in the menu bar to hide the pill.": "Ipakita ang Yogurt sa menu bar para itago ang recording bar.",
"Show Yogurt in": "Ipakita ang Yogurt sa",
"Show the next meeting": "Ipakita ang susunod na pulong",
"Menu bar and Dock": "Menu bar at Dock",
diff --git a/app/src/shared/locales/fr.json b/app/src/shared/locales/fr.json
index 7177f84b..8b88298a 100644
--- a/app/src/shared/locales/fr.json
+++ b/app/src/shared/locales/fr.json
@@ -695,6 +695,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt n’a pas pu terminer la suppression de cette note.",
"Yogurt couldn't save this folder.": "Yogurt n’a pas pu enregistrer ce dossier.",
"Your edits to the summary will be replaced.": "Vos modifications du résumé seront remplacées.",
+ "Show floating recording pill": "Afficher la barre d’enregistrement flottante",
+ "Show Yogurt in the menu bar to hide the pill.": "Affichez Yogurt dans la barre des menus pour masquer la barre d’enregistrement.",
"Show Yogurt in": "Afficher Yogurt dans",
"Show the next meeting": "Afficher la prochaine réunion",
"Menu bar and Dock": "Barre des menus et Dock",
diff --git a/app/src/shared/locales/he.json b/app/src/shared/locales/he.json
index 63b08804..351518e2 100644
--- a/app/src/shared/locales/he.json
+++ b/app/src/shared/locales/he.json
@@ -689,6 +689,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt לא הצליח לסיים למחוק את ההערה הזו.",
"Yogurt couldn't save this folder.": "Yogurt לא הצליח לשמור את התיקייה הזו.",
"Your edits to the summary will be replaced.": "העריכות שלך בסיכום יוחלפו.",
+ "Show floating recording pill": "הצגת סרגל ההקלטה הצף",
+ "Show Yogurt in the menu bar to hide the pill.": "כדי להסתיר את סרגל ההקלטה, יש להציג את Yogurt בשורת התפריטים.",
"Show Yogurt in": "הצגת Yogurt ב",
"Show the next meeting": "הצגת הפגישה הבאה",
"Menu bar and Dock": "שורת התפריטים ו-Dock",
diff --git a/app/src/shared/locales/hi.json b/app/src/shared/locales/hi.json
index e293a951..62492ccf 100644
--- a/app/src/shared/locales/hi.json
+++ b/app/src/shared/locales/hi.json
@@ -667,6 +667,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt यह नोट पूरी तरह डिलीट नहीं कर सका।",
"Yogurt couldn't save this folder.": "Yogurt यह फ़ोल्डर सेव नहीं कर सका।",
"Your edits to the summary will be replaced.": "सारांश में आपके बदलाव बदल दिए जाएँगे।",
+ "Show floating recording pill": "फ़्लोटिंग रिकॉर्डिंग बार दिखाएँ",
+ "Show Yogurt in the menu bar to hide the pill.": "रिकॉर्डिंग बार छिपाने के लिए मेनू बार में Yogurt दिखाएँ।",
"Show Yogurt in": "Yogurt दिखाएँ",
"Show the next meeting": "अगली मीटिंग दिखाएँ",
"Menu bar and Dock": "मेनू बार और Dock",
diff --git a/app/src/shared/locales/hu.json b/app/src/shared/locales/hu.json
index 79b70bd7..7253a7d3 100644
--- a/app/src/shared/locales/hu.json
+++ b/app/src/shared/locales/hu.json
@@ -667,6 +667,8 @@
"Yogurt couldn't finish deleting this note.": "A Yogurt nem tudta befejezni a jegyzet törlését.",
"Yogurt couldn't save this folder.": "A Yogurt nem tudta menteni ezt a mappát.",
"Your edits to the summary will be replaced.": "Az összefoglalón végzett módosításaid lecserélődnek.",
+ "Show floating recording pill": "Lebegő felvételi sáv megjelenítése",
+ "Show Yogurt in the menu bar to hide the pill.": "A felvételi sáv elrejtéséhez jelenítse meg a Yogurtot a menüsoron.",
"Show Yogurt in": "Yogurt megjelenítése",
"Show the next meeting": "A következő megbeszélés megjelenítése",
"Menu bar and Dock": "Menüsáv és Dock",
diff --git a/app/src/shared/locales/id.json b/app/src/shared/locales/id.json
index 1632355e..ed0aca83 100644
--- a/app/src/shared/locales/id.json
+++ b/app/src/shared/locales/id.json
@@ -637,6 +637,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt tidak bisa menyelesaikan penghapusan catatan ini.",
"Yogurt couldn't save this folder.": "Yogurt tidak bisa menyimpan folder ini.",
"Your edits to the summary will be replaced.": "Suntingan Anda pada ringkasan akan diganti.",
+ "Show floating recording pill": "Tampilkan bilah rekaman mengambang",
+ "Show Yogurt in the menu bar to hide the pill.": "Tampilkan Yogurt di bar menu untuk menyembunyikan bilah rekaman.",
"Show Yogurt in": "Tampilkan Yogurt di",
"Show the next meeting": "Tampilkan rapat berikutnya",
"Menu bar and Dock": "Bar menu dan Dock",
diff --git a/app/src/shared/locales/it.json b/app/src/shared/locales/it.json
index f7873e03..7045cd6f 100644
--- a/app/src/shared/locales/it.json
+++ b/app/src/shared/locales/it.json
@@ -698,6 +698,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt non è riuscito a completare l’eliminazione di questa nota.",
"Yogurt couldn't save this folder.": "Yogurt non è riuscito a salvare questa cartella.",
"Your edits to the summary will be replaced.": "Le tue modifiche al riepilogo verranno sostituite.",
+ "Show floating recording pill": "Mostra la barra di registrazione mobile",
+ "Show Yogurt in the menu bar to hide the pill.": "Mostra Yogurt nella barra dei menu per nascondere la barra di registrazione.",
"Show Yogurt in": "Mostra Yogurt in",
"Show the next meeting": "Mostra la prossima riunione",
"Menu bar and Dock": "Barra dei menu e Dock",
diff --git a/app/src/shared/locales/ja.json b/app/src/shared/locales/ja.json
index dd634584..a0e9f93d 100644
--- a/app/src/shared/locales/ja.json
+++ b/app/src/shared/locales/ja.json
@@ -637,6 +637,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurtはこのノートの削除を完了できませんでした。",
"Yogurt couldn't save this folder.": "Yogurtはこのフォルダを保存できませんでした。",
"Your edits to the summary will be replaced.": "要約に加えた編集は置き換えられます。",
+ "Show floating recording pill": "フローティング録音バーを表示",
+ "Show Yogurt in the menu bar to hide the pill.": "録音バーを隠すには、メニューバーにYogurtを表示してください。",
"Show Yogurt in": "Yogurtの表示場所",
"Show the next meeting": "次の会議を表示",
"Menu bar and Dock": "メニューバーとDock",
diff --git a/app/src/shared/locales/ko.json b/app/src/shared/locales/ko.json
index 4f266d15..5758b062 100644
--- a/app/src/shared/locales/ko.json
+++ b/app/src/shared/locales/ko.json
@@ -637,6 +637,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt가 이 노트 삭제를 마치지 못했어요.",
"Yogurt couldn't save this folder.": "Yogurt가 이 폴더를 저장하지 못했어요.",
"Your edits to the summary will be replaced.": "요약에서 수정한 내용은 바뀌어요.",
+ "Show floating recording pill": "플로팅 녹음 막대 표시",
+ "Show Yogurt in the menu bar to hide the pill.": "녹음 막대를 숨기려면 메뉴 막대에 Yogurt를 표시하세요.",
"Show Yogurt in": "Yogurt 표시 위치",
"Show the next meeting": "다음 회의 표시",
"Menu bar and Dock": "메뉴 막대 및 Dock",
diff --git a/app/src/shared/locales/ms.json b/app/src/shared/locales/ms.json
index ef98d8e3..ba921fe0 100644
--- a/app/src/shared/locales/ms.json
+++ b/app/src/shared/locales/ms.json
@@ -637,6 +637,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt tidak dapat selesai memadam nota ini.",
"Yogurt couldn't save this folder.": "Yogurt tidak dapat menyimpan folder ini.",
"Your edits to the summary will be replaced.": "Suntingan anda pada ringkasan akan diganti.",
+ "Show floating recording pill": "Tunjukkan bar rakaman terapung",
+ "Show Yogurt in the menu bar to hide the pill.": "Tunjukkan Yogurt dalam bar menu untuk menyembunyikan bar rakaman.",
"Show Yogurt in": "Paparkan Yogurt di",
"Show the next meeting": "Tunjukkan mesyuarat seterusnya",
"Menu bar and Dock": "Bar menu dan Dock",
diff --git a/app/src/shared/locales/nb.json b/app/src/shared/locales/nb.json
index ad3ee5b7..ab7b7476 100644
--- a/app/src/shared/locales/nb.json
+++ b/app/src/shared/locales/nb.json
@@ -679,6 +679,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt kunne ikke slette dette notatet helt.",
"Yogurt couldn't save this folder.": "Yogurt kunne ikke lagre denne mappen.",
"Your edits to the summary will be replaced.": "Endringene dine i sammendraget blir erstattet.",
+ "Show floating recording pill": "Vis flytende opptakslinje",
+ "Show Yogurt in the menu bar to hide the pill.": "Vis Yogurt i menylinjen for å skjule opptakslinjen.",
"Show Yogurt in": "Vis Yogurt i",
"Show the next meeting": "Vis neste møte",
"Menu bar and Dock": "Menylinje og Dock",
diff --git a/app/src/shared/locales/nl.json b/app/src/shared/locales/nl.json
index 9366dbda..6dfb0d3c 100644
--- a/app/src/shared/locales/nl.json
+++ b/app/src/shared/locales/nl.json
@@ -679,6 +679,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt kon het verwijderen van deze notitie niet afronden.",
"Yogurt couldn't save this folder.": "Yogurt kon deze map niet bewaren.",
"Your edits to the summary will be replaced.": "Je wijzigingen in de samenvatting worden vervangen.",
+ "Show floating recording pill": "Zwevende opnamebalk tonen",
+ "Show Yogurt in the menu bar to hide the pill.": "Toon Yogurt in de menubalk om de opnamebalk te verbergen.",
"Show Yogurt in": "Yogurt weergeven in",
"Show the next meeting": "Volgende vergadering tonen",
"Menu bar and Dock": "Menubalk en Dock",
diff --git a/app/src/shared/locales/pl.json b/app/src/shared/locales/pl.json
index f8c9b105..ff6692fc 100644
--- a/app/src/shared/locales/pl.json
+++ b/app/src/shared/locales/pl.json
@@ -715,6 +715,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt nie mógł dokończyć usuwania tej notatki.",
"Yogurt couldn't save this folder.": "Yogurt nie mógł zapisać tego folderu.",
"Your edits to the summary will be replaced.": "Twoje zmiany w podsumowaniu zostaną zastąpione.",
+ "Show floating recording pill": "Pokazuj pływający pasek nagrywania",
+ "Show Yogurt in the menu bar to hide the pill.": "Pokaż Yogurt na pasku menu, aby ukryć pasek nagrywania.",
"Show Yogurt in": "Pokaż Yogurt w",
"Show the next meeting": "Pokaż następne spotkanie",
"Menu bar and Dock": "Pasek menu i Dock",
diff --git a/app/src/shared/locales/pt-BR.json b/app/src/shared/locales/pt-BR.json
index b257e7ab..f673ae73 100644
--- a/app/src/shared/locales/pt-BR.json
+++ b/app/src/shared/locales/pt-BR.json
@@ -695,6 +695,8 @@
"Yogurt couldn't finish deleting this note.": "O Yogurt não conseguiu terminar de apagar esta nota.",
"Yogurt couldn't save this folder.": "O Yogurt não conseguiu salvar esta pasta.",
"Your edits to the summary will be replaced.": "Suas edições no resumo serão substituídas.",
+ "Show floating recording pill": "Mostrar a barra flutuante de gravação",
+ "Show Yogurt in the menu bar to hide the pill.": "Mostre o Yogurt na barra de menus para ocultar a barra de gravação.",
"Show Yogurt in": "Mostrar Yogurt em",
"Show the next meeting": "Mostrar a próxima reunião",
"Menu bar and Dock": "Barra de menus e Dock",
diff --git a/app/src/shared/locales/ro.json b/app/src/shared/locales/ro.json
index ba59b763..98977819 100644
--- a/app/src/shared/locales/ro.json
+++ b/app/src/shared/locales/ro.json
@@ -696,6 +696,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt nu a putut termina ștergerea acestei notițe.",
"Yogurt couldn't save this folder.": "Yogurt nu a putut salva acest dosar.",
"Your edits to the summary will be replaced.": "Modificările dvs. din rezumat vor fi înlocuite.",
+ "Show floating recording pill": "Afișează bara flotantă de înregistrare",
+ "Show Yogurt in the menu bar to hide the pill.": "Afișează Yogurt în bara de meniu pentru a ascunde bara de înregistrare.",
"Show Yogurt in": "Afișează Yogurt în",
"Show the next meeting": "Afișează următoarea întâlnire",
"Menu bar and Dock": "Bara de meniu și Dock",
diff --git a/app/src/shared/locales/ru.json b/app/src/shared/locales/ru.json
index a5ad47f9..e3bc3e12 100644
--- a/app/src/shared/locales/ru.json
+++ b/app/src/shared/locales/ru.json
@@ -707,6 +707,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt не смог до конца удалить эту заметку.",
"Yogurt couldn't save this folder.": "Yogurt не смог сохранить эту папку.",
"Your edits to the summary will be replaced.": "Ваши правки в сводке будут заменены.",
+ "Show floating recording pill": "Показывать плавающую панель записи",
+ "Show Yogurt in the menu bar to hide the pill.": "Чтобы скрыть панель записи, включите отображение Yogurt в строке меню.",
"Show Yogurt in": "Показывать Yogurt в",
"Show the next meeting": "Показывать следующую встречу",
"Menu bar and Dock": "Строка меню и Dock",
diff --git a/app/src/shared/locales/sv.json b/app/src/shared/locales/sv.json
index ffb5a2e9..21e10a1c 100644
--- a/app/src/shared/locales/sv.json
+++ b/app/src/shared/locales/sv.json
@@ -679,6 +679,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt kunde inte radera klart anteckningen.",
"Yogurt couldn't save this folder.": "Yogurt kunde inte spara mappen.",
"Your edits to the summary will be replaced.": "Dina ändringar i sammanfattningen ersätts.",
+ "Show floating recording pill": "Visa flytande inspelningsfält",
+ "Show Yogurt in the menu bar to hide the pill.": "Visa Yogurt i menyraden för att dölja inspelningsfältet.",
"Show Yogurt in": "Visa Yogurt i",
"Show the next meeting": "Visa nästa möte",
"Menu bar and Dock": "Menyrad och Dock",
diff --git a/app/src/shared/locales/th.json b/app/src/shared/locales/th.json
index 9c9153dd..ca396eb4 100644
--- a/app/src/shared/locales/th.json
+++ b/app/src/shared/locales/th.json
@@ -637,6 +637,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt ลบโน้ตนี้ไม่เสร็จ",
"Yogurt couldn't save this folder.": "Yogurt บันทึกโฟลเดอร์นี้ไม่ได้",
"Your edits to the summary will be replaced.": "การแก้ไขในสรุปจะถูกแทนที่",
+ "Show floating recording pill": "แสดงแถบบันทึกเสียงแบบลอย",
+ "Show Yogurt in the menu bar to hide the pill.": "แสดง Yogurt ในแถบเมนูเพื่อซ่อนแถบบันทึกเสียง",
"Show Yogurt in": "แสดง Yogurt ใน",
"Show the next meeting": "แสดงการประชุมถัดไป",
"Menu bar and Dock": "แถบเมนูและ Dock",
diff --git a/app/src/shared/locales/tr.json b/app/src/shared/locales/tr.json
index 22476260..9983c7ca 100644
--- a/app/src/shared/locales/tr.json
+++ b/app/src/shared/locales/tr.json
@@ -667,6 +667,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt bu notu silmeyi bitiremedi.",
"Yogurt couldn't save this folder.": "Yogurt bu klasörü kaydedemedi.",
"Your edits to the summary will be replaced.": "Özette yaptığınız düzenlemeler değiştirilecek.",
+ "Show floating recording pill": "Kayan kayıt çubuğunu göster",
+ "Show Yogurt in the menu bar to hide the pill.": "Kayıt çubuğunu gizlemek için Yogurt’u menü çubuğunda gösterin.",
"Show Yogurt in": "Yogurt’u göster",
"Show the next meeting": "Sonraki toplantıyı göster",
"Menu bar and Dock": "Menü çubuğu ve Dock",
diff --git a/app/src/shared/locales/uk.json b/app/src/shared/locales/uk.json
index c6b110a0..1cf7df89 100644
--- a/app/src/shared/locales/uk.json
+++ b/app/src/shared/locales/uk.json
@@ -707,6 +707,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt не зміг до кінця видалити цю нотатку.",
"Yogurt couldn't save this folder.": "Yogurt не зміг зберегти цю папку.",
"Your edits to the summary will be replaced.": "Ваші зміни в підсумку буде замінено.",
+ "Show floating recording pill": "Показувати рухому панель запису",
+ "Show Yogurt in the menu bar to hide the pill.": "Щоб приховати панель запису, увімкніть показ Yogurt у смузі меню.",
"Show Yogurt in": "Показувати Yogurt у",
"Show the next meeting": "Показувати наступну зустріч",
"Menu bar and Dock": "Рядок меню та Dock",
diff --git a/app/src/shared/locales/vi.json b/app/src/shared/locales/vi.json
index f3486a97..1863d9a3 100644
--- a/app/src/shared/locales/vi.json
+++ b/app/src/shared/locales/vi.json
@@ -637,6 +637,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt không xóa xong ghi chú này.",
"Yogurt couldn't save this folder.": "Yogurt không lưu được thư mục này.",
"Your edits to the summary will be replaced.": "Những chỉnh sửa của bạn trong tóm tắt sẽ bị thay thế.",
+ "Show floating recording pill": "Hiện thanh ghi âm nổi",
+ "Show Yogurt in the menu bar to hide the pill.": "Hiện Yogurt trên thanh menu để ẩn thanh ghi âm.",
"Show Yogurt in": "Hiển thị Yogurt trong",
"Show the next meeting": "Hiện cuộc họp tiếp theo",
"Menu bar and Dock": "Thanh menu và Dock",
diff --git a/app/src/shared/locales/zh-CN.json b/app/src/shared/locales/zh-CN.json
index bd0f6be5..95c2f352 100644
--- a/app/src/shared/locales/zh-CN.json
+++ b/app/src/shared/locales/zh-CN.json
@@ -637,6 +637,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt 未能删除完这条笔记。",
"Yogurt couldn't save this folder.": "Yogurt 无法保存这个文件夹。",
"Your edits to the summary will be replaced.": "你对摘要的修改将被替换。",
+ "Show floating recording pill": "显示悬浮录音条",
+ "Show Yogurt in the menu bar to hide the pill.": "要隐藏录音条,请在菜单栏中显示 Yogurt。",
"Show Yogurt in": "Yogurt 显示位置",
"Show the next meeting": "显示下一场会议",
"Menu bar and Dock": "菜单栏和 Dock",
diff --git a/app/src/shared/locales/zh-TW.json b/app/src/shared/locales/zh-TW.json
index 99aa68fa..fabe502c 100644
--- a/app/src/shared/locales/zh-TW.json
+++ b/app/src/shared/locales/zh-TW.json
@@ -637,6 +637,8 @@
"Yogurt couldn't finish deleting this note.": "Yogurt 未能刪除完這則筆記。",
"Yogurt couldn't save this folder.": "Yogurt 無法儲存這個資料夾。",
"Your edits to the summary will be replaced.": "你對摘要的修改將被取代。",
+ "Show floating recording pill": "顯示浮動錄音列",
+ "Show Yogurt in the menu bar to hide the pill.": "若要隱藏錄音列,請在選單列中顯示 Yogurt。",
"Show Yogurt in": "Yogurt 顯示位置",
"Show the next meeting": "顯示下一場會議",
"Menu bar and Dock": "選單列與 Dock",
diff --git a/app/src/shared/types.ts b/app/src/shared/types.ts
index 942ae3f9..118e02f9 100644
--- a/app/src/shared/types.ts
+++ b/app/src/shared/types.ts
@@ -276,13 +276,14 @@ export type YogurtApi = {
}
settings: {
/** myName: what the person is called in meetings (their Mac's full name, macName, when they never changed it) */
- get(): Promise<{ theme: Theme; openAtLogin: boolean; showInMenuBar: boolean; showNextMeeting: boolean; appVisibility: AppVisibility; /** the language picked; '' follows the Mac */ language: string; /** the language in use */ locale: string; /** the Mac's language, among Yogurt's */ systemLocale: string; myName: string; macName: string; /** a recording stops by itself when its call ends (off: ask first) */ stopWhenCallEnds: boolean; recordingReminder: boolean; keepRecordings: boolean; /** personal jargon, spelled as typed */ jargon: string[]; /** the language people speak in meetings */ spoken: import('./spoken').Spoken; /** default summary language; '' follows the meeting */ summaryLanguage: string }>
+ get(): Promise<{ theme: Theme; openAtLogin: boolean; showInMenuBar: boolean; showNextMeeting: boolean; showRecordingPill: boolean; appVisibility: AppVisibility; /** the language picked; '' follows the Mac */ language: string; /** the language in use */ locale: string; /** the Mac's language, among Yogurt's */ systemLocale: string; myName: string; macName: string; /** a recording stops by itself when its call ends (off: ask first) */ stopWhenCallEnds: boolean; recordingReminder: boolean; keepRecordings: boolean; /** personal jargon, spelled as typed */ jargon: string[]; /** the language people speak in meetings */ spoken: import('./spoken').Spoken; /** default summary language; '' follows the meeting */ summaryLanguage: string }>
/** blank goes back to the Mac's full name */
setName(name: string): Promise<void>
setTheme(v: Theme): Promise<void>
setOpenAtLogin(on: boolean): Promise<void>
setShowInMenuBar(on: boolean): Promise<void>
setShowNextMeeting(on: boolean): Promise<void>
+ setShowRecordingPill(on: boolean): Promise<void>
setAppVisibility(choice: AppVisibility): Promise<void>
setStopWhenCallEnds(on: boolean): Promise<void>
setRecordingReminder(on: boolean): Promise<void>
diff --git a/app/test/backup.test.ts b/app/test/backup.test.ts
index 66f9640a..0aea0a12 100644
--- a/app/test/backup.test.ts
+++ b/app/test/backup.test.ts
@@ -235,6 +235,13 @@ describe('backup file', { timeout: 20_000 }, () => {
expect(readdirSync(dest)).toEqual(['Yogurt backup.zip'])
})
+ it.each([false, true])('round-trips the recording pill preference (%s) in the archive', async showRecordingPill => {
+ const out = join(tmp(), 'backup.zip')
+ await exportBackup({ db: fresh().db, meetingsDir: tmp(), out, appVersion: '1', showRecordingPill })
+ const result = await importBackup({ db: fresh().db, meetingsDir: tmp(), zip: out })
+ expect(result).toEqual({ ok: true, added: 0, skipped: 0, showRecordingPill })
+ })
+
it('successfully replaces the same backup path with a complete, importable archive', async () => {
const s = fresh(), dest = tmp(), out = join(dest, 'Yogurt backup.zip'), recordings = tmp()
const first = fill(s, 'First meeting', 'first')
diff --git a/app/test/backupIpc.test.ts b/app/test/backupIpc.test.ts
index 444709d1..6137dc82 100644
--- a/app/test/backupIpc.test.ts
+++ b/app/test/backupIpc.test.ts
@@ -17,12 +17,12 @@ vi.mock('../src/main/backup', () => ({
exportBackup: vi.fn(async () => ({ meetings: 2 })),
importBackup: vi.fn(async () => ({ ok: true, added: 2, skipped: 0 })),
}))
-const changed = vi.fn()
+const changed = vi.fn(), setRecordingPill = vi.fn()
const beforeExport = vi.fn<() => string | undefined>(() => undefined)
let recording = false
beforeEach(() => {
vi.resetAllMocks(); handlers.clear(); recording = false
- hookBackup({ db: {} as never, meetingsDir: '/meetings', window: () => undefined, recording: () => recording, changed, beforeExport })
+ hookBackup({ db: {} as never, meetingsDir: '/meetings', window: () => undefined, recording: () => recording, getRecordingPill: () => false, setRecordingPill, changed, beforeExport })
})
const call = (channel: string) => handlers.get(channel)!()
@@ -42,6 +42,19 @@ describe('backup IPC results', () => {
expect(await call('backup:export')).toEqual({ ok: true, meetings: 2 })
expect(await call('backup:import')).toEqual({ ok: true, added: 2, skipped: 0 })
expect(changed).toHaveBeenCalledOnce()
+ expect(exportBackup).toHaveBeenCalledWith(expect.objectContaining({ showRecordingPill: false }))
+ expect(setRecordingPill).toHaveBeenCalledExactlyOnceWith(true) // older backup
+ })
+ it('restores the pill choice even when every meeting already exists', async () => {
+ vi.mocked(importBackup).mockResolvedValueOnce({ ok: true, added: 0, skipped: 2, showRecordingPill: false })
+ await call('backup:import')
+ expect(setRecordingPill).toHaveBeenCalledExactlyOnceWith(false)
+ expect(changed).not.toHaveBeenCalled()
+ })
+ it('refreshes committed notes even if restoring the preference fails and the import must be retried', async () => {
+ setRecordingPill.mockImplementationOnce(() => { throw new Error('settings unavailable') })
+ expect(await call('backup:import')).toEqual({ ok: false, error: 'failed' })
+ expect(changed).toHaveBeenCalledOnce()
})
it('turns dialog rejection into a visible failure result', async () => {
vi.mocked(dialog.showSaveDialog).mockRejectedValueOnce(new Error('dialog failed'))
@@ -55,6 +68,7 @@ describe('backup IPC results', () => {
vi.mocked(importBackup).mockRejectedValueOnce(new Error('cannot prepare import'))
expect(await call('backup:import')).toEqual({ ok: false, error: 'failed' })
expect(changed).not.toHaveBeenCalled()
+ expect(setRecordingPill).not.toHaveBeenCalled()
})
it('preserves a committed import result if notifying a closed window fails', async () => {
changed.mockImplementationOnce(() => { throw new Error('window closed') })
diff --git a/app/test/dockPreference.test.ts b/app/test/dockPreference.test.ts
index 502e612d..e0f5bfb2 100644
--- a/app/test/dockPreference.test.ts
+++ b/app/test/dockPreference.test.ts
@@ -71,7 +71,7 @@ it('shows the kept icon before hiding the other in all nine choice transitions',
expect(order).toEqual(calls)
expect([menuBar, dock]).toEqual(expected)
expect(handlers.get('settings:get')!().appVisibility).toBe(choice)
- expect(visibilityOf(loadSettings(file))).toEqual({ showInMenuBar: expected[0], showInDock: expected[1] })
+ expect(visibilityOf(loadSettings(file))).toEqual({ showInMenuBar: expected[0], showInDock: expected[1], showRecordingPill: true })
expect(loadSettings(file).openAtLogin).toBe(true)
}
}
@@ -117,5 +117,51 @@ it('reads legacy booleans without a migration and retains the both-off startup h
expect(loadSettings(file).showInMenuBar).toBe(menuBar)
expect(loadSettings(file).showInDock).toBe(dock)
}
- expect(visibilityOf({ showInMenuBar: false, showInDock: false })).toEqual({ showInMenuBar: false, showInDock: true })
+ expect(visibilityOf({ showInMenuBar: false, showInDock: false })).toEqual({ showInMenuBar: false, showInDock: true, showRecordingPill: true })
+})
+
+it('restores the pill before removing the recording indicator, and guards Dock only at the IPC', () => {
+ const dir = mkdtempSync(join(tmpdir(), 'recording-indicators-')); dirs.push(dir)
+ const file = join(dir, 'settings.json')
+ const changes: string[] = []
+ const dock = vi.fn()
+ const deps = hook(file, dock, on => changes.push(`tray:${on}`))
+ const prefs = hookPreferences({ ...deps, recordingPillChanged: on => changes.push(`pill:${on}`) })
+ const get = () => handlers.get('settings:get')!().showRecordingPill
+ const pill = (on: unknown) => handlers.get('settings:recording-pill')!(null, on)
+ expect(get()).toBe(true)
+ pill(false)
+ expect(loadSettings(file)).toEqual({ showRecordingPill: false })
+ expect(get()).toBe(false)
+ handlers.get('settings:next-meeting')!(null, false)
+ expect(get()).toBe(false)
+ for (const bad of [null, 0, 'false']) pill(bad)
+ expect(changes).toEqual(['pill:false'])
+ handlers.get('settings:visibility')!(null, 'dock')
+ expect(changes.slice(-2)).toEqual(['pill:true', 'tray:false'])
+ expect(loadSettings(file)).toEqual({ showInMenuBar: false, showNextMeeting: false })
+ pill(false)
+ prefs.setRecordingPill(false) // an imported preference also respects Dock only
+ expect(get()).toBe(true)
+ handlers.get('settings:visibility')!(null, 'both')
+ expect(get()).toBe(true)
+ prefs.setRecordingPill(false)
+ expect(loadSettings(file)).toEqual({ showRecordingPill: false, showNextMeeting: false })
+ handlers.get('settings:next-meeting')!(null, true)
+ expect(get()).toBe(false)
+ pill(true)
+ expect(get()).toBe(true)
+})
+
+it.each(['win32', 'linux'])('keeps the pill on for imported and hand-edited settings on %s', os => {
+ const dir = mkdtempSync(join(tmpdir(), 'recording-pill-platform-')); dirs.push(dir)
+ const file = join(dir, 'settings.json')
+ updateSettings(file, { showRecordingPill: false })
+ const deps = hook(file, vi.fn(), vi.fn(), os)
+ const prefs = hookPreferences(deps)
+ handlers.get('settings:recording-pill')!(null, false)
+ expect(handlers.get('settings:get')!().showRecordingPill).toBe(true)
+ prefs.setRecordingPill(false)
+ expect(loadSettings(file).showRecordingPill).toBeUndefined()
+ expect(visibilityOf({ showInMenuBar: false, showRecordingPill: false }, 'darwin').showRecordingPill).toBe(true)
})
diff --git a/app/test/tray.test.ts b/app/test/tray.test.ts
index 1af8d667..cc6cf1a1 100644
--- a/app/test/tray.test.ts
+++ b/app/test/tray.test.ts
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, expect, it, vi } from 'vitest'
-const state = vi.hoisted(() => ({ meeting: null as null | { id: string; title: string }, paused: false, change: () => {}, recording: (_e: { t: string }) => {}, language: () => {}, trays: [] as any[] }))
+const state = vi.hoisted(() => ({ meeting: null as null | { id: string; title: string }, paused: false, change: () => {}, recording: (_e: { t: string; code?: string }) => {}, language: () => {}, trays: [] as any[] }))
vi.mock('electron', () => ({
app: { quit: vi.fn(), on: vi.fn(), getSystemLocale: vi.fn(() => 'en-US') },
systemPreferences: { getUserDefault: vi.fn(() => false) },
@@ -282,3 +282,30 @@ it('uses the system region for a dated event and honors the Mac clock override',
vi.mocked(systemPreferences.getUserDefault).mockReset()
}
})
+
+it('keeps the recording warning available when the pill is hidden, through pause and until stop', () => {
+ let pill = true
+ const tray = createTray({ show: true, showNextMeeting: false, showRecordingPill: () => pill, ...actions() })
+ state.meeting = { id: 'first', title: 'Review' }; state.change()
+ const warning = 'Yogurt is falling behind. Some lines may be missing.'
+ state.recording({ t: 'warn', code: 'falling-behind' })
+ expect(tray.items()).not.toContain(warning)
+ pill = false; tray.refresh()
+ const menu = () => state.trays[0].setContextMenu.mock.lastCall[0] as { label: string; enabled: boolean }[]
+ expect(menu()[1]).toMatchObject({ label: warning, enabled: false })
+ for (const showNext of [true, false]) {
+ tray.setShowNextMeeting(showNext)
+ expect(tray.items()).toContain(warning)
+ expect(state.trays[0].setTitle.mock.lastCall[0]).toBe('12:03')
+ }
+ state.paused = true; state.recording({ t: 'paused' })
+ expect(tray.items()).toContain(warning)
+ state.paused = false; state.recording({ t: 'paused' })
+ expect(tray.items()).toContain(warning)
+ state.meeting = null; state.change()
+ expect(tray.items()).not.toContain(warning)
+ state.meeting = { id: 'first', title: 'Review' }; state.change()
+ expect(tray.items()).not.toContain(warning)
+ state.recording({ t: 'warn', code: 'falling-behind' })
+ expect(menu()[1]).toMatchObject({ label: warning, enabled: false })
+})
diff --git a/app/test/widgetWindow.test.ts b/app/test/widgetWindow.test.ts
index d420d6ff..64afcbc0 100644
--- a/app/test/widgetWindow.test.ts
+++ b/app/test/widgetWindow.test.ts
@@ -59,6 +59,7 @@ vi.mock('../src/main/meeting', () => ({
const send = (channel: string, ...args: unknown[]) => state.handlers.get(channel)!({ sender: win.webContents }, ...args)
let win: any
const open = vi.fn()
+let showRecordingPill = true
let widget: ReturnType<typeof import('../src/main/widget').createWidget>
beforeEach(async () => {
vi.useFakeTimers()
@@ -68,7 +69,8 @@ beforeEach(async () => {
state.notifications.length = 0; state.fake = false; state.stopPending = false; state.supported = true
state.finished.mockReset().mockResolvedValue(); open.mockReset()
const { createWidget } = await import('../src/main/widget')
- widget = createWidget({ open, stop: vi.fn(), foreground: () => false })
+ showRecordingPill = true
+ widget = createWidget({ open, stop: vi.fn(), foreground: () => false, showRecordingPill: () => showRecordingPill })
state.start!({ id: 'meeting', title: 'Review', startedAt: 0 })
win = state.windows[0]
})
@@ -370,3 +372,21 @@ describe('hidden, the recorder does no work (the audit: its 4/s clock and meter
expect(win3.webContents.setBackgroundThrottling).toHaveBeenLastCalledWith(false)
})
})
+
+it('hides an expanded pill immediately and keeps the note recording and warning active', () => {
+ const show = vi.spyOn(win, 'showInactive')
+ const hide = vi.spyOn(win, 'hide')
+ send('widget:surface', { x: 0, y: 0, width: 310, height: 200, radius: 10 })
+ expect(show).toHaveBeenCalled()
+ show.mockClear()
+ showRecordingPill = false; widget.visibilityChanged()
+ expect(hide).toHaveBeenCalled()
+ state.recording!({ t: 'warn', code: 'falling-behind' })
+ expect(widget.snapshot()).toMatchObject({ visible: false, view: { kind: 'recording', note: { text: 'Yogurt is falling behind. Some lines may be missing.' } } })
+ expect(win.webContents.send).toHaveBeenCalledWith('widget:reset')
+ expect(show).not.toHaveBeenCalled()
+ expect(state.notifications).toHaveLength(0)
+ showRecordingPill = true; widget.visibilityChanged()
+ expect(widget.snapshot().visible).toBe(true)
+ expect(show).toHaveBeenCalledOnce()
+})