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.

Call names: what the call app gave goes to main.log, so a call that stayed Them can be explained

christianmat052ecdca856f
diff --git a/app/src/main/callNames/index.ts b/app/src/main/callNames/index.ts
index ee00e364..11f85265 100644
--- a/app/src/main/callNames/index.ts
+++ b/app/src/main/callNames/index.ts
@@ -58,7 +58,8 @@ export function hookCallNames(p: {
log?: (msg: string) => void
now?: () => number
}) {
- const log = p.log ?? ((s: string) => console.log(s))
+ // info, not log: main.log keeps info, warn and error, and these lines are how a call that stayed Them gets explained
+ const log = p.log ?? ((s: string) => console.info(s))
const now = p.now ?? Date.now
const sessions = new Map<string, Session>()
const finals = new Map<string, Promise<void>>()
diff --git a/app/test/callNames.test.ts b/app/test/callNames.test.ts
index 9d8add1a..2fa36576 100644
--- a/app/test/callNames.test.ts
+++ b/app/test/callNames.test.ts
@@ -1,4 +1,4 @@
-import { afterEach, describe, expect, it } from 'vitest'
+import { afterEach, describe, expect, it, vi } from 'vitest'
import { EventEmitter } from 'node:events'
import { mkdtempSync, rmSync } from 'node:fs'
import { tmpdir } from 'node:os'
@@ -104,6 +104,20 @@ describe('Webex accessibility roster', () => {
})
describe('hookCallNames', () => {
+ it('says what it read in main.log (info, which the log file keeps; console.log never reaches it)', () => {
+ const root = mkdtempSync(join(tmpdir(), 'yogurt-callnames-')); dirs.push(root)
+ const store = openStore(join(root, 'yogurt.db')); stores.push(store)
+ const m = store.createMeeting({ title: 'Sync', startedAt: 1_000_000, endedAt: null, eventId: null, app: 'FaceTime', attendees: [], state: 'recording' })
+ const info = vi.spyOn(console, 'info').mockImplementation(() => {})
+ const starts: Array<(m: Meeting) => void> = []
+ try {
+ hookCallNames({ store, myNames: () => [], transcribed: async () => {}, changed: () => {}, watch: () => ({ stop() {} }),
+ onStart: (fn) => starts.push(fn), onStop: () => {}, onCapture: () => {} })
+ starts.forEach((f) => f(m))
+ expect(info.mock.calls.flat().join('\n')).toContain("call names: FaceTime can't be read")
+ } finally { info.mockRestore() }
+ })
+
it('a resumed session names only new lines and preserves previous speaker labels', async () => {
const s = setup()
s.store.addSegments([{ meetingId: s.m.id, track: 'them', startMs: 1000, endMs: 3000, text: 'Prior session.', speaker: 'Ann Lee' }])