Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.
TypeScript ai-meeting-assistantai-notetakerelectrongranola-alternativelinuxllama-cpplocal-ailocal-firstmacosmcpmeeting-minutesmeeting-notesoffline-firstopen-sourceprivacyspeech-to-texttranscriptionwhisperwhisper-cppwindows
Summary: "The attendee list has changed" compares attendees as a set, so removing a duplicate name no longer raises it, and the notice can be dismissed with ×
Eric Brownrouted69e87d90d8
diff --git a/app/e2e/note-layout.spec.ts b/app/e2e/note-layout.spec.tsindex 8c1ad956..ea127da5 100644--- a/app/e2e/note-layout.spec.ts+++ b/app/e2e/note-layout.spec.ts@@ -3,7 +3,7 @@ import { _electron as electron, expect, test, type ElectronApplication, type Pagimport { mkdtempSync } from 'node:fs'import { tmpdir } from 'node:os'import { join } from 'node:path'-import type { NoteView } from '../src/shared/types'+import type { NoteView, Person } from '../src/shared/types'const main = join(import.meta.dirname, '../out/main/index.js')const zoom = { bundleId: 'us.zoom.xos', name: 'zoom.us' }@@ -43,17 +43,19 @@ const putClipboardBack = (app: ElectronApplication) => app.evaluate(async ({ cliconst notesOf = (page: Page, id: string) => page.evaluate((id) => window.yogurt.notes.get(id), id) as Promise<NoteView>/** a meeting recorded, heard and written up: the note is open with enhanced notes done; its id */-async function finished(app: ElectronApplication, page: Page): Promise<string> {+async function finished(app: ElectronApplication, page: Page, attendees?: Person[]): Promise<string> {await fake(app, 'signals', { micApps: [], events: [] })await fake(app, 'signals', { micApps: [zoom], events: [] })await (await windowOf(app, '#prompt')).getByTestId('prompt-take-notes').click()await expect(page.getByTestId('note-state')).toHaveAttribute('data-state', 'recording')await page.getByTestId('note-transcript-toggle').click()await expect(page.getByTestId('transcript-line').filter({ hasText: 'The site goes live on Tuesday' })).toBeVisible({ timeout: 30_000 })+ const id = (await page.evaluate(() => window.yogurt.nav.current())).slice('/note/'.length)+ if (attendees) await page.evaluate(({ id, attendees }) => window.yogurt.meetings.setAttendees(id, attendees), { id, attendees })await page.getByTestId('note-stop').click()await page.getByTestId('note-summary-tab').click()await expect(page.getByTestId('note-enhanced')).toHaveAttribute('data-status', 'done', { timeout: 60_000 })- return (await page.evaluate(() => window.yogurt.nav.current())).slice('/note/'.length)+ return id}test('the workspace keeps Meetings and Back navigation, including a return from Settings', async () => {@@ -166,21 +168,51 @@ test('people added and removed by hand are saved, and the notes are written agai} finally { await app.close() }})-test('people changed on edited notes: they are kept, and Yogurt offers to write them again', async () => {- const { app, page } = await launch()+test('edited summaries can dismiss an attendee change until membership changes again', async ({}, testInfo) => {+ const { app, page } = await launch({ YOGURT_FAKE_AX: 'denied', YOGURT_FAKE_LLM_MS: '2' })try {- const id = await finished(app, page)+ const ann = { name: 'Ann Lee', email: null }+ const id = await finished(app, page, [ann, ann])+ await page.evaluate(id => window.yogurt.meetings.rename(id, 'Launch follow-up'), id)const editor = page.getByTestId('note-enhanced-editor')- await editor.locator('h2').first().click()- await page.keyboard.press('End')- await page.keyboard.type(' (mine)')- await expect.poll(async () => (await notesOf(page, id)).edited, { timeout: 5000 }).toBe(true)+ await editor.fill('My edited launch plan')+ await expect.poll(async () => (await notesOf(page, id)).edited).toBe(true)+ const banner = page.getByTestId('note-people-changed')await page.getByTestId('note-attendees').click()+ const removeAnn = page.getByRole('button', { name: 'Remove Ann Lee', exact: true })+ await expect(removeAnn).toHaveCount(2)+ await removeAnn.last().click()+ await expect(removeAnn).toHaveCount(1)+ expect((await notesOf(page, id)).peopleChanged).toBe(false)+ await expect(banner).toHaveCount(0)await page.getByTestId('people-add-open').click()await page.getByTestId('people-add').fill('Maya Chen')await page.keyboard.press('Enter')- await expect(page.getByTestId('note-people-changed')).toHaveText(/The attendee list has changed\./, { timeout: 10_000 })- await expect(editor.locator('h2').first()).toHaveText('Launch plan (mine)')+ await expect(banner).toContainText('The attendee list has changed.')+ await page.keyboard.press('Escape')+ await expect(page.getByTestId('people-card')).toHaveCount(0)+ const close = banner.getByRole('button', { name: 'Close', exact: true })+ await expect(close).toHaveAttribute('title', 'Close')+ await page.emulateMedia({ colorScheme: null }) // Let the window follow Yogurt's appearance setting.+ for (const theme of ['light', 'dark'] as const) {+ await page.evaluate(theme => window.yogurt.settings.setTheme(theme), theme)+ await expect.poll(() => page.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches)).toBe(theme === 'dark')+ await expect(close).toBeVisible()+ await page.screenshot({ path: testInfo.outputPath(`attendee-notice-${theme}.png`) })+ }+ await close.press('Enter')+ await expect(banner).toHaveCount(0)+ await page.getByTestId('nav-home').click()+ await page.getByTestId('past-note').filter({ hasText: 'Launch follow-up' }).click()+ await expect(editor).toHaveText('My edited launch plan')+ await expect(banner).toHaveCount(0)+ await page.getByTestId('note-attendees').click()+ await removeAnn.click()+ await expect(banner).toBeVisible()+ await banner.getByRole('button', { name: 'Regenerate summary' }).click()+ await page.getByTestId('note-write-again-confirm').click()+ await expect(editor).toContainText('With Maya Chen.', { timeout: 30_000 })+ await expect(banner).toHaveCount(0)} finally { await app.close() }})diff --git a/app/src/main/index.ts b/app/src/main/index.tsindex ba28803f..adab4ecb 100644--- a/app/src/main/index.ts+++ b/app/src/main/index.ts@@ -980,6 +980,9 @@ app.whenReady().then(() => {ipcMain.handle('notes:set-enhanced', (_e, id: unknown, md: unknown, revision: unknown) => saveEdit(id, 'enhanced', md, revision))ipcMain.on('notes:flush-sync', (e, id: unknown, side: unknown, md: unknown, revision: unknown) => { e.returnValue = saveEdit(id, side, md, revision) })ipcMain.on('notes:kept-edits', (_e, id: unknown) => { if (known(id)) notes.keptEdits(id) })+ ipcMain.handle('notes:dismiss-people-change', (_e, id: unknown, membership: unknown) => {+ if (known(id) && typeof membership === 'string') notes.dismissPeopleChange(id, membership)+ })ipcMain.handle('notes:stop', (_e, id: unknown) => { if (known(id)) return notes.stop(id) })// "Write again", from the note or an AI app; false when it can't start nowconst writeAgain = (id: unknown, note: unknown): boolean => {diff --git a/app/src/main/notes/index.ts b/app/src/main/notes/index.tsindex 05554ac2..3228045f 100644--- a/app/src/main/notes/index.ts+++ b/app/src/main/notes/index.ts@@ -1,4 +1,4 @@-import { attendeeMembership as stamp } from '../../shared/people'+import { attendeeMembership as stamp, sameAttendeeMembership } from '../../shared/people'import type { Meeting, Store } from '../store'import type { NotesModel } from './model'import type { NoteSaveResult, NoteSide, NoteStatus, NoteView } from '../../shared/types'@@ -20,7 +20,7 @@ const DRAFT_EVERY_MS = 50* the one model queue, streamed to the window as they are written, then saved. "Write again" goes the same way.*/export function hookNotes(p: {- store: Pick<Store, 'meeting' | 'notes' | 'setNotes' | 'writtenWith' | 'setWrittenWith' | 'segments' | 'updateMeeting' | 'unenhancedMeetings'>+ store: Pick<Store, 'meeting' | 'notes' | 'setNotes' | 'writtenWith' | 'setWrittenWith' | 'attendeeNoticeDismissed' | 'setDismissedAttendees' | 'segments' | 'updateMeeting' | 'unenhancedMeetings'>queue: Queuemodel: Pick<NotesModel, 'llm'> & Partial<Pick<NotesModel, 'needsLoad'>>/** Windows and Linux: say when the notes wait for the model to load (a Mac shows what it always did) */@@ -65,9 +65,11 @@ export function hookNotes(p: {}/** the notes were written with other people than the meeting has now (not known for notes older than this) */- const peopleChanged = (id: string, written: boolean) => {+ const changedMembership = (id: string) => {const was = p.store.writtenWith(id)- return written && was != null && was !== stamp(p.store.meeting(id)?.attendees ?? [])+ if (was == null) return null+ const current = stamp(p.store.meeting(id)?.attendees ?? [])+ return sameAttendeeMembership(was, current) ? null : current}/** out of date, unless they are being written again on their own right now (then no hint) */@@ -76,7 +78,8 @@ export function hookNotes(p: {const l = live.get(id)const saved = edits.get(id)const saves = saved && Object.fromEntries(Object.entries(saved).map(([side, edit]) => [side, { revision: edit.revision, status: edit.status, ...(edit.reason ? { reason: edit.reason } : {}) }]))- return { meetingId: id, mine: n.mine, enhanced: n.enhanced, edited: n.edited, status: l?.status ?? (n.enhanced != null ? 'done' : 'idle'), draft: l?.draft ?? '', peopleChanged: peopleChanged(id, n.enhanced != null) && !rewriteTimers.has(id) && !rewriting.has(id), ...(l?.part ? { part: l.part } : {}), ...(l?.step ? { step: l.step } : {}), ...(saves ? { saves } : {}) }+ const membership = n.enhanced != null && !rewriteTimers.has(id) && !rewriting.has(id) ? changedMembership(id) : null+ return { meetingId: id, mine: n.mine, enhanced: n.enhanced, edited: n.edited, status: l?.status ?? (n.enhanced != null ? 'done' : 'idle'), draft: l?.draft ?? '', peopleChanged: membership != null && !p.store.attendeeNoticeDismissed(id, membership), ...(l?.part ? { part: l.part } : {}), ...(l?.step ? { step: l.step } : {}), ...(saves ? { saves } : {}) }}const set = (id: string, status: NoteStatus, draft = '', part?: { part: number; of: number }, step?: 'loading') => { live.set(id, { status, draft, part, step }); p.send(view(id)) }@@ -247,6 +250,10 @@ export function hookNotes(p: {const notes = {view,+ dismissPeopleChange(id: string, membership: string) {+ if (changedMembership(id) === membership) p.store.setDismissedAttendees(id, membership)+ p.send(view(id))+ },/** A user stop is final; queue preemption for a recording still resumes later. */stop(id: string): Promise<void> {const pending = stopping.get(id)@@ -295,7 +302,7 @@ export function hookNotes(p: {applyPeople(id: string, retitle = true) {const refreshTitle = retitle || rewriteTimers.has(id)clearTimeout(rewriteTimers.get(id)); rewriteTimers.delete(id)- const due = () => { const n = currentNotes(id); return !resuming.has(id) && p.store.meeting(id)?.state !== 'recording' && n.enhanced != null && !n.edited && !live.has(id) && !rewriting.has(id) && peopleChanged(id, true) }+ const due = () => { const n = currentNotes(id); return !resuming.has(id) && p.store.meeting(id)?.state !== 'recording' && n.enhanced != null && !n.edited && !live.has(id) && !rewriting.has(id) && changedMembership(id) != null }const titleDue = () => refreshTitle && !resuming.has(id) && p.store.meeting(id)?.state !== 'recording' && p.store.meeting(id)?.titleSource === 'auto'if (!due() && !titleDue()) { p.send(view(id)); return }rewriteTimers.set(id, setTimeout(() => {diff --git a/app/src/main/store.ts b/app/src/main/store.tsindex bcabb2f9..ac41914c 100644--- a/app/src/main/store.ts+++ b/app/src/main/store.ts@@ -4,7 +4,7 @@ import { matchSearchPeople, searchPersonKey, uniqueSearchPeople } from '../shareimport { oneEdit, parseSearchQuery, type SearchOptions } from '../shared/searchQuery'import { echoConfidence } from './asr/echo'import { backfillPeople, rememberPeople, resolvePeople } from './people'-import { attendeeMembership, matchingOwnEmail, ownAddress, personEmail } from '../shared/people'+import { attendeeMembership, matchingOwnEmail, ownAddress, personEmail, sameAttendeeMembership } from '../shared/people'import type { FolderSuggestionRecord } from '../shared/folderSuggestion'import { unusedPreparedNote } from '../shared/agendaNote'import { speakerOrder } from '../shared/speakerColors'@@ -257,6 +257,7 @@ export class Store {const cols = (this.db.prepare('PRAGMA table_info(notes)').all() as Row[]).map((r) => String(r.name))if (!cols.includes('edited')) this.db.exec('ALTER TABLE notes ADD COLUMN edited INTEGER NOT NULL DEFAULT 0')const meetingCols = (this.db.prepare('PRAGMA table_info(meetings)').all() as Row[]).map((r) => String(r.name))+ if (!meetingCols.includes('dismissed_attendees')) this.db.exec('ALTER TABLE meetings ADD COLUMN dismissed_attendees TEXT')for (const [name, type] of [['suggested_folder_id', 'TEXT'], ['suggestion_state', 'TEXT'], ['suggestion_confidence', 'REAL'], ['suggestion_attempt', 'TEXT']]) {if (!meetingCols.includes(name)) this.db.exec(`ALTER TABLE meetings ADD COLUMN ${name} ${type}`)}@@ -347,8 +348,10 @@ export class Store {} else {const previous = attendeeMembership(people)person.name = name- this.db.prepare('UPDATE meetings SET attendees = ? WHERE id = ?').run(JSON.stringify(people), id)- this.db.prepare('UPDATE notes SET written_with = ? WHERE meeting_id = ? AND written_with = ?').run(attendeeMembership(people), id, previous)+ const renamed = attendeeMembership(people)+ this.db.prepare('UPDATE meetings SET attendees = ?, dismissed_attendees = CASE WHEN dismissed_attendees = ? THEN ? END WHERE id = ?')+ .run(JSON.stringify(people), previous, renamed, id)+ if (sameAttendeeMembership(this.writtenWith(id), previous)) this.setWrittenWith(id, renamed)}this.db.prepare('UPDATE meetings SET keep_attendees = 1 WHERE id = ?').run(id)this.db.exec('RELEASE rename_person')@@ -400,7 +403,13 @@ export class Store {if (k === 'attendees') return JSON.stringify(value)return typeof value === 'boolean' ? Number(value) : value as string | number | null})- this.db.prepare(`UPDATE meetings SET ${keys.map((k) => `${col[k]} = ?`).join(', ')} WHERE id = ?`).run(...vals, id)+ const assignments = keys.map(k => `${col[k]} = ?`)+ if (patch.attendees) {+ // Expire the dismissal on the first different set, even if the old set returns later.+ assignments.push('dismissed_attendees = CASE WHEN dismissed_attendees = ? THEN dismissed_attendees END')+ vals.push(attendeeMembership(patch.attendees))+ }+ this.db.prepare(`UPDATE meetings SET ${assignments.join(', ')} WHERE id = ?`).run(...vals, id)}/** Refresh every note still linked to this occurrence, including alternate calendar IDs. */rememberEvent(event: CalEvent): Meeting[] {@@ -628,6 +637,12 @@ export class Store {setWrittenWith(meetingId: string, people: string) {this.db.prepare('UPDATE notes SET written_with = ? WHERE meeting_id = ?').run(people, meetingId)}+ attendeeNoticeDismissed(meetingId: string, people: string): boolean {+ return !!this.db.prepare('SELECT 1 FROM meetings WHERE id = ? AND dismissed_attendees = ?').get(meetingId, people)+ }+ setDismissedAttendees(meetingId: string, people: string) {+ this.db.prepare('UPDATE meetings SET dismissed_attendees = ? WHERE id = ?').run(people, meetingId)+ }/** Resume managed jobs; legacy partial recordings wait for an explicit Continue. */untranscribedMeetings(): Meeting[] {diff --git a/app/src/preload/index.ts b/app/src/preload/index.tsindex 70d066e2..dd9cdd4c 100644--- a/app/src/preload/index.ts+++ b/app/src/preload/index.ts@@ -130,6 +130,7 @@ const api: YogurtApi = {return () => { ipcRenderer.removeListener('notes:flush-request', run) }},keptEdits: (id) => { ipcRenderer.send('notes:kept-edits', id) },+ dismissPeopleChange: (id, membership) => ipcRenderer.invoke('notes:dismiss-people-change', id, membership),writeAgain: (id, note) => ipcRenderer.invoke('notes:write-again', id, note),stop: (id) => ipcRenderer.invoke('notes:stop', id),onChange: (cb) => {diff --git a/app/src/renderer/src/screens/Note.tsx b/app/src/renderer/src/screens/Note.tsxindex 5d06e4f7..10a957e4 100644--- a/app/src/renderer/src/screens/Note.tsx+++ b/app/src/renderer/src/screens/Note.tsx@@ -10,7 +10,8 @@ import { LoadingContent } from '../components/LoadingContent'import { motion, useReducedMotion } from '../motion'import { useEffect, useLayoutEffect, useMemo, useRef, useState, type KeyboardEvent } from 'react'import { useScrollMemory } from '../useScrollMemory'-import { Lock, RotateCcw, Trash2, Mic, Pause, Play } from '../components/Icons'+import { Lock, RotateCcw, Trash2, Mic, Pause, Play, X } from '../components/Icons'+import { attendeeMembership } from '../../../shared/people'import type { MeetingView, NoteSaveResult, NoteSide, NoteView, SetupState, WidgetView } from '../../../shared/types'import { t } from '../../../shared/i18n'import { osWords } from '../keys'@@ -488,9 +489,16 @@ export function Note({ id, onTitleChange, at, folderSuggestion, onSource, onResu</InlineError>)}{primary === 'notes' && shown === 'enhanced' && notes.status === 'done' && notes.peopleChanged && !rewriteOpen && (- <div data-testid="note-people-changed" className="pointer-events-auto mx-auto mt-3 flex w-fit max-w-[calc(100%-32px)] flex-wrap items-center gap-3 rounded-xl border border-line bg-float px-4 py-2 text-[13px] shadow-[var(--shadow)]">- <span>{t('The attendee list has changed.')}</span>- <button data-testid="note-people-write-again" onClick={requestRewrite} className="workspace-button primary">{t('Regenerate summary')}</button>+ <div data-testid="note-people-changed" className="pointer-events-auto mx-auto mt-3 flex w-fit max-w-[calc(100%-32px)] items-center gap-3 rounded-xl border border-line bg-float ps-4 pe-2.5 py-2 text-[13px] shadow-[var(--shadow)]">+ <div className="flex min-w-0 flex-wrap items-center gap-3">+ <span>{t('The attendee list has changed.')}</span>+ <button data-testid="note-people-write-again" onClick={requestRewrite} className="workspace-button primary">{t('Regenerate summary')}</button>+ </div>+ <button type="button" className="ghost-btn workspace-icon shrink-0" aria-label={t('Close')} title={t('Close')} onClick={() => {+ void window.yogurt.notes.dismissPeopleChange(id, attendeeMembership(m.attendees)).catch(() => {+ toasts.add({ title: t("Yogurt couldn't make that change. Try again.") })+ })+ }}><X size={14} aria-hidden="true" /></button></div>)}{saveStatus === 'failed' && (diff --git a/app/src/shared/people.ts b/app/src/shared/people.tsindex ebf2bd95..eb0f73d6 100644--- a/app/src/shared/people.ts+++ b/app/src/shared/people.ts@@ -8,7 +8,24 @@ export function matchingOwnEmail(people: Person[], emails: string[]): string | nexport const personEmail = (email: string) => email.trim().toLowerCase()export const attendeePrivacy = (focused: boolean, text: string) => focused || text.includes('@')-export const attendeeMembership = (people: Person[]) => 'members:' + JSON.stringify(people.map(p => p.email ? `email:${personEmail(p.email)}` : `name:${p.name}`).sort())+const membershipPrefix = 'members:'+function membership(keys: string[]) {+ const normalized = keys.map(key => key.startsWith('name:') ? 'name:' + key.slice(5).trim().replace(/\s+/g, ' ').toLowerCase() : key)+ return membershipPrefix + JSON.stringify([...new Set(normalized)].sort())+}+export const attendeeMembership = (people: Person[]) => membership(people.map(p => p.email?.trim() ? `email:${personEmail(p.email)}` : `name:${p.name}`))++/** Older fingerprints kept duplicate identities and the original spelling of names. */+function normalizedMembership(value: string) {+ if (value.startsWith(membershipPrefix)) {+ try {+ const keys: unknown = JSON.parse(value.slice(membershipPrefix.length))+ if (Array.isArray(keys) && keys.every(key => typeof key === 'string')) return membership(keys)+ } catch { /* Keep an unrecognized baseline as recorded. */ }+ }+ return value+}+export const sameAttendeeMembership = (a: string | null, b: string) => a === b || (a != null && normalizedMembership(a) === normalizedMembership(b))export function emailName(email: string): string {const local = email.split('@')[0], name = local.replace(/[._-]+/g, ' ').trim() || localreturn name.charAt(0).toUpperCase() + name.slice(1)diff --git a/app/src/shared/types.ts b/app/src/shared/types.tsindex 9e17c66a..14538539 100644--- a/app/src/shared/types.ts+++ b/app/src/shared/types.ts@@ -149,6 +149,7 @@ export type YogurtApi = {onFlushRequest(cb: (closing: boolean) => Promise<boolean>): () => void/** the open note kept its unsaved edits over notes written again for new people */keptEdits(meetingId: string): void+ dismissPeopleChange(meetingId: string, membership: string): Promise<void>/** writes the enhanced notes again */writeAgain(meetingId: string, note?: string): Promise<void>stop(meetingId: string): Promise<void>@@ -414,7 +415,7 @@ export type NoteView = {part?: { part: number; of: number }/** Windows and Linux: waiting while the notes model loads (it can take a while there) */step?: 'loading'- /** the people at the meeting changed after these edited notes were written, so they may be out of date */+ /** Show the notice for a changed attendee list until this membership is dismissed. */peopleChanged: boolean/** the notes were just written again (for new people): what they replaced, so an open editor with no edits since takes them */rewrittenFrom?: stringdiff --git a/app/test/notes.test.ts b/app/test/notes.test.tsindex 5460b96f..537043dd 100644--- a/app/test/notes.test.ts+++ b/app/test/notes.test.ts@@ -7,6 +7,7 @@ import { hookNotes, NOTES_MAX } from '../src/main/notes'import { createQueue } from '../src/main/notes/queue'import type { Llm } from '../src/main/notes/enhance'import type { NoteView } from '../src/shared/types'+import { attendeeMembership } from '../src/shared/people'const dirs: string[] = []const stores: Store[] = []@@ -398,6 +399,33 @@ describe('hookNotes', () => {expect(s.prompts).toHaveLength(1)expect(s.notes.view(s.m.id).peopleChanged).toBe(true)})+ it('dismisses only the attendee change that was shown and remembers it after reopening', () => {+ const s = setup(), id = s.m.id, ann = { name: 'Ann Lee', email: null }+ const baseline = attendeeMembership([]), membership = attendeeMembership([ann])+ s.store.setNotes(id, { enhanced: 'My summary', edited: true })+ s.store.setWrittenWith(id, baseline)+ s.store.updateMeeting(id, { attendees: [ann] })+ expect(s.notes.view(id).peopleChanged).toBe(true)+ s.notes.dismissPeopleChange(id, membership)+ expect(s.sent.at(-1)).toMatchObject({ peopleChanged: false, enhanced: 'My summary', edited: true })+ expect(s.store.writtenWith(id)).toBe(baseline)++ const reopened = openStore(s.store.db.location()!)+ stores.push(reopened)+ const notes = hookNotes({ store: reopened, queue: s.queue, model: { llm: async () => s.llm },+ transcribed: async () => {}, language: () => null, onStop: () => {}, send: () => {}, changed: () => {} })+ expect(notes.view(id).peopleChanged).toBe(false)+ reopened.renameAttendee(id, 0, 'Annie Lee')+ expect(notes.view(id).peopleChanged).toBe(false)+ reopened.renameAttendee(id, 0, ann.name)+ reopened.updateMeeting(id, { attendees: [ann, { name: ' ANN lee ', email: null }] })+ expect(notes.view(id).peopleChanged).toBe(false)+ reopened.updateMeeting(id, { attendees: [ann, { name: 'Bo', email: null }] })+ notes.dismissPeopleChange(id, membership)+ expect(notes.view(id).peopleChanged).toBe(true)+ reopened.updateMeeting(id, { attendees: [ann] })+ expect(notes.view(id).peopleChanged).toBe(true)+ })it('notes written before Yogurt kept who was there are not marked out of date for their attendees', async () => {const s = setup()s.store.updateMeeting(s.m.id, { attendees: [{ name: 'Ann Lee', email: null }] })@@ -411,6 +439,21 @@ describe('hookNotes', () => {await wait(80)expect(s.prompts).toHaveLength(1)})+ it('removing a duplicate from an older note neither shows a hint nor queues a rewrite', async () => {+ const s = setup(), ann = { name: 'Ann Lee', email: null }+ s.store.setNotes(s.m.id, { enhanced: 'Original summary' })+ s.store.setWrittenWith(s.m.id, 'members:["name:Ann Lee","name:Ann Lee"]')+ s.store.updateMeeting(s.m.id, { attendees: [ann] })+ expect(s.notes.view(s.m.id).peopleChanged).toBe(false)+ s.notes.applyPeople(s.m.id)+ await wait(80)+ expect(s.prompts).toHaveLength(0)+ s.store.setNotes(s.m.id, { edited: true })+ s.store.updateMeeting(s.m.id, { attendees: [] })+ expect(s.notes.view(s.m.id).peopleChanged).toBe(true)+ s.store.updateMeeting(s.m.id, { attendees: [ann, ann] })+ expect(s.notes.view(s.m.id).peopleChanged).toBe(false)+ })it('written() resolves once the notes after the meeting are done', async () => {const s = setup()s.stop()diff --git a/app/test/peopleRecords.test.ts b/app/test/peopleRecords.test.tsindex a7ef89b5..c5f0570e 100644--- a/app/test/peopleRecords.test.ts+++ b/app/test/peopleRecords.test.ts@@ -7,6 +7,13 @@ const stores: ReturnType<typeof openStore>[] = []afterEach(() => stores.splice(0).forEach(s => s.close()))const fresh = () => { const s = openStore(':memory:'); stores.push(s); return s }const create = (s: ReturnType<typeof fresh>, email: string | null = '[email protected]') => s.createMeeting({ title: 'Call', startedAt: 1, endedAt: 2, eventId: null, app: null, attendees: [{ name: 'jamie', email }], state: 'done' })+it('counts each email or normalized name once, including when the same person is re-added', () => {+ const jamie = { name: 'Jamie', email: ' [email protected] ' }, ann = { name: 'Ann Lee', email: null }+ const membership = attendeeMembership([jamie, ann])+ expect(attendeeMembership([ann, jamie, { name: ' ANN\tLee ', email: null }, { name: 'J', email: '[email protected]' }])).toBe(membership)+ expect(attendeeMembership([ann])).not.toBe(membership)+ expect(attendeeMembership([ann, jamie, { name: 'Jamie', email: '[email protected]' }])).not.toBe(membership)+})it('resolves an override, best observed name, then a capitalized local part', () => {expect(resolvedPersonName('[email protected]', 'Jamie Quill', ['Jamie Jones'])).toBe('Jamie Quill')expect(resolvedPersonName('[email protected]', null, ['jamie', 'Jamie Quill', 'Jamie'])).toBe('Jamie Quill')@@ -35,7 +42,7 @@ it('backfills idempotently and propagates a rename across meetings and exports wit('renames a name-only attendee on just that meeting, preserving the Summary membership baseline', () => {const s = fresh(), a = create(s, null), b = create(s, null)s.setNotes(a.id, { enhanced: 'Summary' })- s.setWrittenWith(a.id, attendeeMembership(a.attendees))+ s.setWrittenWith(a.id, 'members:["name:Jamie","name:jamie"]')s.renameAttendee(a.id, 0, 'Jamie Quill')expect(s.meeting(a.id)!.attendees[0].name).toBe('Jamie Quill')expect(s.meeting(b.id)!.attendees[0].name).toBe('jamie')