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.

no 'take notes?' card right after Finish while the call app still holds the mic; the next call still gets one

christianmat225ba7f76f84
diff --git a/app/src/main/watch.ts b/app/src/main/watch.ts
index 319bd971..68826974 100644
--- a/app/src/main/watch.ts
+++ b/app/src/main/watch.ts
@@ -37,6 +37,8 @@ export class Watcher {
/** call apps on the mic at the last look before recording: a recording started from the card belongs to that call */
private idleMic = new Set<string>()
private idleCall: { app: string; at: number } | null = null
+ /** a recording was going at the last look */
+ private wasRecording = false
constructor(private d: WatchDeps) {}
@@ -56,12 +58,16 @@ export class Watcher {
const rec = this.d.active()
const s: Signals = { ...reading, recording: !!rec }
if (rec) this.recording(rec, s, now)
- else this.idle(s, now)
+ else this.idle(s, now, this.wasRecording)
+ this.wasRecording = !!rec
} finally { this.busy = false }
}
- private idle(s: Signals, now: number) {
+ private idle(s: Signals, now: number, justStopped = false) {
this.rec = null
+ // the recording just ended while its call app still holds the mic (Finish in Yogurt, then Zoom closes a few seconds
+ // later): that call is done, as if its card were closed. It is forgiven once the app lets go of the mic, as below.
+ if (justStopped) for (let p = decide(s, now, this.dismissed); p; p = decide(s, now, this.dismissed)) this.dismissed.add(p.key)
this.idleMic = new Set(s.micApps.flatMap((m) => callAppName(m.bundleId, s.runningApps) ?? []))
const call = decide(s, now, new Set())
this.idleCall = call?.app ? { app: call.app, at: now } : null
diff --git a/app/test/watch.test.ts b/app/test/watch.test.ts
index 799dfcf4..be4eecce 100644
--- a/app/test/watch.test.ts
+++ b/app/test/watch.test.ts
@@ -68,6 +68,30 @@ describe('start cards', () => {
await w.tick()
expect(w.dismissed.has('app:us.zoom.xos')).toBe(true)
})
+ it('finishing in Yogurt while the call app still holds the mic: no card for that call, and the next call still gets one', async () => {
+ reading = { micApps: [zoom], events: [] }
+ active = meeting()
+ await w.tick(); await w.tick()
+ // Finish in Yogurt; Zoom keeps the mic a few seconds longer
+ active = null; w.cleared()
+ await w.tick(); clock += 5000; await w.tick()
+ expect(log.filter((l) => l.startsWith('offer'))).toEqual([])
+ // the call ends, and a new one starts later
+ reading = { micApps: [], events: [] }
+ await w.tick()
+ reading = { micApps: [zoom], events: [] }
+ await w.tick()
+ expect(log.filter((l) => l.startsWith('offer'))).toEqual(['offer:app:us.zoom.xos'])
+ })
+ it('finishing during a calendar meeting: no card for that event either', async () => {
+ const e = ev()
+ reading = { micApps: [zoom], events: [e] }
+ active = meeting({ eventId: e.id })
+ await w.tick()
+ active = null; w.cleared()
+ await w.tick(); clock += 5000; await w.tick()
+ expect(log.filter((l) => l.startsWith('offer'))).toEqual([])
+ })
it('a closed event card stays quiet for good', async () => {
const e = ev()
reading = { micApps: [zoom], events: [e] }