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.

First run: no "Take notes?" for a call while onboarding is still on screen

christianmat906508beacb1
diff --git a/app/src/main/index.ts b/app/src/main/index.ts
index 1da088da..53c4b49b 100644
--- a/app/src/main/index.ts
+++ b/app/src/main/index.ts
@@ -32,7 +32,7 @@ import { realDeps } from './downloader'
import { wavOf } from './fakeCapture'
import { askFakeNotifications, chatMeetings, fakeAccess, fakeDownloadDeps, fakeHardware, fakeHelper, fakeNow, installFakeHooks, manyMeetings, mediaCalls, waitForFakeAudioMetadata } from './fake'
import { createPermissions } from './permissions'
-import { hookPreferences } from './preferences'
+import { hookPreferences, onboardingShowing } from './preferences'
import { loginItemOn, openedAtLogin, setLoginItem, syncLoginItem } from './loginItem'
import { createMedia } from './media'
import { createTray, linuxTrayHost } from './tray'
@@ -294,6 +294,8 @@ function startDetection() {
// the call ended: the same stop as the widget's Stop button, then say so
autoStop: (m) => { widget.callEnded(m.id); stopMeeting(m.id); prompts.stopped(m) },
autoStopOn: () => stopsWhenCallEnds(loadSettings(join(userDataDir(), 'settings.json'))),
+ // no "Take notes?" while onboarding is still on screen
+ ready: () => !onboardingShowing(),
// fake mode: tests can shorten the grace
graceMs: isFake() && process.env.YOGURT_FAKE_CALL_GONE_MS ? Number(process.env.YOGURT_FAKE_CALL_GONE_MS) : CALL_GONE_MS,
})
diff --git a/app/src/main/preferences.ts b/app/src/main/preferences.ts
index c195cd5b..bc8047a1 100644
--- a/app/src/main/preferences.ts
+++ b/app/src/main/preferences.ts
@@ -14,6 +14,10 @@ const isKind = (k: unknown): k is PermissionKind => PERMISSION_KINDS.includes(k
* Settings, the first run (intro and permissions) and home's Finish setup: permissions (read, asked, or their System Settings pane), open at login, theme.
* ask: whether this run may show the first run at all (fake mode only when a test sets the permissions).
*/
+/** the first-run screens are on screen now (intro or permission steps, not yet finished): no call is offered meanwhile */
+let firstRunShowing = false
+export const onboardingShowing = (): boolean => firstRunShowing
+
export function hookPreferences(d: { file: string; permissions: Permissions; ask: boolean; setLogin(on: boolean): void; setTrayVisible(on: boolean): void; setDockVisible(on: boolean): void; loginOn(saved: boolean | undefined): boolean; /** the Mac's full name */ macName(): string
/** quit and open again, for a permission the Mac applies only then; false when it can't now (recording) */
relaunch(): boolean
@@ -31,10 +35,12 @@ export function hookPreferences(d: { file: string; permissions: Permissions; ask
if (d.slowStartMs) await new Promise((r) => setTimeout(r, d.slowStartMs))
const s = loadSettings(d.file)
if (!d.ask || s.welcomed) return { intro: false, steps: [] }
- return firstRunPlan({ ask: d.ask, welcomed: !!s.welcomed, introSeen: !!s.introSeen, status: await d.permissions.status(), kinds })
+ const p = await firstRunPlan({ ask: d.ask, welcomed: !!s.welcomed, introSeen: !!s.introSeen, status: await d.permissions.status(), kinds })
+ firstRunShowing = p.intro || p.steps.length > 0
+ return p
})()))
ipcMain.handle('onboarding:intro-seen', () => { updateSettings(d.file, { introSeen: true }) })
- ipcMain.handle('onboarding:done', () => { updateSettings(d.file, { welcomed: true }) })
+ ipcMain.handle('onboarding:done', () => { firstRunShowing = false; updateSettings(d.file, { welcomed: true }) })
// home's Finish setup: what wasn't put away (fake mode, like the first run, only when a test sets the permissions)
ipcMain.handle('onboarding:nudge', async () => (d.ask ? nudge(await d.permissions.status(), loadSettings(d.file).setupDismissed ?? [], kinds) : []))
ipcMain.handle('onboarding:dismiss-nudge', async () => {
diff --git a/app/src/main/watch.ts b/app/src/main/watch.ts
index d242b6c9..b180d444 100644
--- a/app/src/main/watch.ts
+++ b/app/src/main/watch.ts
@@ -11,6 +11,8 @@ export type WatchDeps = {
bindApp(id: string, app: string): Meeting | undefined
/** offer to take notes */
offer(p: Prompt): void
+ /** the first run is set up (onboarding done): until then no call is offered, the mic and models may not be ready */
+ ready?(): boolean
/** ask whether to stop */
askStop(m: Meeting): void
/** take down whichever card is up */
@@ -78,7 +80,7 @@ export class Watcher {
for (const k of [...this.dismissed]) {
if (k.startsWith('app:') && !s.micApps.some((m) => callAppName(k.slice(4)) === callAppName(m.bundleId, s.runningApps))) this.dismissed.delete(k)
}
- const p = decide(s, now, this.dismissed)
+ const p = this.d.ready && !this.d.ready() ? null : decide(s, now, this.dismissed)
if (!p) { if (this.shown) { this.shown = null; this.d.hide() } return }
if (this.shown === p.key) return
this.shown = p.key
diff --git a/app/test/watch.test.ts b/app/test/watch.test.ts
index 3c0e18a4..0a6cd48a 100644
--- a/app/test/watch.test.ts
+++ b/app/test/watch.test.ts
@@ -35,6 +35,17 @@ beforeEach(() => {
})
describe('start cards', () => {
+ it('offers nothing while the first run is still being set up, then offers the call once it is done', async () => {
+ let ready = false
+ const x = new Watcher({ read: async () => reading, now: () => clock, active: () => active, bindApp: (_id, app) => (active = { ...active!, app }),
+ offer: (p) => log.push('offer:' + p.key), askStop: () => log.push('stop'), hide: () => log.push('hide'), ready: () => ready })
+ reading = { micApps: [zoom], events: [] }
+ await x.tick(); await x.tick()
+ expect(log).toEqual([])
+ ready = true
+ await x.tick()
+ expect(log).toEqual(['offer:app:us.zoom.xos'])
+ })
it('offers once per meeting, not on every tick', async () => {
reading = { micApps: [zoom], events: [ev()] }
await w.tick(); await w.tick(); await w.tick()