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.

Agenda: every timed event offers Prepare note and Take notes, solo blocks included

Eric Brownrout572723433e7a
diff --git a/app/e2e/agendaTimeline.spec.ts b/app/e2e/agendaTimeline.spec.ts
index 7fe180a8..2e1fc988 100644
--- a/app/e2e/agendaTimeline.spec.ts
+++ b/app/e2e/agendaTimeline.spec.ts
@@ -92,7 +92,7 @@ test('granting calendar access initializes the timeline after events arrive, inc
await page.getByTestId('event').last().getByTestId('event-details').click()
const details = page.getByTestId('event-details-content')
await expect(details.getByRole('heading')).toHaveText('Earlier 17')
- await expect(details.getByTestId('event-open')).toHaveCount(0)
+ await expect(details.getByTestId('event-open')).toHaveText('Prepare note')
await expect(page.getByTestId('event-start')).toHaveCount(0)
expect(await page.evaluate(() => window.yogurt.meetings.cards({ limit: 10 }))).toEqual([])
await page.keyboard.press('Escape')
@@ -100,3 +100,39 @@ test('granting calendar access initializes the timeline after events arrive, inc
await expect(page.getByTestId('event').last().getByTestId('event-details')).toBeFocused()
} finally { await app.close() }
})
+
+test('a solo timed block can be prepared and then recorded from its agenda details', async () => {
+ const app = await electron.launch({ args: [join(import.meta.dirname, '../out/main/index.js')], env: {
+ ...process.env, YOGURT_FAKE: '1', YOGURT_USER_DATA: mkdtempSync(join(tmpdir(), 'agenda-solo-')),
+ } })
+ try {
+ const page = await app.firstWindow()
+ await expect(page.getByTestId('home')).toBeVisible()
+ const now = new Date(); now.setHours(12, 0, 0, 0)
+ const start = +now + 60_000
+ await page.clock.setFixedTime(now)
+ await app.evaluate(async (_e, now) => {
+ await (globalThis as any).__fake__.advance(now - Date.now())
+ ;(globalThis as any).__fake__.calendarEvents([{ id: 'solo', title: 'Focus block', start: new Date(now + 60_000).toISOString(), end: new Date(now + 1_800_000).toISOString(), attendees: [], url: null }])
+ }, +now)
+ await page.reload()
+ await page.getByTestId('event-details').click()
+ const action = page.getByTestId('event-details-content').getByTestId('event-open')
+ await expect(action).toHaveText('Prepare note')
+ await action.click()
+ await expect(page.getByTestId('note')).toBeVisible()
+ const [prepared] = await page.evaluate(() => window.yogurt.meetings.cards({ limit: 10 }))
+ expect(prepared.state).toBe('prepared')
+ await page.getByTestId('nav-home').click()
+ await page.clock.setFixedTime(start)
+ await app.evaluate(async () => { await (globalThis as any).__fake__.advance(60_000) })
+ await page.reload()
+ await page.getByTestId('event-details').click()
+ await expect(action).toHaveText('Take notes')
+ await action.click()
+ await expect(page.getByTestId('note-state')).toHaveAttribute('data-state', 'recording')
+ const notes = await page.evaluate(() => window.yogurt.meetings.cards({ limit: 10 }))
+ expect(notes).toHaveLength(1)
+ expect(notes[0].id).toBe(prepared.id)
+ } finally { await app.close() }
+})
diff --git a/app/e2e/home.spec.ts b/app/e2e/home.spec.ts
index 1397d73e..9f3ef6a6 100644
--- a/app/e2e/home.spec.ts
+++ b/app/e2e/home.spec.ts
@@ -145,7 +145,8 @@ test('agenda opens details on demand and the title bar records the current event
await event('Earlier meeting').getByTestId('event-details').click()
await expect(page.getByTestId('home')).toBeVisible()
await expect(details.getByRole('heading')).toHaveText('Earlier meeting')
- await expect(details.getByTestId('event-open')).toHaveCount(0)
+ await expect(details.getByTestId('event-open')).toHaveText('Prepare note')
+ await expect(details.getByTestId('event-open')).toBeVisible()
expect(await page.evaluate(() => window.yogurt.meetings.cards({ limit: 50 }))).toEqual([])
await details.getByRole('button', { name: 'Close', exact: true }).click()
@@ -491,6 +492,7 @@ test('agenda detail cards support keyboard entry, dismissal and return focus wit
const { app, page } = await launch()
try {
const at = new Date(); at.setHours(12, 0, 0, 0)
+ await page.clock.setFixedTime(at.getTime() - 60_000)
const base = { start: at.toISOString(), end: new Date(at.getTime() + 30 * 60_000).toISOString() }
await fake(app, 'calendarEvents', [
{ ...base, id: 'no-details', title: 'Focus time', attendees: [], url: ' ' },
@@ -504,7 +506,8 @@ test('agenda detail cards support keyboard entry, dismissal and return focus wit
await expect(details.getByRole('heading')).toHaveText('Focus time')
await expect(details).toContainText('12:00 PM – 12:30 PM')
await expect(details.getByRole('link')).toHaveCount(0)
- await expect(details.getByTestId('event-open')).toHaveCount(0)
+ await expect(details.getByTestId('event-open')).toHaveText('Prepare note')
+ await expect(details.getByTestId('event-open')).toBeVisible()
expect(await details.evaluate(el => el.matches(':modal'))).toBe(false)
await expect(details.getByRole('heading')).toBeFocused()
await expect(details.getByRole('button', { name: 'Close', exact: true })).not.toBeFocused()
diff --git a/app/src/shared/agendaNote.ts b/app/src/shared/agendaNote.ts
index f8614b65..9165ff5f 100644
--- a/app/src/shared/agendaNote.ts
+++ b/app/src/shared/agendaNote.ts
@@ -4,10 +4,8 @@ export const resumesNote = (note: AgendaEvent['note']): boolean => note?.state =
export function agendaNoteAction(event: AgendaEvent, recording: MeetingCard | undefined, now: number): 'start' | 'open' | 'prepare' | null {
const note = recording?.eventId === event.id ? recording : event.note
- const meeting = event.attendees.length > 0 || !!event.url?.trim() // EventKit already excludes the owner.
- if (meeting && !recording && (!note || note.state === 'prepared') && event.start <= now && event.end > now) return 'start'
- if (note) return 'open'
- return meeting ? 'prepare' : null
+ if (!recording && (!note || note.state === 'prepared') && event.start <= now && event.end > now) return 'start'
+ return note ? 'open' : 'prepare'
}
export const DAY_MS = 86_400_000
diff --git a/app/test/agendaNote.test.ts b/app/test/agendaNote.test.ts
index 03fd7aa8..7c6117e6 100644
--- a/app/test/agendaNote.test.ts
+++ b/app/test/agendaNote.test.ts
@@ -9,13 +9,14 @@ it('resumes only stopped or completed notes', () => {
expect(resumesNote({ id: 'note', state })).toBe(state === 'stopped' || state === 'done')
}
})
-it('offers one note action and leaves solo blocks alone', () => {
+it('offers one note action, solo blocks included', () => {
expect(agendaNoteAction(event, undefined, 50)).toBe('prepare')
expect(agendaNoteAction(event, undefined, 150)).toBe('start')
expect(agendaNoteAction({ ...event, note: { id: 'note', state: 'done' } }, undefined, 150)).toBe('open')
expect(agendaNoteAction({ ...event, note: { id: 'note', state: 'prepared' } }, undefined, 150)).toBe('start')
- expect(agendaNoteAction({ ...event, attendees: [] }, undefined, 150)).toBeNull()
- expect(agendaNoteAction({ ...event, attendees: [], url: 'https://meet.google.com/abc' }, undefined, 50)).toBe('prepare')
+ expect(agendaNoteAction({ ...event, attendees: [] }, undefined, 50)).toBe('prepare')
+ expect(agendaNoteAction({ ...event, attendees: [] }, undefined, 150)).toBe('start')
+ expect(agendaNoteAction({ ...event, attendees: [], url: 'https://example.com/meeting' }, undefined, 50)).toBe('prepare')
})
describe('unused prepared notes', () => {
const empty = { state: 'prepared', eventEnd: 0, openedAt: 0, mine: '', enhanced: null, segments: 0, userEdited: false }