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
Command palette: recent meetings, a preview, Ask for questions, and filters for people and dates
Eric Brownrout978360080559
diff --git a/app/e2e/askNaming.spec.ts b/app/e2e/askNaming.spec.tsindex 4330a617..0feed9e2 100644--- a/app/e2e/askNaming.spec.ts+++ b/app/e2e/askNaming.spec.ts@@ -31,9 +31,9 @@ for (const locale of ['en', 'ar'] as const) for (const theme of ['light', 'dark'await page.screenshot({ path: info.outputPath(`ask-${locale}-${theme}-page.png`) })await page.keyboard.press('Meta+k')await page.getByTestId('search-input').fill(ask)- await expect(page.locator('.command-row')).toHaveCount(2)- await expect(page.getByTestId('search').getByRole('option').first()).toHaveAttribute('id', 'search-ask')- await expect(page.getByTestId('search-ask')).toContainText(ask)+ await expect(page.locator('.command-row')).toHaveCount(1)+ await expect(page.getByTestId('search').getByRole('option').first()).toHaveAttribute('id', 'command-chat')+ await expect(page.getByTestId('search-secondary-hint')).toContainText(ask)await expect(page.getByTestId('command-chat')).toContainText(ask)await expect(page.getByTestId('command-chat')).toContainText('⌘2')await page.screenshot({ path: info.outputPath(`ask-${locale}-${theme}-commands.png`) })diff --git a/app/e2e/commands.spec.ts b/app/e2e/commands.spec.tsindex 1ae962af..e56815ae 100644--- a/app/e2e/commands.spec.ts+++ b/app/e2e/commands.spec.ts@@ -14,6 +14,75 @@ async function launch(env: Record<string, string> = {}) {return { app, page }}+for (const theme of ['light', 'dark'] as const) {+ test(`palette captures in ${theme}`, async ({}, testInfo) => {+ const { app, page } = await launch({ YOGURT_SYSTEM_LANGUAGES: 'en' })+ try {+ const meetingIds = await app.evaluate(() => {+ const fake = (globalThis as unknown as { __fake__: { chatMeetings(): Promise<string[]>; manyMeetings(opts: { n: number; clean: boolean }): void } }).__fake__+ fake.manyMeetings({ n: 2, clean: true })+ return fake.chatMeetings()+ })+ await page.evaluate(async ({ meetingIds, theme }) => {+ const folder = await window.yogurt.folders.create('Product', { color: 'teal', icon: 'folder' })+ await window.yogurt.folders.addMany(folder!.id, meetingIds)+ await window.yogurt.settings.setTheme(theme)+ }, { meetingIds, theme })+ await page.reload()+ await expect(page.getByTestId('past-note').first()).toBeVisible()+ await page.emulateMedia({ colorScheme: theme, reducedMotion: 'reduce' })+ await page.keyboard.press('ControlOrMeta+k')+ const palette = page.getByTestId('search'), input = palette.getByRole('combobox')+ await input.fill('appearance')+ await expect(palette.getByTestId(`command-theme-${theme}`)).toHaveAttribute('aria-current', 'true')+ await expect(input).toHaveCSS('color', theme === 'dark' ? 'rgb(231, 230, 235)' : 'rgb(41, 41, 44)')+ await input.fill('')+ const results = palette.getByRole('listbox'), options = results.getByRole('option')+ const emptyInputWidth = await input.evaluate(el => el.clientWidth)+ const capture = async (state: string) => {+ await expect(results).toHaveAttribute('aria-busy', 'false')+ await expect(options.locator('kbd')).toHaveCount(1)+ await expect(palette.locator('.search-header svg:not(.search-filters svg)')).toHaveCount(0)+ expect(await input.evaluate(el => el.clientWidth)).toBe(emptyInputWidth)+ const clip = await palette.evaluate(el => {+ const { x, y, width, height } = el.getBoundingClientRect()+ const margin = 16+ return { x: Math.round(x) - margin, y: Math.round(y) - margin,+ width: Math.round(width) + 2 * margin, height: Math.round(height) + 2 * margin }+ })+ await page.screenshot({ clip, animations: 'disabled', path: testInfo.outputPath(`palette-${state}-${theme}.png`) })+ }+ await expect(input).toHaveAttribute('placeholder', 'Ask, search, or open a meeting…')+ await expect(options).toHaveCount(3)+ await expect(results.locator('.command-section')).toHaveText(['Recent meetings'])+ await capture('empty')+ await input.fill('Launch planning')+ const meeting = results.getByTestId('search-result')+ await expect(meeting).toHaveCount(1)+ await expect(meeting).toContainText('Bo Park')+ await expect(meeting.locator('[data-folder-color=teal]')).toBeVisible()+ await expect(meeting).toHaveAccessibleDescription(/The site goes live on Tuesday/)+ await capture('meeting')+ await input.fill('What did we decide about the launch?')+ await expect(options.first()).toHaveAttribute('id', 'search-ask')+ await expect(input).toHaveAttribute('aria-activedescendant', 'search-ask')+ await expect(palette.getByTestId('search-preview')).toHaveCount(0)+ await capture('question')+ await input.fill('with Bo past 7 days')+ await expect(palette.getByTestId('search-person-highlight')).toHaveText('with Bo')+ await expect(palette.getByTestId('search-date-highlight')).toHaveText('past 7 days')+ await expect(palette.getByTestId('search-person-filter')).toContainText('Bo Park')+ await expect(palette.getByTestId('search-date')).toBeVisible()+ await expect(meeting).toHaveText(/Launch planning/)+ await capture('person-date')+ await input.fill('dark')+ await expect(input).toHaveAttribute('aria-activedescendant', 'command-theme-dark')+ await expect(results.locator('.command-section')).toHaveText(['Appearance'])+ await capture('command')+ } finally { await app.close() }+ })+}+test('@everywhere search returns focus with the same ring the opener had', async () => {const { app, page } = await launch({ YOGURT_BACKGROUND: process.env.YOGURT_BACKGROUND ?? '1' })try {@@ -124,6 +193,7 @@ test('the sidebar shortcut, native View menu, command palette and shortcut referawait clickMenu()await expect(toggle).toHaveAttribute('aria-expanded', 'true')await page.keyboard.press('Meta+k')+ await page.getByTestId('search-input').fill('sidebar')const command = page.getByTestId('command-sidebar')await expect(command).toContainText('Hide Sidebar')await expect(command.locator('.search-shortcut')).toHaveText('⌃⌘S')@@ -163,7 +233,9 @@ test('page shortcuts are taught in the palette, work there, and respect modal ed['settings', '⌘,', 'Meta+,', 'settings'], ['meetings', '⌘1', 'Meta+1', 'home'],]) {await page.keyboard.press('Meta+k')+ await page.getByTestId('search-input').fill(id)const command = page.getByTestId(`command-${id}`)+ await command.hover()await expect(command.locator('.search-shortcut')).toHaveText(shortcut)expect((await command.locator('.search-shortcut').boundingBox())!.x).toBeGreaterThan((await command.locator('.command-label').boundingBox())!.x)await page.keyboard.press(key)@@ -270,24 +342,25 @@ test('command ranking controls visible order, selection and Enter alongside matc]) {await input.fill(query)await expect(results).toHaveAttribute('aria-busy', 'false')- await expect(options.first()).toHaveAttribute('id', query ? 'search-ask' : expected)+ await expect(options.first()).toHaveAttribute('id', `search-${id}`)await expect(results.locator('[aria-selected="true"]')).toHaveAttribute('id', expected)await expect(input).toHaveAttribute('aria-activedescendant', expected)- await expect(results.locator('[aria-selected="true"] .search-return')).toBeVisible()+ await expect(results.locator('[aria-selected="true"] kbd')).toBeVisible()await expect(page.getByTestId('search-result')).toHaveCount(1)}// Clearing resets settling; equal command scores keep their original order, including folders.await input.fill('')await expect(results).toHaveAttribute('aria-busy', 'false')await input.fill('dark')- await expect(options).toHaveCount(4)+ await expect(options).toHaveCount(3)await expect(input).toHaveAttribute('aria-activedescendant', `command-folder-${folder!.id}`)await expect(options.nth(1)).toHaveAttribute('id', `command-folder-${folder!.id}`)await expect(options.nth(2)).toHaveAttribute('id', 'command-theme-dark')- await expect(options.nth(3)).toHaveAttribute('id', `search-${id}`)+ await expect(options.first()).toHaveAttribute('id', `search-${id}`)await page.keyboard.press('ArrowDown')await expect(input).toHaveAttribute('aria-activedescendant', 'command-theme-dark')- await page.keyboard.press('ArrowDown')+ await page.keyboard.press('ArrowUp')+ await page.keyboard.press('ArrowUp')await expect(input).toHaveAttribute('aria-activedescendant', `search-${id}`)await page.keyboard.press('Enter')await expect(page.getByTestId('search')).toHaveCount(0)@@ -307,7 +380,8 @@ test('Enter during a pending search follows command ranking', async () => {await page.evaluate(id => window.yogurt.meetings.rename(id, 'Dark mode planning'), id)await page.evaluate(() => window.yogurt.settings.setTheme('light'))await page.keyboard.press('Meta+k')- await expect(page.getByTestId('command-theme-dark')).toBeVisible()+ await expect(page.getByTestId('search-input')).toBeFocused()+ await expect(page.getByTestId('command-theme-dark')).toHaveCount(0)await page.getByTestId('search-input').fill('dark')await page.keyboard.press('Enter')await expect(page.getByTestId('search')).toHaveCount(0)@@ -368,45 +442,23 @@ test('a parsed date chip can be removed with its button or Backspace', async ()} finally { await app.close() }})-test('the input stays icon-free, row icons and hints stay fixed, and the secondary shortcut sends to Ask', async () => {+test('selection updates the shortcut and footer, and the secondary shortcut sends to Ask', async () => {const { app, page } = await launch()try {await page.keyboard.press('Meta+k')const input = page.getByTestId('search-input')await expect(input).toBeFocused()- const glyphs = await page.locator('.search-row>svg, .search-row>.folder-glyph>svg').evaluateAll(icons => icons.map(icon => {- const style = getComputedStyle(icon)- const folder = icon.closest('.folder-glyph')- return { size: [parseFloat(style.width), parseFloat(style.height)], stroke: icon.getAttribute('stroke-width'), color: style.color, folderColor: folder && getComputedStyle(folder).color }- }))- expect(glyphs.length).toBeGreaterThan(0)- const commandColor = glyphs.find(glyph => !glyph.folderColor)?.color- for (const glyph of glyphs) {- expect(glyph.size).toEqual([16, 16])- expect(glyph.stroke).toBe(String(ICON_STROKE_WIDTH))- expect(glyph.color).toBe(glyph.folderColor ?? commandColor)- }- const hints = await page.locator('.search-footer').textContent()- for (const query of ['s', 'se', 'set', 'settings', 'why', 'why now?']) {- await input.fill(query)- await expect(page.locator('.search-footer')).toHaveText(hints!)- await expect(page.locator('.search-input-row svg')).toHaveCount(0)- }await input.fill('settings')- await expect(page.getByTestId('command-settings')).toHaveAttribute('aria-selected', 'true')- await expect(page.locator('.search-input-row svg')).toHaveCount(0)- const settingsIcon = await page.getByTestId('command-settings').locator('svg').innerHTML()- const askIcon = await page.getByTestId('search-ask').locator('svg').innerHTML()- await expect(page.getByTestId('search-primary-hint')).toHaveText('↵Select')- await expect(page.getByTestId('search-secondary-hint')).toContainText('Ask')- await page.keyboard.press('ArrowUp')- await expect(page.getByTestId('search-ask')).toHaveAttribute('aria-selected', 'true')- await expect(page.locator('.search-input-row svg')).toHaveCount(0)- expect(await page.getByTestId('command-settings').locator('svg').innerHTML()).toBe(settingsIcon)- expect(await page.getByTestId('search-ask').locator('svg').innerHTML()).toBe(askIcon)- await expect(page.getByTestId('search-primary-hint')).toHaveText('↵Select')+ const settings = page.getByTestId('command-settings')+ await expect(settings).toHaveAttribute('aria-selected', 'true')+ await expect(settings.locator('.search-shortcut')).toHaveText('⌘,')+ await expect(settings.locator('svg')).toHaveAttribute('stroke-width', String(ICON_STROKE_WIDTH))+ await expect(page.getByTestId('search-primary-hint')).toHaveText('↵Go to')await expect(page.getByTestId('search-secondary-hint')).toContainText('Ask')await page.keyboard.press('ArrowDown')+ await expect(settings.locator('kbd')).toHaveCount(0)+ await expect(page.getByTestId('search-primary-hint')).toHaveText('↵Select')+ await expect(page.locator('[role=option] kbd')).toHaveCount(1)await page.keyboard.press('Meta+Enter')await expect(page.getByTestId('search')).toHaveCount(0)await expect(page.getByTestId('chat-page-question')).toHaveText('settings')@@ -531,7 +583,7 @@ test('bracket history works in both directions, branches correctly, and keeps a} finally { await app.close() }})-test('typing keeps the palette frame steady and replaces meeting and command results together', async () => {+test('typing keeps the input anchored and replaces meeting and command results together', async () => {const { app, page } = await launch({ YOGURT_FAKE_SEARCH_SLOW: '1' })try {await app.evaluate(() => (globalThis as unknown as { __fake__: { manyMeetings(n: number): void } }).__fake__.manyMeetings(8))@@ -542,30 +594,30 @@ test('typing keeps the palette frame steady and replaces meeting and command resconst input = page.getByTestId('search-input')await expect(palette.getByTestId('search-result')).toHaveCount(3)await page.evaluate(() => {- const frames: number[][] = []+ const frames: number[] = []const measure = () => {const panel = document.querySelector('[data-testid=search]')if (!panel) return- const p = panel.getBoundingClientRect(), footer = panel.querySelector('.search-footer')!.getBoundingClientRect()- frames.push([p.y, p.height, footer.y])+ frames.push(panel.querySelector('input')!.getBoundingClientRect().y)requestAnimationFrame(measure)}- ;(window as unknown as { paletteFrames: number[][] }).paletteFrames = frames+ ;(window as unknown as { paletteFrames: number[] }).paletteFrames = framesrequestAnimationFrame(measure)})await input.fill('sett')// While the delayed search is pending, retain one coherent result set instead of clearing its rows.await page.waitForTimeout(250)await expect(palette.getByTestId('search-result')).toHaveCount(3)- await expect(palette.getByTestId('command-meetings')).toHaveCount(1)+ await expect(palette.getByTestId('command-settings')).toHaveCount(0)await expect(palette.getByTestId('search-result')).toHaveCount(0)await expect(palette.getByTestId('command-settings')).toBeVisible()await expect(palette.getByTestId('command-meetings')).toHaveCount(0)await input.fill('zzqx')- await expect(palette.getByRole('option')).toHaveCount(1)- await expect(palette.getByTestId('search-ask')).toHaveAttribute('aria-selected', 'true')- const frames = await page.evaluate(() => (window as unknown as { paletteFrames: number[][] }).paletteFrames)- for (const i of [0, 1, 2]) expect(Math.max(...frames.map(f => f[i])) - Math.min(...frames.map(f => f[i]))).toBeLessThan(1)+ await expect(palette.getByTestId('search-none')).toHaveText('No matches')+ await expect(palette.getByRole('option')).toHaveCount(0)+ await expect(palette.getByTestId('search-primary-hint')).toContainText('Ask')+ const frames = await page.evaluate(() => (window as unknown as { paletteFrames: number[] }).paletteFrames)+ expect(Math.max(...frames) - Math.min(...frames)).toBeLessThan(1)// Enter during a pending query uses the new command, not the retained results.await input.fill('settings')await page.keyboard.press('Enter')@@ -573,6 +625,49 @@ test('typing keeps the palette frame steady and replaces meeting and command res} finally { await app.close() }})+test('typing keeps the settled rows, hints and panel height between keystrokes', async () => {+ const { app, page } = await launch()+ try {+ await app.evaluate(() => (globalThis as unknown as { __fake__: { manyMeetings(n: number): void } }).__fake__.manyMeetings(1))+ await page.reload()+ await expect(page.getByTestId('past-note')).toBeVisible()+ await page.emulateMedia({ reducedMotion: 'reduce' })+ await page.keyboard.press('Meta+k')+ const panel = page.getByTestId('search'), input = panel.getByRole('combobox'), list = panel.getByRole('listbox')+ for (const [prefix, suffix, marker, label, hint] of [+ ['uncr', 'ates', 'search-none', 'No matches', '↵Ask'],+ ['bud', 'get', 'search-result', 'Budget review', '↵Open note'],+ ]) {+ await input.fill(prefix)+ await expect(list).toHaveAttribute('aria-busy', 'false')+ await expect(panel.getByTestId(marker)).toContainText(label)+ await expect(panel.getByTestId('search-primary-hint')).toHaveText(hint)+ const observation = await panel.evaluateHandle((el, marker) => {+ const row = el.querySelector(`[data-testid="${marker}"]`)!+ const footer = el.querySelector('.search-footer')!+ const height = el.getBoundingClientRect().height, hints = footer.textContent+ const changes = new Set<string>()+ let searches = 0+ const observer = new MutationObserver(records => {+ searches += records.filter(r => r.attributeName === 'aria-busy' && r.oldValue === 'false').length+ if (!row.isConnected) changes.add('result detached')+ if (el.getBoundingClientRect().height !== height) changes.add('panel height changed')+ if (footer.textContent !== hints) changes.add('footer hints changed')+ })+ observer.observe(el, { subtree: true, childList: true, characterData: true, attributeFilter: ['aria-busy'], attributeOldValue: true })+ return () => { observer.disconnect(); return { searches, changes: [...changes] } }+ }, marker)+ for (const key of suffix) {+ await input.press(key)+ await expect(list).toHaveAttribute('aria-busy', 'false')+ }+ expect(await observation.evaluate(finish => finish())).toEqual({ searches: suffix.length, changes: [] })+ await expect(input).toHaveValue(prefix + suffix)+ await observation.dispose()+ }+ } finally { await app.close() }+})+test('shortcut help opens from the palette and its footer, is searchable, and closes with Escape', async () => {const { app, page } = await launch()try {@@ -674,7 +769,7 @@ test('the palette recovers from a rejected read', async () => {ipcMain.handle('search:query', (_event, q: string) => {if (q !== 'Planning') return []if (!available) throw new Error('Read failed')- return [{ meetingId: 'planning', title: 'Planning review', startedAt: 1, parts: [] }]+ return [{ meetingId: 'planning', title: 'Planning review', startedAt: 1, parts: [], attendees: [], preview: '' }]})}, available)await setAvailable(false)diff --git a/app/e2e/folders.spec.ts b/app/e2e/folders.spec.tsindex 3f458fa0..41eb4097 100644--- a/app/e2e/folders.spec.ts+++ b/app/e2e/folders.spec.ts@@ -460,7 +460,7 @@ test('a meeting row dragged onto a folder goes into it; ⌘K on a folder page loawait expect(page.getByTestId('search-result')).toHaveCount(2)await page.keyboard.type('budget')await expect(page.getByTestId('search-result')).toHaveCount(0)- await expect(page.getByTestId('search-ask')).toHaveAttribute('aria-selected', 'true')+ await expect(page.getByTestId('search-primary-hint')).toHaveText('↵Ask')await page.getByTestId('search-scope-clear').click()await expect(page.getByTestId('search-result').first()).toContainText('Budget review')await expect(page.getByTestId('search-input')).toBeFocused()diff --git a/app/e2e/home.spec.ts b/app/e2e/home.spec.tsindex 97515fa9..1c8520b6 100644--- a/app/e2e/home.spec.ts+++ b/app/e2e/home.spec.ts@@ -429,7 +429,7 @@ test('search: from any screen, as you type, arrows and Enter, Esc closes; a slowawait expect(search).toBeVisible()await page.keyboard.type('zzqx')await expect(search.getByTestId('search-result')).toHaveCount(0)- await expect(search.getByTestId('search-ask')).toHaveAttribute('aria-selected', 'true')+ await expect(search.getByTestId('search-primary-hint')).toHaveText('↵Ask')await page.keyboard.press('Escape')await expect(search).toHaveCount(0)} finally { await app.close() }diff --git a/app/e2e/libraryChat.spec.ts b/app/e2e/libraryChat.spec.tsindex 886280ea..97821696 100644--- a/app/e2e/libraryChat.spec.ts+++ b/app/e2e/libraryChat.spec.ts@@ -141,8 +141,10 @@ test('a follow-up stays in the chat; New chat starts another; chats can be renamconst recentTime = recentRow.locator('time')await expect(recentTime).toHaveCSS('opacity', '1')await expect(recentRow.getByTestId('chat-menu')).toHaveCSS('opacity', '0')- // the rows animate in too: every animation in the list settles before the time is measured- const settled = () => page.getByTestId('chat-recent-list').evaluate(el => Promise.allSettled(el.getAnimations({ subtree: true }).map(a => a.finished)))+ const recentList = page.getByTestId('chat-recent-list')+ // The popup starts at 97% scale before its entrance transition appears in getAnimations().+ await expect(recentList).toHaveCSS('transform', 'none')+ const settled = () => recentList.evaluate(el => Promise.allSettled(el.getAnimations({ subtree: true }).map(a => a.finished)))await settled()const timeBox = await recentTime.boundingBox()await page.getByTestId('chat-history-item').nth(1).hover()diff --git a/app/src/main/index.ts b/app/src/main/index.tsindex 754aabb8..ce9a233c 100644--- a/app/src/main/index.ts+++ b/app/src/main/index.ts@@ -1285,12 +1285,18 @@ app.whenReady().then(() => {const sp = isId(folder) ? folder : undefined// fake mode: short questions answer late, so a test can see an older answer never replace a newer oneif (isFake() && process.env.YOGURT_FAKE_SEARCH_SLOW === '1' && query.trim().length <= 4) await new Promise((r) => setTimeout(r, 1000))- const hits = query.trim() || personSearch ? store.search(query, personSearch ? Infinity : 30, sp, { locale: app.getLocale(), language: uiLanguage(), people }) : store.meetingCards({ limit: 3, folder: sp }).map((c) => ({ meetingId: c.id, snippet: '', parts: [] }))- return hits.flatMap((h) => {- const m = store.meeting(h.meetingId)- if (!m) return []- const parts = h.parts.length ? h.parts : [{ text: store.preview(m.id), hit: false }]- return [{ meetingId: m.id, title: m.title, startedAt: m.startedAt, confident: 'confident' in h ? h.confident : false, parts: parts.filter((p) => p.text) }]+ const hits = query.trim() || personSearch+ ? store.search(query, personSearch ? Infinity : 30, sp, { locale: app.getLocale(), language: uiLanguage(), people })+ : undefined+ if (hits && !hits.length) return []+ const cards = store.meetingCards({ limit: hits?.length ?? 3, folder: sp, ids: hits?.map(h => h.meetingId) })+ const byId = new Map(cards.map(c => [c.id, c]))+ return (hits ?? cards.map(c => ({ meetingId: c.id, parts: [], confident: false }))).flatMap(hit => {+ const card = byId.get(hit.meetingId)+ if (!card) return []+ const folder = card.folders?.find(f => f.id === sp) ?? card.folders?.[0]+ return [{ meetingId: card.id, title: card.title, startedAt: card.startedAt, attendees: card.attendees,+ folder, preview: card.preview, parts: hit.parts, confident: hit.confident }]})})// the window's own moves (home, a note from the list): remembered here so a reload stays where it wasdiff --git a/app/src/main/store.ts b/app/src/main/store.tsindex 501d695a..bcabb2f9 100644--- a/app/src/main/store.ts+++ b/app/src/main/store.ts@@ -642,13 +642,14 @@ export class Store {}/** Past meetings for the home screen, newest first, a page at a time: before is the last card of the page before */- meetingCards({ before, limit, folder }: { before?: { at: number; id: string }; limit: number; /** only the meetings in this folder */ folder?: string }): MeetingCard[] {+ meetingCards({ before, limit, folder, ids }: { ids?: string[]; before?: { at: number; id: string }; limit: number; /** only the meetings in this folder */ folder?: string }): MeetingCard[] {const cols = `m.*, substr(n.mine, 1, 600) AS n_mine, substr(n.enhanced, 1, 600) AS n_enhanced,(SELECT json_group_array(json_object('id', id, 'name', name, 'icon', icon, 'color', color)) FROM(SELECT f.id, f.name, f.icon, f.color FROM folders f JOIN folder_meetings fm ON fm.folder_id = f.idWHERE fm.meeting_id = m.id ORDER BY f.name COLLATE NOCASE, f.created_at)) AS card_folders`- const from = `FROM meetings m LEFT JOIN notes n ON n.meeting_id = m.id${folder == null ? '' : ' JOIN folder_meetings sm ON sm.meeting_id = m.id AND sm.folder_id = ?'} WHERE m.trashed_at IS NULL`- const sp = folder == null ? [] : [folder]+ const from = `FROM meetings m LEFT JOIN notes n ON n.meeting_id = m.id${folder == null ? '' : ' JOIN folder_meetings sm ON sm.meeting_id = m.id AND sm.folder_id = ?'} WHERE m.trashed_at IS NULL+ ${ids ? 'AND m.id IN (SELECT value FROM json_each(?))' : ''}`+ const sp = [...(folder == null ? [] : [folder]), ...(ids ? [JSON.stringify(ids)] : [])]const rows = before == null? this.db.prepare(`SELECT ${cols} ${from} ORDER BY m.started_at DESC, m.id DESC LIMIT ?`).all(...sp, limit): this.db.prepare(`SELECT ${cols} ${from} AND (m.started_at < ? OR (m.started_at = ? AND m.id < ?)) ORDER BY m.started_at DESC, m.id DESC LIMIT ?`)diff --git a/app/src/renderer/src/components/Search.tsx b/app/src/renderer/src/components/Search.tsxindex df263f29..d082ae45 100644--- a/app/src/renderer/src/components/Search.tsx+++ b/app/src/renderer/src/components/Search.tsx@@ -13,7 +13,7 @@ import { markWords } from '../../../shared/highlight'import { dayLabel, timeOf } from '../dates'import { parseSearchQuery } from '../../../shared/searchQuery'import { completeSearchPerson, matchSearchPeople, removeSearchSpan, searchPersonKey, uniqueSearchPeople, type SearchPersonMatch } from '../../../shared/searchPeople'-import { searchPalette, searchSelectionKey } from '../searchRanking'+import { isSearchQuestion, searchPalette, searchSelectionKey } from '../searchRanking'import { searchDateCommand, searchDateLabel, searchFilterEmptyMessage, searchFilterHighlights } from '../searchFilters'/** typing settles this long before the search runs */@@ -48,8 +48,8 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,const selectedPeople = uniqueSearchPeople(personQuery.matches.map(m => m.person))const peopleKey = selectedPeople.map(searchPersonKey).join('|')const parsed = parseSearchQuery(personQuery.text, searchOptions)- const filtered = !!parsed.date || selectedPeople.length > 0- const [results, setResults] = useState<{ q: string; scopeId?: string; peopleKey: string; list: SearchResult[] }>()+ const request = { q, scope, peopleKey, people: selectedPeople, date: parsed.date, suggestions: personQuery.suggestions.slice(0, 5) }+ const [results, setResults] = useState<typeof request & { list: SearchResult[] }>()const [active, setActive] = useState<number | null>(null)const [prefs, setPrefs] = useState<Awaited<ReturnType<typeof window.yogurt.settings.get>>>()const [error, setError] = useState(false)@@ -77,13 +77,13 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,useEffect(() => {const scheduled = ++seq.currentsetQueryFailed(false)- const run = (request: number) => {+ const run = (sequence: number) => {// Enter or Retry can supersede this read before the debounce fires.- if (request !== seq.current) return+ if (sequence !== seq.current) returnvoid window.yogurt.search.query(q, scope?.id, selectedPeople).then(list => {- if (request !== seq.current) return- setQueryFailed(false); setResults({ q, scopeId: scope?.id, peopleKey, list }); setActive(null)- }, () => { if (request === seq.current) setQueryFailed(true) })+ if (sequence !== seq.current) return+ setQueryFailed(false); setResults({ ...request, list }); setActive(null)+ }, () => { if (sequence === seq.current) setQueryFailed(true) })}retry.current = () => run(++seq.current)if (!q.trim()) { run(scheduled); return }@@ -99,21 +99,20 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,useEffect(syncHighlight, [q])// Keep one coherent result set on screen until the next search is ready.- const typed = (results?.q ?? '').trim()- const settled = results?.q === q && results?.scopeId === scope?.id && results?.peopleKey === peopleKey- const items = results?.list ?? []+ const typed = results?.q.trim() ?? ''+ const settled = results?.q === q && results?.scope?.id === scope?.id && results?.peopleKey === peopleKey+ const shown = results ?? request+ const filtered = !!shown.date || shown.people.length > 0const navigate = (route: string) => { onNavigate(route) }const settingsAction = async (run: () => Promise<void>) => { await run(); onSettingsChange() }- const dateCommand = window.yogurt.capabilities.calendar ? searchDateCommand(parsed.date, q) : undefinedconst allCommands = [- ...(dateCommand ? [{ ...dateCommand, Icon: CalendarDays, run: () => onNavigate('', dateCommand.at) }] : []),{ id: 'meetings', label: t('Meetings'), group: t('Go to'), Icon: FileText, run: () => navigate(''), shortcut: keys('⌘1') },{ id: 'chat', synonyms: ['chat'], label: t('Ask'), group: t('Go to'), Icon: MessageCircle, run: () => navigate('/chat'), shortcut: keys('⌘2') },{ id: 'trash', label: t('Trash'), group: t('Go to'), Icon: Trash2, run: () => navigate('/trash'), shortcut: keys('⌘3') },{ id: 'settings', synonyms: ['preferences', 'prefs'], label: t('Settings'), group: t('Go to'), Icon: Settings, run: () => navigate('/settings'), shortcut: keys('⌘,') },{ id: 'shortcuts', label: t('Keyboard shortcuts'), group: t('Go to'), Icon: Keyboard, run: onShortcuts, shortcut: keys('⌘/') },- { id: 'sidebar', label: sidebarCollapsed ? t('Show Sidebar') : t('Hide Sidebar'), group: t('View'), Icon: PanelLeft, run: onToggleSidebar, shortcut: keys('⌃⌘S') },- ...(folders ?? []).map((f) => ({ id: `folder-${f.id}`, label: f.name, group: t('Folders'), Icon: FolderIcon, folder: f, run: () => navigate(`/folder/${f.id}`) })),+ { id: 'sidebar', label: sidebarCollapsed ? t('Show Sidebar') : t('Hide Sidebar'), group: t('Go to'), synonyms: [t('View')], Icon: PanelLeft, run: onToggleSidebar, shortcut: keys('⌃⌘S') },+ ...(folders ?? []).map((f) => ({ id: `folder-${f.id}`, label: f.name, group: t('Go to'), synonyms: [t('Folders')], Icon: FolderIcon, folder: f, run: () => navigate(`/folder/${f.id}`) })),{ id: 'theme-light', synonyms: ['theme', 'appearance', 'mode', 'light'], label: t('Light theme'), group: t('Appearance'), Icon: Sun, run: () => settingsAction(() => window.yogurt.settings.setTheme('light')) },{ id: 'theme-dark', synonyms: ['theme', 'appearance', 'mode', 'dark'], label: t('Dark theme'), group: t('Appearance'), Icon: Moon, run: () => settingsAction(() => window.yogurt.settings.setTheme('dark')) },{ id: 'theme-system', synonyms: ['theme', 'appearance', 'mode', 'system'], label: osWords({ mac: t('Match my Mac'), windows: t('Match Windows'), linux: t('Match my system') }), group: t('Appearance'), Icon: Monitor, run: () => settingsAction(() => window.yogurt.settings.setTheme('system')) },@@ -122,36 +121,40 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,{ id: 'auto-stop', label: prefs.stopWhenCallEnds ? t('Keep recording when the call ends') : t('Stop recording when the call ends'), group: t('Settings'), Icon: AudioLines, run: () => settingsAction(() => window.yogurt.settings.setStopWhenCallEnds(!prefs.stopWhenCallEnds)) },] : []),].filter((c) => !c.id.startsWith('theme-') || !!prefs)- const suggestions = matchSearchPeople(typed, people, chosenPeople, searchOptions).suggestions.slice(0, 5)const defaultSelection = useRef<string | undefined>(undefined)- const palette = searchPalette(allCommands, items, typed, q, suggestions, defaultSelection.current, filtered)+ const rank = (search: typeof request, list: SearchResult[]) => {+ const date = window.yogurt.capabilities.calendar && searchDateCommand(search.date, search.q)+ const commands = date ? [{ ...date, Icon: CalendarDays, run: () => onNavigate('', date.at) }, ...allCommands] : allCommands+ return searchPalette(commands, list, search.q, search.q, search.suggestions, defaultSelection.current, !!search.date || search.people.length > 0)+ }+ const palette = results ? rank(results, results.list) : { rows: [], active: 0 }const rows = palette.rowsconst count = rows.length- const activeIndex = active ?? palette.active+ const activeIndex = active !== null && rows[active] ? active : palette.activeconst selected = rows[activeIndex]useEffect(() => {- defaultSelection.current = q.trim() && rows[palette.active] ? searchSelectionKey(rows[palette.active]) : undefined+ if (settled) defaultSelection.current = typed && rows[palette.active] ? searchSelectionKey(rows[palette.active]) : undefined})- const dateLabel = parsed.date && searchDateLabel(parsed.date)- const clearDate = () => { if (parsed.dateSpan) setQ(removeSearchSpan(q, parsed.dateSpan)); setActive(null); input.current?.focus() }+ const dateLabel = shown.date && searchDateLabel(shown.date)+ const clearDate = () => { if (parsed.dateSpan) setQ(removeSearchSpan(q, parsed.dateSpan)); input.current?.focus() }const clearPerson = (person: Person) => {const key = searchPersonKey(person)setChosenPeople(current => current.filter(p => searchPersonKey(p) !== key))const match = personQuery.matches.find(m => searchPersonKey(m.person) === key)if (match) setQ(removeSearchSpan(q, match))- setActive(null); input.current?.focus()+ input.current?.focus()}const pickPerson = (choice: SearchPersonMatch) => {const match = personQuery.suggestions.find(m => searchPersonKey(m.person) === searchPersonKey(choice.person))if (!match) returnsetChosenPeople(current => uniqueSearchPeople([...current.filter(p => p.name !== match.person.name), match.person]))- setQ(completeSearchPerson(q, match)); setActive(null); input.current?.focus()+ setQ(completeSearchPerson(q, match)); input.current?.focus()}useEffect(() => {if (!scrollSelection.current) returnlist.current?.querySelector<HTMLElement>('[aria-selected="true"]')?.scrollIntoView({ block: 'nearest' })}, [activeIndex, results])- const runCommand = async (command: typeof allCommands[number]) => {+ const runCommand = async (command: Pick<typeof allCommands[number], 'id' | 'run'>) => {if (running) returnsetRunning(true); setError(false)try {@@ -172,11 +175,12 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,}const onKeyDown = (e: React.KeyboardEvent) => {if (e.nativeEvent.isComposing) return+ if (e.key === 'Enter' && command(e)) { e.preventDefault(); if (q.trim()) void ask(q.trim()); return }if ((e.key === 'Enter' || e.key === ' ') && e.target instanceof HTMLButtonElement) returnif (e.key === 'ArrowDown') { e.preventDefault(); scrollSelection.current = true; setActive(Math.min(Math.max(0, count - 1), activeIndex + 1)) }else if (e.key === 'ArrowUp') { e.preventDefault(); scrollSelection.current = true; setActive(Math.max(0, activeIndex - 1)) }else if (e.key === 'Backspace' && (parsed.date || selectedPeople.length) && e.target === input.current && input.current?.selectionStart === 0 && input.current.selectionEnd === 0) { e.preventDefault(); if (parsed.date) clearDate(); else clearPerson(selectedPeople[selectedPeople.length - 1]) }- else if (e.key === 'Enter') { e.preventDefault(); if (command(e)) { if (q.trim()) void ask(q.trim()) } else enter() }+ else if (e.key === 'Enter') { e.preventDefault(); enter() }else if (e.key === 'Escape') { e.preventDefault(); setOpen(false) }else if (e.key === 'Tab') {e.preventDefault()@@ -186,29 +190,32 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,controls[(at + (e.shiftKey ? -1 : 1) + controls.length) % controls.length]?.focus()}}- /** what is shown answers what is typed: open the one picked; typed faster than the search: ask now and open its first */+ const activate = (row: typeof rows[number] | undefined) => {+ if (row?.kind === 'meeting') onOpen(row.meeting.meetingId)+ else if (row?.kind === 'command') void runCommand(row.command)+ else if (row?.kind === 'person') pickPerson(row)+ else if (q.trim()) void ask(q.trim())+ }const enter = () => {- if (selected?.kind === 'person') { pickPerson(selected); return }- if (selected?.kind === 'ask' && active !== null) { void ask(selected.query); return }if (queryFailed && q.trim()) { void ask(q.trim()); return }- if (settled) {- if (selected?.kind === 'ask') void ask(selected.query)- else if (selected?.kind === 'meeting') onOpen(selected.meeting.meetingId)- else if (selected?.kind === 'command') void runCommand(selected.command)- return- }+ if (settled) { activate(selected); return }+ // Enter before the debounce finishes must act on the new query.+ if (isSearchQuestion(q)) { void ask(q.trim()); return }const mine = ++seq.current- void window.yogurt.search.query(q, scope?.id, selectedPeople).then((list) => {+ void window.yogurt.search.query(q, scope?.id, selectedPeople).then(list => {if (mine !== seq.current) return- const next = searchPalette(allCommands, list, q, q, personQuery.suggestions, defaultSelection.current, filtered)- const first = next.rows[next.active]- if (first?.kind === 'ask') void ask(first.query)- else if (first?.kind === 'meeting') onOpen(first.meeting.meetingId)- else if (first?.kind === 'command') void runCommand(first.command)- else { setQueryFailed(false); setResults({ q, scopeId: scope?.id, peopleKey, list }); setActive(null) }+ setQueryFailed(false); setResults({ ...request, list }); setActive(null)+ const next = rank(request, list)+ activate(next.rows[next.active])}).catch(() => { if (mine === seq.current) setQueryFailed(true) })}+ const enterAsks = queryFailed ? !!q.trim() : !!typed && !selected+ const primaryHint = enterAsks || selected?.kind === 'ask' ? t('Ask')+ : selected?.kind === 'meeting' ? t('Open note')+ : selected?.kind === 'command' && selected.command.group === t('Go to') && selected.command.id !== 'sidebar' ? t('Go to')+ : selected ? t('Select') : undefined+return (<Dialog.Root open={open} onOpenChange={setOpen}><Dialog.Portal keepMounted>@@ -216,27 +223,25 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,<MotionPopup ref={popupRef} initialFocus={input} finalFocus={false} data-testid="search" role="dialog" aria-modal="true" aria-label={t('Search and commands')} onKeyDown={onKeyDown}// a click anywhere in the panel keeps typing, arrows and Esc in the search boxonMouseDown={(e) => { if (e.target !== input.current) { e.preventDefault(); input.current?.focus() } }}- className="search-panel flex max-h-[74vh] w-full max-w-[640px] flex-col overflow-hidden rounded-2xl border border-line bg-float">+ className="search-panel flex max-h-[74vh] w-full flex-col overflow-hidden rounded-2xl border border-line bg-float"><div className="search-header">- <div className="search-input-row">- <div className="search-field">- <div ref={highlight} className="search-input-highlight" aria-hidden="true">- <span>{searchFilterHighlights(q, personQuery.matches, parsed.dateSpan).map((part, i) => part.kind- ? <mark key={i} data-testid={`search-${part.kind}-highlight`}>{part.text}</mark> : <Fragment key={i}>{part.text}</Fragment>)}</span>- </div>- <input- data-testid="search-input" ref={input} autoFocus value={q} onChange={(e) => { scrollSelection.current = true; setQ(e.target.value); setActive(null); setError(false) }} onScroll={syncHighlight}- placeholder={t('Search meetings or run a command…')} aria-label={t('Search')} spellCheck={false}- role="combobox" aria-expanded="true" aria-controls="search-results" aria-activedescendant={selected?.kind === 'meeting' ? `search-${selected.meeting.meetingId}` : selected?.kind === 'command' ? `command-${selected.command.id}` : selected?.kind === 'person' ? `search-person-${encodeURIComponent(searchPersonKey(selected.person))}` : selected ? 'search-ask' : undefined}- />+ <div className="search-field">+ <div ref={highlight} className="search-input-highlight" aria-hidden="true">+ <span>{searchFilterHighlights(q, personQuery.matches, parsed.dateSpan).map((part, i) => part.kind+ ? <mark key={i} data-testid={`search-${part.kind}-highlight`}>{part.text}</mark> : <Fragment key={i}>{part.text}</Fragment>)}</span></div>+ <input+ data-testid="search-input" ref={input} autoFocus value={q} onChange={(e) => { scrollSelection.current = true; setQ(e.target.value); setError(false) }} onScroll={syncHighlight}+ placeholder={t('Ask, search, or open a meeting…')} aria-label={t('Search')} spellCheck={false}+ role="combobox" aria-expanded="true" aria-controls="search-results" aria-activedescendant={selected?.kind === 'meeting' ? `search-${selected.meeting.meetingId}` : selected?.kind === 'command' ? `command-${selected.command.id}` : selected?.kind === 'person' ? `search-person-${encodeURIComponent(searchPersonKey(selected.person))}` : selected ? 'search-ask' : undefined}+ /></div>- {(scope || dateLabel || selectedPeople.length > 0) && <div className="search-filters">- {scope && <span data-testid="search-scope" className="search-filter">- <FolderGlyph appearance={scope} size={14} /><span className="truncate">{scope.name}</span>+ {(shown.scope || filtered) && <div className="search-filters">+ {shown.scope && <span data-testid="search-scope" className="search-filter">+ <FolderGlyph appearance={shown.scope} size={14} /><span className="truncate">{shown.scope.name}</span><button data-testid="search-scope-clear" onClick={() => { setScope(undefined); input.current?.focus() }} aria-label={t('Search all meetings')} title={t('Search all meetings')}><X size={13} aria-hidden="true" /></button></span>}- {selectedPeople.map(person => <span key={searchPersonKey(person)} data-testid="search-person-filter" className="search-filter">+ {shown.people.map(person => <span key={searchPersonKey(person)} data-testid="search-person-filter" className="search-filter"><UserRound size={14} aria-hidden="true" /><span className="truncate" title={person.email || person.name}>{person.name || person.email}</span><button onClick={() => clearPerson(person)} aria-label={t('Remove {name}', { name: person.name || person.email || '' })}><X size={13} aria-hidden="true" /></button></span>)}@@ -253,16 +258,17 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,</div></InlineError>}{queryFailed && results && <p className="px-5 text-xs text-muted">{t('Previous results')}{typed && ' · ' + typed}</p>}- <ul ref={list} id="search-results" role="listbox" aria-label={t('Results')} aria-busy={running || !settled && !queryFailed} className="min-h-0 flex-1 overflow-y-auto [overflow-anchor:none] px-2 pb-2 scroll-pb-2">+ <ul ref={list} id="search-results" role="listbox" aria-label={t('Results')} aria-busy={running || !settled && !queryFailed} className="min-h-0 overflow-y-auto [overflow-anchor:none] px-2 pb-2 scroll-pb-2">{rows.map((row, i) => {const previous = rows[i - 1]+ const returnKey = activeIndex === i && <kbd className="search-key search-return" aria-hidden="true">↵</kbd>if (row.kind === 'ask') return <Fragment key="ask"><li role="presentation" className="command-section">{t('Ask')}</li><li id="search-ask" data-testid="search-ask" role="option" aria-selected={activeIndex === i} aria-disabled={running}- onMouseMove={(e) => hover(e, i)} onClick={() => void ask(row.query)} className="search-row command-row">+ onMouseMove={(e) => hover(e, i)} onClick={() => void ask(row.query)} className="search-row command-row search-ask"><MessageCircle size={16} aria-hidden="true" />- <span className="shrink-0">{t('Ask Yogurt')}</span><span className="command-label truncate text-muted">{row.query}</span>- <kbd className="search-key search-return" aria-hidden="true">↵</kbd>+ <span className="shrink-0">{t('Ask Yogurt')}</span><span aria-hidden="true">·</span><span className="command-label">{row.query}</span>+ {returnKey}</li></Fragment>if (row.kind === 'person') return <Fragment key={searchPersonKey(row.person)}>@@ -272,7 +278,7 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,<UserRound size={16} aria-hidden="true" /><span className="command-label">{t('Meetings with {name}', { name: row.person.name || row.person.email || '' })}</span>{row.person.email && <span className="search-metadata truncate">{row.person.email}</span>}- <kbd className="search-key search-return" aria-hidden="true">↵</kbd>+ {returnKey}</li></Fragment>if (row.kind === 'meeting') {@@ -280,17 +286,19 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,return <Fragment key={r.meetingId}>{previous?.kind !== 'meeting' && <li role="presentation" className="command-section">{typed || filtered ? t('Meetings') : t('Recent meetings')}</li>}<li- id={`search-${r.meetingId}`} data-testid="search-result" role="option" aria-selected={i === activeIndex}+ id={`search-${r.meetingId}`} data-testid="search-result" role="option" aria-selected={i === activeIndex} aria-describedby={i === activeIndex && r.preview ? 'search-preview' : undefined}onMouseMove={(e) => hover(e, i)} onClick={() => onOpen(r.meetingId)}className="search-row search-meeting">- <FileText size={16} aria-hidden="true" />+ <span className="search-meeting-dot" aria-hidden="true" data-folder-color={r.folder?.color} title={r.folder?.name} /><span className="min-w-0 flex-1">- <span data-testid="search-result-title" className="block truncate text-sm font-medium leading-5"><Marked parts={markWords(r.title, typed)} /></span>- {typed && r.parts.length > 0 && <span className="mt-0.5 line-clamp-1 text-xs leading-5 text-muted"><Marked parts={r.parts} /></span>}+ <span data-testid="search-result-title" className="search-meeting-title"><Marked parts={markWords(r.title, typed)} /></span>+ {r.attendees.length > 0 && <span className="search-attendees">{r.attendees.map(p => p.name || p.email).filter(Boolean).join(', ')}</span>}+ {typed && !r.confident && r.parts.length > 0 && <span className="search-snippet"><Marked parts={r.parts} /></span>}</span>- <time className="search-metadata" dateTime={new Date(r.startedAt).toISOString()}>{dayLabel(r.startedAt)}<span>{timeOf(r.startedAt)}</span></time>- <kbd className="search-key search-return" aria-hidden="true">↵</kbd>+ {r.folder && <span className="sr-only">{r.folder.name}</span>}+ <time className="search-metadata" dateTime={new Date(r.startedAt).toISOString()}>{dayLabel(r.startedAt)} · {timeOf(r.startedAt)}</time>+ {returnKey}</li></Fragment>}@@ -301,26 +309,33 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,<div id={`command-${c.id}`} data-testid={`command-${c.id}`} role="option" aria-selected={activeIndex === i} aria-current={current || undefined} aria-disabled={running}onMouseMove={(e) => hover(e, i)} onClick={() => void runCommand(c)} className="search-row command-row">{'folder' in c ? <FolderGlyph appearance={c.folder} /> : <c.Icon size={16} aria-hidden="true" />}- <span className="command-label">{c.label}{current && <span aria-hidden="true"> ✓</span>}</span>{'shortcut' in c && <kbd className="search-key search-shortcut">{c.shortcut}</kbd>}- <kbd className="search-key search-return" aria-hidden="true">↵</kbd>+ <span className="command-label">{c.label}{current && <span aria-hidden="true"> ✓</span>}</span>+ {activeIndex === i && ('shortcut' in c+ ? <kbd className="search-key search-shortcut">{c.shortcut}</kbd> : returnKey)}</div></li>})}- {settled && filtered && !items.length && <li role="presentation" data-testid="search-filter-empty" className="px-5 py-8 text-center text-sm text-muted">- {searchFilterEmptyMessage(selectedPeople, dateLabel)}+ {results && filtered && !results.list.length && <li role="presentation" data-testid="search-filter-empty" className="px-5 py-8 text-center text-sm text-muted">+ {searchFilterEmptyMessage(shown.people, dateLabel)}</li>}{!queryFailed && results && !count && !filtered && (<li role="presentation" data-testid="search-none" className="flex h-full items-center justify-center px-5 py-8 text-center text-sm text-muted">- {scope ? t('No meetings in this folder yet.') : t('No notes yet.')}+ {typed ? t('No matches') : shown.scope ? t('No meetings in this folder yet.') : t('No notes yet.')}</li>)}</ul>+ {selected?.kind === 'meeting' && selected.meeting.preview && <div id="search-preview" data-testid="search-preview" className="search-preview">+ <p>{selected.meeting.preview}</p>+ </div>}{error && <p role="alert" className="px-5 pb-3 text-xs text-danger">{t("Yogurt couldn't make that change. Try again.")}</p>}<div className="search-footer">- <span><kbd className="search-key">↑↓</kbd>{t('Navigate')}</span>- <span data-testid="search-primary-hint"><kbd className="search-key">↵</kbd>{t('Select')}</span>- <span data-testid="search-secondary-hint"><kbd className="search-key">{keys('⌘↵')}</kbd>{t('Ask')}</span>- <span><kbd className="search-key">esc</kbd>{t('Close')}</span>+ {enterAsks+ ? <button className="search-ask-hint" data-testid="search-primary-hint" onClick={() => void ask(q.trim())}><kbd>↵</kbd>{t('Ask')}</button>+ : primaryHint && <span data-testid="search-primary-hint"><kbd>{selected?.kind === 'person' ? '⇥' : '↵'}</kbd>{primaryHint}</span>}+ {!!typed && primaryHint !== t('Ask')+ ? <button className="search-ask-hint" data-testid="search-secondary-hint" onClick={() => void ask(q.trim())}><kbd>{keys('⌘↵')}</kbd>{t('Ask')}</button>+ : count > 1 && <span><kbd>↑↓</kbd>{t('Navigate')}</span>}+ <span><kbd>esc</kbd>{t('Close')}</span><button className="ghost-btn workspace-icon" data-testid="search-shortcuts" onClick={onShortcuts} aria-label={t('Keyboard shortcuts')} title={`${t('Keyboard shortcuts')} ${keys('⌘/')}`}><Keyboard size={15} aria-hidden="true" /></button></div></MotionPopup>diff --git a/app/src/renderer/src/searchRanking.ts b/app/src/renderer/src/searchRanking.tsindex 5fd54bd5..0d8a2fa0 100644--- a/app/src/renderer/src/searchRanking.ts+++ b/app/src/renderer/src/searchRanking.ts@@ -29,37 +29,43 @@ export function scoreCommand(command: Command, query: string): number {}))}-export function orderSearchResults<C extends Command, M>(commands: C[], meetings: M[], query: string) {- const ranked = commands.map((command) => ({ command, score: scoreCommand(command, query) }))- .filter(({ score }) => !query.trim() || score > 0)- .sort((a, b) => b.score - a.score)- const commandRows = ranked.map(({ command }) => ({ kind: 'command' as const, command }))- const meetingRows = meetings.map((meeting) => ({ kind: 'meeting' as const, meeting }))- const leading = ranked[0]?.score >= 3 ? 4 : 0- return [...commandRows.slice(0, leading), ...meetingRows, ...commandRows.slice(leading)]+export function isSearchQuestion(query: string): boolean {+ const text = query.trim()+ return /[??؟]$/.test(text) || /^(who|what|when|where|why|how|did|do|does|is|are|can|could|would|should|was|were|will|have|has)\b/i.test(text)}export function searchPalette<C extends Command, M extends Meeting>(commands: C[], meetings: M[], query: string, askQuery = query, people: SearchPersonMatch[] = [], previous?: string, filtered = false) {- const matches = orderSearchResults(filtered ? commands.filter(c => c.query !== undefined) : commands, meetings, query)- const choices = [...people.map(person => ({ kind: 'person' as const, ...person })), ...matches]- const rows = askQuery.trim() ? [{ kind: 'ask' as const, query: askQuery.trim() }, ...choices] : choices- // Ask stays pinned, but Enter chooses a strong command or a meeting whose terms all match metadata.- // Keep the completed query’s strong selection while new results settle; questions still select Ask.- const question = /\?\s*$/.test(askQuery) || /^(who|what|when|where|why|how|did|does|is|are|can|should)\b/i.test(askQuery.trim())- const best = askQuery.trim() && query.trim() && !question ? rows.findIndex(row => row.kind === 'command'- ? scoreCommand(row.command, query) >= 3 : row.kind === 'meeting' && row.meeting.confident) : -1- let active = best < 0 ? 0 : best- if (askQuery.trim() && query.trim() && !question && previous) {- const prior = rows.findIndex(row => searchSelectionKey(row) === previous)- const strength = (row: SelectionRow) => {- if (row.kind === 'ask') return 2- if (row.kind === 'meeting') return row.meeting.confident ? 4 : 0- if (row.kind !== 'command') return 0- const score = scoreCommand(row.command, query)- return score >= 2 ? score + 1 : 0+ const groups = [...new Set(commands.map(c => c.group))]+ const ranked = query.trim() ? commands.filter(c => !filtered || c.query !== undefined)+ .map(command => ({ kind: 'command' as const, command, score: scoreCommand(command, query) }))+ .filter(c => c.score > 0)+ .sort((a, b) => groups.indexOf(a.command.group) - groups.indexOf(b.command.group) || b.score - a.score) : []+ const question = isSearchQuestion(askQuery)+ const rows = [+ ...(question ? [{ kind: 'ask' as const, query: askQuery.trim() }] : []),+ ...(query.trim() ? meetings : meetings.slice(0, 3)).map(meeting => ({ kind: 'meeting' as const, meeting })),+ ...people.map(person => ({ kind: 'person' as const, ...person })),+ ...ranked.map(({ command }) => ({ kind: 'command' as const, command })),+ ]+ let active = 0+ if (!question && query.trim() && askQuery.trim()) {+ const meeting = rows.findIndex(row => row.kind === 'meeting' && row.meeting.confident)+ let best = ranked[0]+ for (const candidate of ranked) if (candidate.score > best.score) best = candidate+ if (best && (best.score >= 3 || meeting < 0 && best.score >= 2)) active = rows.findIndex(row => row.kind === 'command' && row.command === best.command)+ else if (meeting >= 0) active = meeting++ // Keep a strong default across near-tied queries without rearranging the groups.+ const prior = previous ? rows.findIndex(row => searchSelectionKey(row) === previous) : -1+ if (prior >= 0) {+ const strength = (row: SelectionRow) => {+ if (row.kind === 'meeting') return row.meeting.confident ? 4 : 0+ if (row.kind !== 'command') return 0+ const score = scoreCommand(row.command, query)+ return score >= 2 ? score + 1 : 0+ }+ if (strength(rows[prior]) && strength(rows[active]) < strength(rows[prior]) + 2) active = prior}- // Keep a still-relevant choice across near-ties; a two-point gain, question, or vanished match replaces it.- if (prior >= 0 && strength(rows[prior]) > 0 && strength(rows[active]) < strength(rows[prior]) + 2) active = prior}return { rows, active }}diff --git a/app/src/renderer/src/styles.css b/app/src/renderer/src/styles.cssindex 16335828..4fa5fa48 100644--- a/app/src/renderer/src/styles.css+++ b/app/src/renderer/src/styles.css@@ -412,37 +412,48 @@ html.widget, .widget-pill[data-illustration] { --pill:#232326;--pill-ink:#F7F7FA/* a long list: days off screen skip layout and paint until they scroll near */.past-day { content-visibility: auto; contain-intrinsic-size: auto 320px; }.search-backdrop { background:var(--scrim); }-.search-panel { position:fixed;top:12vh;left:50%;translate:-50% 0;z-index:101;width:min(640px,calc(100vw - 32px));outline:none;height:min(560px,74vh);box-shadow:var(--shadow);border-radius:12px; }-.search-header { flex:none;border-bottom:1px solid var(--line); }-.search-input-row { display:flex;align-items:center;padding-inline:20px; }-.search-field { position:relative;min-width:0;flex:1;font-size:var(--text-base);line-height:24px; }-.search-field input { position:relative;display:block;width:100%;min-width:0;height:60px;padding:18px 0;border:0;background:transparent;color:var(--ink);caret-color:var(--accent);font:inherit;letter-spacing:inherit;outline:none; }+.search-panel { position:fixed;top:12vh;left:50%;translate:-50% 0;z-index:101;width:min(680px,calc(100vw - 32px));outline:none;box-shadow:var(--shadow);border-radius:18px; }+.search-header { flex:none;margin:0 10px;border-bottom:1px solid var(--line); }+.search-field { position:relative;margin-inline:14px 10px;font-size:clamp(19px,3vw,24px);line-height:32px;letter-spacing:-.025em; }+.search-field input,.search-input-highlight { padding:20px 0; }+.search-field input { position:relative;display:block;width:100%;min-width:0;border:0;background:transparent;color:var(--ink);caret-color:var(--accent);font:inherit;letter-spacing:inherit;outline:none; }.search-field input::placeholder { color:var(--muted);font-weight:400; }-.search-input-highlight { position:absolute;inset:0;overflow:hidden;padding-block:18px;white-space:pre;pointer-events:none;color:transparent; }+.search-input-highlight { position:absolute;inset:0;overflow:hidden;white-space:pre;pointer-events:none;color:transparent; }.search-input-highlight>span { display:inline-block;min-width:100%; }-.search-input-highlight mark { padding:0;border-radius:3px;background:var(--accent-soft);color:transparent; }-.search-filters { display:flex;flex-wrap:wrap;gap:8px;padding:0 20px 12px; }-.search-filter { display:flex;align-items:center;gap:7px;min-width:0;max-width:100%;min-height:28px;padding:3px 4px 3px 8px;border-radius:6px;background:var(--control);color:var(--muted);font-size:12px; }+.search-input-highlight mark { padding:0;border-radius:4px;background:var(--accent-soft);color:transparent; }+.search-filters { display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 14px; }+.search-filter { display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;min-height:26px;padding:2px 3px 2px 8px;border-radius:7px;background:var(--card);color:var(--written);font-size:var(--text-xs); }.search-filter>svg,.search-filter>button { flex:none; }-.search-filter>button { display:grid;place-items:center;width:22px;height:22px;border-radius:4px; }+.search-filter>button { display:grid;place-items:center;width:22px;height:22px;border-radius:4px;color:var(--muted); }.search-filter>button:hover { color:var(--ink);background:var(--control-hover); }.search-filter>button:focus-visible { outline:2px solid var(--focus);outline-offset:2px; }-.command-section { padding:12px 12px 4px;font-size:var(--text-xs);line-height:16px;font-weight:500;color:var(--muted); }-.command-row { display:flex;align-items:center;gap:10px;min-height:40px;padding:8px 12px;border-radius:7px;font-size:var(--text-sm);line-height:20px;font-weight:500;cursor:default; }+.command-section { padding:13px 14px 5px;font-size:var(--text-xs);line-height:16px;font-weight:500;color:var(--muted); }+.search-row { align-items:center;min-height:40px;padding:8px 14px;border-radius:9px;cursor:default; }+.command-row { display:flex;gap:10px;font-size:var(--text-sm);line-height:20px;font-weight:500; }.search-row>svg { flex:none;width:16px;height:16px;color:var(--muted); }-.command-label { min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }-.search-meeting { display:flex;align-items:center;gap:10px;min-height:48px;padding:8px 12px;border-radius:7px;cursor:default; }-.search-metadata { flex:none;max-width:35%;color:var(--muted);font-size:var(--text-xs);line-height:18px;text-align:end;font-variant-numeric:tabular-nums; }-.search-metadata>span { display:block; }-.search-return { flex:none;visibility:hidden; }-.search-row[aria-selected=true] .search-return { visibility:visible; }-.search-key { display:inline-grid;place-items:center;flex:none;min-width:20px;height:20px;padding:0 4px;border:1px solid transparent;border-radius:4px;font:var(--text-xs) var(--font-sans);white-space:nowrap;color:var(--muted);background:var(--control); }-.search-footer { display:flex;align-items:center;gap:14px;flex:none;min-height:44px;border-top:1px solid var(--line);padding:10px 20px;color:var(--muted);font-size:var(--text-xs);background:var(--card); }-.search-footer>span { display:flex;align-items:center;gap:5px;white-space:nowrap; }+.search-ask,.search-ask>svg { color:var(--accent); }+.command-label,.search-meeting-title,.search-attendees,.search-snippet,.search-metadata { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }+.command-label { min-width:0;flex:1; }+.search-meeting { display:grid;grid-template-columns:8px minmax(0,1fr) fit-content(34%) 22px;gap:11px;min-height:46px; }+.search-meeting-dot { width:7px;height:7px;border-radius:50%;background:var(--folder-ink,transparent); }+.search-meeting-title { display:block;font-size:var(--text-sm);line-height:21px;font-weight:500; }+.search-attendees,.search-snippet { display:block;font-size:var(--text-xs);line-height:18px;color:var(--muted); }+.search-metadata { flex:none;max-width:100%;color:var(--muted);font-size:var(--text-xs);font-variant-numeric:tabular-nums; }+.command-row .search-metadata { max-width:35%; }+.search-key { display:inline-grid;place-items:center;flex:none;min-width:22px;height:21px;padding:0 5px;border-radius:5px;font:var(--text-xs) var(--font-sans);white-space:nowrap;color:var(--written);background:var(--float); }+.search-preview { flex:none;margin:0 10px;padding:12px 14px;border-top:1px solid var(--line); }+.search-preview p { display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:var(--text-sm);line-height:21px;color:var(--written);overflow-wrap:anywhere; }+.search-footer { display:flex;align-items:center;flex:none;gap:16px;margin:0 10px;min-height:40px;border-top:1px solid var(--line);padding:5px 10px;color:var(--muted);font-size:var(--text-xs); }+.search-footer>span,.search-footer .search-ask-hint { display:inline-flex;align-items:center;gap:5px;white-space:nowrap; }+.search-footer kbd { font:inherit; }+.search-footer .search-ask-hint:hover { color:var(--accent); }@media (max-width:480px) {- .search-input-row { padding-inline:16px; }- .search-filters { padding-inline:16px; }- .search-footer { flex-wrap:wrap;gap:8px 12px;padding-inline:16px; }+ .search-field { margin-inline:8px 6px;font-size:19px; }+ .search-preview { padding-inline:8px; }+ .search-filters { padding-inline:8px; }+ .search-row { padding-inline:9px; }+ .search-meeting { column-gap:7px; }+ .search-footer { flex-wrap:wrap;gap:6px 10px;padding-inline:5px; }}.search-panel [data-testid="search-input"]:focus-visible { outline: none; }@@ -485,7 +496,7 @@ html.widget, .widget-pill[data-illustration] { --pill:#232326;--pill-ink:#F7F7FA.modal-button.primary { background:var(--primary);color:var(--primary-ink); }.modal-button.primary:hover:not(:disabled) { background:var(--primary-hover); }.modal-button:disabled { opacity:.55; }-.search-row[aria-selected="true"] { background:var(--selected); }+.search-row[aria-selected="true"] { background:var(--accent-soft); }.search-mark { background: var(--accent-soft); color: var(--ink); border-radius: 3px; padding: 0 1px; }@media (prefers-reduced-motion: reduce) {.bar-btn { transition:none; }@@ -729,7 +740,7 @@ html:not(.widget) button:focus-visible, html:not(.widget) input:focus-visible {@media(prefers-reduced-motion:reduce) { .chat-page .chat-box,.chat-page .chat-send { transition:none; } }-.search-footer>button { margin-inline-start:auto; }+.search-footer>.workspace-icon { margin-inline-start:auto; }.app-modal[data-testid=shortcuts-dialog] { width:min(460px,calc(100vw - 40px));height:min(580px,80vh);display:flex;flex-direction:column;overflow:hidden; }.app-modal[data-testid=shortcuts-dialog] .modal-copy { flex:none;padding:22px 24px 18px; }.shortcuts-close { position:absolute;inset-inline-end:16px;top:18px; }diff --git a/app/src/shared/locales/ar.json b/app/src/shared/locales/ar.jsonindex e4a861e4..16125950 100644--- a/app/src/shared/locales/ar.json+++ b/app/src/shared/locales/ar.json@@ -369,7 +369,7 @@"Search": "بحث","Search all meetings": "البحث في كل الاجتماعات","Search and commands": "البحث والأوامر",- "Search meetings or run a command…": "ابحث عن اجتماعات أو نفّذ أمراً…",+ "Ask, search, or open a meeting…": "اسأل أو ابحث أو افتح اجتماعًا…","Search the transcript": "البحث في النص","See who said what": "اعرف من قال ماذا","See your meetings here": "شاهد اجتماعاتك هنا",diff --git a/app/src/shared/locales/bn.json b/app/src/shared/locales/bn.jsonindex b5b1e444..48e53159 100644--- a/app/src/shared/locales/bn.json+++ b/app/src/shared/locales/bn.json@@ -357,7 +357,7 @@"Search": "সার্চ করুন","Search all meetings": "সব মিটিংয়ে খুঁজুন","Search and commands": "অনুসন্ধান ও কমান্ড",- "Search meetings or run a command…": "মিটিং খুঁজুন বা কমান্ড চালান…",+ "Ask, search, or open a meeting…": "প্রশ্ন করুন, খুঁজুন বা কোনো মিটিং খুলুন…","Search the transcript": "ট্রান্সক্রিপ্টে খুঁজুন","See who said what": "কে কী বলেছে দেখুন","See your meetings here": "আপনার মিটিং এখানে দেখুন",diff --git a/app/src/shared/locales/cs.json b/app/src/shared/locales/cs.jsonindex 645f193a..4b87b2c4 100644--- a/app/src/shared/locales/cs.json+++ b/app/src/shared/locales/cs.json@@ -363,7 +363,7 @@"Search": "Hledat","Search all meetings": "Prohledat všechny schůzky","Search and commands": "Hledání a příkazy",- "Search meetings or run a command…": "Hledat schůzky nebo spustit příkaz…",+ "Ask, search, or open a meeting…": "Zeptejte se, hledejte nebo otevřete schůzku…","Search the transcript": "Hledat v přepisu","See who said what": "Uvidíte, kdo co řekl","See your meetings here": "Tady uvidíte své schůzky",diff --git a/app/src/shared/locales/da.json b/app/src/shared/locales/da.jsonindex 202f6355..7b436e70 100644--- a/app/src/shared/locales/da.json+++ b/app/src/shared/locales/da.json@@ -357,7 +357,7 @@"Search": "Søg","Search all meetings": "Søg i alle møder","Search and commands": "Søgning og kommandoer",- "Search meetings or run a command…": "Søg i møder, eller kør en kommando…",+ "Ask, search, or open a meeting…": "Spørg, søg, eller åbn et møde…","Search the transcript": "Søg i transskriptionen","See who said what": "Se, hvem der sagde hvad","See your meetings here": "Se dine møder her",diff --git a/app/src/shared/locales/de.json b/app/src/shared/locales/de.jsonindex 3842f81c..1fb7eedc 100644--- a/app/src/shared/locales/de.json+++ b/app/src/shared/locales/de.json@@ -357,7 +357,7 @@"Search": "Suchen","Search all meetings": "Alle Meetings durchsuchen","Search and commands": "Suche und Befehle",- "Search meetings or run a command…": "Meetings suchen oder einen Befehl ausführen…",+ "Ask, search, or open a meeting…": "Frage stellen, suchen oder ein Meeting öffnen…","Search the transcript": "Transkript durchsuchen","See who said what": "Sieh, wer was gesagt hat","See your meetings here": "Deine Meetings auf einen Blick",diff --git a/app/src/shared/locales/el.json b/app/src/shared/locales/el.jsonindex 7623e50e..65f34f33 100644--- a/app/src/shared/locales/el.json+++ b/app/src/shared/locales/el.json@@ -357,7 +357,7 @@"Search": "Αναζήτηση","Search all meetings": "Αναζήτηση σε όλες τις συσκέψεις","Search and commands": "Αναζήτηση και εντολές",- "Search meetings or run a command…": "Αναζήτηση συναντήσεων ή εκτέλεση εντολής…",+ "Ask, search, or open a meeting…": "Ρωτήστε, αναζητήστε ή ανοίξτε μια συνάντηση…","Search the transcript": "Αναζήτηση στην απομαγνητοφώνηση","See who said what": "Δείτε ποιος είπε τι","See your meetings here": "Δείτε εδώ τις συσκέψεις σας",diff --git a/app/src/shared/locales/es.json b/app/src/shared/locales/es.jsonindex 3f543cb9..0df82d3c 100644--- a/app/src/shared/locales/es.json+++ b/app/src/shared/locales/es.json@@ -360,7 +360,7 @@"Search": "Buscar","Search all meetings": "Buscar en todas las reuniones","Search and commands": "Búsqueda y comandos",- "Search meetings or run a command…": "Buscar reuniones o ejecutar un comando…",+ "Ask, search, or open a meeting…": "Haz una pregunta, busca o abre una reunión…","Search the transcript": "Buscar en la transcripción","See who said what": "Mira quién dijo qué","See your meetings here": "Ve aquí tus reuniones",diff --git a/app/src/shared/locales/fi.json b/app/src/shared/locales/fi.jsonindex 449ff7d6..a7a681e0 100644--- a/app/src/shared/locales/fi.json+++ b/app/src/shared/locales/fi.json@@ -357,7 +357,7 @@"Search": "Hae","Search all meetings": "Hae kaikista kokouksista","Search and commands": "Haku ja komennot",- "Search meetings or run a command…": "Hae kokouksia tai suorita komento…",+ "Ask, search, or open a meeting…": "Kysy, hae tai avaa kokous…","Search the transcript": "Hae litteroinnista","See who said what": "Näe, kuka sanoi mitäkin","See your meetings here": "Näe kokouksesi täällä",diff --git a/app/src/shared/locales/fil.json b/app/src/shared/locales/fil.jsonindex 8ec5b00f..7588628d 100644--- a/app/src/shared/locales/fil.json+++ b/app/src/shared/locales/fil.json@@ -357,7 +357,7 @@"Search": "Maghanap","Search all meetings": "Hanapin sa lahat ng meeting","Search and commands": "Paghahanap at mga command",- "Search meetings or run a command…": "Maghanap ng mga meeting o magpatakbo ng command…",+ "Ask, search, or open a meeting…": "Magtanong, maghanap, o magbukas ng pulong…","Search the transcript": "Hanapin sa transcript","See who said what": "Alamin kung sino ang nagsalita","See your meetings here": "Makikita rito ang mga meeting mo",diff --git a/app/src/shared/locales/fr.json b/app/src/shared/locales/fr.jsonindex 6d43aeab..b980eb02 100644--- a/app/src/shared/locales/fr.json+++ b/app/src/shared/locales/fr.json@@ -360,7 +360,7 @@"Search": "Rechercher","Search all meetings": "Rechercher dans toutes les réunions","Search and commands": "Recherche et commandes",- "Search meetings or run a command…": "Rechercher des réunions ou exécuter une commande…",+ "Ask, search, or open a meeting…": "Posez une question, recherchez ou ouvrez une réunion…","Search the transcript": "Rechercher dans la transcription","See who said what": "Voyez qui a dit quoi","See your meetings here": "Vos réunions s’affichent ici",diff --git a/app/src/shared/locales/he.json b/app/src/shared/locales/he.jsonindex 01b0ede4..6b57135b 100644--- a/app/src/shared/locales/he.json+++ b/app/src/shared/locales/he.json@@ -360,7 +360,7 @@"Search": "חיפוש","Search all meetings": "חיפוש בכל הפגישות","Search and commands": "חיפוש ופקודות",- "Search meetings or run a command…": "חיפוש פגישות או הפעלת פקודה…",+ "Ask, search, or open a meeting…": "אפשר לשאול, לחפש או לפתוח פגישה…","Search the transcript": "חיפוש בתמלול","See who said what": "לראות מי אמר מה","See your meetings here": "הפגישות שלך יופיעו כאן",diff --git a/app/src/shared/locales/hi.json b/app/src/shared/locales/hi.jsonindex bc9af9d1..5545c825 100644--- a/app/src/shared/locales/hi.json+++ b/app/src/shared/locales/hi.json@@ -357,7 +357,7 @@"Search": "सर्च करें","Search all meetings": "सभी मीटिंग्स में खोजें","Search and commands": "खोज और कमांड",- "Search meetings or run a command…": "मीटिंग खोजें या कमांड चलाएँ…",+ "Ask, search, or open a meeting…": "पूछें, खोजें या कोई मीटिंग खोलें…","Search the transcript": "ट्रांसक्रिप्ट में खोजें","See who said what": "देखें किसने क्या कहा","See your meetings here": "अपनी मीटिंग्स यहाँ देखें",diff --git a/app/src/shared/locales/hu.json b/app/src/shared/locales/hu.jsonindex b1102799..9276e6ee 100644--- a/app/src/shared/locales/hu.json+++ b/app/src/shared/locales/hu.json@@ -357,7 +357,7 @@"Search": "Keresés","Search all meetings": "Keresés az összes megbeszélésben","Search and commands": "Keresés és parancsok",- "Search meetings or run a command…": "Megbeszélések keresése vagy parancs futtatása…",+ "Ask, search, or open a meeting…": "Kérdezzen, keressen vagy nyisson meg egy megbeszélést…","Search the transcript": "Keresés az átiratban","See who said what": "Lásd, ki mit mondott","See your meetings here": "Itt láthatod a megbeszéléseidet",diff --git a/app/src/shared/locales/id.json b/app/src/shared/locales/id.jsonindex 6ebd8369..ddb4994a 100644--- a/app/src/shared/locales/id.json+++ b/app/src/shared/locales/id.json@@ -348,7 +348,7 @@"Search": "Cari","Search all meetings": "Cari di semua rapat","Search and commands": "Pencarian dan perintah",- "Search meetings or run a command…": "Cari rapat atau jalankan perintah…",+ "Ask, search, or open a meeting…": "Ajukan pertanyaan, cari, atau buka rapat…","Search the transcript": "Cari di transkrip","See who said what": "Lihat siapa bilang apa","See your meetings here": "Lihat rapat Anda di sini",diff --git a/app/src/shared/locales/it.json b/app/src/shared/locales/it.jsonindex 2e5e8c69..b0e0f857 100644--- a/app/src/shared/locales/it.json+++ b/app/src/shared/locales/it.json@@ -360,7 +360,7 @@"Search": "Cerca","Search all meetings": "Cerca in tutte le riunioni","Search and commands": "Ricerca e comandi",- "Search meetings or run a command…": "Cerca riunioni o esegui un comando…",+ "Ask, search, or open a meeting…": "Fai una domanda, cerca o apri una riunione…","Search the transcript": "Cerca nella trascrizione","See who said what": "Vedi chi ha detto cosa","See your meetings here": "Le tue riunioni, qui",diff --git a/app/src/shared/locales/ja.json b/app/src/shared/locales/ja.jsonindex 157ac75d..857b4648 100644--- a/app/src/shared/locales/ja.json+++ b/app/src/shared/locales/ja.json@@ -348,7 +348,7 @@"Search": "検索","Search all meetings": "すべてのミーティングを検索","Search and commands": "検索とコマンド",- "Search meetings or run a command…": "会議を検索、またはコマンドを実行…",+ "Ask, search, or open a meeting…": "質問、検索、または会議を開く…","Search the transcript": "文字起こしを検索","See who said what": "誰が何を話したかがわかる","See your meetings here": "ミーティングがここに表示されます",diff --git a/app/src/shared/locales/ko.json b/app/src/shared/locales/ko.jsonindex 86412069..6e094383 100644--- a/app/src/shared/locales/ko.json+++ b/app/src/shared/locales/ko.json@@ -348,7 +348,7 @@"Search": "검색","Search all meetings": "모든 회의 검색","Search and commands": "검색 및 명령",- "Search meetings or run a command…": "회의 검색 또는 명령 실행…",+ "Ask, search, or open a meeting…": "질문하거나 검색하거나 회의를 여세요…","Search the transcript": "녹취록 검색","See who said what": "누가 무슨 말을 했는지 확인","See your meetings here": "여기에서 회의를 확인하세요",diff --git a/app/src/shared/locales/ms.json b/app/src/shared/locales/ms.jsonindex b3697543..7a08acaf 100644--- a/app/src/shared/locales/ms.json+++ b/app/src/shared/locales/ms.json@@ -348,7 +348,7 @@"Search": "Cari","Search all meetings": "Cari semua mesyuarat","Search and commands": "Carian dan perintah",- "Search meetings or run a command…": "Cari mesyuarat atau jalankan perintah…",+ "Ask, search, or open a meeting…": "Tanya, cari atau buka mesyuarat…","Search the transcript": "Cari dalam transkrip","See who said what": "Lihat siapa cakap apa","See your meetings here": "Lihat mesyuarat anda di sini",diff --git a/app/src/shared/locales/nb.json b/app/src/shared/locales/nb.jsonindex 74b923ca..986fbff3 100644--- a/app/src/shared/locales/nb.json+++ b/app/src/shared/locales/nb.json@@ -357,7 +357,7 @@"Search": "Søk","Search all meetings": "Søk i alle møter","Search and commands": "Søk og kommandoer",- "Search meetings or run a command…": "Søk etter møter eller kjør en kommando…",+ "Ask, search, or open a meeting…": "Spør, søk eller åpne et møte…","Search the transcript": "Søk i transkripsjonen","See who said what": "Se hvem som sa hva","See your meetings here": "Se møtene dine her",diff --git a/app/src/shared/locales/nl.json b/app/src/shared/locales/nl.jsonindex 6e49a89a..4d21b014 100644--- a/app/src/shared/locales/nl.json+++ b/app/src/shared/locales/nl.json@@ -357,7 +357,7 @@"Search": "Zoeken","Search all meetings": "Alle meetings doorzoeken","Search and commands": "Zoeken en opdrachten",- "Search meetings or run a command…": "Vergaderingen zoeken of een opdracht uitvoeren…",+ "Ask, search, or open a meeting…": "Stel een vraag, zoek of open een vergadering…","Search the transcript": "Transcript doorzoeken","See who said what": "Zie wie wat zei","See your meetings here": "Zie je meetings hier",diff --git a/app/src/shared/locales/pl.json b/app/src/shared/locales/pl.jsonindex 5a3deb5e..ed4a7463 100644--- a/app/src/shared/locales/pl.json+++ b/app/src/shared/locales/pl.json@@ -363,7 +363,7 @@"Search": "Szukaj","Search all meetings": "Przeszukaj wszystkie spotkania","Search and commands": "Wyszukiwanie i polecenia",- "Search meetings or run a command…": "Szukaj spotkań lub uruchom polecenie…",+ "Ask, search, or open a meeting…": "Zadaj pytanie, wyszukaj lub otwórz spotkanie…","Search the transcript": "Szukaj w transkrypcji","See who said what": "Zobacz, kto co powiedział","See your meetings here": "Tu zobaczysz swoje spotkania",diff --git a/app/src/shared/locales/pt-BR.json b/app/src/shared/locales/pt-BR.jsonindex 7f20fce1..2d5bb27d 100644--- a/app/src/shared/locales/pt-BR.json+++ b/app/src/shared/locales/pt-BR.json@@ -360,7 +360,7 @@"Search": "Buscar","Search all meetings": "Buscar em todas as reuniões","Search and commands": "Busca e comandos",- "Search meetings or run a command…": "Buscar reuniões ou executar um comando…",+ "Ask, search, or open a meeting…": "Pergunte, pesquise ou abra uma reunião…","Search the transcript": "Buscar na transcrição","See who said what": "Veja quem disse o quê","See your meetings here": "Veja suas reuniões aqui",diff --git a/app/src/shared/locales/ro.json b/app/src/shared/locales/ro.jsonindex 88744fbc..fb431848 100644--- a/app/src/shared/locales/ro.json+++ b/app/src/shared/locales/ro.json@@ -360,7 +360,7 @@"Search": "Caută","Search all meetings": "Căutați în toate întâlnirile","Search and commands": "Căutare și comenzi",- "Search meetings or run a command…": "Caută întâlniri sau execută o comandă…",+ "Ask, search, or open a meeting…": "Pune o întrebare, caută sau deschide o întâlnire…","Search the transcript": "Căutați în transcriere","See who said what": "Vedeți cine ce a spus","See your meetings here": "Vedeți-vă întâlnirile aici",diff --git a/app/src/shared/locales/ru.json b/app/src/shared/locales/ru.jsonindex fe8a0024..23a4ad2c 100644--- a/app/src/shared/locales/ru.json+++ b/app/src/shared/locales/ru.json@@ -363,7 +363,7 @@"Search": "Поиск","Search all meetings": "Искать во всех встречах","Search and commands": "Поиск и команды",- "Search meetings or run a command…": "Найти встречи или выполнить команду…",+ "Ask, search, or open a meeting…": "Задайте вопрос, найдите или откройте встречу…","Search the transcript": "Поиск в расшифровке","See who said what": "Видно, кто что сказал","See your meetings here": "Здесь будут ваши встречи",diff --git a/app/src/shared/locales/sv.json b/app/src/shared/locales/sv.jsonindex ebd28295..fe8a81b7 100644--- a/app/src/shared/locales/sv.json+++ b/app/src/shared/locales/sv.json@@ -357,7 +357,7 @@"Search": "Sök","Search all meetings": "Sök i alla möten","Search and commands": "Sökning och kommandon",- "Search meetings or run a command…": "Sök efter möten eller kör ett kommando…",+ "Ask, search, or open a meeting…": "Fråga, sök eller öppna ett möte…","Search the transcript": "Sök i transkriptionen","See who said what": "Se vem som sa vad","See your meetings here": "Se dina möten här",diff --git a/app/src/shared/locales/th.json b/app/src/shared/locales/th.jsonindex 9b9a630c..6434ce30 100644--- a/app/src/shared/locales/th.json+++ b/app/src/shared/locales/th.json@@ -348,7 +348,7 @@"Search": "ค้นหา","Search all meetings": "ค้นหาในทุกการประชุม","Search and commands": "ค้นหาและคำสั่ง",- "Search meetings or run a command…": "ค้นหาการประชุมหรือเรียกใช้คำสั่ง…",+ "Ask, search, or open a meeting…": "ถาม ค้นหา หรือเปิดการประชุม…","Search the transcript": "ค้นหาในคำถอดความ","See who said what": "ดูว่าใครพูดอะไร","See your meetings here": "ดูการประชุมของคุณที่นี่",diff --git a/app/src/shared/locales/tr.json b/app/src/shared/locales/tr.jsonindex cdf23e79..b9f5e80d 100644--- a/app/src/shared/locales/tr.json+++ b/app/src/shared/locales/tr.json@@ -357,7 +357,7 @@"Search": "Ara","Search all meetings": "Tüm toplantılarda ara","Search and commands": "Arama ve komutlar",- "Search meetings or run a command…": "Toplantı ara veya komut çalıştır…",+ "Ask, search, or open a meeting…": "Soru sorun, arayın veya bir toplantı açın…","Search the transcript": "Transkriptte ara","See who said what": "Kimin ne dediğini görün","See your meetings here": "Toplantılarınız burada",diff --git a/app/src/shared/locales/uk.json b/app/src/shared/locales/uk.jsonindex 092c47bc..43bc9ee2 100644--- a/app/src/shared/locales/uk.json+++ b/app/src/shared/locales/uk.json@@ -363,7 +363,7 @@"Search": "Пошук","Search all meetings": "Шукати в усіх зустрічах","Search and commands": "Пошук і команди",- "Search meetings or run a command…": "Знайти зустрічі або виконати команду…",+ "Ask, search, or open a meeting…": "Поставте запитання, знайдіть або відкрийте зустріч…","Search the transcript": "Пошук у розшифровці","See who said what": "Видно, хто що сказав","See your meetings here": "Тут будуть ваші зустрічі",diff --git a/app/src/shared/locales/vi.json b/app/src/shared/locales/vi.jsonindex cbec0927..7e40c223 100644--- a/app/src/shared/locales/vi.json+++ b/app/src/shared/locales/vi.json@@ -348,7 +348,7 @@"Search": "Tìm kiếm","Search all meetings": "Tìm trong mọi cuộc họp","Search and commands": "Tìm kiếm và lệnh",- "Search meetings or run a command…": "Tìm cuộc họp hoặc chạy lệnh…",+ "Ask, search, or open a meeting…": "Đặt câu hỏi, tìm kiếm hoặc mở cuộc họp…","Search the transcript": "Tìm trong bản chép lời","See who said what": "Xem ai đã nói gì","See your meetings here": "Các cuộc họp của bạn hiện ở đây",diff --git a/app/src/shared/locales/zh-CN.json b/app/src/shared/locales/zh-CN.jsonindex e4fc48b4..8e98c928 100644--- a/app/src/shared/locales/zh-CN.json+++ b/app/src/shared/locales/zh-CN.json@@ -348,7 +348,7 @@"Search": "搜索","Search all meetings": "搜索全部会议","Search and commands": "搜索与命令",- "Search meetings or run a command…": "搜索会议或运行命令…",+ "Ask, search, or open a meeting…": "提问、搜索或打开会议…","Search the transcript": "搜索文字记录","See who said what": "看清谁说了什么","See your meetings here": "在这里查看你的会议",diff --git a/app/src/shared/locales/zh-TW.json b/app/src/shared/locales/zh-TW.jsonindex 70f801ad..d46d0439 100644--- a/app/src/shared/locales/zh-TW.json+++ b/app/src/shared/locales/zh-TW.json@@ -348,7 +348,7 @@"Search": "搜尋","Search all meetings": "搜尋所有會議","Search and commands": "搜尋與指令",- "Search meetings or run a command…": "搜尋會議或執行指令…",+ "Ask, search, or open a meeting…": "提問、搜尋或開啟會議…","Search the transcript": "搜尋逐字稿","See who said what": "看清楚誰說了什麼","See your meetings here": "在這裡查看你的會議",diff --git a/app/src/shared/searchPeople.ts b/app/src/shared/searchPeople.tsindex b492e698..57321761 100644--- a/app/src/shared/searchPeople.ts+++ b/app/src/shared/searchPeople.ts@@ -14,19 +14,27 @@ export function matchSearchPeople(query: string, people: Person[], chosen: Persoconst candidates = uniqueSearchPeople(people)const chosenKeys = new Set(chosen.map(searchPersonKey))const exact: SearchPersonMatch[] = []+ const withPerson = /\bwith\s+/i.test(query)for (const person of candidates) {const selected = chosenKeys.has(searchPersonKey(person))+ const firstName = person.name.trim().split(/\s+/)[0]const labels = [person.email?.trim(), ...(selected || person.name.trim().split(/\s+/).length > 1 ? [person.name.trim()] : [])].filter((s): s is string => !!s)for (const label of labels) {const match = new RegExp(`(?<![\\p{L}\\p{N}@._+-])${escape(label).replace(/\s+/g, '\\s+')}(?![\\p{L}\\p{N}@._+-])`, 'iu').exec(query)if (match) { exact.push({ person, start: match.index, end: match.index + match[0].length }); break }}+ // A first name after "with" is explicit. Shared first names still go through disambiguation below.+ if (withPerson && firstName && !exact.some(m => m.person === person)) {+ const match = new RegExp(`\\bwith\\s+(${escape(firstName)})(?![\\p{L}\\p{N}@._+-])`, 'iu').exec(query)+ if (match) exact.push({ person, start: match.index + match[0].length - match[1].length, end: match.index + match[0].length })+ }}const preferred = exact.filter(m => !exact.some(other => other !== m && other.start === m.start && other.end === m.end&& chosenKeys.has(searchPersonKey(other.person)) && !chosenKeys.has(searchPersonKey(m.person))))const longest = preferred.filter(m => !preferred.some(other => other.start <= m.start && other.end >= m.end && other.end - other.start > m.end - m.start))// A shared full name is not enough to choose between different email identities.const matches = longest.filter(m => !longest.some(other => other !== m && other.start < m.end && other.end > m.start))+ .map(m => ({ ...m, start: /\bwith\s+$/i.exec(query.slice(0, m.start))?.index ?? m.start }))let text = queryfor (const match of matches) text = text.slice(0, match.start) + ' '.repeat(match.end - match.start) + text.slice(match.end)const date = parseSearchQuery(text, options).dateSpandiff --git a/app/src/shared/searchQuery.ts b/app/src/shared/searchQuery.tsindex 28e60f08..a31ce399 100644--- a/app/src/shared/searchQuery.ts+++ b/app/src/shared/searchQuery.ts@@ -72,7 +72,9 @@ export function parseSearchQuery(query: string, { now = new Date(), locale = newspan.start = inMonth.index} else if (weekdayOnly) {// A bare weekday within other words may be a title; standalone weekdays and explicit modifiers are dates.- if (/^\p{L}+\.?$/u.test(result.text.trim()) && query.trim() !== result.text.trim()) continue+ const on = /\bon\s+$/i.exec(before)+ if (on) span.start = on.index+ else if (/^\p{L}+\.?$/u.test(result.text.trim()) && query.trim() !== result.text.trim()) continueif (start > day() && !/\b(next|this)\b/i.test(result.text)) {start.setDate(start.getDate() - 7); last.setDate(last.getDate() - 7)}diff --git a/app/src/shared/types.ts b/app/src/shared/types.tsindex 797b6b3a..c043aa13 100644--- a/app/src/shared/types.ts+++ b/app/src/shared/types.ts@@ -395,7 +395,10 @@ export type AgendaEvent = CalEvent & { note?: { id: string; state: Meeting['stat/** Start notes: the meeting's id, or why it didn't start (gone: the event left the calendar) */export type StartResult = { id: string; alreadyRecording?: true; resumeRequested?: true } | { error: 'gone' | 'failed' }/** one meeting found: parts is a piece of its notes or transcript, hit on the words matched */-export type SearchResult = { meetingId: string; title: string; startedAt: number; parts: SnippetPart[]; confident?: boolean }+export type SearchResult = {+ meetingId: string; title: string; startedAt: number; attendees: Person[]; folder?: Pick<Folder, 'id' | 'name' | 'color'>+ preview: string; parts: SnippetPart[]; confident?: boolean+}/*** Where a meeting's enhanced notes are: idle (none yet, the meeting may still be on), waiting (for the transcript ordiff --git a/app/test/meetingSearch.test.ts b/app/test/meetingSearch.test.tsindex 9db27850..562951cf 100644--- a/app/test/meetingSearch.test.ts+++ b/app/test/meetingSearch.test.ts@@ -64,6 +64,19 @@ describe('meeting search', () => {expect(ids('standup')).toEqual([m.id, newerTypo.id, other.id])})+ it('reads only matching cards with their people, folder color and plain notes preview', () => {+ const kept = make('Planning', 10, ['Ana López'])+ const deleted = make('Other')+ const f = store.createFolder('Design', { color: 'teal', icon: 'folder' })+ store.addToFolder(f.id, kept.id)+ store.setNotes(kept.id, { enhanced: '## Decisions\n- **Ship** on Friday.' })+ store.trashMeeting(deleted.id)+ expect(ids('with Ana nov 10')).toEqual([kept.id])+ expect(store.meetingCards({ ids: [kept.id, deleted.id], limit: 2 })).toMatchObject([+ { id: kept.id, attendees: [{ name: 'Ana López' }], folders: [{ name: 'Design', color: 'teal' }], preview: 'Ship on Friday.' },+ ])+ })+it('filters yesterday even without other words and returns nothing for a miss', () => {const yesterday = make('Planning', 11)make('Planning', 12)diff --git a/app/test/motionInteractions.test.ts b/app/test/motionInteractions.test.tsindex dbcee9b1..2956a26d 100644--- a/app/test/motionInteractions.test.ts+++ b/app/test/motionInteractions.test.ts@@ -1,4 +1,4 @@-import { CalendarDays, Check, FileText, ICON_STROKE_WIDTH } from '../src/renderer/src/components/Icons'+import { CalendarDays, Check, ICON_STROKE_WIDTH } from '../src/renderer/src/components/Icons'import { renderToStaticMarkup } from 'react-dom/server'import { App } from '../src/renderer/src/App'import { afterEach, expect, it, vi } from 'vitest'@@ -503,7 +503,7 @@ it('offers letting AI apps make changes only once they can read, off until turneexpect(toggle()['aria-checked']).toBe(true)})-it('opens a command-search question as a draft when recording prevents an answer', async () => {+it.each([false, true])('opens a pending command-search question as a draft when recording prevents an answer (Meta: %s)', async metaKey => {vi.stubGlobal('document', { activeElement: null })vi.stubGlobal('HTMLButtonElement', class {})const draft = vi.fn().mockResolvedValue(undefined), onNavigate = vi.fn()@@ -511,7 +511,7 @@ it('opens a command-search question as a draft when recording prevents an answervi.stubGlobal('window', { yogurt: { capabilities: { calendar: false }, conversations } })const render = renderer(() => Search({ onOpen() {}, onNavigate, onSettingsChange() {}, onShortcuts() {}, onClose() {}, sidebarCollapsed: false, onToggleSidebar() {} }))find(render(), 'search-input').props.onChange({ target: { value: 'What did we decide?' } })- find(render(), 'search').props.onKeyDown({ key: 'Enter', metaKey: true, nativeEvent: {}, preventDefault() {} })+ find(render(), 'search').props.onKeyDown({ key: 'Enter', metaKey, nativeEvent: {}, preventDefault() {} })await vi.waitFor(() => expect(onNavigate).toHaveBeenCalledExactlyOnceWith('/chat/draft-id'))expect(draft).toHaveBeenCalledExactlyOnceWith('draft-id', 'What did we decide?')})@@ -589,7 +589,7 @@ it.each(['dark', 'mode'])('executes the ranked result when Enter beats a slow sevi.useFakeTimers()vi.stubGlobal('document', { activeElement: null })vi.stubGlobal('HTMLButtonElement', class {})- const meeting = { meetingId: 'm1', title: 'Dark mode planning', startedAt: 1, parts: [], confident: true }+ const meeting = { meetingId: 'm1', title: 'Dark mode planning', startedAt: 1, parts: [], attendees: [], preview: '', confident: true }const query = vi.fn(async () => { await new Promise(resolve => setTimeout(resolve, 300)); return [meeting] })const setTheme = vi.fn().mockResolvedValue(undefined), onOpen = vi.fn()vi.stubGlobal('window', { yogurt: { capabilities: {}, settings: { get: async () => ({ theme: 'light' }), setTheme }, search: { query } } })@@ -597,8 +597,14 @@ it.each(['dark', 'mode'])('executes the ranked result when Enter beats a slow serender()vi.mocked(useEffect).mock.calls[1][0]()await Promise.resolve()+ const question = 'What happened?'+ find(render(), 'search-input').props.onChange({ target: { value: question } })+ render()+ vi.mocked(useEffect).mock.calls.find(([, deps]) => deps?.[0] === question && deps.length > 1)![0]()+ await vi.runAllTimersAsync()find(render(), 'search-input').props.onChange({ target: { value: term } })const tree = render()+ expect(find(tree, 'search-ask').props['aria-selected']).toBe(true)vi.mocked(useEffect).mock.calls.find(([, deps]) => deps?.[0] === term && deps.length > 1)![0]()find(tree, 'search').props.onKeyDown({ key: 'Enter', nativeEvent: {}, preventDefault() {} })await vi.runAllTimersAsync()@@ -625,7 +631,7 @@ it('offers another read when a palette query fails', async () => {it('keeps initial search results still, ignores stationary hover, and scrolls only for keyboard selection', async () => {- const meetings = [{ meetingId: 'm1', title: 'Recent meeting', startedAt: 1000, parts: [] }]+ const meetings = ['m1', 'm2', 'm3'].map(meetingId => ({ meetingId, title: 'Recent meeting', startedAt: 1000, parts: [], attendees: [], preview: meetingId + ' notes' }))vi.stubGlobal('document', { activeElement: null })vi.stubGlobal('HTMLButtonElement', class {})vi.stubGlobal('window', { yogurt: { capabilities: { calendar: true }, search: { query: vi.fn().mockResolvedValue(meetings) } } })@@ -635,40 +641,37 @@ it('keeps initial search results still, ignores stationary hover, and scrolls onlet tree = render()find(tree, 'search-results').props.ref.current = { querySelector: () => ({ scrollIntoView }) }expect(find(tree, 'search-results').props.className).toContain('[overflow-anchor:none]')- expect(() => find(tree, 'search-intent-icon')).toThrow('Missing')scroll()expect(scrollIntoView).not.toHaveBeenCalled()- // Recent meetings arrive after the initial commands, without scrolling the commands back into view.+ // Receiving the recent meetings does not move the list.vi.mocked(useEffect).mock.calls.find(([, deps]) => deps?.length === 6)![0]()await Promise.resolve()tree = render(); scroll()expect(find(tree, 'search-result').props['aria-selected']).toBe(true)expect(scrollIntoView).not.toHaveBeenCalled()- find(tree, 'command-meetings').props.onMouseMove({ movementX: 0, movementY: 0 })+ find(tree, 'search-m2').props.onMouseMove({ movementX: 0, movementY: 0 })tree = render(); scroll()expect(find(tree, 'search-result').props['aria-selected']).toBe(true)- expect(() => find(tree, 'search-intent-icon')).toThrow('Missing')- find(tree, 'command-meetings').props.onMouseMove({ movementX: 1, movementY: 0 })+ find(tree, 'search-m2').props.onMouseMove({ movementX: 1, movementY: 0 })tree = render(); scroll()- expect(find(tree, 'command-meetings').props['aria-selected']).toBe(true)- expect(() => find(tree, 'search-intent-icon')).toThrow('Missing')- expect(find(tree, 'command-meetings').props.children[0].type).toBe(FileText)+ expect(find(tree, 'search-m2').props['aria-selected']).toBe(true)+ expect(find(tree, 'search-preview').props.children.props.children).toBe('m2 notes')expect(scrollIntoView).not.toHaveBeenCalled()find(tree, 'search').props.onKeyDown({ key: 'ArrowDown', nativeEvent: {}, preventDefault() {} })tree = render(); scroll()- expect(find(tree, 'command-chat').props['aria-selected']).toBe(true)+ expect(find(tree, 'search-m3').props['aria-selected']).toBe(true)expect(scrollIntoView).toHaveBeenCalledWith({ block: 'nearest' })scrollIntoView.mockClear()- find(tree, 'command-meetings').props.onMouseMove({ movementX: 0, movementY: 0 })+ find(tree, 'search-m2').props.onMouseMove({ movementX: 0, movementY: 0 })tree = render()- expect(find(tree, 'command-chat').props['aria-selected']).toBe(true)+ expect(find(tree, 'search-m3').props['aria-selected']).toBe(true)find(tree, 'search-result').props.onMouseMove({ movementX: 0, movementY: 1 })tree = render(); scroll()expect(find(tree, 'search-result').props['aria-selected']).toBe(true)expect(scrollIntoView).not.toHaveBeenCalled()})-it('keeps row glyphs stable across typing, filters, and keyboard selection without an input icon', async () => {+it('keeps row glyphs stable across keyboard selection', async () => {vi.useFakeTimers()vi.stubGlobal('document', { activeElement: null })vi.stubGlobal('HTMLButtonElement', class {})@@ -678,7 +681,7 @@ it('keeps row glyphs stable across typing, filters, and keyboard selection withomeetings: { onChange: () => () => {} },search: {people: async () => [{ name: 'Sample attendee', email: '[email protected]' }],- query: async () => [{ meetingId: 'm1', title: 'Planning', startedAt: 1000, parts: [] }],+ query: async () => [{ meetingId: 'm1', title: 'Planning', startedAt: 1000, parts: [], attendees: [], preview: '' }],},} })const folders = [{ id: 'f1', name: 'Planning', icon: 'calendar' as const, color: 'violet' as const, count: 1, createdAt: 1 }]@@ -696,7 +699,8 @@ it('keeps row glyphs stable across typing, filters, and keyboard selection withoconst icon = props.children[0]if (icons.has(props.id)) expect(icon.type).toBe(icons.get(props.id))icons.set(props.id, icon.type)- if (icon.props.appearance) expect(icon.props.appearance).toBe(folders[0])+ if (props.id === 'search-m1') expect(icon.props.className).toBe('search-meeting-dot')+ else if (icon.props.appearance) expect(icon.props.appearance).toBe(folders[0])else {expect(icon.props).toMatchObject({ size: 16, 'aria-hidden': 'true' })expect(renderToStaticMarkup(icon)).toContain(`stroke-width="${ICON_STROKE_WIDTH}"`)@@ -704,19 +708,17 @@ it('keeps row glyphs stable across typing, filters, and keyboard selection witho}inspect(props.children)}- for (const query of ['', 'plan', 'planning', 'November 11, 2028', 'att', 'Sample attendee', 'theme']) {+ for (const query of ['', 'plan', 'planning', 'November 11, 2028', 'att', 'Sample attendee', 'theme', 'what was decided?']) {find(render(), 'search-input').props.onChange({ target: { value: query } })render()vi.mocked(useEffect).mock.calls.find(([, deps]) => deps?.length === 6)![0]()await vi.runAllTimersAsync()- let tree = render()- expect(() => find(tree, 'search-intent-icon')).toThrow('Missing')+ const tree = render()inspect(tree)if (query === 'Sample attendee') expect(find(tree, 'search-person-filter')).toBeDefined()if (query === 'November 11, 2028') expect(find(tree, 'search-date')).toBeDefined()find(tree, 'search').props.onKeyDown({ key: 'ArrowDown', nativeEvent: {}, preventDefault() {} })- tree = render()- inspect(tree)+ inspect(render())}expect([...icons.keys()]).toEqual(expect.arrayContaining(['search-m1', 'search-ask', 'command-agenda-date', 'command-folder-f1', 'command-theme-light', 'search-person-email%3Aparticipant%40example.test']))})diff --git a/app/test/searchFilters.test.ts b/app/test/searchFilters.test.tsindex 347243a5..9d72858c 100644--- a/app/test/searchFilters.test.ts+++ b/app/test/searchFilters.test.ts@@ -17,7 +17,7 @@ describe('agenda date command', () => {expect(command).toMatchObject({ id: 'agenda-date', group: 'Go to', at: parsed.date!.start })const meeting = { meetingId: 'example', confident: true }const palette = searchPalette([...commands, command], [meeting], query, query, [], undefined, true)- expect(palette.rows.map(row => row.kind)).toEqual(['ask', 'command', 'meeting'])+ expect(palette.rows.map(row => row.kind)).toEqual(['meeting', 'command'])expect(palette.rows[palette.active]).toEqual({ kind: 'command', command })})it.each(['', 'planning', 'November', 'in November', 'last week', 'past 7 days', 'November 11 to November 13, 2028', '02/30/2028'])('omits the jump for %s', query => {@@ -36,7 +36,7 @@ describe('agenda date command', () => {expect(command.label).toBe('Zum 11. Nov. 2028 springen')const palette = searchPalette([command], [], query, query, [], undefined, true)expect(palette.rows[palette.active]).toEqual({ kind: 'command', command })- expect(searchPalette([command], [], 'last week', 'last week', [], undefined, true).rows.map(r => r.kind)).toEqual(['ask'])+ expect(searchPalette([command], [], 'last week', 'last week', [], undefined, true).rows.map(r => r.kind)).toEqual([])})it('recognizes single days on both daylight-saving transitions', () => {const saved = process.env.TZ@@ -73,11 +73,11 @@ describe('search filters', () => {const date = parseSearchQuery(people.text)const parts = searchFilterHighlights(query, people.matches, date.dateSpan)expect(parts).toEqual([- { text: 'notes with ' }, { text: person.name, kind: 'person' },+ { text: 'notes ' }, { text: 'with ' + person.name, kind: 'person' },{ text: ' ' }, { text: 'today', kind: 'date' },])expect(parts.map(p => p.text).join('')).toBe(query)- expect(removeSearchSpan(query, people.matches[0])).toBe('notes with today')+ expect(removeSearchSpan(query, people.matches[0])).toBe('notes today')expect(removeSearchSpan(query, date.dateSpan!)).toBe('notes with Riley Example')})@@ -86,23 +86,23 @@ describe('search filters', () => {const date = parseSearchQuery(people.text)const filtered = !!date.date || people.matches.length > 0const palette = searchPalette(commands, [{ confident: true }], query, query, [], undefined, filtered)- expect(palette.rows.map(r => r.kind)).toEqual(['ask', 'meeting'])+ expect(palette.rows.map(r => r.kind)).toEqual(['meeting'])expect(palette.rows[palette.active].kind).toBe('meeting')})- it('names the filters with no matches while keeping Ask available and selected', () => {+ it('names the filters when no meetings match', () => {expect(searchFilterEmptyMessage([person])).toBe('No matching meetings with Riley Example.')expect(searchFilterEmptyMessage([], 'Monday')).toBe('No matching meetings on Monday.')expect(searchFilterEmptyMessage([person], 'Monday')).toBe('No matching meetings with Riley Example on Monday.')expect(searchFilterEmptyMessage([])).toBeUndefined()const palette = searchPalette(commands, [], person.name, person.name, [], undefined, true)- expect(palette.rows).toEqual([{ kind: 'ask', query: person.name }])+ expect(palette.rows).toEqual([])expect(palette.active).toBe(0)})- it('restores ordinary commands after filter text is deleted', () => {+ it('returns to recents after filter text is deleted', () => {const query = removeSearchSpan(person.name, matchSearchPeople(person.name, [person]).matches[0])expect(searchFilterHighlights(query, [])).toEqual([])- expect(searchPalette(commands, [], query).rows.map(r => r.kind)).toEqual(['command'])+ expect(searchPalette(commands, [], query).rows.map(r => r.kind)).toEqual([])})})diff --git a/app/test/searchPeople.test.ts b/app/test/searchPeople.test.tsindex 208de2dc..9e65e402 100644--- a/app/test/searchPeople.test.ts+++ b/app/test/searchPeople.test.ts@@ -14,7 +14,26 @@ describe('people in search', () => {expect(completed).toBe('notes with Riley Example today')const recognized = matchSearchPeople(completed, people)expect(recognized.matches[0].person).toEqual(person)- expect(removeSearchSpan(completed, recognized.matches[0])).toBe('notes with today')+ expect(removeSearchSpan(completed, recognized.matches[0])).toBe('notes today')+ })++ it('recognizes a unique first name after with and leaves the date in place', () => {+ const ana = { name: 'Ana López', email: '[email protected]' }+ const q = 'planning with Ana last week'+ const { matches, text } = matchSearchPeople(q, [ana])+ expect(matches.map(m => m.person)).toEqual([ana])+ expect(q.slice(matches[0].start, matches[0].end)).toBe('with Ana')+ expect(removeSearchSpan(q, matches[0])).toBe('planning last week')+ const date = parseSearchQuery(text).dateSpan!+ expect(q.slice(date.start, date.end)).toBe('last week')+ const weekday = 'planning with Ana on Tuesday'+ const parsed = parseSearchQuery(matchSearchPeople(weekday, [ana]).text)+ expect(parsed.words).toEqual(['planning'])+ expect(weekday.slice(parsed.dateSpan!.start, parsed.dateSpan!.end)).toBe('on Tuesday')+ expect(matchSearchPeople('with Anabel', [ana]).matches).toEqual([])+ const ambiguous = matchSearchPeople('with Ana', [ana, { name: 'Ana Gray', email: null }])+ expect(ambiguous.matches).toEqual([])+ expect(ambiguous.suggestions).toHaveLength(2)})it('keeps chosen single-word names in the text, and stops filtering when edited away', () => {diff --git a/app/test/searchRanking.test.ts b/app/test/searchRanking.test.tsindex 1a4091fe..0216309b 100644--- a/app/test/searchRanking.test.ts+++ b/app/test/searchRanking.test.ts@@ -1,5 +1,5 @@import { describe, expect, it } from 'vitest'-import { orderSearchResults, scoreCommand, searchPalette, searchSelectionKey } from '../src/renderer/src/searchRanking'+import { scoreCommand, searchPalette, searchSelectionKey } from '../src/renderer/src/searchRanking'const commands = [{ label: 'Settings', group: 'Go to', synonyms: ['preferences', 'prefs'] },@@ -9,10 +9,10 @@ const commands = [{ label: 'Light theme', group: 'Appearance', synonyms: ['theme', 'appearance', 'mode', 'light'] },{ label: 'Match my system', group: 'Appearance', synonyms: ['theme', 'appearance', 'mode', 'system'] },{ label: 'Open at login', group: 'Settings' },- { label: 'Dark planning', group: 'Folders' },+ { label: 'Dark planning', group: 'Go to', synonyms: ['Folders'] },]-const labels = (query: string, source = commands) => orderSearchResults(source, ['meeting'], query)- .map((row) => row.kind === 'command' ? row.command.label : row.meeting)+const labels = (query: string, source = commands) => searchPalette(source, [{ meetingId: 'meeting' }], query).rows+ .map(row => row.kind === 'command' ? row.command.label : row.kind === 'meeting' && row.meeting.meetingId)describe('command scoring', () => {it('ranks exact labels, prefixes, word starts, aliases, then substrings', () => {@@ -44,49 +44,49 @@ describe('command scoring', () => {describe('search ordering', () => {it.each([- ['dark', ['Dark theme', 'Dark planning', 'meeting']],- ['light', ['Light theme', 'meeting']],- ['set', ['Settings', 'Open at login', 'meeting']],- ['trash', ['Trash', 'meeting']],- ['short', ['Keyboard shortcuts', 'meeting']],+ ['dark', ['meeting', 'Dark planning', 'Dark theme']],+ ['light', ['meeting', 'Light theme']],+ ['set', ['meeting', 'Settings', 'Open at login']],+ ['trash', ['meeting', 'Trash']],+ ['short', ['meeting', 'Keyboard shortcuts']],['budget review', ['meeting']],- ['theme', ['Dark theme', 'Light theme', 'Match my system', 'meeting']],+ ['theme', ['meeting', 'Dark theme', 'Light theme', 'Match my system']],['mode', ['meeting', 'Dark theme', 'Light theme', 'Match my system']],['appearance', ['meeting', 'Dark theme', 'Light theme', 'Match my system']],['prefs', ['meeting', 'Settings']],- ['ark', ['meeting', 'Dark theme', 'Dark planning']],+ ['ark', ['meeting', 'Dark planning', 'Dark theme']],])('orders commands and meetings for %s', (query, expected) => {expect(labels(query)).toEqual(expected)})it('keeps the empty-query order, including whitespace-only queries', () => {- for (const query of ['', ' ']) expect(labels(query)).toEqual(['meeting', ...commands.map((c) => c.label)])+ for (const query of ['', ' ']) expect(searchPalette(commands, ['1', '2', '3', '4'].map(meetingId => ({ meetingId })), query).rows.map(r => r.kind === 'meeting' && r.meeting.meetingId)).toEqual(['1', '2', '3'])})- it('caps promoted commands at four, keeps ties stable and leaves overflow accessible', () => {+ it('keeps all matching folders together in stable order', () => {const folders = Array.from({ length: 6 }, (_, i) => ({ label: `Plan ${i}`, group: 'Folders' }))- expect(labels('plan', folders)).toEqual(['Plan 0', 'Plan 1', 'Plan 2', 'Plan 3', 'meeting', 'Plan 4', 'Plan 5'])+ expect(labels('plan', folders)).toEqual(['meeting', 'Plan 0', 'Plan 1', 'Plan 2', 'Plan 3', 'Plan 4', 'Plan 5'])expect(folders.map((f) => f.label)).toEqual(['Plan 0', 'Plan 1', 'Plan 2', 'Plan 3', 'Plan 4', 'Plan 5'])})it('preserves meeting order and shows commands when there are no meetings', () => {- expect(orderSearchResults(commands, ['recent', 'older'], 'ark').slice(0, 2))- .toEqual([{ kind: 'meeting', meeting: 'recent' }, { kind: 'meeting', meeting: 'older' }])- expect(orderSearchResults(commands, [], 'prefs')).toEqual([{ kind: 'command', command: commands[0] }])- expect(orderSearchResults(commands, [], 'unknown')).toEqual([])+ const meetings = [{ meetingId: 'recent' }, { meetingId: 'older' }]+ expect(searchPalette(commands, meetings, 'ark').rows.slice(0, 2)).toEqual(meetings.map(meeting => ({ kind: 'meeting', meeting })))+ expect(searchPalette(commands, [], 'prefs').rows).toEqual([{ kind: 'command', command: commands[0] }])+ expect(searchPalette(commands, [], 'unknown').rows).toEqual([])})})describe('Ask in the command palette', () => {const meeting = { title: 'Budget review', confident: true }- it('pins Ask above results but selects a strong command or confident meeting', () => {+ it('groups meeting and command matches and selects the strongest intent', () => {const command = searchPalette(commands, [meeting], 'dark')- expect(command.rows[0]).toEqual({ kind: 'ask', query: 'dark' })- expect(command.rows[command.active]).toEqual({ kind: 'command', command: commands[3] })+ expect(command.rows.map(r => r.kind)).toEqual(['meeting', 'command', 'command'])+ expect(command.rows[command.active]).toEqual({ kind: 'command', command: commands[7] })expect(searchPalette(commands, [meeting], 'dark', ' dark ').active).toBe(command.active)const found = searchPalette(commands, [meeting], 'budget')- expect(found.rows[0].kind).toBe('ask')+ expect(found.rows[0].kind).toBe('meeting')expect(found.rows[found.active]).toEqual({ kind: 'meeting', meeting })})it.each(['Budget review?', 'who', 'what', 'when', 'where', 'why', 'how', 'did', 'does', 'is', 'are', 'can', 'should'])('selects Ask for a question starting with %s', query => {@@ -98,15 +98,15 @@ describe('Ask in the command palette', () => {const palette = searchPalette(commands, [meeting], 'island')expect(palette.rows[palette.active].kind).toBe('meeting')})- it('selects the only Ask row for no matches, and prefers Ask over weak matches', () => {- expect(searchPalette(commands, [], 'unfindable')).toEqual({ rows: [{ kind: 'ask', query: 'unfindable' }], active: 0 })+ it('leaves unmatched searches empty and keeps weak matches selectable', () => {+ expect(searchPalette(commands, [], 'unfindable')).toEqual({ rows: [], active: 0 })expect(searchPalette(commands, [{ confident: false }], 'budget').active).toBe(0)expect(searchPalette(commands, [], 'prefs').active).toBe(0)})it('keeps empty-query behavior and shows the latest question while results settle', () => {expect(searchPalette(commands, [meeting], ' ').rows[0]).toEqual({ kind: 'meeting', meeting })- const pending = searchPalette(commands, [meeting], '', 'new question')- expect(pending.rows[0]).toEqual({ kind: 'ask', query: 'new question' })+ const pending = searchPalette(commands, [meeting], '', 'new question?')+ expect(pending.rows[0]).toEqual({ kind: 'ask', query: 'new question?' })expect(pending.active).toBe(0)})})@@ -123,11 +123,11 @@ it('keeps a strong selection through pending keystrokes, while questions stay onexpect(searchPalette(commands, [meeting], 'what is', 'what is next').active).toBe(0)})-it('puts explicit people choices below Ask without treating them as automatic filters', () => {+it('offers people as choices without turning partial names into filters', () => {const choice = { person: { name: 'Riley Example', email: '[email protected]' }, start: 0, end: 3 }const result = searchPalette(commands, [], 'Ril', 'Ril', [choice])- expect(result.rows.map(r => r.kind)).toEqual(['ask', 'person'])- expect(result.rows[1]).toEqual({ kind: 'person', ...choice })+ expect(result.rows.map(r => r.kind)).toEqual(['person'])+ expect(result.rows[0]).toEqual({ kind: 'person', ...choice })expect(result.active).toBe(0)})@@ -135,7 +135,7 @@ describe('default selection settling', () => {const meeting = { meetingId: 'planning', confident: true }const choose = (query: string, previous?: string, meetings = [meeting]) => {const palette = searchPalette(commands, meetings, query, query, [], previous)- return searchSelectionKey(palette.rows[palette.active])+ return palette.rows[palette.active] && searchSelectionKey(palette.rows[palette.active])}it('keeps folder ties in command order and settles successive queries like the palette', () => {@@ -148,7 +148,8 @@ describe('default selection settling', () => {['dark', 'command:Dark planning'],]) {const pending = searchPalette(source, [meeting], completed, query, [], previous)- previous = query ? searchSelectionKey(pending.rows[pending.active]) : undefined+ if (!query) previous = undefined+ else if (completed) expect(pending.rows.length).toBeGreaterThan(0)const settled = searchPalette(source, [meeting], query, query, [], previous)expect(searchSelectionKey(settled.rows[settled.active])).toBe(expected)previous = query ? searchSelectionKey(settled.rows[settled.active]) : undefined@@ -183,9 +184,9 @@ describe('default selection settling', () => {}})- it('selects Ask for questions, vanished matches, or a meeting that is no longer confident', () => {+ it('selects Ask for questions and discards vanished previous selections', () => {expect(choose('what is dark theme?', 'command:Dark theme')).toBe('ask')- expect(choose('unfindable', 'command:Dark theme', [])).toBe('ask')- expect(choose('budget', 'meeting:planning', [{ ...meeting, confident: false }])).toBe('ask')+ expect(choose('unfindable', 'command:Dark theme', [])).toBeUndefined()+ expect(choose('budget', 'meeting:planning', [{ ...meeting, confident: false }])).toBe('meeting:planning')})})