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
Ask: choose meetings and folders from one searchable scope picker.
Eric Brownrout116d6d858322
diff --git a/app/e2e/askContext.spec.ts b/app/e2e/askContext.spec.tsindex 8f821f43..09176db1 100644--- a/app/e2e/askContext.spec.ts+++ b/app/e2e/askContext.spec.ts@@ -17,15 +17,15 @@ test('Ask shares meeting history and drafts, and Command-J starts the right contawait page.keyboard.press('Meta+j')const input = page.getByTestId('chat-input')await expect(input).toBeFocused()- await expect(page.locator('.ask-box .ask-context-row')).toHaveCount(1)- await expect(page.locator('.ask-context-row')).toHaveCSS('height', '32px')- await page.evaluate(id => window.yogurt.meetings.rename(id, 'Design review with LT'), meeting)- await expect(page.locator('.ask-context-row')).toContainText('Design review with LT')- await expect(page.getByTestId('ask-composer-context')).toHaveCSS('box-shadow', 'none')+ await expect(page.getByTestId('ask-scope')).toHaveCount(1)+ await expect(page.getByTestId('ask-scope')).toHaveCSS('height', '28px')+ await page.evaluate(id => window.yogurt.meetings.rename(id, 'Design review'), meeting)+ await expect(page.getByTestId('ask-scope')).toContainText('Design review')+ await expect(page.getByTestId('ask-composer-context')).toHaveCount(0)await input.fill('What was decided?')await input.press('Enter')await expect(page.getByTestId('chat-turn')).toHaveAttribute('data-status', 'done', { timeout: 15_000 })- await expect(page.locator('.ask-box .ask-context-row')).toHaveCount(1)+ await expect(page.getByTestId('ask-scope')).toHaveCount(1)await expect(page.getByTestId('ask-thread-context')).toHaveCount(0)await input.fill('Keep this question for later')await input.press('Escape')@@ -34,25 +34,29 @@ test('Ask shares meeting history and drafts, and Command-J starts the right contawait page.getByTestId('chat-history-item').filter({ hasText: 'What was decided?' }).click()await expect(page.getByTestId('chat-page-turn')).toHaveCount(1)await expect(page.getByTestId('chat-page-input')).toHaveValue('Keep this question for later')- await expect(page.locator('.ask-box .ask-context-row')).toHaveCount(1)- await page.locator('.ask-context-row button').focus()- await page.locator('.ask-context-row button').press('Enter')- await expect(page.getByTestId('ask-composer-context')).toHaveCount(0)+ await expect(page.getByTestId('ask-scope')).toHaveCount(1)+ await page.getByTestId('ask-scope').focus()+ await page.getByTestId('ask-scope').press('Enter')+ await page.locator('.ask-picker-clear').click()+ await expect(page.getByTestId('ask-scope')).toHaveText('All meetings')+ await page.getByRole('combobox', { name: 'Search meetings and folders' }).press('Escape')await expect(page.getByTestId('chat-page-input')).toBeFocused()await expect(page.getByTestId('chat-page-turn')).toHaveCount(1)await page.reload()await expect(page.getByTestId('chat-page-input')).toHaveValue('Keep this question for later')await page.keyboard.press('Meta+j')await expect(page.getByTestId('chat-page-turn')).toHaveCount(0)- await expect(page.locator('.ask-box .ask-context-row')).toHaveCount(0)+ await expect(page.getByTestId('ask-scope')).toHaveText('All meetings')const title = await page.evaluate(id => window.yogurt.meetings.get(id).then(v => v!.title), meeting)await page.getByTestId('chat-page-input').fill(`@${title}`)await expect(page.getByRole('option')).toHaveCount(1)await page.getByTestId('chat-page-input').press('Enter')- await expect(page.locator('.ask-box .ask-context-row')).toContainText(title)+ await expect(page.getByTestId('ask-scope')).toContainText(title)await expect(page.getByTestId('chat-page-input')).toHaveValue('')- await page.locator('.ask-box .ask-context-row button').click()- await expect(page.locator('.ask-box .ask-context-row')).toHaveCount(0)+ await page.getByTestId('ask-scope').click()+ await page.locator('.ask-picker-clear').click()+ await expect(page.getByTestId('ask-scope')).toHaveText('All meetings')+ await page.getByRole('combobox', { name: 'Search meetings and folders' }).press('Escape')} finally { await app.close() }})@@ -71,7 +75,10 @@ test('the note panel and full conversation expose Rename and a single Delete conawait page.keyboard.press('Meta+j')await expect(page.locator('.chat-panel .ask-conversation-head')).toHaveCount(1)// Global retrieval supplies cited chunks; single-meeting answers use the whole transcript.- await page.locator('.ask-context-row button').click()+ await page.getByTestId('ask-scope').click()+ await page.locator('.ask-picker-clear').click()+ await expect(page.getByTestId('ask-scope')).toHaveText('All meetings')+ await page.getByRole('combobox', { name: 'Search meetings and folders' }).press('Escape')await page.getByTestId('chat-input').fill('What are my next steps?')await page.getByTestId('chat-input').press('Enter')await expect(page.getByTestId('chat-turn')).toHaveAttribute('data-status', 'done', { timeout: 15_000 })@@ -138,7 +145,7 @@ test('Ask has soft thread edges, compact bubbles, and expands the same reading pawait expect(page.getByTestId('chat-turn')).toHaveAttribute('data-status', 'done', { timeout: 15_000 })await expect(page.getByTestId('chat-question')).toHaveCSS('height', '36px')await expect(page.getByTestId('chat-question')).toHaveCSS('padding', '8px 12px')- await expect(panel.locator('.ask-context-row')).toHaveCount(1)+ await expect(panel.getByTestId('ask-scope')).toHaveCount(1)await expect(page.getByTestId('chat-suggestion')).toHaveCount(0)const view = await page.evaluate(async id => window.yogurt.conversations.get(await window.yogurt.conversations.current([{ kind: 'meeting', id }])), meeting)// Long saved content makes both viewports overflow without a model-dependent answer length.@@ -208,7 +215,7 @@ test('Ask anchors context growth and retains picker results between searches', aawait expect(page.getByRole('option')).toHaveCount(1)await expect(page.getByRole('option')).toContainText(name)await input.press('Enter')- await expect(page.locator('.ask-context-row')).toHaveCount(index + 1)+ await expect(page.getByTestId('ask-scope')).toHaveText(index ? `Project review and ${index} ${index === 1 ? 'other' : 'others'}` : 'Project review')await expect(input).toHaveValue('')expect(await title.boundingBox()).toEqual(top)expect((await composer.boundingBox())!.y).toBe(composerTop)diff --git a/app/e2e/chat.spec.ts b/app/e2e/chat.spec.tsindex e76b163f..22d12878 100644--- a/app/e2e/chat.spec.ts+++ b/app/e2e/chat.spec.ts@@ -79,7 +79,7 @@ test('a narrow chat is modal, contains keyboard focus, and keeps its draft whenexpect(await panel.evaluate((el) => el.matches(':modal'))).toBe(true)await expect(input).toBeFocused()await page.keyboard.press('Tab')- await expect(panel.getByRole('button', { name: 'Add a meeting or folder' })).toBeFocused()+ await expect(panel.getByRole('button', { name: 'Choose meetings or folders' })).toBeFocused()await page.keyboard.press('Escape')await expect(panel).toHaveCount(0)await expect(page.getByTestId('chat-open')).toBeFocused()diff --git a/app/e2e/chatEntrance.spec.ts b/app/e2e/chatEntrance.spec.tsindex 7feb2ef2..c808b022 100644--- a/app/e2e/chatEntrance.spec.ts+++ b/app/e2e/chatEntrance.spec.ts@@ -33,11 +33,14 @@ test('Ask starters hide without moving the landing layout', async ({}, info) =>await page.getByTestId('chat-page-input').fill('')await expect(starters.first()).toBeVisible()expect(await title.boundingBox()).toEqual(titleBox)- await page.getByRole('button', { name: 'Add a meeting or folder', exact: true }).click()+ await page.getByRole('button', { name: 'Choose meetings or folders', exact: true }).click()+ await expect(page.getByRole('combobox', { name: 'Search meetings and folders' })).toBeFocused()+ await expect(page.getByTestId('chat-page-input')).toHaveValue('')await expect(starters.first()).toBeHidden()expect(await title.boundingBox()).toEqual(titleBox)expect(await composer.boundingBox()).toEqual(composerBox)- await page.getByTestId('chat-page-input').fill('')+ await page.keyboard.press('Escape')+ await expect(page.getByTestId('chat-page-input')).toBeFocused()await expect(starters.first()).toBeVisible()}await page.screenshot({ path: info.outputPath(`chat-${before ? 'before' : 'after'}-${colorScheme}.png`) })diff --git a/app/src/main/library/store.ts b/app/src/main/library/store.tsindex adac474d..08fc18d0 100644--- a/app/src/main/library/store.ts+++ b/app/src/main/library/store.ts@@ -165,9 +165,13 @@ export class Library {return (this.db.prepare('SELECT meeting_id, people FROM library_sources').all() as Row[]).map((r) => ({ meetingId: String(r.meeting_id), people: JSON.parse(String(r.people)) }))}+ /** The picker starts with a few of each kind and can reveal the remaining matches. */targets(query = ''): ContextTarget[] {- const meetings = this.db.prepare("SELECT id,title,started_at FROM meetings WHERE trashed_at IS NULL AND instr(lower(title),lower(?)) > 0 ORDER BY started_at DESC LIMIT 40").all(query) as Row[]- const folders = this.db.prepare("SELECT id,name FROM folders WHERE instr(lower(name),lower(?)) > 0 ORDER BY name LIMIT 40").all(query) as Row[]+ const typed = query !== ''+ const folders = this.db.prepare(`SELECT id,name FROM folders WHERE instr(lower(name),lower(?)) > 0+ ORDER BY ${typed ? 'name' : '(SELECT MAX(added_at) FROM folder_meetings WHERE folder_id = folders.id) DESC, created_at DESC'} LIMIT 40`).all(query) as Row[]+ const meetings = this.db.prepare("SELECT id,title,started_at FROM meetings WHERE trashed_at IS NULL AND instr(lower(title),lower(?)) > 0 ORDER BY started_at DESC LIMIT 40")+ .all(query) as Row[]return [...meetings.map(r => ({ kind: 'meeting' as const, id: String(r.id), title: String(r.title), startedAt: Number(r.started_at) })),...folders.map(r => ({ kind: 'folder' as const, id: String(r.id), title: String(r.name) }))]}diff --git a/app/src/renderer/src/components/AskContext.tsx b/app/src/renderer/src/components/AskContext.tsxindex e5c10fa6..2b0fb776 100644--- a/app/src/renderer/src/components/AskContext.tsx+++ b/app/src/renderer/src/components/AskContext.tsx@@ -1,18 +1,16 @@-import { FileText, Folder, X } from 'lucide-react'+import { ChevronDown, FileText, Folder } from 'lucide-react'import type { ContextTarget } from '../../../shared/askContext'import { t } from '../../../shared/i18n'export const chipTitle = (c: ContextTarget) => c.title.trim() || (c.kind === 'meeting' ? t('Untitled meeting') : t('Folder'))+export const scopeLabel = (chips: ContextTarget[]) => ({+ name: chips.length ? chipTitle(chips[0]) : t('All meetings'),+ others: chips.length > 1 ? t('and {count} others', { count: chips.length - 1 }) : '',+})-export function AskContext({ chips, disabled, onRemove }: {- chips: ContextTarget[]; disabled: boolean; onRemove: (chip: ContextTarget) => void-}) {- if (!chips.length) return null- return <div className="ask-context-strip" data-testid="ask-composer-context">- {chips.map(c => <div className="ask-context-row" key={`${c.kind}:${c.id}`} title={chipTitle(c)}>- {c.kind === 'meeting' ? <FileText size={14} aria-hidden="true" /> : <Folder size={14} aria-hidden="true" />}- <span>{chipTitle(c)}</span>- <button type="button" className="chat-icon" disabled={disabled} aria-label={`${t('Remove')} ${chipTitle(c)}`} title={t('Remove')} onClick={() => onRemove(c)}><X size={12} aria-hidden="true" /></button>- </div>)}- </div>+export function AskContext({ chips }: { chips: ContextTarget[] }) {+ const label = scopeLabel(chips)+ const Icon = chips[0]?.kind === 'folder' ? Folder : FileText+ return <>{!!chips.length && <Icon size={14} aria-hidden="true" />}<span className="ask-scope-label"><span className="ask-scope-name">{label.name}</span>+ {label.others && <span className="ask-scope-others">{` ${label.others}`}</span>}</span><ChevronDown size={12} aria-hidden="true" /></>}diff --git a/app/src/renderer/src/components/AskConversation.tsx b/app/src/renderer/src/components/AskConversation.tsxindex 3939693c..1f5163e2 100644--- a/app/src/renderer/src/components/AskConversation.tsx+++ b/app/src/renderer/src/components/AskConversation.tsx@@ -1,5 +1,7 @@import { useEffect, useLayoutEffect, useRef, useState, type KeyboardEvent } from 'react'-import { ArrowDown, ArrowUp, AtSign, Check, FileText, Folder, Maximize2, Square, X } from 'lucide-react'+import { createPortal } from 'react-dom'+import { Popover } from '@base-ui/react/popover'+import { ArrowDown, ArrowUp, Check, Ellipsis, FileText, Folder, Maximize2, Square, X } from 'lucide-react'import { attachContext, mentionAt, type ContextTarget } from '../../../shared/askContext'import type { AskStep, ConversationTurn, ConversationView, LibrarySource } from '../../../shared/types'import { t } from '../../../shared/i18n'@@ -19,6 +21,7 @@ import { AskContext, chipTitle } from './AskContext'import { useFollowLatest } from '../useFollowLatest'import { Swap, SwapText } from './Swap'import { attachAskTracer } from '../askTracer'+import { mentionPosition, textareaMentionRect } from '../mentionPlacement'const drafts = new Map<string, string>()const starters = (chips: ContextTarget[], recording: boolean) => chips.length === 1 && chips[0].kind === 'meeting'@@ -39,8 +42,29 @@ export function AskConversation({ id, pendingDraftKey, initial, loadError = falsconst pendingQuestion = useRef<string>(undefined)const [changing, setChanging] = useState(false)const [mention, setMention] = useState<{ start: number; end: number; query: string }>()+ const [selector, setSelector] = useState<{ query: string }>()+ const dismissedMention = useRef(false)+ const query = selector?.query ?? mention?.queryconst [targetResults, setTargetResults] = useState<{ query: string; items: ContextTarget[] }>()- const targets = targetResults?.items ?? []+ // The bare list, kept so the picker opens already filled instead of flashing Loading.+ const bare = useRef<ContextTarget[]>(undefined)+ const prefetch = () => { if (!bare.current) void window.yogurt.conversations.targets('').then(items => { bare.current = items }).catch(() => {}) }+ const [expanded, setExpanded] = useState(false)+ const [scopeExpanded, setScopeExpanded] = useState(false)+ const chips = chat ? attachContext(chat.chips, chat.draftChips) : []+ const inScope = (c: ContextTarget) => chips.some(x => x.kind === c.kind && x.id === c.id)+ const items = (targetResults?.items ?? []).filter(c => query ? true : !inScope(c))+ const meetings = items.filter(c => c.kind === 'meeting')+ const folders = items.filter(c => c.kind === 'folder')+ const shownFolders = folders.slice(0, targetResults?.query ? 4 : 2)+ const shownMeetings = meetings.slice(0, targetResults?.query ? 10 - shownFolders.length : folders.length ? 3 : 5)+ const allTargets = [...meetings, ...folders]+ const targets = expanded ? allTargets : [...shownMeetings, ...shownFolders]+ const more = allTargets.length - targets.length+ const scoped = selector && !query ? chips.slice(0, scopeExpanded ? undefined : 3) : []+ const scopeMore = selector && !query ? chips.length - scoped.length : 0+ const offset = selector && !query ? scoped.length + (scopeMore ? 1 : 0) : 0+ const rowCount = offset + targets.length + (more ? 1 : 0)const [selected, setSelected] = useState(0)const input = useRef<HTMLTextAreaElement>(null)const composer = useRef<HTMLFormElement>(null)@@ -53,7 +77,9 @@ export function AskConversation({ id, pendingDraftKey, initial, loadError = falsreturn () => { tracer.current?.dispose(); tracer.current = undefined }}, [composerReady])useEffect(() => { tracer.current?.update() }, [text])- const focusAfterRemove = useRef(false)+ const search = useRef<HTMLInputElement>(null)+ const mentionMenu = useRef<HTMLDivElement>(null)+ const savedSelection = useRef({ start: 0, end: 0 })const scrollKey = `conversation/${id}`const scroll = useScrollMemory<HTMLDivElement>(scrollKey, !!chat)const content = useRef<HTMLDivElement>(null)@@ -96,29 +122,47 @@ export function AskConversation({ id, pendingDraftKey, initial, loadError = fals}, [id])useEffect(() => {let active = true- if (!mention) { setTargetResults(undefined); setSelected(0); return }+ if (query === undefined) { setTargetResults(undefined); setSelected(0); setExpanded(false); return }// Keep the last completed search visible until the replacement is ready.- void window.yogurt.conversations.targets(mention.query).then(items => {+ void window.yogurt.conversations.targets(query).then(items => {if (!active) return- setTargetResults({ query: mention.query, items: items.filter(c => ![...(chat?.chips ?? []), ...(chat?.draftChips ?? [])].some(x => x.kind === c.kind && x.id === c.id)) }); setSelected(0)+ if (!query) bare.current = items+ setTargetResults({ query, items }); setSelected(0); setExpanded(false)}).catch(() => { if (active) setError(true) })return () => { active = false }- }, [mention?.query, !!mention, chat?.chips, chat?.draftChips])+ }, [query, !!selector, chat?.chips, chat?.draftChips])// about exactly one meeting: main reads it in now, so the first question only reads itself- const scope = chat ? attachContext(chat.chips, chat.draftChips) : []- const single = scope.length === 1 && scope[0].kind === 'meeting' ? scope[0].id : undefined+ const single = chips.length === 1 && chips[0].kind === 'meeting' ? chips[0].id : undefinedconst warm = () => { if (single) window.yogurt.conversations.warm(id) }useEffect(warm, [id, single])useEffect(() => { document.getElementById(`${prefix}-context-${selected}`)?.scrollIntoView({ block: 'nearest' }) }, [selected, targets])useLayoutEffect(() => {- if (!changing && focusAfterRemove.current) { focusAfterRemove.current = false; input.current?.focus() }- }, [changing, chat])+ const field = input.current, menu = mentionMenu.current+ if (!mention || !field || !menu) return+ const position = () => {+ const line = textareaMentionRect(field, mention.start)+ const size = { width: menu.offsetWidth, height: Math.min(340, innerHeight / 2, menu.scrollHeight + menu.offsetHeight - menu.clientHeight) }+ const placed = mentionPosition(line, size, { width: innerWidth, height: innerHeight })+ Object.assign(menu.style, { left: `${placed.left}px`, top: `${placed.top}px`, maxHeight: `${placed.maxHeight}px` })+ }+ position()+ const observer = new ResizeObserver(position)+ observer.observe(field)+ observer.observe(menu)+ if (composer.current) observer.observe(composer.current)+ window.addEventListener('resize', position)+ document.addEventListener('scroll', position, true)+ return () => {+ observer.disconnect()+ window.removeEventListener('resize', position)+ document.removeEventListener('scroll', position, true)+ }+ }, [mention, text, targetResults, expanded, chat])const turns = chat?.turns ?? [], last = turns.at(-1)const answering = last?.status === 'waiting' || last?.status === 'answering'const busy = !chat || sending || changing || answeringconst unsent = (chat ? chat.firstChips === null : home || panel) && !turns.lengthconst landing = home || (!panel && unsent)- const chips = chat ? attachContext(chat.chips, chat.draftChips) : []const saveText = (value: string) => {edited.current = truesetText(value)@@ -127,7 +171,10 @@ export function AskConversation({ id, pendingDraftKey, initial, loadError = falsvoid window.yogurt.conversations.draft(id, value).then(() => { if (drafts.get(id) === value) drafts.delete(id) }).catch(() => setError(true))}const detectMention = (value: string, caret: number) => {- setMention(mentionAt(value, caret))+ const typed = value.slice(0, caret) !== text.slice(0, caret)+ if (typed && value[caret - 1] === '@') dismissedMention.current = false+ if (typed && value[caret - 1] === ' ' && mention && targetResults?.query === mention.query && !targets.length) dismissedMention.current = true+ setMention(dismissedMention.current ? undefined : mentionAt(value, caret))}const context = async (chips: ContextTarget[]) => {setChanging(true); setError(false)@@ -136,22 +183,27 @@ export function AskConversation({ id, pendingDraftKey, initial, loadError = falsfinally { setChanging(false) }}const insert = (c: ContextTarget) => {- if (!mention || busy || !chat) return- const range = mention- void context([...chat.draftChips, c]).then(() => {- const value = text.slice(0, range.start) + text.slice(range.end)- saveText(value); setMention(undefined)- requestAnimationFrame(() => { input.current?.focus(); input.current?.setSelectionRange(range.start, range.start) })+ if ((!mention && !selector) || busy || !chat) return+ void (inScope(c) ? Promise.resolve() : context(attachContext(chat.firstChips === null ? chips : chat.draftChips, [c]))).then(() => {+ if (mention) saveText(text.slice(0, mention.start) + text.slice(mention.end))+ if (!mention) return+ setMention(undefined)+ requestAnimationFrame(() => { input.current?.focus(); input.current?.setSelectionRange(mention.start, mention.start) })}).catch(() => {})}- const remove = async (chip: ContextTarget) => {+ const remove = async (targets: ContextTarget[]) => {if (busy) return- focusAfterRemove.current = truesetChanging(true); setError(false)- try { await window.yogurt.conversations.removeContext(id, chip) }- catch { focusAfterRemove.current = false; setError(true) }+ try { for (const chip of targets) await window.yogurt.conversations.removeContext(id, chip) }+ catch { setError(true) }finally { setChanging(false) }}+ const toggle = (c: ContextTarget) => { if (selector && inScope(c)) void remove([c]); else insert(c) }+ const restoreSelection = () => {+ input.current?.focus({ preventScroll: true })+ input.current?.setSelectionRange(savedSelection.current.start, savedSelection.current.end)+ return false+ }// Sending from the box (Enter, the send button or a starter) keeps the person in it; the button turns into Stop and starters go. A disabled field would drop focus, so it is read-only while saving.const keepTyping = () => { const from = document.activeElement; if (from === document.body || from?.closest('.ask-box, .ask-starters')) input.current?.focus({ preventScroll: true }) }const submit = (q: string) => {@@ -164,7 +216,7 @@ export function AskConversation({ id, pendingDraftKey, initial, loadError = falsconst send = (q: string) => {if (!q.trim() || sending || changing || answering || loadError || (!chat && (!panel || error))) returnkeepTyping()- follow.resume(); setSending(true); setError(false); setMention(undefined)+ follow.resume(); setSending(true); setError(false); setMention(undefined); setSelector(undefined)// Typing is available before the conversation loads; Enter must survive that handoff too.if (!chat) { pendingQuestion.current = q; return }submit(q)@@ -176,23 +228,59 @@ export function AskConversation({ id, pendingDraftKey, initial, loadError = falspendingQuestion.current = undefinedsubmit(question)}, [chat, loadError])- const key = (e: KeyboardEvent<HTMLTextAreaElement>) => {+ const expand = () => {+ setSelected(offset + allTargets.findIndex(c => !targets.includes(c)))+ setExpanded(true)+ }+ const key = (e: KeyboardEvent<HTMLTextAreaElement | HTMLInputElement>) => {if (e.nativeEvent.isComposing) return- if (mention && ['ArrowDown', 'ArrowUp', 'Enter', 'Escape'].includes(e.key)) {+ if ((mention || selector) && ['ArrowDown', 'ArrowUp', 'Enter', 'Escape'].includes(e.key)) {e.preventDefault(); e.stopPropagation()- if (e.key === 'Escape') setMention(undefined)- else if (e.key === 'Enter') { if (targets[selected]) insert(targets[selected]) }- else setSelected(i => (i + (e.key === 'ArrowDown' ? 1 : -1) + targets.length) % (targets.length || 1))+ if (e.key === 'Escape') { dismissedMention.current = true; setMention(undefined); setSelector(undefined) }+ else if (e.key === 'Enter') {+ const row = selected < scoped.length ? scoped[selected] : scopeMore && selected === offset - 1 ? 'scope-more' : more && selected === offset + targets.length ? 'more' : targets[selected - offset]+ if (row === 'scope-more') setScopeExpanded(true)+ else if (row === 'more') expand()+ // Enter picks and goes back to the question; a click keeps the picker open to pick several+ else if (row) { toggle(row); if (selector) setSelector(undefined) }+ }+ else setSelected(i => (i + (e.key === 'ArrowDown' ? 1 : -1) + rowCount) % (rowCount || 1))} else if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); send(text) }}const fresh = () => {if (!chat || changing) returnvoid window.yogurt.conversations.current(attachContext(chat.chips, chat.draftChips), true).then(onSelect).catch(() => setError(true))}- const startersHidden = !panel && !!text- const suggestions = unsent && (landing || panel) && (!panel || !text) && <div data-testid={panel ? 'chat-suggestions' : 'chat-starters'} aria-hidden={startersHidden || undefined} inert={startersHidden} className={`ask-starters${panel ? '' : ' ask-home-starters'}`}>- {starters(chat ? attachContext(chat.chips, chat.draftChips) : [], recording).map(q => <button type="button" key={q} title={q} data-testid={panel ? 'chat-suggestion' : 'chat-starter'} disabled={busy || startersHidden} onClick={() => send(q)}>{q}</button>)}+ const startersHidden = !panel && (!!text || !!selector)+ const suggestions = unsent && (landing || panel) && (!panel || !text) && <div data-testid={panel ? 'chat-suggestions' : 'chat-starters'} aria-hidden={startersHidden || undefined} data-instant={!!selector || undefined} inert={startersHidden} className={`ask-starters${panel ? '' : ' ask-home-starters'}`}>+ {starters(chips, recording).map(q => <button type="button" key={q} title={q} data-testid={panel ? 'chat-suggestion' : 'chat-starter'} disabled={busy || startersHidden} onClick={() => send(q)}>{q}</button>)}</div>+ const targetRow = (c: ContextTarget, i: number) => <button type="button" role="option" tabIndex={-1} disabled={busy}+ aria-selected={selector ? inScope(c) : selected === i} data-active={selected === i || undefined} id={`${prefix}-context-${i}`} key={`${c.kind}:${c.id}`}+ onMouseDown={e => e.preventDefault()} onClick={() => toggle(c)}>+ {c.kind === 'meeting' ? <FileText size={14} aria-hidden="true" /> : <Folder size={14} aria-hidden="true" />}<span>{chipTitle(c)}</span>+ {inScope(c) ? <Check size={14} aria-hidden="true" /> : c.startedAt && <small>{dayLabel(c.startedAt)}</small>}+ </button>+ const results = <>+ {!!offset && <>+ {!!scoped.length && <div role="group" aria-label={t('In this chat')}><h3>{t('In this chat')}<button type="button" className="ask-picker-clear" disabled={busy}+ onMouseDown={e => e.preventDefault()} onClick={() => void remove(chips)}>{t('Clear')}</button></h3>+ {scoped.map((c, i) => targetRow(c, i))}+ {!!scopeMore && <button type="button" role="option" tabIndex={-1} aria-selected={false} data-active={selected === offset - 1 || undefined} id={`${prefix}-context-${offset - 1}`}+ onMouseDown={e => e.preventDefault()} onClick={() => setScopeExpanded(true)}><Ellipsis size={14} aria-hidden="true" /><span>{t('{count} more', { count: scopeMore })}</span></button>}+ </div>}+ </>}+ {(['meeting', 'folder'] as const).map(kind => targets.some(c => c.kind === kind) && <div key={kind} role="group" aria-label={kind === 'meeting' ? t('Meetings') : t('Folders')}>+ <h3>{kind === 'meeting' ? t('Meetings') : t('Folders')}</h3>+ {targets.map((c, i) => c.kind === kind && targetRow(c, offset + i))}+ </div>)}+ {!!more && <button type="button" role="option" tabIndex={-1} disabled={busy} className="text-muted" aria-selected={selector ? false : selected === offset + targets.length} data-active={selected === offset + targets.length || undefined} id={`${prefix}-context-${offset + targets.length}`}+ onMouseDown={e => e.preventDefault()} onClick={expand}>+ <Ellipsis size={14} aria-hidden="true" /><span>{t('{count} more results', { count: more })}</span>+ </button>}+ {!targetResults && !error && <p role="status">{t('Loading…')}</p>}+ {targetResults && !targets.length && !offset && <p>{t('Nothing found for “{query}”.', { query: targetResults.query })}</p>}+ </>return <div data-testid={landing ? "chat-empty" : undefined} aria-busy={last?.status === 'answering'} className={`ask-conversation${landing ? ' ask-landing' : ''}`}>{landing ? <h1 className="ask-home-title">{t('Ask about your meetings')}</h1> : <header className="ask-conversation-head"><h2 id={panel ? 'meeting-chat-title' : undefined} title={[chat?.title || t('New chat'), ...(chat?.chips.map(chipTitle) ?? [])].join('\n')}>{chat?.title || t('New chat')}</h2>@@ -215,37 +303,45 @@ export function AskConversation({ id, pendingDraftKey, initial, loadError = fals<div className={`ask-composer${panel ? ' chat-composer' : ''}`}>{error && <p data-testid={panel ? "chat-send-error" : "chat-page-error"} role="alert" className="chat-error">{t("Couldn't save your changes")}</p>}<LoadingContent pending={!panel && !chat && !error} onReady={() => { if (chat) input.current?.focus({ preventScroll: true }) }} testId={landing ? "chat-loading" : undefined}><form ref={composer} className="ask-box" data-busy={busy || undefined} data-testid={`${prefix}-box`} onSubmit={e => { e.preventDefault(); send(text) }} onBlur={e => { if (!e.currentTarget.contains(e.relatedTarget)) setMention(undefined) }}>- <AskContext chips={chips} disabled={busy} onRemove={remove} /><div className="ask-field"><textarea autoFocus={panel} ref={input} id={panel ? 'meeting-question' : 'library-question'} data-testid={`${prefix}-input`} rows={1} maxLength={4000}placeholder={panel ? t('Ask anything') : t('Ask about your meetings')} aria-label={panel ? t('Ask anything') : t('Ask about your meetings')} value={text} disabled={!panel && !chat} readOnly={sending || changing}role="combobox" aria-autocomplete="list" aria-expanded={!!mention} aria-controls={mention ? `${prefix}-contexts` : undefined}- aria-activedescendant={mention && targets[selected] ? `${prefix}-context-${selected}` : undefined}+ aria-activedescendant={mention && selected < rowCount ? `${prefix}-context-${selected}` : undefined}onChange={e => { saveText(e.target.value); detectMention(e.target.value, e.target.selectionStart) }}- onClick={e => detectMention(e.currentTarget.value, e.currentTarget.selectionStart)} onFocus={warm} onKeyDown={key} />+ onClick={e => detectMention(e.currentTarget.value, e.currentTarget.selectionStart)}+ onSelect={e => detectMention(e.currentTarget.value, e.currentTarget.selectionStart)} onFocus={warm} onKeyDown={key} /><div className="ask-box-actions">- <button type="button" className="ask-toolbar-button" disabled={busy} aria-label={t('Add a meeting or folder')} title={t('Add a meeting or folder')} onClick={() => {- const caret = input.current?.selectionStart ?? text.length- const token = caret && !/\s/.test(text[caret - 1]) ? ' @' : '@'- const value = text.slice(0, caret) + token + text.slice(caret)- saveText(value); detectMention(value, caret + token.length)- input.current?.focus(); requestAnimationFrame(() => input.current?.setSelectionRange(caret + token.length, caret + token.length))- }}><AtSign size={16} aria-hidden="true" /></button>+ <Popover.Root open={!!selector} onOpenChange={open => {+ setMention(undefined)+ setTargetResults(open && bare.current ? { query: '', items: bare.current } : undefined); setSelected(0); setExpanded(false); setScopeExpanded(false)+ // Closing from the pill leaves focus on it; hand it back to the text unless the click went somewhere else.+ if (!open) requestAnimationFrame(() => { const at = document.activeElement; if (!at || at === document.body || at.closest('.ask-scope, .ask-selector')) input.current?.focus({ preventScroll: true }) })+ if (open) savedSelection.current = { start: input.current?.selectionStart ?? text.length, end: input.current?.selectionEnd ?? text.length }+ setSelector(open ? { query: '' } : undefined)+ }}>+ <span className="ask-scope-group">+ <Popover.Trigger type="button" className="ask-scope" data-testid="ask-scope" onPointerEnter={prefetch} onFocus={prefetch} disabled={busy} aria-label={t('Choose meetings or folders')} title={t('Choose meetings or folders')}><AskContext chips={chips} /></Popover.Trigger>+ {!!chips.length && <button type="button" className="ask-scope-clear" data-testid="ask-scope-clear" disabled={busy} aria-label={t('Clear')} title={t('Clear')}+ onClick={() => { void remove(chips); input.current?.focus({ preventScroll: true }) }}><X size={12} aria-hidden="true" /></button>}+ </span>+ <Popover.Portal container={input.current?.closest('dialog') ?? undefined}>+ <Popover.Positioner anchor={composer} side={landing ? 'bottom' : 'top'} align="start" collisionAvoidance={{ fallbackAxisSide: 'none' }} sideOffset={6} collisionPadding={16} positionMethod="fixed" className="ask-selector-positioner">+ <Popover.Popup className="ask-picker ask-selector" aria-label={t('Choose meetings or folders')} initialFocus={search} finalFocus={restoreSelection}>+ <input ref={search} className="ask-picker-search" placeholder={t('Search…')} aria-label={t('Search meetings and folders')}+ role="combobox" aria-autocomplete="list" aria-expanded={!!selector} aria-controls={`${prefix}-contexts`}+ aria-activedescendant={selected < rowCount ? `${prefix}-context-${selected}` : undefined}+ value={selector?.query ?? ''} maxLength={200} readOnly={changing} onChange={e => setSelector(current => current && { ...current, query: e.target.value })} onKeyDown={key} />+ <div className="ask-picker-results" id={`${prefix}-contexts`} role="listbox" aria-multiselectable="true" aria-label={t('Add context')}>{results}</div>+ </Popover.Popup>+ </Popover.Positioner>+ </Popover.Portal>+ </Popover.Root>{answering ? <button type="button" data-testid={`${prefix}-stop`} className="ask-toolbar-button ask-stop" aria-label={chat?.waitsForModel ? t('Cancel question') : t('Stop')} title={chat?.waitsForModel ? t('Cancel question') : t('Stop')} onClick={() => { keepTyping(); window.yogurt.conversations.stop(id) }}><Square size={10} fill="currentColor" /></button>: <button type="submit" data-testid={`${prefix}-send`} className="ask-toolbar-button ask-send" disabled={busy || !text.trim()} aria-label={t('Ask')}><span className="orb-material" aria-hidden="true" /><ArrowUp size={16} /></button>}</div></div>- {mention && <div className="ask-picker" id={`${prefix}-contexts`} role="listbox" aria-label={t('Add context')}>- {(['meeting', 'folder'] as const).map(kind => targets.some(c => c.kind === kind) && <div key={kind} role="group" aria-label={kind === 'meeting' ? t('Meetings') : t('Folders')}>- <h3>{kind === 'meeting' ? t('Meetings') : t('Folders')}</h3>- {targets.map((c, i) => c.kind === kind && <button type="button" role="option" aria-selected={selected === i} id={`${prefix}-context-${i}`} key={`${c.kind}:${c.id}`}- onMouseDown={e => e.preventDefault()} onClick={() => insert(c)}>- {kind === 'meeting' ? <FileText size={14} /> : <Folder size={14} />}<span>{chipTitle(c)}</span>{c.startedAt && <small>{dayLabel(c.startedAt)}</small>}- </button>)}- </div>)}- {!targetResults && !error && <p role="status">{t('Loading…')}</p>}- {targetResults && !targets.length && <p>{t('Nothing found for “{query}”.', { query: targetResults.query })}</p>}- </div>}+ {mention && createPortal(<div ref={mentionMenu} className="ask-picker ask-mention" id={`${prefix}-contexts`} role="listbox" aria-label={t('Add context')}>{results}</div>, input.current?.closest('dialog') ?? document.body)}</form></LoadingContent></div>{!panel && suggestions}diff --git a/app/src/renderer/src/mentionPlacement.ts b/app/src/renderer/src/mentionPlacement.tsnew file mode 100644index 00000000..a64cf5ca--- /dev/null+++ b/app/src/renderer/src/mentionPlacement.ts@@ -0,0 +1,40 @@+export function mentionPosition(line: { left: number; top: number; bottom: number }, menu: { width: number; height: number }, viewport: { width: number; height: number }) {+ const padding = 16, gap = 4+ const below = Math.max(0, viewport.height - padding - line.bottom - gap)+ const above = Math.max(0, line.top - gap - padding)+ const flip = menu.height > below && above > below+ const maxHeight = Math.min(menu.height, flip ? above : below)+ return {+ left: Math.max(padding, Math.min(line.left, viewport.width - padding - menu.width)),+ top: Math.max(padding, Math.min(flip ? line.top - gap - maxHeight : line.bottom + gap, viewport.height - padding - maxHeight)),+ maxHeight,+ }+}++export function textareaMentionRect(input: HTMLTextAreaElement, start: number) {+ const style = getComputedStyle(input), bounds = input.getBoundingClientRect()+ const mirror = document.createElement('div'), marker = document.createElement('span')+ for (const property of [+ 'font-family', 'font-size', 'font-weight', 'font-style', 'font-variant', 'font-stretch',+ 'line-height', 'letter-spacing', 'word-spacing', 'text-indent', 'text-align', 'text-transform',+ 'direction', 'tab-size', 'padding-top', 'padding-right', 'padding-bottom', 'padding-left',+ 'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width', 'border-style',+ 'white-space', 'overflow-wrap', 'word-break',+ ]) mirror.style.setProperty(property, style.getPropertyValue(property))+ // clientWidth excludes the textarea's scrollbar, so wrapping stays aligned when it scrolls.+ Object.assign(mirror.style, {+ position: 'fixed', visibility: 'hidden', pointerEvents: 'none', left: '0', top: '0',+ boxSizing: 'border-box', width: `${input.clientWidth + parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth)}px`,+ })+ mirror.setAttribute('aria-hidden', 'true')+ mirror.textContent = input.value.slice(0, start)+ marker.textContent = input.value.slice(start, start + 1)+ mirror.append(marker, document.createTextNode(input.value.slice(start + 1)))+ document.body.append(mirror)+ try {+ const rect = marker.getBoundingClientRect()+ const height = parseFloat(style.lineHeight)+ const top = bounds.top + rect.top - (height - rect.height) / 2 - input.scrollTop+ return { left: bounds.left + rect.left - input.scrollLeft, top, bottom: top + height }+ } finally { mirror.remove() }+}diff --git a/app/src/renderer/src/workspace.css b/app/src/renderer/src/workspace.cssindex 119abb86..4fbf193b 100644--- a/app/src/renderer/src/workspace.css+++ b/app/src/renderer/src/workspace.css@@ -479,7 +479,6 @@ body:has(.chat-panel[open]) .app-toast-viewport:dir(rtl) { --toast-x:440px; }.ask-conversation :is(.chat-copy-action,.chat-latest):hover { background:var(--control);color:var(--ink); }.ask-conversation :is(.chat-copy-action,.chat-latest):active { background:var(--control-pressed); }.ask-conversation button:focus-visible,.ask-page-toolbar button:focus-visible { outline:2px solid var(--focus);outline-offset:2px; }-.ask-context-row>button:focus-visible { outline-offset:1px; }.ask-header-actions { display:flex;align-items:center;gap:8px;flex:none; }.ask-thread-wrap { flex:1;position:relative;min-height:0;display:flex; }.ask-thread { flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 0; }@@ -534,31 +533,47 @@ body:has(.chat-panel[open]) .app-toast-viewport:dir(rtl) { --toast-x:440px; }.ask-stop { background:var(--control);color:var(--ink); }.ask-stop:hover:not(:disabled) { background:var(--control-hover);color:var(--ink); }.ask-stop:active:not(:disabled) { background:var(--control-pressed); }-.ask-context-strip { display:grid;gap:6px;padding:10px 10px 0;max-height:184px;overflow-y:auto; }-.ask-context-strip+.ask-field { padding-top:10px; }-.ask-context-row { display:flex;align-items:center;gap:8px;min-width:0;height:32px;padding-inline:8px 4px;border-radius:8px;background:color-mix(in srgb,var(--control) 55%,var(--float));color:var(--ink);font-size:13px;line-height:20px; }-.ask-context-row>span { flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }-.ask-context-row>svg,.ask-context-row>button { flex:none; }-.ask-context-row>svg { color:var(--muted); }-.ask-context-row>button { width:24px;height:24px;opacity:0; }-.ask-context-row:hover>button,.ask-context-row:focus-within>button { opacity:1; }+.ask-scope-group { display:flex;align-items:center;gap:1px;min-width:0;max-width:calc(100% - 40px); }+.ask-scope { display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;height:28px;padding:0 8px;border-radius:8px;background:var(--control);color:var(--muted);font-size:12px;white-space:nowrap; }+.ask-scope:hover:not(:disabled) { background:var(--control-hover);color:var(--ink); }+.ask-scope:disabled { opacity:.45; }+.ask-scope-group:has(.ask-scope-clear) .ask-scope { border-start-end-radius:0;border-end-end-radius:0; }+.ask-scope-clear { flex:none;display:flex;align-items:center;justify-content:center;width:26px;height:28px;border-start-end-radius:8px;border-end-end-radius:8px;background:var(--control);color:var(--muted); }+.ask-scope-clear:hover:not(:disabled) { background:var(--control-hover);color:var(--ink); }+.ask-scope-clear:disabled { opacity:.45; }+.ask-picker h3:has(.ask-picker-clear) { display:flex;align-items:center;justify-content:space-between; }+.ask-picker h3 .ask-picker-clear { width:auto;padding:0 2px;border-radius:4px;background:none;color:var(--muted);font-size:11px;font-weight:500; }+.ask-picker h3 .ask-picker-clear:hover:not(:disabled) { background:none;color:var(--ink); }+.ask-scope-label { display:flex;min-width:0; }+.ask-scope-name { min-width:0;overflow:hidden;text-overflow:ellipsis; }+.ask-scope-others { flex:none;white-space:pre; }+.ask-scope>svg { flex:none; }.ask-starters { display:flex;flex-direction:column;align-items:flex-end;gap:8px;min-width:0; }.ask-starters button { max-width:80%;border:0;border-radius:12px;padding:8px 12px;font-size:12px;line-height:20px;color:var(--muted);text-align:start;background:color-mix(in srgb,var(--control) 50%,transparent); }.ask-home-starters { opacity:1;visibility:visible;transition:opacity var(--dur-micro) var(--ease-out),visibility 0s;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;margin-top:12px; }.ask-home-starters[aria-hidden=true] { opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--dur-micro) var(--ease-out),visibility 0s var(--dur-micro); }+.ask-home-starters[data-instant] { transition:none; }@media (prefers-reduced-motion:reduce) { .ask-home-starters { transition:opacity var(--dur-micro) var(--ease-out),visibility 0s; } .ask-home-starters[aria-hidden=true] { transition-delay:0s,var(--dur-micro); } }.ask-home-starters button { height:28px;max-width:100%;padding:4px 10px;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }.ask-starters button:hover:not(:disabled) { background:var(--control);color:var(--ink); }.ask-starters button:active:not(:disabled) { background:var(--control-pressed); }-.ask-picker { position:absolute;z-index:80;inset-inline:0;bottom:calc(100% + 8px);max-height:min(260px,40vh);overflow-y:auto;border:1px solid var(--line);border-radius:10px;background:var(--float);box-shadow:var(--shadow-soft);padding:6px;animation:ask-fade var(--dur-micro) var(--ease-out); }-.ask-landing .ask-picker { top:calc(100% + 8px);bottom:auto; }+.ask-picker { z-index:80;max-height:min(340px,50vh);overflow-y:auto;border:1px solid var(--line);border-radius:10px;background:var(--float);color:var(--ink);box-shadow:var(--shadow-soft);padding:6px;animation:ask-fade var(--dur-micro) var(--ease-out); }+.ask-mention { position:fixed;width:min(380px,calc(100vw - 32px)); }+.ask-selector-positioner { z-index:80; }+.ask-picker.ask-selector { position:static;inset:auto;display:flex;flex-direction:column;width:min(380px,calc(100vw - 32px));max-height:min(380px,60vh,var(--available-height));overflow:hidden;color:var(--ink); }+.ask-picker-search { flex:none;width:100%;min-width:0;padding:10px 8px;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);font-size:13px;outline:none;text-overflow:ellipsis; }+.ask-picker-search::placeholder { color:var(--muted); }+.ask-picker-search:focus-visible { outline:none;border-radius:0; }+.ask-picker-results { min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable; }.ask-picker h3 { padding:7px 8px;font-size:11px;font-weight:550;color:var(--muted); }.ask-picker button { display:flex;align-items:center;gap:8px;width:100%;padding:8px;border-radius:5px;text-align:start;font-size:13px; }-.ask-picker button[aria-selected=true],.ask-picker button:hover { background:var(--card); }+.ask-picker button[data-active=true],.ask-picker button:hover:not(:disabled) { background:var(--card); }.ask-picker button>span { flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }.ask-picker button:active { background:var(--control-pressed); }+.ask-picker button>svg { flex:none; }+.ask-picker button:disabled { opacity:.45; }.ask-picker small { flex:none;color:var(--muted);font-size:11px; }-.ask-picker p { padding:10px;color:var(--muted);font-size:12px; }+.ask-picker p { padding:10px;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }.ask-recent-positioner { z-index:80; }.ask-history { width:min(520px,calc(100vw - 32px));max-height:min(480px,var(--available-height));overflow:hidden;border:1px solid var(--line);border-radius:9px;background:var(--float);color:var(--ink);box-shadow:var(--shadow); }.ask-history-scroll { max-height:min(478px,calc(var(--available-height) - 2px));overflow-y:auto;overscroll-behavior:contain;padding:8px; }@@ -582,7 +597,6 @@ body:has(.chat-panel[open]) .app-toast-viewport:dir(rtl) { --toast-x:440px; }.chat-panel .ask-thread { padding:16px 12px; }.chat-panel .ask-composer { padding:0 12px 12px;overflow:visible; }@container (max-width:520px) { .ask-page { padding-inline:18px; } }-@media (hover:none) { .ask-context-row>button { opacity:1; } }@keyframes ask-fade { from { opacity:0; } to { opacity:1; } }@media (prefers-reduced-motion:reduce) { .ask-toolbar-button { transition:none; } }diff --git a/app/src/shared/locales/ar.json b/app/src/shared/locales/ar.jsonindex 2b20c692..3c6a7749 100644--- a/app/src/shared/locales/ar.json+++ b/app/src/shared/locales/ar.json@@ -613,7 +613,6 @@"Calendar event unavailable": "حدث التقويم غير متاح","{count} left": "متبقٍ {count}","Delete now": "حذف الآن",- "Add a meeting or folder": "إضافة اجتماع أو مجلد","Recent": "الأخيرة","Show all": "عرض الكل","Move to Trash": "نقل إلى سلة المهملات",@@ -739,5 +738,20 @@"New recording": "تسجيل جديد","Hide events without a call link": "إخفاء الأحداث التي ليس لها رابط مكالمة","Keep your agenda and reminders focused on calls.": "ركّز جدولك وتذكيراتك على المكالمات.",- "Show earlier lines": "عرض الأسطر السابقة"+ "Show earlier lines": "عرض الأسطر السابقة",+ "{count} more results": {+ "one": "نتيجة إضافية واحدة",+ "two": "نتيجتان إضافيتان",+ "few": "{count} نتائج إضافية",+ "many": "{count} نتيجة إضافية",+ "other": "{count} نتيجة إضافية"+ },+ "Search meetings and folders": "ابحث عن الاجتماعات والمجلدات",+ "Search…": "بحث…",+ "All meetings": "كل الاجتماعات",+ "Choose meetings or folders": "اختر اجتماعات أو مجلدات",+ "In this chat": "في هذه المحادثة",+ "and {count} others": "و{count} إضافية",+ "{count} more": "{count} إضافية",+ "Clear": "مسح"}diff --git a/app/src/shared/locales/bn.json b/app/src/shared/locales/bn.jsonindex f366bff7..f2a6ec18 100644--- a/app/src/shared/locales/bn.json+++ b/app/src/shared/locales/bn.json@@ -569,7 +569,6 @@"Calendar event unavailable": "ক্যালেন্ডারের ইভেন্টটি পাওয়া যাচ্ছে না","{count} left": "{count} বাকি","Delete now": "এখন মুছুন",- "Add a meeting or folder": "একটি মিটিং বা ফোল্ডার যোগ করুন","Recent": "সাম্প্রতিক","Show all": "সব দেখান","Move to Trash": "ট্র্যাশে সরান",@@ -669,5 +668,14 @@"New recording": "নতুন রেকর্ডিং","Hide events without a call link": "কলের লিঙ্ক ছাড়া ইভেন্ট লুকান","Keep your agenda and reminders focused on calls.": "আপনার সময়সূচি ও রিমাইন্ডারে কলগুলোকে প্রাধান্য দিন।",- "Show earlier lines": "আগের লাইনগুলো দেখান"+ "Show earlier lines": "আগের লাইনগুলো দেখান",+ "{count} more results": "আরও {count}টি ফলাফল",+ "Search meetings and folders": "মিটিং ও ফোল্ডার খুঁজুন",+ "Search…": "সার্চ করুন…",+ "All meetings": "সব মিটিং",+ "Choose meetings or folders": "মিটিং বা ফোল্ডার বেছে নিন",+ "In this chat": "এই চ্যাটে",+ "and {count} others": "ও আরও {count}টি",+ "{count} more": "আরও {count}টি",+ "Clear": "মুছুন"}diff --git a/app/src/shared/locales/cs.json b/app/src/shared/locales/cs.jsonindex db6a26ac..35fbf40a 100644--- a/app/src/shared/locales/cs.json+++ b/app/src/shared/locales/cs.json@@ -589,7 +589,6 @@"Calendar event unavailable": "Událost kalendáře není dostupná","{count} left": "Zbývá {count}","Delete now": "Smazat nyní",- "Add a meeting or folder": "Přidat schůzku nebo složku","Recent": "Nedávné","Show all": "Zobrazit vše","Move to Trash": "Přesunout do koše",@@ -712,5 +711,18 @@"New recording": "Nová nahrávka","Hide events without a call link": "Skrýt události bez odkazu na hovor","Keep your agenda and reminders focused on calls.": "Zaměřte svůj program a připomínky na hovory.",- "Show earlier lines": "Zobrazit starší řádky"+ "Show earlier lines": "Zobrazit starší řádky",+ "{count} more results": {+ "one": "{count} další výsledek",+ "few": "{count} další výsledky",+ "other": "{count} dalších výsledků"+ },+ "Search meetings and folders": "Hledat schůzky a složky",+ "Search…": "Hledat…",+ "All meetings": "Všechny schůzky",+ "Choose meetings or folders": "Vybrat schůzky nebo složky",+ "In this chat": "V této konverzaci",+ "and {count} others": "a {count} další",+ "{count} more": "{count} další",+ "Clear": "Vymazat"}diff --git a/app/src/shared/locales/da.json b/app/src/shared/locales/da.jsonindex 41e5784c..dcb97af1 100644--- a/app/src/shared/locales/da.json+++ b/app/src/shared/locales/da.json@@ -569,7 +569,6 @@"Calendar event unavailable": "Kalenderbegivenheden er utilgængelig","{count} left": "{count} tilbage","Delete now": "Slet nu",- "Add a meeting or folder": "Tilføj et møde eller en mappe","Recent": "Seneste","Show all": "Vis alle","Move to Trash": "Flyt til papirkurv",@@ -678,5 +677,17 @@"New recording": "Ny optagelse","Hide events without a call link": "Skjul begivenheder uden opkaldslink","Keep your agenda and reminders focused on calls.": "Hold fokus på opkald i din dagsorden og dine påmindelser.",- "Show earlier lines": "Vis tidligere linjer"+ "Show earlier lines": "Vis tidligere linjer",+ "{count} more results": {+ "one": "{count} resultat mere",+ "other": "{count} resultater mere"+ },+ "Search meetings and folders": "Søg i møder og mapper",+ "Search…": "Søg…",+ "All meetings": "Alle møder",+ "Choose meetings or folders": "Vælg møder eller mapper",+ "In this chat": "I denne samtale",+ "and {count} others": "og {count} andre",+ "{count} more": "{count} flere",+ "Clear": "Ryd"}diff --git a/app/src/shared/locales/de.json b/app/src/shared/locales/de.jsonindex 1436d481..af3bbef5 100644--- a/app/src/shared/locales/de.json+++ b/app/src/shared/locales/de.json@@ -569,7 +569,6 @@"Calendar event unavailable": "Kalenderereignis nicht verfügbar","{count} left": "{count} übrig","Delete now": "Jetzt löschen",- "Add a meeting or folder": "Meeting oder Ordner hinzufügen","Recent": "Zuletzt","Show all": "Alle anzeigen","Move to Trash": "In den Papierkorb verschieben",@@ -678,5 +677,17 @@"New recording": "Neue Aufnahme","Hide events without a call link": "Termine ohne Anruflink ausblenden","Keep your agenda and reminders focused on calls.": "Konzentriere dich in Agenda und Erinnerungen auf Anrufe.",- "Show earlier lines": "Frühere Zeilen anzeigen"+ "Show earlier lines": "Frühere Zeilen anzeigen",+ "{count} more results": {+ "one": "{count} weiteres Ergebnis",+ "other": "{count} weitere Ergebnisse"+ },+ "Search meetings and folders": "Meetings und Ordner suchen",+ "Search…": "Suchen…",+ "All meetings": "Alle Meetings",+ "Choose meetings or folders": "Meetings oder Ordner wählen",+ "In this chat": "In diesem Gespräch",+ "and {count} others": "und {count} weitere",+ "{count} more": "{count} weitere",+ "Clear": "Zurücksetzen"}diff --git a/app/src/shared/locales/el.json b/app/src/shared/locales/el.jsonindex 7c832c90..f74c6b7c 100644--- a/app/src/shared/locales/el.json+++ b/app/src/shared/locales/el.json@@ -569,7 +569,6 @@"Calendar event unavailable": "Το συμβάν ημερολογίου δεν είναι διαθέσιμο","{count} left": "Απομένουν {count}","Delete now": "Διαγραφή τώρα",- "Add a meeting or folder": "Προσθήκη συνάντησης ή φακέλου","Recent": "Πρόσφατες","Show all": "Εμφάνιση όλων","Move to Trash": "Μετακίνηση στον Κάδο",@@ -681,5 +680,17 @@"New recording": "Νέα ηχογράφηση","Hide events without a call link": "Απόκρυψη συμβάντων χωρίς σύνδεσμο κλήσης","Keep your agenda and reminders focused on calls.": "Εστιάστε το πρόγραμμά σας και τις υπενθυμίσεις στις κλήσεις.",- "Show earlier lines": "Εμφάνιση προηγούμενων γραμμών"+ "Show earlier lines": "Εμφάνιση προηγούμενων γραμμών",+ "{count} more results": {+ "one": "{count} ακόμη αποτέλεσμα",+ "other": "{count} ακόμη αποτελέσματα"+ },+ "Search meetings and folders": "Αναζήτηση συναντήσεων και φακέλων",+ "Search…": "Αναζήτηση…",+ "All meetings": "Όλες οι συσκέψεις",+ "Choose meetings or folders": "Επιλογή συσκέψεων ή φακέλων",+ "In this chat": "Σε αυτή τη συνομιλία",+ "and {count} others": "και {count} ακόμη",+ "{count} more": "{count} ακόμη",+ "Clear": "Εκκαθάριση"}diff --git a/app/src/shared/locales/en.json b/app/src/shared/locales/en.jsonindex 1aebd321..9eb98766 100644--- a/app/src/shared/locales/en.json+++ b/app/src/shared/locales/en.json@@ -132,5 +132,23 @@"New recording": "New recording","Hide events without a call link": "Hide events without a call link","Keep your agenda and reminders focused on calls.": "Keep your agenda and reminders focused on calls.",- "Show earlier lines": "Show earlier lines"+ "Show earlier lines": "Show earlier lines",+ "{count} more results": {+ "one": "{count} more result",+ "other": "{count} more results"+ },+ "Search meetings and folders": "Search meetings and folders",+ "Search…": "Search…",+ "All meetings": "All meetings",+ "Choose meetings or folders": "Choose meetings or folders",+ "In this chat": "In this chat",+ "and {count} others": {+ "one": "and {count} other",+ "other": "and {count} others"+ },+ "{count} more": {+ "one": "{count} more",+ "other": "{count} more"+ },+ "Clear": "Clear"}diff --git a/app/src/shared/locales/es.json b/app/src/shared/locales/es.jsonindex d5cee172..e8bdd1c5 100644--- a/app/src/shared/locales/es.json+++ b/app/src/shared/locales/es.json@@ -579,7 +579,6 @@"Calendar event unavailable": "Evento del calendario no disponible","{count} left": "Quedan {count}","Delete now": "Eliminar ahora",- "Add a meeting or folder": "Añadir una reunión o carpeta","Recent": "Recientes","Show all": "Mostrar todo","Move to Trash": "Mover a la papelera",@@ -693,5 +692,17 @@"New recording": "Nueva grabación","Hide events without a call link": "Ocultar eventos sin enlace de llamada","Keep your agenda and reminders focused on calls.": "Centra tu agenda y tus recordatorios en las llamadas.",- "Show earlier lines": "Mostrar líneas anteriores"+ "Show earlier lines": "Mostrar líneas anteriores",+ "{count} more results": {+ "one": "{count} resultado más",+ "other": "{count} resultados más"+ },+ "Search meetings and folders": "Buscar reuniones y carpetas",+ "Search…": "Buscar…",+ "All meetings": "Todas las reuniones",+ "Choose meetings or folders": "Elegir reuniones o carpetas",+ "In this chat": "En esta conversación",+ "and {count} others": "y {count} más",+ "{count} more": "{count} más",+ "Clear": "Borrar"}diff --git a/app/src/shared/locales/fi.json b/app/src/shared/locales/fi.jsonindex 45b1c189..90778aba 100644--- a/app/src/shared/locales/fi.json+++ b/app/src/shared/locales/fi.json@@ -572,7 +572,6 @@"Calendar event unavailable": "Kalenteritapahtuma ei ole saatavilla","{count} left": "{count} jäljellä","Delete now": "Poista nyt",- "Add a meeting or folder": "Lisää kokous tai kansio","Recent": "Viimeisimmät","Show all": "Näytä kaikki","Move to Trash": "Siirrä roskakoriin",@@ -681,5 +680,20 @@"New recording": "Uusi tallennus","Hide events without a call link": "Piilota tapahtumat ilman puhelulinkkiä","Keep your agenda and reminders focused on calls.": "Keskity puheluihin päiväohjelmassa ja muistutuksissa.",- "Show earlier lines": "Näytä aiemmat rivit"+ "Show earlier lines": "Näytä aiemmat rivit",+ "{count} more results": {+ "one": "{count} tulos lisää",+ "other": "{count} tulosta lisää"+ },+ "Search meetings and folders": "Etsi kokouksia ja kansioita",+ "Search…": "Hae…",+ "All meetings": "Kaikki kokoukset",+ "Choose meetings or folders": "Valitse kokouksia tai kansioita",+ "In this chat": "Tässä keskustelussa",+ "and {count} others": {+ "one": "ja {count} muu",+ "other": "ja {count} muuta"+ },+ "{count} more": "{count} lisää",+ "Clear": "Tyhjennä"}diff --git a/app/src/shared/locales/fil.json b/app/src/shared/locales/fil.jsonindex 20fb921e..34340db4 100644--- a/app/src/shared/locales/fil.json+++ b/app/src/shared/locales/fil.json@@ -569,7 +569,6 @@"Calendar event unavailable": "Hindi available ang event sa kalendaryo","{count} left": "{count} pa","Delete now": "Burahin ngayon",- "Add a meeting or folder": "Magdagdag ng pulong o folder","Recent": "Kamakailan","Show all": "Ipakita lahat","Move to Trash": "Ilipat sa Basurahan",@@ -678,5 +677,17 @@"New recording": "Bagong recording","Hide events without a call link": "Itago ang mga event na walang link sa tawag","Keep your agenda and reminders focused on calls.": "Ituon ang iyong agenda at mga paalala sa mga tawag.",- "Show earlier lines": "Ipakita ang mga naunang linya"+ "Show earlier lines": "Ipakita ang mga naunang linya",+ "{count} more results": {+ "one": "{count} pang resulta",+ "other": "{count} pang resulta"+ },+ "Search meetings and folders": "Maghanap ng mga pulong at folder",+ "Search…": "Maghanap…",+ "All meetings": "Lahat ng pulong",+ "Choose meetings or folders": "Pumili ng pulong o folder",+ "In this chat": "Sa pag-uusap na ito",+ "and {count} others": "at {count} pa",+ "{count} more": "{count} pa",+ "Clear": "I-clear"}diff --git a/app/src/shared/locales/fr.json b/app/src/shared/locales/fr.jsonindex cf37feab..15c9f5d6 100644--- a/app/src/shared/locales/fr.json+++ b/app/src/shared/locales/fr.json@@ -579,7 +579,6 @@"Calendar event unavailable": "Événement du calendrier indisponible","{count} left": "{count} à faire","Delete now": "Supprimer maintenant",- "Add a meeting or folder": "Ajouter une réunion ou un dossier","Recent": "Récentes","Show all": "Tout afficher","Move to Trash": "Déplacer vers la corbeille",@@ -693,5 +692,20 @@"New recording": "Nouvel enregistrement","Hide events without a call link": "Masquer les événements sans lien d’appel","Keep your agenda and reminders focused on calls.": "Gardez les appels au centre de votre agenda et de vos rappels.",- "Show earlier lines": "Afficher les lignes précédentes"+ "Show earlier lines": "Afficher les lignes précédentes",+ "{count} more results": {+ "one": "{count} résultat de plus",+ "other": "{count} résultats de plus"+ },+ "Search meetings and folders": "Rechercher réunions et dossiers",+ "Search…": "Rechercher…",+ "All meetings": "Toutes les réunions",+ "Choose meetings or folders": "Choisir des réunions ou dossiers",+ "In this chat": "Dans cette conversation",+ "and {count} others": {+ "one": "et {count} autre",+ "other": "et {count} autres"+ },+ "{count} more": "{count} de plus",+ "Clear": "Effacer"}diff --git a/app/src/shared/locales/he.json b/app/src/shared/locales/he.jsonindex d986d44e..5dd5e7d0 100644--- a/app/src/shared/locales/he.json+++ b/app/src/shared/locales/he.json@@ -579,7 +579,6 @@"Calendar event unavailable": "אירוע היומן אינו זמין","{count} left": "נותרו {count}","Delete now": "מחק עכשיו",- "Add a meeting or folder": "הוספת פגישה או תיקייה","Recent": "אחרונות","Show all": "הצגת הכול","Move to Trash": "העברה לאשפה",@@ -690,5 +689,17 @@"New recording": "הקלטה חדשה","Hide events without a call link": "הסתרת אירועים ללא קישור לשיחה","Keep your agenda and reminders focused on calls.": "מקדו את סדר היום והתזכורות בשיחות.",- "Show earlier lines": "הצגת שורות קודמות"+ "Show earlier lines": "הצגת שורות קודמות",+ "{count} more results": {+ "one": "עוד תוצאה אחת",+ "other": "עוד {count} תוצאות"+ },+ "Search meetings and folders": "חיפוש פגישות ותיקיות",+ "Search…": "חיפוש…",+ "All meetings": "כל הפגישות",+ "Choose meetings or folders": "בחירת פגישות או תיקיות",+ "In this chat": "בשיחה הזו",+ "and {count} others": "ועוד {count}",+ "{count} more": "עוד {count}",+ "Clear": "נקה"}diff --git a/app/src/shared/locales/hi.json b/app/src/shared/locales/hi.jsonindex 6de51659..55268f6f 100644--- a/app/src/shared/locales/hi.json+++ b/app/src/shared/locales/hi.json@@ -569,7 +569,6 @@"Calendar event unavailable": "कैलेंडर इवेंट उपलब्ध नहीं है","{count} left": "{count} बाकी","Delete now": "अभी हटाएँ",- "Add a meeting or folder": "मीटिंग या फ़ोल्डर जोड़ें","Recent": "हाल की","Show all": "सभी दिखाएँ","Move to Trash": "ट्रैश में ले जाएँ",@@ -669,5 +668,14 @@"New recording": "नई रिकॉर्डिंग","Hide events without a call link": "कॉल लिंक के बिना इवेंट छिपाएँ","Keep your agenda and reminders focused on calls.": "अपने एजेंडा और रिमाइंडर को कॉल पर केंद्रित रखें।",- "Show earlier lines": "पिछली पंक्तियाँ दिखाएँ"+ "Show earlier lines": "पिछली पंक्तियाँ दिखाएँ",+ "{count} more results": "{count} और परिणाम",+ "Search meetings and folders": "मीटिंग और फ़ोल्डर खोजें",+ "Search…": "सर्च करें…",+ "All meetings": "सभी मीटिंग",+ "Choose meetings or folders": "मीटिंग या फ़ोल्डर चुनें",+ "In this chat": "इस बातचीत में",+ "and {count} others": "और {count} अन्य",+ "{count} more": "{count} और",+ "Clear": "साफ़ करें"}diff --git a/app/src/shared/locales/hu.json b/app/src/shared/locales/hu.jsonindex 7d474871..9a363a5d 100644--- a/app/src/shared/locales/hu.json+++ b/app/src/shared/locales/hu.json@@ -569,7 +569,6 @@"Calendar event unavailable": "A naptáresemény nem érhető el","{count} left": "{count} van hátra","Delete now": "Törlés most",- "Add a meeting or folder": "Megbeszélés vagy mappa hozzáadása","Recent": "Legutóbbiak","Show all": "Összes megjelenítése","Move to Trash": "Áthelyezés a kukába",@@ -669,5 +668,14 @@"New recording": "Új felvétel","Hide events without a call link": "Híváshivatkozás nélküli események elrejtése","Keep your agenda and reminders focused on calls.": "A napirendben és az emlékeztetőkben a hívásokra összpontosítson.",- "Show earlier lines": "Korábbi sorok megjelenítése"+ "Show earlier lines": "Korábbi sorok megjelenítése",+ "{count} more results": "További {count} találat",+ "Search meetings and folders": "Megbeszélések és mappák keresése",+ "Search…": "Keresés…",+ "All meetings": "Minden megbeszélés",+ "Choose meetings or folders": "Megbeszélések vagy mappák választása",+ "In this chat": "Ebben a beszélgetésben",+ "and {count} others": "és {count} további",+ "{count} more": "Még {count}",+ "Clear": "Törlés"}diff --git a/app/src/shared/locales/id.json b/app/src/shared/locales/id.jsonindex 5776640f..ce9aec5b 100644--- a/app/src/shared/locales/id.json+++ b/app/src/shared/locales/id.json@@ -539,7 +539,6 @@"Calendar event unavailable": "Acara kalender tidak tersedia","{count} left": "{count} tersisa","Delete now": "Hapus sekarang",- "Add a meeting or folder": "Tambahkan rapat atau folder","Recent": "Terbaru","Show all": "Tampilkan semua","Move to Trash": "Pindahkan ke Sampah",@@ -633,5 +632,14 @@"New recording": "Rekaman baru","Hide events without a call link": "Sembunyikan acara tanpa tautan panggilan","Keep your agenda and reminders focused on calls.": "Fokuskan agenda dan pengingat Anda pada panggilan.",- "Show earlier lines": "Tampilkan baris sebelumnya"+ "Show earlier lines": "Tampilkan baris sebelumnya",+ "{count} more results": "{count} hasil lainnya",+ "Search meetings and folders": "Cari rapat dan folder",+ "Search…": "Cari…",+ "All meetings": "Semua rapat",+ "Choose meetings or folders": "Pilih rapat atau folder",+ "In this chat": "Dalam percakapan ini",+ "and {count} others": "dan {count} lainnya",+ "{count} more": "{count} lagi",+ "Clear": "Hapus"}diff --git a/app/src/shared/locales/it.json b/app/src/shared/locales/it.jsonindex 1d73d661..dcdfa41b 100644--- a/app/src/shared/locales/it.json+++ b/app/src/shared/locales/it.json@@ -582,7 +582,6 @@"Calendar event unavailable": "Evento del calendario non disponibile","{count} left": "{count} da fare","Delete now": "Elimina ora",- "Add a meeting or folder": "Aggiungi una riunione o cartella","Recent": "Recenti","Show all": "Mostra tutto","Move to Trash": "Sposta nel Cestino",@@ -696,5 +695,20 @@"New recording": "Nuova registrazione","Hide events without a call link": "Nascondi eventi senza link alla chiamata","Keep your agenda and reminders focused on calls.": "Concentra agenda e promemoria sulle chiamate.",- "Show earlier lines": "Mostra righe precedenti"+ "Show earlier lines": "Mostra righe precedenti",+ "{count} more results": {+ "one": "{count} altro risultato",+ "other": "{count} altri risultati"+ },+ "Search meetings and folders": "Cerca riunioni e cartelle",+ "Search…": "Cerca…",+ "All meetings": "Tutte le riunioni",+ "Choose meetings or folders": "Scegli riunioni o cartelle",+ "In this chat": "In questa conversazione",+ "and {count} others": {+ "one": "e {count} altro",+ "other": "e {count} altri"+ },+ "{count} more": "Altri {count}",+ "Clear": "Cancella"}diff --git a/app/src/shared/locales/ja.json b/app/src/shared/locales/ja.jsonindex 76490eb6..5269324a 100644--- a/app/src/shared/locales/ja.json+++ b/app/src/shared/locales/ja.json@@ -539,7 +539,6 @@"Calendar event unavailable": "カレンダーの予定を表示できません","{count} left": "残り{count}件","Delete now": "今すぐ削除",- "Add a meeting or folder": "会議やフォルダを追加","Recent": "最近の会話","Show all": "すべて表示","Move to Trash": "ゴミ箱に移動",@@ -633,5 +632,14 @@"New recording": "新規録音","Hide events without a call link": "通話リンクのない予定を非表示","Keep your agenda and reminders focused on calls.": "予定とリマインダーを通話中心に整理します。",- "Show earlier lines": "前の行を表示"+ "Show earlier lines": "前の行を表示",+ "{count} more results": "さらに{count}件の結果",+ "Search meetings and folders": "会議とフォルダを検索",+ "Search…": "検索…",+ "All meetings": "すべての会議",+ "Choose meetings or folders": "会議やフォルダを選択",+ "In this chat": "この会話内",+ "and {count} others": "と他 {count} 件",+ "{count} more": "他 {count} 件",+ "Clear": "クリア"}diff --git a/app/src/shared/locales/ko.json b/app/src/shared/locales/ko.jsonindex 8916e29e..2e713299 100644--- a/app/src/shared/locales/ko.json+++ b/app/src/shared/locales/ko.json@@ -539,7 +539,6 @@"Calendar event unavailable": "캘린더 일정을 사용할 수 없습니다","{count} left": "{count}개 남음","Delete now": "지금 삭제",- "Add a meeting or folder": "회의 또는 폴더 추가","Recent": "최근 대화","Show all": "모두 보기","Move to Trash": "휴지통으로 이동",@@ -633,5 +632,14 @@"New recording": "새 녹음","Hide events without a call link": "통화 링크가 없는 일정 숨기기","Keep your agenda and reminders focused on calls.": "일정과 알림을 통화 중심으로 정리하세요.",- "Show earlier lines": "이전 줄 보기"+ "Show earlier lines": "이전 줄 보기",+ "{count} more results": "결과 {count}개 더 보기",+ "Search meetings and folders": "회의 및 폴더 검색",+ "Search…": "검색…",+ "All meetings": "모든 회의",+ "Choose meetings or folders": "회의 또는 폴더 선택",+ "In this chat": "이 대화에서",+ "and {count} others": "외 {count}개",+ "{count} more": "{count}개 더",+ "Clear": "지우기"}diff --git a/app/src/shared/locales/ms.json b/app/src/shared/locales/ms.jsonindex 29b2283b..f9158f8a 100644--- a/app/src/shared/locales/ms.json+++ b/app/src/shared/locales/ms.json@@ -539,7 +539,6 @@"Calendar event unavailable": "Acara kalendar tidak tersedia","{count} left": "{count} lagi","Delete now": "Padam sekarang",- "Add a meeting or folder": "Tambah mesyuarat atau folder","Recent": "Terkini","Show all": "Tunjukkan semua","Move to Trash": "Alih ke Sampah",@@ -633,5 +632,14 @@"New recording": "Rakaman baharu","Hide events without a call link": "Sembunyikan acara tanpa pautan panggilan","Keep your agenda and reminders focused on calls.": "Fokuskan agenda dan peringatan anda pada panggilan.",- "Show earlier lines": "Tunjukkan baris terdahulu"+ "Show earlier lines": "Tunjukkan baris terdahulu",+ "{count} more results": "{count} lagi hasil",+ "Search meetings and folders": "Cari mesyuarat dan folder",+ "Search…": "Cari…",+ "All meetings": "Semua mesyuarat",+ "Choose meetings or folders": "Pilih mesyuarat atau folder",+ "In this chat": "Dalam perbualan ini",+ "and {count} others": "dan {count} lagi",+ "{count} more": "{count} lagi",+ "Clear": "Kosongkan"}diff --git a/app/src/shared/locales/nb.json b/app/src/shared/locales/nb.jsonindex 79687c2f..0d2f96bd 100644--- a/app/src/shared/locales/nb.json+++ b/app/src/shared/locales/nb.json@@ -569,7 +569,6 @@"Calendar event unavailable": "Kalenderhendelsen er utilgjengelig","{count} left": "{count} igjen","Delete now": "Slett nå",- "Add a meeting or folder": "Legg til et møte eller en mappe","Recent": "Nylige","Show all": "Vis alle","Move to Trash": "Flytt til papirkurven",@@ -678,5 +677,17 @@"New recording": "Nytt opptak","Hide events without a call link": "Skjul hendelser uten anropslenke","Keep your agenda and reminders focused on calls.": "Hold fokus på samtaler i agendaen og påminnelsene dine.",- "Show earlier lines": "Vis tidligere linjer"+ "Show earlier lines": "Vis tidligere linjer",+ "{count} more results": {+ "one": "{count} resultat til",+ "other": "{count} resultater til"+ },+ "Search meetings and folders": "Søk i møter og mapper",+ "Search…": "Søk…",+ "All meetings": "Alle møter",+ "Choose meetings or folders": "Velg møter eller mapper",+ "In this chat": "I denne samtalen",+ "and {count} others": "og {count} andre",+ "{count} more": "{count} til",+ "Clear": "Tøm"}diff --git a/app/src/shared/locales/nl.json b/app/src/shared/locales/nl.jsonindex 2d6bd574..5b37b15e 100644--- a/app/src/shared/locales/nl.json+++ b/app/src/shared/locales/nl.json@@ -569,7 +569,6 @@"Calendar event unavailable": "Agenda-afspraak niet beschikbaar","{count} left": "{count} over","Delete now": "Nu verwijderen",- "Add a meeting or folder": "Vergadering of map toevoegen","Recent": "Recent","Show all": "Alles tonen","Move to Trash": "Verplaats naar prullenmand",@@ -678,5 +677,17 @@"New recording": "Nieuwe opname","Hide events without a call link": "Afspraken zonder gesprekslink verbergen","Keep your agenda and reminders focused on calls.": "Richt je agenda en herinneringen op gesprekken.",- "Show earlier lines": "Eerdere regels tonen"+ "Show earlier lines": "Eerdere regels tonen",+ "{count} more results": {+ "one": "Nog {count} resultaat",+ "other": "Nog {count} resultaten"+ },+ "Search meetings and folders": "Vergaderingen en mappen zoeken",+ "Search…": "Zoeken…",+ "All meetings": "Alle meetings",+ "Choose meetings or folders": "Kies meetings of mappen",+ "In this chat": "In dit gesprek",+ "and {count} others": "en {count} andere",+ "{count} more": "Nog {count}",+ "Clear": "Wissen"}diff --git a/app/src/shared/locales/pl.json b/app/src/shared/locales/pl.jsonindex ea045cda..cd770525 100644--- a/app/src/shared/locales/pl.json+++ b/app/src/shared/locales/pl.json@@ -589,7 +589,6 @@"Calendar event unavailable": "Wydarzenie kalendarza jest niedostępne","{count} left": "Pozostało: {count}","Delete now": "Usuń teraz",- "Add a meeting or folder": "Dodaj spotkanie lub folder","Recent": "Ostatnie","Show all": "Pokaż wszystkie","Move to Trash": "Przenieś do kosza",@@ -711,5 +710,24 @@"New recording": "Nowe nagranie","Hide events without a call link": "Ukryj wydarzenia bez linku do rozmowy","Keep your agenda and reminders focused on calls.": "Skup plan dnia i przypomnienia na rozmowach.",- "Show earlier lines": "Pokaż wcześniejsze wiersze"+ "Show earlier lines": "Pokaż wcześniejsze wiersze",+ "{count} more results": {+ "one": "Jeszcze {count} wynik",+ "few": "Jeszcze {count} wyniki",+ "many": "Jeszcze {count} wyników",+ "other": "Jeszcze {count} wyniku"+ },+ "Search meetings and folders": "Szukaj spotkań i folderów",+ "Search…": "Szukaj…",+ "All meetings": "Wszystkie spotkania",+ "Choose meetings or folders": "Wybierz spotkania lub foldery",+ "In this chat": "W tej rozmowie",+ "and {count} others": {+ "one": "i {count} inne",+ "few": "i {count} inne",+ "many": "i {count} innych",+ "other": "i {count} innych"+ },+ "{count} more": "Jeszcze {count}",+ "Clear": "Wyczyść"}diff --git a/app/src/shared/locales/pt-BR.json b/app/src/shared/locales/pt-BR.jsonindex 7a8d44b3..1e8646af 100644--- a/app/src/shared/locales/pt-BR.json+++ b/app/src/shared/locales/pt-BR.json@@ -579,7 +579,6 @@"Calendar event unavailable": "Evento do calendário indisponível","{count} left": "Restam {count}","Delete now": "Excluir agora",- "Add a meeting or folder": "Adicionar reunião ou pasta","Recent": "Recentes","Show all": "Mostrar tudo","Move to Trash": "Mover para a Lixeira",@@ -693,5 +692,20 @@"New recording": "Nova gravação","Hide events without a call link": "Ocultar eventos sem link de chamada","Keep your agenda and reminders focused on calls.": "Mantenha sua agenda e seus lembretes focados em chamadas.",- "Show earlier lines": "Mostrar linhas anteriores"+ "Show earlier lines": "Mostrar linhas anteriores",+ "{count} more results": {+ "one": "Mais {count} resultado",+ "other": "Mais {count} resultados"+ },+ "Search meetings and folders": "Buscar reuniões e pastas",+ "Search…": "Buscar…",+ "All meetings": "Todas as reuniões",+ "Choose meetings or folders": "Escolher reuniões ou pastas",+ "In this chat": "Nesta conversa",+ "and {count} others": {+ "one": "e mais {count}",+ "other": "e mais {count}"+ },+ "{count} more": "Mais {count}",+ "Clear": "Limpar"}diff --git a/app/src/shared/locales/ro.json b/app/src/shared/locales/ro.jsonindex f12ec9fe..46a2c7b3 100644--- a/app/src/shared/locales/ro.json+++ b/app/src/shared/locales/ro.json@@ -579,7 +579,6 @@"Calendar event unavailable": "Evenimentul din calendar nu este disponibil","{count} left": "Au rămas {count}","Delete now": "Șterge acum",- "Add a meeting or folder": "Adaugă o întâlnire sau un dosar","Recent": "Recente","Show all": "Arată tot","Move to Trash": "Mutați în Coș",@@ -696,5 +695,18 @@"New recording": "Înregistrare nouă","Hide events without a call link": "Ascunde evenimentele fără link de apel","Keep your agenda and reminders focused on calls.": "Concentrează agenda și mementourile pe apeluri.",- "Show earlier lines": "Afișează rândurile anterioare"+ "Show earlier lines": "Afișează rândurile anterioare",+ "{count} more results": {+ "one": "Încă {count} rezultat",+ "few": "Încă {count} rezultate",+ "other": "Încă {count} de rezultate"+ },+ "Search meetings and folders": "Caută întâlniri și dosare",+ "Search…": "Caută…",+ "All meetings": "Toate întâlnirile",+ "Choose meetings or folders": "Alege întâlniri sau dosare",+ "In this chat": "În această conversație",+ "and {count} others": "și încă {count}",+ "{count} more": "Încă {count}",+ "Clear": "Șterge"}diff --git a/app/src/shared/locales/ru.json b/app/src/shared/locales/ru.jsonindex e25551e4..ddd676f0 100644--- a/app/src/shared/locales/ru.json+++ b/app/src/shared/locales/ru.json@@ -589,7 +589,6 @@"Calendar event unavailable": "Событие календаря недоступно","{count} left": "Осталось: {count}","Delete now": "Удалить сейчас",- "Add a meeting or folder": "Добавить встречу или папку","Recent": "Недавние","Show all": "Показать все","Move to Trash": "Переместить в Корзину",@@ -708,5 +707,19 @@"New recording": "Новая запись","Hide events without a call link": "Скрывать события без ссылки на звонок","Keep your agenda and reminders focused on calls.": "Сосредоточьтесь на звонках в расписании и напоминаниях.",- "Show earlier lines": "Показать предыдущие строки"+ "Show earlier lines": "Показать предыдущие строки",+ "{count} more results": {+ "one": "Ещё {count} результат",+ "few": "Ещё {count} результата",+ "many": "Ещё {count} результатов",+ "other": "Ещё {count} результата"+ },+ "Search meetings and folders": "Поиск встреч и папок",+ "Search…": "Поиск…",+ "All meetings": "Все встречи",+ "Choose meetings or folders": "Выбрать встречи или папки",+ "In this chat": "В этом разговоре",+ "and {count} others": "и ещё {count}",+ "{count} more": "Ещё {count}",+ "Clear": "Очистить"}diff --git a/app/src/shared/locales/sv.json b/app/src/shared/locales/sv.jsonindex fd9ba046..dd82d66e 100644--- a/app/src/shared/locales/sv.json+++ b/app/src/shared/locales/sv.json@@ -569,7 +569,6 @@"Calendar event unavailable": "Kalenderhändelsen är inte tillgänglig","{count} left": "{count} kvar","Delete now": "Radera nu",- "Add a meeting or folder": "Lägg till ett möte eller en mapp","Recent": "Senaste","Show all": "Visa alla","Move to Trash": "Flytta till papperskorgen",@@ -681,5 +680,14 @@"New recording": "Ny inspelning","Hide events without a call link": "Dölj händelser utan samtalslänk","Keep your agenda and reminders focused on calls.": "Fokusera din agenda och dina påminnelser på samtal.",- "Show earlier lines": "Visa tidigare rader"+ "Show earlier lines": "Visa tidigare rader",+ "{count} more results": "{count} fler resultat",+ "Search meetings and folders": "Sök möten och mappar",+ "Search…": "Sök…",+ "All meetings": "Alla möten",+ "Choose meetings or folders": "Välj möten eller mappar",+ "In this chat": "I det här samtalet",+ "and {count} others": "och {count} till",+ "{count} more": "{count} till",+ "Clear": "Rensa"}diff --git a/app/src/shared/locales/th.json b/app/src/shared/locales/th.jsonindex 48817863..1ac7de99 100644--- a/app/src/shared/locales/th.json+++ b/app/src/shared/locales/th.json@@ -539,7 +539,6 @@"Calendar event unavailable": "ไม่พบกิจกรรมในปฏิทิน","{count} left": "เหลือ {count}","Delete now": "ลบตอนนี้",- "Add a meeting or folder": "เพิ่มการประชุมหรือโฟลเดอร์","Recent": "ล่าสุด","Show all": "แสดงทั้งหมด","Move to Trash": "ย้ายไปถังขยะ",@@ -633,5 +632,14 @@"New recording": "การบันทึกใหม่","Hide events without a call link": "ซ่อนกิจกรรมที่ไม่มีลิงก์การโทร","Keep your agenda and reminders focused on calls.": "เน้นการโทรในกำหนดการและการแจ้งเตือนของคุณ",- "Show earlier lines": "แสดงบรรทัดก่อนหน้า"+ "Show earlier lines": "แสดงบรรทัดก่อนหน้า",+ "{count} more results": "อีก {count} ผลลัพธ์",+ "Search meetings and folders": "ค้นหาการประชุมและโฟลเดอร์",+ "Search…": "ค้นหา…",+ "All meetings": "การประชุมทั้งหมด",+ "Choose meetings or folders": "เลือกการประชุมหรือโฟลเดอร์",+ "In this chat": "ในการสนทนานี้",+ "and {count} others": "และอีก {count} รายการ",+ "{count} more": "อีก {count} รายการ",+ "Clear": "ล้าง"}diff --git a/app/src/shared/locales/tr.json b/app/src/shared/locales/tr.jsonindex fb44afc2..a82c5f51 100644--- a/app/src/shared/locales/tr.json+++ b/app/src/shared/locales/tr.json@@ -569,7 +569,6 @@"Calendar event unavailable": "Takvim etkinliği kullanılamıyor","{count} left": "{count} kaldı","Delete now": "Şimdi sil",- "Add a meeting or folder": "Toplantı veya klasör ekle","Recent": "Son konuşmalar","Show all": "Tümünü göster","Move to Trash": "Çöp Kutusuna taşı",@@ -669,5 +668,14 @@"New recording": "Yeni kayıt","Hide events without a call link": "Arama bağlantısı olmayan etkinlikleri gizle","Keep your agenda and reminders focused on calls.": "Ajandanızı ve hatırlatıcılarınızı aramalara odaklayın.",- "Show earlier lines": "Önceki satırları göster"+ "Show earlier lines": "Önceki satırları göster",+ "{count} more results": "{count} sonuç daha",+ "Search meetings and folders": "Toplantı ve klasör ara",+ "Search…": "Ara…",+ "All meetings": "Tüm toplantılar",+ "Choose meetings or folders": "Toplantı veya klasör seç",+ "In this chat": "Bu sohbette",+ "and {count} others": "ve {count} diğer",+ "{count} more": "{count} tane daha",+ "Clear": "Temizle"}diff --git a/app/src/shared/locales/uk.json b/app/src/shared/locales/uk.jsonindex 4cb21c92..7d247638 100644--- a/app/src/shared/locales/uk.json+++ b/app/src/shared/locales/uk.json@@ -589,7 +589,6 @@"Calendar event unavailable": "Подія календаря недоступна","{count} left": "Залишилось: {count}","Delete now": "Видалити зараз",- "Add a meeting or folder": "Додати зустріч або папку","Recent": "Нещодавні","Show all": "Показати всі","Move to Trash": "Перемістити до Кошика",@@ -708,5 +707,19 @@"New recording": "Новий запис","Hide events without a call link": "Приховувати події без посилання на дзвінок","Keep your agenda and reminders focused on calls.": "Зосередьте розклад і нагадування на дзвінках.",- "Show earlier lines": "Показати попередні рядки"+ "Show earlier lines": "Показати попередні рядки",+ "{count} more results": {+ "one": "Ще {count} результат",+ "few": "Ще {count} результати",+ "many": "Ще {count} результатів",+ "other": "Ще {count} результату"+ },+ "Search meetings and folders": "Пошук зустрічей і папок",+ "Search…": "Пошук…",+ "All meetings": "Усі зустрічі",+ "Choose meetings or folders": "Вибрати зустрічі або папки",+ "In this chat": "У цій розмові",+ "and {count} others": "і ще {count}",+ "{count} more": "Ще {count}",+ "Clear": "Очистити"}diff --git a/app/src/shared/locales/vi.json b/app/src/shared/locales/vi.jsonindex eb5c40dc..d572d829 100644--- a/app/src/shared/locales/vi.json+++ b/app/src/shared/locales/vi.json@@ -539,7 +539,6 @@"Calendar event unavailable": "Sự kiện lịch không khả dụng","{count} left": "Còn {count}","Delete now": "Xóa ngay",- "Add a meeting or folder": "Thêm cuộc họp hoặc thư mục","Recent": "Gần đây","Show all": "Hiển thị tất cả","Move to Trash": "Chuyển vào Thùng rác",@@ -633,5 +632,14 @@"New recording": "Bản ghi mới","Hide events without a call link": "Ẩn sự kiện không có liên kết cuộc gọi","Keep your agenda and reminders focused on calls.": "Tập trung lịch trình và lời nhắc vào các cuộc gọi.",- "Show earlier lines": "Hiện các dòng trước"+ "Show earlier lines": "Hiện các dòng trước",+ "{count} more results": "Thêm {count} kết quả",+ "Search meetings and folders": "Tìm cuộc họp và thư mục",+ "Search…": "Tìm kiếm…",+ "All meetings": "Tất cả cuộc họp",+ "Choose meetings or folders": "Chọn cuộc họp hoặc thư mục",+ "In this chat": "Trong cuộc trò chuyện này",+ "and {count} others": "và {count} mục khác",+ "{count} more": "Thêm {count} mục",+ "Clear": "Xóa"}diff --git a/app/src/shared/locales/zh-CN.json b/app/src/shared/locales/zh-CN.jsonindex beb27706..02747965 100644--- a/app/src/shared/locales/zh-CN.json+++ b/app/src/shared/locales/zh-CN.json@@ -539,7 +539,6 @@"Calendar event unavailable": "日历活动不可用","{count} left": "剩余 {count} 项","Delete now": "立即删除",- "Add a meeting or folder": "添加会议或文件夹","Recent": "最近","Show all": "显示全部","Move to Trash": "移到废纸篓",@@ -633,5 +632,14 @@"New recording": "新建录音","Hide events without a call link": "隐藏没有通话链接的日程","Keep your agenda and reminders focused on calls.": "让日程和提醒专注于通话。",- "Show earlier lines": "显示更早的内容"+ "Show earlier lines": "显示更早的内容",+ "{count} more results": "还有 {count} 个结果",+ "Search meetings and folders": "搜索会议和文件夹",+ "Search…": "搜索…",+ "All meetings": "所有会议",+ "Choose meetings or folders": "选择会议或文件夹",+ "In this chat": "在此对话中",+ "and {count} others": "及其他 {count} 项",+ "{count} more": "还有 {count} 项",+ "Clear": "清除"}diff --git a/app/src/shared/locales/zh-TW.json b/app/src/shared/locales/zh-TW.jsonindex 519a63bb..379a3463 100644--- a/app/src/shared/locales/zh-TW.json+++ b/app/src/shared/locales/zh-TW.json@@ -539,7 +539,6 @@"Calendar event unavailable": "行事曆活動無法使用","{count} left": "剩餘 {count} 項","Delete now": "立即刪除",- "Add a meeting or folder": "新增會議或資料夾","Recent": "最近","Show all": "顯示全部","Move to Trash": "移到垃圾桶",@@ -633,5 +632,14 @@"New recording": "新增錄音","Hide events without a call link": "隱藏沒有通話連結的行程","Keep your agenda and reminders focused on calls.": "讓行程與提醒專注於通話。",- "Show earlier lines": "顯示更早的內容"+ "Show earlier lines": "顯示更早的內容",+ "{count} more results": "還有 {count} 個結果",+ "Search meetings and folders": "搜尋會議與資料夾",+ "Search…": "搜尋…",+ "All meetings": "所有會議",+ "Choose meetings or folders": "選擇會議或資料夾",+ "In this chat": "在此對話中",+ "and {count} others": "及其他 {count} 項",+ "{count} more": "還有 {count} 項",+ "Clear": "清除"}diff --git a/app/test/askContext.test.ts b/app/test/askContext.test.tsindex d55bf49e..bf189335 100644--- a/app/test/askContext.test.ts+++ b/app/test/askContext.test.ts@@ -211,3 +211,35 @@ it('resolves current meeting and folder titles, showing the same title as the noexpect(l.describe(chips)[0].title).toBe('Meeting')expect(l.describe([{ kind: 'meeting', id: 'missing' }])[0].title).toBe('')})++it('returns matches for renderer expansion, with recent folders first only for a bare @', () => {+ const { store, library } = fresh()+ const ms = Array.from({ length: 12 }, (_, i) => store.createMeeting({ title: `Plan ${i}`, startedAt: 1000 + i, endedAt: 2000 + i, state: 'done', eventId: null, app: null, attendees: [] }))+ const folders = ['Plans A', 'Plans B', 'Plans C', 'Plans D', 'Plans E'].map(name => store.createFolder(name))+ store.addToFolder(folders[4].id, ms[0].id)+ const bare = library.targets('')+ expect(bare.filter(c => c.kind === 'meeting')).toHaveLength(12)+ expect(bare.filter(c => c.kind === 'folder')).toHaveLength(5)+ expect(bare.slice(0, 3).map(c => c.title)).toEqual(['Plan 11', 'Plan 10', 'Plan 9'])+ expect(bare.filter(c => c.kind === 'folder')[0].title).toBe('Plans E')+ const typed = library.targets('plan')+ expect(typed.filter(c => c.kind === 'folder').map(c => c.title)).toEqual(['Plans A', 'Plans B', 'Plans C', 'Plans D', 'Plans E'])+ expect(typed.filter(c => c.kind === 'meeting')).toHaveLength(12)+})++it('returns all available meetings when there are no folders', () => {+ const { store, library } = fresh()+ for (let i = 0; i < 8; i++) meeting(store, `Call ${i}`)+ expect(library.targets('').map(c => c.kind)).toEqual(Array(8).fill('meeting'))+})++it('limits matching targets to 40 of each kind before renderer caps', () => {+ const { store, library } = fresh()+ for (let i = 0; i < 45; i++) { meeting(store, `Plan ${i}`); store.createFolder(`Plan ${i}`) }+ for (const query of ['', 'plan']) {+ const targets = library.targets(query)+ expect(targets.filter(c => c.kind === 'meeting')).toHaveLength(40)+ expect(targets.filter(c => c.kind === 'folder')).toHaveLength(40)+ }+ expect(library.targets('no match')).toEqual([])+})diff --git a/app/test/i18n-tables.test.ts b/app/test/i18n-tables.test.tsindex 347438f5..cfd781d7 100644--- a/app/test/i18n-tables.test.ts+++ b/app/test/i18n-tables.test.ts@@ -65,8 +65,8 @@ it('translates the contextual recording action and menu timing in every locale',})it('uses Ask and conversations throughout the interface', () => {- // The rebuild explicitly calls its fresh-conversation action New chat; the page remains Ask.- expect(keys.filter(key => /\bchats?\b/i.test(key))).toEqual(['New chat'])+ // Chat names the fresh-conversation action and selected scope group; the page remains Ask.+ expect(keys.filter(key => /\bchats?\b/i.test(key))).toEqual(['In this chat', 'New chat'])expect(keys).toContain('Ask')expect(keys).toContain('Conversations')})@@ -180,3 +180,38 @@ it('translates recording deletion and retention in every locale', () => {if (id !== 'en' && !(id === 'fil' && key === 'Settings')) expect(load(id)[key]).not.toBe(key)}})++it('translates the context selector search in every locale', () => {+ for (const key of ['Search…', 'Search meetings and folders']) {+ expect(keys).toContain(key)+ for (const { id } of LOCALES) {+ expect(load(id)[key]).toBeTypeOf('string')+ expect(load(id)[key]).not.toBe('')+ if (id !== 'en') expect(load(id)[key]).not.toBe(key)+ }+ }+})++it('translates additional context results and their singular form', () => {+ const key = '{count} more results'+ expect(keys).toContain(key)+ for (const { id } of LOCALES) {+ const entry = load(id)[key]+ expect(entry).toBeDefined()+ expect(forms(entry).every(value => value.trim().length > 0)).toBe(true)+ if (id !== 'en') expect(forms(entry)).not.toContain(key)+ }+ expect(load('en')[key]).toEqual({ one: '{count} more result', other: key })+})+++it('translates scope labels and actions in every locale', () => {+ for (const key of ['All meetings', 'Choose meetings or folders', 'In this chat', 'and {count} others', '{count} more', 'Clear']) {+ expect(keys).toContain(key)+ for (const { id } of LOCALES) {+ expect(load(id)[key]).toBeDefined()+ if (id !== 'en') expect(forms(load(id)[key])).not.toContain(key)+ }+ }+ expect(load('en')['and {count} others']).toEqual({ one: 'and {count} other', other: 'and {count} others' })+})diff --git a/app/test/mentionPlacement.test.ts b/app/test/mentionPlacement.test.tsnew file mode 100644index 00000000..dae2c3c6--- /dev/null+++ b/app/test/mentionPlacement.test.ts@@ -0,0 +1,36 @@+import { describe, expect, it } from 'vitest'+import { mentionPosition } from '../src/renderer/src/mentionPlacement'++describe('mention placement', () => {+ const menu = { width: 380, height: 280 }, viewport = { width: 1000, height: 800 }+ it('opens four pixels below the @ line, aligned to the character', () => {+ expect(mentionPosition({ left: 120, top: 200, bottom: 222 }, menu, viewport))+ .toEqual({ left: 120, top: 226, maxHeight: 280 })+ })+ it('flips above a line near the bottom of the window', () => {+ expect(mentionPosition({ left: 120, top: 700, bottom: 722 }, menu, viewport))+ .toEqual({ left: 120, top: 416, maxHeight: 280 })+ })+ it('keeps sixteen pixels at both horizontal edges', () => {+ expect(mentionPosition({ left: 900, top: 200, bottom: 222 }, menu, viewport).left).toBe(604)+ expect(mentionPosition({ left: -20, top: 200, bottom: 222 }, menu, viewport).left).toBe(16)+ expect(mentionPosition({ left: 300, top: 200, bottom: 222 }, { width: 343, height: 280 }, { width: 375, height: 800 }).left).toBe(16)+ })+ it('limits height to the larger side when neither side fits', () => {+ const small = { width: 1000, height: 400 }+ expect(mentionPosition({ left: 120, top: 220, bottom: 242 }, menu, small))+ .toEqual({ left: 120, top: 16, maxHeight: 200 })+ expect(mentionPosition({ left: 120, top: 100, bottom: 122 }, menu, small))+ .toEqual({ left: 120, top: 126, maxHeight: 258 })+ })+ it('stays below when the menu fits exactly', () => {+ expect(mentionPosition({ left: 120, top: 478, bottom: 500 }, menu, viewport))+ .toEqual({ left: 120, top: 504, maxHeight: 280 })+ })+ it('clamps lines scrolled outside the window', () => {+ expect(mentionPosition({ left: 120, top: -60, bottom: -38 }, menu, viewport))+ .toEqual({ left: 120, top: 16, maxHeight: 280 })+ expect(mentionPosition({ left: 120, top: 1000, bottom: 1022 }, menu, viewport))+ .toEqual({ left: 120, top: 504, maxHeight: 280 })+ })+})diff --git a/app/test/motionInteractions.test.ts b/app/test/motionInteractions.test.tsindex ebe25d36..670201c4 100644--- a/app/test/motionInteractions.test.ts+++ b/app/test/motionInteractions.test.ts@@ -2,6 +2,7 @@ import { afterEach, expect, it, vi } from 'vitest'import { useEffect, useLayoutEffect, useRef, useState, type ReactElement, type ReactNode } from 'react'import { Search } from '../src/renderer/src/components/Search'import { Ask } from '../src/renderer/src/components/Chat'+import { AskContext, scopeLabel } from '../src/renderer/src/components/AskContext'import { AskConversation } from '../src/renderer/src/components/AskConversation'import type { ConversationView } from '../src/shared/types'import { Workspace } from '../src/renderer/src/components/Workspace'@@ -373,7 +374,7 @@ it.each(['send', 'load', 'resolve'] as const)('keeps an early Enter through loadconst enter = (tree: ReactNode) => find(tree, 'chat-input').props.onKeyDown({ key: 'Enter', nativeEvent: {}, preventDefault() {} })let tree = render()const focus = vi.fn()- find(tree, 'chat-input').props.ref.current = { focus }+ find(tree, 'chat-input').props.ref.current = { focus, closest: () => null }find(tree, 'chat-input').props.onChange({ target: { value: 'Who owns the next step?', selectionStart: 23 } })tree = render()enter(tree)@@ -409,3 +410,353 @@ it.each(['send', 'load', 'resolve'] as const)('keeps an early Enter through loadexpect(ask).toHaveBeenCalledTimes(2)}})++function mentionComposer(panel: boolean, draft = 'Keep this question') {+ vi.stubGlobal('document', { body: {} })+ const context = vi.fn().mockResolvedValue(undefined), save = vi.fn().mockResolvedValue(undefined)+ const targets = vi.fn().mockResolvedValue([+ { kind: 'folder', id: 'folder', title: 'Planning' },+ { kind: 'meeting', id: 'attached', title: 'Already attached' },+ { kind: 'meeting', id: 'meeting', title: 'Planning review' },+ ])+ const removeContext = vi.fn().mockResolvedValue(undefined)+ vi.stubGlobal('window', { yogurt: { conversations: { context, removeContext, draft: save, targets } } })+ vi.stubGlobal('requestAnimationFrame', (callback: () => void) => { callback(); return 0 })+ const initial: ConversationView = { id: `mention-${panel}`, title: '', draft, chips: [{ kind: 'meeting', id: 'attached', title: 'Already attached' }], draftChips: [], firstChips: null, turns: [], waitsForMeeting: false, waitsForModel: false }+ const render = renderer(() => AskConversation({ id: initial.id, initial, panel, onSelect() {}, onDeleted() {}, onSource() {} }))+ const prefix = panel ? 'chat' : 'chat-page'+ const input = () => find(render(), `${prefix}-input`).props+ const popup = () => find(render(), 'ask-box-actions').props.children[0].props+ const caret = { closest: () => null, selectionStart: 5, selectionEnd: 9, focus: vi.fn(), setSelectionRange: vi.fn() }+ input().ref.current = caret+ const flush = async () => { for (let i = 0; i < 5; i++) await Promise.resolve() }+ const lookup = async () => {+ render()+ const cleanup = vi.mocked(useEffect).mock.calls.find(([, deps]) => deps?.length === 4)![0]()+ await flush()+ return cleanup+ }+ const type = (value: string) => input().onChange({ target: { value, selectionStart: value.length } })+ const key = (props: any, key: string) => props.onKeyDown({ key, nativeEvent: {}, preventDefault() {}, stopPropagation() {} })+ return { render, prefix, input, popup, caret, lookup, type, key, flush, context, removeContext, save, targets, initial }+}++it.each([false, true])('keeps the scope selector open after picking and restores the saved caret on close (panel: %s)', async panel => {+ const c = mentionComposer(panel)+ c.popup().onOpenChange(true)+ expect(c.popup().open).toBe(true)+ expect(c.input().value).toBe('Keep this question')+ expect(c.input()['aria-expanded']).toBe(false)+ expect(c.save).not.toHaveBeenCalled()+ expect(find(c.render(), 'ask-selector-positioner').props.side).toBe(panel ? 'top' : 'bottom')+ await c.lookup()+ expect(c.targets).toHaveBeenCalledWith('')+ let search = find(c.render(), 'Search meetings and folders').props+ expect(search.placeholder).toBe('Search…')+ expect(search.role).toBe('combobox')+ expect(search['aria-controls']).toBe(`${c.prefix}-contexts`)+ expect(search['aria-activedescendant']).toBe(`${c.prefix}-context-0`)+ // Arrow order follows the displayed groups, even when the service returns folders first.+ expect(find(c.render(), `${c.prefix}-context-0`).props.children[1].props.children).toBe('Already attached')+ expect(find(c.render(), `${c.prefix}-context-0`).props['aria-selected']).toBe(true)+ expect(find(c.render(), `${c.prefix}-context-1`).props.children[1].props.children).toBe('Planning review')+ search.onChange({ target: { value: 'Plan' } })+ await c.lookup()+ expect(c.targets).toHaveBeenLastCalledWith('Plan')+ search = find(c.render(), 'Search meetings and folders').props+ c.key(search, 'ArrowDown')+ c.key(find(c.render(), 'Search meetings and folders').props, 'ArrowDown')+ search = find(c.render(), 'Search meetings and folders').props+ expect(search['aria-activedescendant']).toBe(`${c.prefix}-context-2`)+ find(c.render(), `${c.prefix}-context-2`).props.onClick()+ await c.flush()+ expect(c.context).toHaveBeenCalledExactlyOnceWith(c.initial.id, [...c.initial.chips, { kind: 'folder', id: 'folder', title: 'Planning' }])+ expect(c.input().value).toBe('Keep this question')+ expect(c.save).not.toHaveBeenCalled()+ expect(c.popup().open).toBe(true)+ expect(c.caret.focus).not.toHaveBeenCalled()+ c.key(find(c.render(), 'Search meetings and folders').props, 'Escape')+ expect(c.popup().open).toBe(false)+ c.popup().children[1].props.children.props.children.props.finalFocus()+ expect(c.caret.focus).toHaveBeenCalled()+ expect(c.caret.setSelectionRange).toHaveBeenCalledWith(5, 9)+})++it('leaves the selector and draft intact if attaching fails, and dismisses without saving on Escape or outside press', async () => {+ const c = mentionComposer(true)+ c.context.mockRejectedValue(new Error('write failed'))+ c.popup().onOpenChange(true)+ await c.lookup()+ find(c.render(), `${c.prefix}-context-2`).props.onClick()+ await c.flush()+ expect(c.popup().open).toBe(true)+ expect(c.input().value).toBe('Keep this question')+ expect(find(c.render(), 'chat-send-error').props.role).toBe('alert')+ expect(c.save).not.toHaveBeenCalled()+ c.key(find(c.render(), 'Search meetings and folders').props, 'Escape')+ expect(c.popup().open).toBe(false)+ c.popup().onOpenChange(true)+ c.popup().onOpenChange(false, { reason: 'outside-press' })+ expect(c.popup().open).toBe(false)+ expect(c.input().value).toBe('Keep this question')+})++it.each([false, true])('follows caret selection between mentions without taking focus or editing the draft (panel: %s)', async panel => {+ const c = mentionComposer(panel, '')+ c.type('@First\n@Second')+ await c.lookup()+ expect(c.targets).toHaveBeenLastCalledWith('Second')+ c.save.mockClear()+ c.input().onSelect({ currentTarget: { value: c.input().value, selectionStart: 6 } })+ await c.lookup()+ expect(c.targets).toHaveBeenLastCalledWith('First')+ expect(c.input()['aria-controls']).toBe(`${c.prefix}-contexts`)+ expect(c.input()['aria-activedescendant']).toBe(`${c.prefix}-context-0`)+ expect(find(c.render(), 'ask-picker ask-mention').props.id).toBe(`${c.prefix}-contexts`)+ expect(c.caret.focus).not.toHaveBeenCalled()+ expect(c.save).not.toHaveBeenCalled()+ c.input().onSelect({ currentTarget: { value: c.input().value, selectionStart: 0 } })+ expect(c.input()['aria-expanded']).toBe(false)+})++it.each([false, true])('dismisses empty inline searches on space until a new @, and still inserts inline matches (panel: %s)', async panel => {+ const c = mentionComposer(panel, '')+ c.targets.mockResolvedValue([])+ c.type('@missing')+ await c.lookup()+ expect(c.input()['aria-expanded']).toBe(true)+ c.type('@missing ')+ expect(c.input()['aria-expanded']).toBe(false)+ c.type('@missing and now I am typing')+ expect(c.input()['aria-expanded']).toBe(false)+ c.input().onClick({ currentTarget: { value: c.input().value, selectionStart: 8 } })+ expect(c.input()['aria-expanded']).toBe(false)+ expect(c.input().value).toBe('@missing and now I am typing')+ c.type('@')+ expect(c.input()['aria-expanded']).toBe(false)+ c.type('@missing and now I am typing @')+ expect(c.input()['aria-expanded']).toBe(true)+ const target = { kind: 'meeting', id: 'next', title: 'Next meeting' }+ c.targets.mockResolvedValue([target])+ c.type('@missing and now I am typing @Next')+ await c.lookup()+ c.type('@missing and now I am typing @Next ')+ expect(c.input()['aria-expanded']).toBe(true)+ await c.lookup()+ c.key(c.input(), 'Enter')+ await c.flush()+ expect(c.context).toHaveBeenCalledWith(c.initial.id, [...c.initial.chips, target])+ expect(c.input().value).toBe('@missing and now I am typing ')+ expect(c.input()['aria-expanded']).toBe(false)+})++it.each([false, true].flatMap(panel => [false, true].flatMap(inline => [+ { query: '', meetings: 8, folders: 5, shown: 5, firstNew: 3 },+ { query: '', meetings: 8, folders: 1, shown: 4, firstNew: 3 },+ { query: '', meetings: 8, folders: 0, shown: 5, firstNew: 5 },+ { query: 'Plan', meetings: 8, folders: 5, shown: 10, firstNew: 6 },+ { query: 'Plan', meetings: 12, folders: 0, shown: 10, firstNew: 10 },+ { query: 'Plan', meetings: 2, folders: 5, shown: 6, firstNew: 6 },+ { query: '', meetings: 2, folders: 2, shown: 4, firstNew: -1 },+].map(example => ({ panel, inline, ...example })))))(+ 'caps and expands $meetings meetings/$folders folders for "$query" (panel: $panel, inline: $inline)',+ async ({ panel, inline, query, meetings, folders, shown, firstNew }) => {+ const c = mentionComposer(panel, '')+ const matches = [+ ...Array.from({ length: meetings }, (_, i) => ({ kind: 'meeting', id: `m${i}`, title: `Plan meeting ${i}` })),+ ...Array.from({ length: folders }, (_, i) => ({ kind: 'folder', id: `f${i}`, title: `Plan folder ${i}` })),+ ]+ c.targets.mockResolvedValue(matches)+ if (inline) c.type(`@${query}`)+ else { c.popup().onOpenChange(true); find(c.render(), 'Search meetings and folders').props.onChange({ target: { value: query } }) }+ await c.lookup()+ const control = () => inline ? c.input() : find(c.render(), 'Search meetings and folders').props+ const offset = !inline && !query ? 1 : 0+ const count = meetings + folders - shown+ if (!count) {+ expect(() => find(c.render(), `${c.prefix}-context-${offset + shown}`)).toThrow('Missing')+ return+ }+ const more = find(c.render(), `${c.prefix}-context-${offset + shown}`).props+ expect(more.children[1].props.children).toBe(`${count} more ${count === 1 ? 'result' : 'results'}`)+ expect(() => find(c.render(), `${c.prefix}-context-${offset + shown + 1}`)).toThrow('Missing')+ if (panel) more.onClick()+ else {+ c.key(control(), 'ArrowUp')+ expect(control()['aria-activedescendant']).toBe(`${c.prefix}-context-${offset + shown}`)+ c.key(control(), 'Enter')+ }+ expect(c.context).not.toHaveBeenCalled()+ expect(control()['aria-activedescendant']).toBe(`${c.prefix}-context-${offset + firstNew}`)+ expect(find(c.render(), `${c.prefix}-context-${offset + firstNew}`).props.children[1].props.children).toBe(matches[firstNew].title)+ expect(find(c.render(), `${c.prefix}-context-${offset + matches.length - 1}`).props.children[1].props.children).toBe(matches.at(-1)!.title)+ expect(() => find(c.render(), `${c.prefix}-context-${offset + matches.length}`)).toThrow('Missing')+ c.key(control(), 'Enter')+ await c.flush()+ expect(c.context).toHaveBeenCalledWith(c.initial.id, [...c.initial.chips, matches[firstNew]])+ },+)++it('collapses expanded results for a new search and each new button opening', async () => {+ const c = mentionComposer(false)+ c.targets.mockResolvedValue(Array.from({ length: 20 }, (_, i) => ({ kind: 'meeting', id: String(i), title: `Plan ${i}` })))+ c.popup().onOpenChange(true)+ await c.lookup()+ find(c.render(), `${c.prefix}-context-6`).props.onClick()+ find(c.render(), 'Search meetings and folders').props.onChange({ target: { value: 'Plan' } })+ await c.lookup()+ expect(find(c.render(), `${c.prefix}-context-10`).props.children[1].props.children).toBe('10 more results')+ find(c.render(), `${c.prefix}-context-10`).props.onClick()+ c.popup().onOpenChange(false)+ c.popup().onOpenChange(true)+ await c.lookup()+ expect(find(c.render(), `${c.prefix}-context-6`).props.children[1].props.children).toBe('15 more results')+})+++it.each([0, 1, 2, 5])('labels a scope of %s items without truncating its count', count => {+ const chips = Array.from({ length: count }, (_, i) => ({ kind: 'meeting' as const, id: String(i), title: 'A very long meeting title '.repeat(20) }))+ const label = scopeLabel(chips)+ expect(label.name).toBe(count ? chips[0].title.trim() : 'All meetings')+ expect(label.others).toBe(count > 1 ? `and ${count - 1} ${count === 2 ? 'other' : 'others'}` : '')+ const contents = AskContext({ chips })+ expect(find(contents, 'ask-scope-name').props.children).toBe(label.name)+ if (count > 1) expect(find(contents, 'ask-scope-others').props.children).toBe(` ${label.others}`)+})++it('caps selected scope at three, reveals the rest, and gives query matches the full list', async () => {+ const c = mentionComposer(true)+ c.initial.chips = Array.from({ length: 5 }, (_, i) => ({ kind: i ? 'meeting' : 'folder', id: String(i), title: `Scope ${i}` }))+ c.popup().onOpenChange(true)+ await c.lookup()+ expect(find(c.render(), 'In this chat').props.children[1]).toHaveLength(3)+ expect(find(c.render(), `${c.prefix}-context-3`).props.children[1].props.children).toBe('2 more')+ expect(find(c.render(), `${c.prefix}-context-4`).props.children[1].props.children).toBe('Already attached')+ find(c.render(), `${c.prefix}-context-3`).props.onClick()+ expect(find(c.render(), 'In this chat').props.children[1]).toHaveLength(5)+ c.targets.mockResolvedValue([c.initial.chips[0]])+ find(c.render(), 'Search meetings and folders').props.onChange({ target: { value: 'Scope' } })+ await c.lookup()+ expect(() => find(c.render(), 'In this chat')).toThrow('Missing')+ const row = find(c.render(), `${c.prefix}-context-0`).props+ expect(row['aria-selected']).toBe(true)+ expect(row.children[1].props.children).toBe('Scope 0')+ expect(() => find(c.render(), `${c.prefix}-context-1`)).toThrow('Missing')+ row.onClick(); await c.flush()+ expect(c.removeContext).toHaveBeenCalledExactlyOnceWith(c.initial.id, c.initial.chips[0])+ expect(c.popup().open).toBe(true)+})++it.each(['picker', 'pill'])('clears saved and draft scope from the %s and keeps history', async control => {+ const c = mentionComposer(false)+ c.initial.firstChips = [...c.initial.chips]+ c.initial.draftChips = [{ kind: 'folder', id: 'pending', title: 'Pending' }]+ const scope = [...c.initial.chips, ...c.initial.draftChips]+ c.popup().onOpenChange(true)+ await c.lookup()+ find(c.render(), control === 'picker' ? 'ask-picker-clear' : 'ask-scope-clear').props.onClick()+ await c.flush()+ expect(c.removeContext.mock.calls).toEqual(scope.map(chip => [c.initial.id, chip]))+ expect(c.popup().open).toBe(true)+ c.initial.chips = []; c.initial.draftChips = []+ expect(scopeLabel(c.initial.chips).name).toBe('All meetings')+ expect(() => find(c.render(), 'ask-scope-clear')).toThrow('Missing')+ expect(() => find(c.render(), 'In this chat')).toThrow('Missing')+ expect(c.initial.firstChips).toEqual([scope[0]])+})++it('adds only pending scope after a chat starts and disables toggles during an answer', async () => {+ const c = mentionComposer(true)+ c.initial.firstChips = [...c.initial.chips]+ c.popup().onOpenChange(true)+ await c.lookup()+ find(c.render(), `${c.prefix}-context-1`).props.onClick()+ await c.flush()+ expect(c.context).toHaveBeenCalledWith(c.initial.id, [{ kind: 'meeting', id: 'meeting', title: 'Planning review' }])+ c.initial.turns = [{ id: 1, question: 'Question', answer: '', status: 'answering', sources: [] }]+ const row = find(c.render(), `${c.prefix}-context-0`).props+ expect(row.disabled).toBe(true)+ row.onClick(); await c.flush()+ expect(c.removeContext).not.toHaveBeenCalled()+})+++it('toggles query matches repeatedly without closing (mouse)', async () => {+ const c = mentionComposer(false)+ c.initial.chips = []+ const target = { kind: 'folder' as const, id: 'planning', title: 'Planning' }+ c.targets.mockResolvedValue([target])+ c.context.mockImplementation(async (_id, chips) => { c.initial.chips = chips })+ c.removeContext.mockImplementation(async () => { c.initial.chips = [] })+ c.popup().onOpenChange(true)+ find(c.render(), 'Search meetings and folders').props.onChange({ target: { value: 'Plan' } })+ await c.lookup()+ for (const checked of [true, false, true]) {+ find(c.render(), `${c.prefix}-context-0`).props.onClick()+ await c.flush()+ expect(find(c.render(), `${c.prefix}-context-0`).props['aria-selected']).toBe(checked)+ expect(c.popup().open).toBe(true)+ expect(c.input().value).toBe('Keep this question')+ }+ c.popup().onOpenChange(false)+ c.popup().children[1].props.children.props.children.props.finalFocus()+ expect(c.caret.setSelectionRange).toHaveBeenCalledWith(5, 9)+})++it('Enter picks a query match and closes the picker, back to the question', async () => {+ const c = mentionComposer(false)+ c.initial.chips = []+ const target = { kind: 'folder' as const, id: 'planning', title: 'Planning' }+ c.targets.mockResolvedValue([target])+ c.context.mockImplementation(async (_id, chips) => { c.initial.chips = chips })+ c.popup().onOpenChange(true)+ find(c.render(), 'Search meetings and folders').props.onChange({ target: { value: 'Plan' } })+ await c.lookup()+ c.key(find(c.render(), 'Search meetings and folders').props, 'Enter')+ await c.flush()+ expect(c.context).toHaveBeenCalledWith(expect.anything(), [target])+ expect(c.popup().open).toBe(false)+ expect(c.input().value).toBe('Keep this question')+})++it('keeps checked scope and reports failed removal without closing', async () => {+ const c = mentionComposer(true)+ c.removeContext.mockRejectedValue(new Error('write failed'))+ c.popup().onOpenChange(true)+ await c.lookup()+ find(c.render(), `${c.prefix}-context-0`).props.onClick()+ await c.flush()+ expect(find(c.render(), `${c.prefix}-context-0`).props['aria-selected']).toBe(true)+ expect(find(c.render(), 'chat-send-error').props.role).toBe('alert')+ expect(c.popup().open).toBe(true)+ expect(c.input().readOnly).toBe(false)+})+++it('prefills a reopened picker and anchors it to the composer without sideways fallback', async () => {+ const c = mentionComposer(false)+ find(c.render(), 'ask-scope').props.onPointerEnter()+ await c.flush()+ c.popup().onOpenChange(true)+ expect(find(c.render(), `${c.prefix}-context-1`).props.children[1].props.children).toBe('Planning review')+ const positioner = find(c.render(), 'ask-selector-positioner').props+ expect(positioner.anchor).toBe(find(c.render(), `${c.prefix}-box`).props.ref)+ expect(positioner.collisionAvoidance).toEqual({ fallbackAxisSide: 'none' })+ expect(positioner.align).toBe('start')+ expect(positioner.sideOffset).toBe(6)+})++it('checks an inline match already in scope and consumes its mention without adding it twice', async () => {+ const c = mentionComposer(false, '')+ c.targets.mockResolvedValue([c.initial.chips[0]])+ c.type('@Already')+ await c.lookup()+ const row = find(c.render(), `${c.prefix}-context-0`).props+ expect(row.children[2].type.displayName).toBe('Check')+ c.key(c.input(), 'Enter')+ await c.flush()+ expect(c.context).not.toHaveBeenCalled()+ expect(c.removeContext).not.toHaveBeenCalled()+ expect(c.input().value).toBe('')+ expect(c.input()['aria-expanded']).toBe(false)+})