Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Search: typing a date offers Go to that day, which opens Meetings with the agenda on it

Eric Brownroutada44ea930d3
diff --git a/app/e2e/commands.spec.ts b/app/e2e/commands.spec.ts
index 9da2c33c..312cd108 100644
--- a/app/e2e/commands.spec.ts
+++ b/app/e2e/commands.spec.ts
@@ -12,6 +12,44 @@ async function launch(env: Record<string, string> = {}) {
return { app, page }
}
+test('a future date command opens Meetings on that agenda day and its week', async () => {
+ const { app, page } = await launch()
+ try {
+ await page.clock.install({ time: new Date(2026, 10, 14, 12) })
+ await app.evaluate(({ ipcMain }) => {
+ ipcMain.removeHandler('calendar:day')
+ ipcMain.handle('calendar:day', (_event, at: number) => ({ status: 'granted', events: [
+ { id: 'example', title: 'Example event', start: at, end: at + 60_000, attendees: [], url: null },
+ ] }))
+ })
+ await page.getByTestId('nav-trash').click()
+ const jump = async () => {
+ await page.keyboard.press('Meta+k')
+ await page.getByTestId('search-input').fill('November 11, 2028')
+ await expect(page.getByTestId('search-date')).toContainText('2028')
+ const row = page.getByTestId('command-agenda-date')
+ await expect(row).toContainText('Go to Nov 11, 2028')
+ await expect(row).toHaveAttribute('aria-selected', 'true')
+ await page.keyboard.press('Enter')
+ await expect(page.getByTestId('search')).toHaveCount(0)
+ }
+ await jump()
+ await expect(page.getByTestId('home')).toBeVisible()
+ const agenda = page.getByRole('complementary', { name: 'Agenda' })
+ await expect(agenda.locator('.agenda-month')).toHaveText('November 2028')
+ await expect(agenda.getByRole('button', { name: 'Saturday, November 11', exact: true })).toHaveAttribute('aria-pressed', 'true')
+ await expect(agenda.locator('.agenda-week button').first()).toHaveAttribute('aria-label', 'Sunday, November 5')
+ await agenda.getByTestId('event-details').click()
+ await expect(agenda.getByTestId('event-details-content')).toBeVisible()
+ await jump()
+ await expect(agenda.getByTestId('event-details-content')).toHaveCount(0)
+ await agenda.getByRole('button', { name: 'Next day', exact: true }).click()
+ await expect(agenda.getByRole('button', { name: 'Sunday, November 12', exact: true })).toHaveAttribute('aria-pressed', 'true')
+ await jump()
+ await expect(agenda.getByRole('button', { name: 'Saturday, November 11', exact: true })).toHaveAttribute('aria-pressed', 'true')
+ } finally { await app.close() }
+})
+
test('the sidebar shortcut, native View menu, command palette and shortcut reference stay in sync', async () => {
const { app, page } = await launch()
try {
diff --git a/app/src/renderer/src/App.tsx b/app/src/renderer/src/App.tsx
index b86f4a8f..dcca3b87 100644
--- a/app/src/renderer/src/App.tsx
+++ b/app/src/renderer/src/App.tsx
@@ -41,23 +41,27 @@ export function App() {
const [setup, setSetup] = useState<SetupState>()
// where the app was told to go, e.g. /note/<id>
const [route, setRouteNow] = useState('')
+ const [agendaJump, setAgendaJump] = useState<{ at: number }>()
const [meeting, setMeeting] = useState<Pick<MeetingView, 'id' | 'title'>>()
/** Back and forward keep the same note routes; a new destination starts a new branch. */
const history = useRef<string[]>([])
const future = useRef<string[]>([])
const echoes = useRef<string[]>([])
const routeRef = useRef('')
- const setRoute = (r: string) => {
+ const setRoute = (r: string, agendaDate?: number) => {
+ // A fresh request lets the same date reset a day changed with the arrows.
+ setAgendaJump(agendaDate === undefined ? undefined : { at: agendaDate })
rememberScrollPositions()
if (r !== routeRef.current) { history.current = [...history.current, routeRef.current].slice(-50); future.current = [] }
routeRef.current = r
setRouteNow(r)
}
const rememberRoute = (r: string) => { echoes.current.push(r); window.yogurt.nav.go(r) }
- const go = (r: string) => { setRoute(r); rememberRoute(r) }
+ const go = (r: string, agendaDate?: number) => { setRoute(r, agendaDate); rememberRoute(r) }
const back = () => {
const prev = history.current.pop()
if (prev === undefined) return
+ setAgendaJump(undefined)
rememberScrollPositions()
future.current.push(routeRef.current)
routeRef.current = prev; setRouteNow(prev); rememberRoute(prev)
@@ -65,6 +69,7 @@ export function App() {
const forward = () => {
const next = future.current.pop()
if (next === undefined) return
+ setAgendaJump(undefined)
rememberScrollPositions()
history.current.push(routeRef.current)
routeRef.current = next; setRouteNow(next); rememberRoute(next)
@@ -183,7 +188,7 @@ export function App() {
const screen = settings ? <Settings revision={settingsRevision} focus={route.startsWith('/settings/') ? route.slice('/settings/'.length) : undefined} /> : noteId ? <Note key={noteId} id={noteId} onSource={openSource} onTitleChange={setMeeting} at={jump?.id === noteId ? jump : undefined}
folderSuggestion={suggestedFolder ? { folder: suggestedFolder, dismiss: () => dismissFolderSuggestion(noteId) } : undefined} />
: chatId !== undefined ? <ChatPage id={chatId} go={go} openSource={openSource} />
- : trash ? <Trash open={open} /> : folderScreen || <Home open={open} openFolder={(id) => go(`/folder/${id}`)} />
+ : trash ? <Trash open={open} /> : folderScreen || <Home open={open} openFolder={(id) => go(`/folder/${id}`)} agendaJump={agendaJump} />
return (
<div data-testid="app-shell" className={`h-full text-ink ${ready ? 'bg-transparent' : 'bg-bg'}`}>
{ready ? <Workspace route={route} meeting={meeting} folders={folders} go={go} back={history.current.length ? back : undefined} forward={future.current.length ? forward : undefined} search={() => setSearching(true)} collapsed={sidebarCollapsed} sidebarMotion={sidebarMotion} toggleSidebar={toggleSidebar}>{screen}</Workspace>
diff --git a/app/src/renderer/src/components/Agenda.tsx b/app/src/renderer/src/components/Agenda.tsx
index b9059870..2c435dbd 100644
--- a/app/src/renderer/src/components/Agenda.tsx
+++ b/app/src/renderer/src/components/Agenda.tsx
@@ -26,16 +26,21 @@ let lastView: { selected: number; week: number } | undefined
let lastDay: Day | undefined
let watchingCalendars = false
-export function Agenda({ revision, recording, onStart, onOpen }: Actions & { revision: number }) {
+export function Agenda({ revision, recording, onStart, onOpen, jumpTo }: Actions & { revision: number; jumpTo?: { at: number } }) {
const today = useDay()
const me = useMyName()
- const [selected, setSelected] = useState(() => lastView?.selected ?? shiftDay(Date.now(), 0))
- const [weekAnchor, setWeekAnchor] = useState(() => lastView?.week ?? selected)
+ const [selected, setSelected] = useState(() => jumpTo ? shiftDay(jumpTo.at, 0) : lastView?.selected ?? shiftDay(Date.now(), 0))
+ const [weekAnchor, setWeekAnchor] = useState(() => jumpTo ? selected : lastView?.week ?? selected)
const [loaded, setLoaded] = useState(() => lastDay?.at === selected ? lastDay : undefined)
const [inspected, setInspected] = useState<Inspection>()
const opener = useRef<HTMLButtonElement | null>(null)
const closeDetails = useCallback((restoreFocus = true) => { setInspected(undefined); if (restoreFocus) opener.current?.focus() }, [])
const [jump, setJump] = useState(0)
+ useLayoutEffect(() => {
+ if (!jumpTo) return
+ const at = shiftDay(jumpTo.at, 0)
+ setSelected(at); setWeekAnchor(at); setInspected(undefined); setJump(n => n + 1)
+ }, [jumpTo])
const initialized = useRef<string | undefined>(undefined)
const lastJump = useRef(jump)
const [now, setNow] = useState(Date.now)
diff --git a/app/src/renderer/src/components/Search.tsx b/app/src/renderer/src/components/Search.tsx
index 1f7e6260..3e15659a 100644
--- a/app/src/renderer/src/components/Search.tsx
+++ b/app/src/renderer/src/components/Search.tsx
@@ -12,7 +12,7 @@ import { dayLabel, timeOf } from '../dates'
import { parseSearchQuery } from '../../../shared/searchQuery'
import { completeSearchPerson, matchSearchPeople, removeSearchSpan, searchPersonKey, uniqueSearchPeople, type SearchPersonMatch } from '../../../shared/searchPeople'
import { searchPalette, searchSelectionKey } from '../searchRanking'
-import { searchDateLabel, searchFilterEmptyMessage, searchFilterHighlights } from '../searchFilters'
+import { searchDateCommand, searchDateLabel, searchFilterEmptyMessage, searchFilterHighlights } from '../searchFilters'
/** typing settles this long before the search runs */
const DEBOUNCE_MS = 120
@@ -26,7 +26,7 @@ function Marked({ parts }: { parts: SnippetPart[] }) {
* ⌘K searches meetings and the app's destinations and actions. A folder scopes meeting results and new questions.
*/
export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange, onShortcuts, onClose, sidebarCollapsed, onToggleSidebar }: {
- folder?: Folder; folders?: Folder[]; onOpen: (id: string) => void; onNavigate: (route: string) => void; onSettingsChange: () => void; onShortcuts: () => void; onClose: () => void
+ folder?: Folder; folders?: Folder[]; onOpen: (id: string) => void; onNavigate: (route: string, agendaDate?: number) => void; onSettingsChange: () => void; onShortcuts: () => void; onClose: () => void
sidebarCollapsed: boolean; onToggleSidebar: () => void
}) {
const [open, setOpen] = useState(true)
@@ -96,7 +96,9 @@ export function Search({ folder, folders, onOpen, onNavigate, onSettingsChange,
const items = results?.list ?? []
const navigate = (route: string) => { onNavigate(route) }
const settingsAction = async (run: () => Promise<void>) => { await run(); onSettingsChange() }
+ const dateCommand = window.yogurt.capabilities.calendar ? searchDateCommand(parsed.date, q) : undefined
const allCommands = [
+ ...(dateCommand ? [{ ...dateCommand, Icon: CalendarDays, run: () => onNavigate('', dateCommand.at) }] : []),
{ id: 'meetings', label: t('Meetings'), group: t('Go to'), Icon: FileText, run: () => navigate(''), shortcut: keys('⌘1') },
{ id: 'chat', synonyms: ['chat'], label: t('Ask'), group: t('Go to'), Icon: MessageCircle, run: () => navigate('/chat'), shortcut: keys('⌘2') },
{ id: 'trash', label: t('Trash'), group: t('Go to'), Icon: Trash2, run: () => navigate('/trash'), shortcut: keys('⌘3') },
diff --git a/app/src/renderer/src/screens/Home.tsx b/app/src/renderer/src/screens/Home.tsx
index 8e700cb7..2155c5a9 100644
--- a/app/src/renderer/src/screens/Home.tsx
+++ b/app/src/renderer/src/screens/Home.tsx
@@ -23,7 +23,7 @@ const PAGE = 40
const loadedCounts = new Map<string, number>()
/** The workspace, backed by the existing meeting and calendar bridge. */
-export function Home({ open, openFolder }: { open: (id: string) => void; openFolder?: (id: string) => void }) {
+export function Home({ open, openFolder, agendaJump }: { open: (id: string) => void; openFolder?: (id: string) => void; agendaJump?: { at: number } }) {
const past = usePastNotes()
const day = useDay()
const recording = past.cards?.find((c) => c.state === 'recording')
@@ -46,7 +46,7 @@ export function Home({ open, openFolder }: { open: (id: string) => void; openFol
<p>{t('Start recording, add a few notes, and Yogurt writes the rest when you stop.')}</p>
</div></section> : <PastNotes cards={past.cards ?? []} day={day} more={past.more} sentinel={past.setSentinel} onOpen={open} openFolder={openFolder} />}</LoadingContent>
</div>
- {calendar && <Agenda revision={calendarRevision} recording={recording} onStart={start} onOpen={open} />}
+ {calendar && <Agenda revision={calendarRevision} recording={recording} onStart={start} onOpen={open} jumpTo={agendaJump} />}
</div>
}
diff --git a/app/src/renderer/src/searchFilters.ts b/app/src/renderer/src/searchFilters.ts
index ef876820..792f3c4f 100644
--- a/app/src/renderer/src/searchFilters.ts
+++ b/app/src/renderer/src/searchFilters.ts
@@ -3,6 +3,15 @@ import type { Person } from '../../shared/types'
import type { SearchPersonMatch } from '../../shared/searchPeople'
import type { SearchDate } from '../../shared/searchQuery'
+export function searchDateCommand(date: SearchDate | undefined, query: string) {
+ if (!date) return undefined
+ const start = new Date(date.start)
+ if (new Date(start.getFullYear(), start.getMonth(), start.getDate() + 1).getTime() !== date.end) return undefined
+ return { id: 'agenda-date', query, group: t('Go to'), label: t('Go to {date}', {
+ date: new Intl.DateTimeFormat(language(), { month: 'short', day: 'numeric', year: 'numeric' }).format(start),
+ }), at: date.start }
+}
+
export function searchDateLabel(date: SearchDate, locale = language()) {
const start = new Date(date.start)
const singleDay = new Date(start.getFullYear(), start.getMonth(), start.getDate() + 1).getTime() === date.end
diff --git a/app/src/renderer/src/searchRanking.ts b/app/src/renderer/src/searchRanking.ts
index 59ab2bce..5fd54bd5 100644
--- a/app/src/renderer/src/searchRanking.ts
+++ b/app/src/renderer/src/searchRanking.ts
@@ -1,5 +1,5 @@
import { searchPersonKey, type SearchPersonMatch } from '../../shared/searchPeople'
-type Command = { id?: string; label: string; group: string; synonyms?: string[] }
+type Command = { id?: string; label: string; group: string; synonyms?: string[]; query?: string }
type Meeting = { meetingId?: string; confident?: boolean }
type SelectionRow = { kind: 'ask' } | { kind: 'command'; command: Command } | { kind: 'meeting'; meeting: Meeting } | ({ kind: 'person' } & SearchPersonMatch)
@@ -16,6 +16,8 @@ const words = (text: string) => text.split(/[^\p{L}\p{N}]+/u)
/** Exact label > label prefix > word start > group/synonym > substring. */
export function scoreCommand(command: Command, query: string): number {
const q = normalize(query), label = normalize(command.label)
+ // A parsed date matches its original query, even when its formatted label uses different words.
+ if (command.query !== undefined) return q && normalize(command.query) === q ? 5 : 0
if (!q) return 0
if (label === q) return 5
if (label.startsWith(q)) return 4
@@ -38,7 +40,7 @@ export function orderSearchResults<C extends Command, M>(commands: C[], meetings
}
export function searchPalette<C extends Command, M extends Meeting>(commands: C[], meetings: M[], query: string, askQuery = query, people: SearchPersonMatch[] = [], previous?: string, filtered = false) {
- const matches = orderSearchResults(filtered ? [] : commands, meetings, query)
+ const matches = orderSearchResults(filtered ? commands.filter(c => c.query !== undefined) : commands, meetings, query)
const choices = [...people.map(person => ({ kind: 'person' as const, ...person })), ...matches]
const rows = askQuery.trim() ? [{ kind: 'ask' as const, query: askQuery.trim() }, ...choices] : choices
// Ask stays pinned, but Enter chooses a strong command or a meeting whose terms all match metadata.
diff --git a/app/src/shared/locales/ar.json b/app/src/shared/locales/ar.json
index 9a38398f..f8980c0f 100644
--- a/app/src/shared/locales/ar.json
+++ b/app/src/shared/locales/ar.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "انتقل إلى {date}",
"Take notes · {title}": "تدوين الملاحظات · {title}",
"Take notes · {count} now": "تدوين الملاحظات · {count} الآن",
"Now": "الآن",
diff --git a/app/src/shared/locales/bn.json b/app/src/shared/locales/bn.json
index a664703f..3b9983a3 100644
--- a/app/src/shared/locales/bn.json
+++ b/app/src/shared/locales/bn.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "{date} তারিখে যান",
"Take notes · {title}": "নোট নিন · {title}",
"Take notes · {count} now": "নোট নিন · এখন {count}টি",
"Now": "এখন",
diff --git a/app/src/shared/locales/cs.json b/app/src/shared/locales/cs.json
index b3e8399f..4360fcc4 100644
--- a/app/src/shared/locales/cs.json
+++ b/app/src/shared/locales/cs.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Přejít na {date}",
"Take notes · {title}": "Dělat poznámky · {title}",
"Take notes · {count} now": "Dělat poznámky · {count} právě teď",
"Now": "Nyní",
diff --git a/app/src/shared/locales/da.json b/app/src/shared/locales/da.json
index 183048f0..b86647e4 100644
--- a/app/src/shared/locales/da.json
+++ b/app/src/shared/locales/da.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Gå til {date}",
"Take notes · {title}": "Tag noter · {title}",
"Take notes · {count} now": "Tag noter · {count} nu",
"Now": "Nu",
diff --git a/app/src/shared/locales/de.json b/app/src/shared/locales/de.json
index 8feebabf..e0346e8b 100644
--- a/app/src/shared/locales/de.json
+++ b/app/src/shared/locales/de.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Zum {date} springen",
"Take notes · {title}": "Notizen machen · {title}",
"Take notes · {count} now": "Notizen machen · {count} laufen",
"Now": "Jetzt",
diff --git a/app/src/shared/locales/el.json b/app/src/shared/locales/el.json
index d3381bc3..5c1001dd 100644
--- a/app/src/shared/locales/el.json
+++ b/app/src/shared/locales/el.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Μετάβαση στις {date}",
"Take notes · {title}": "Κράτηση σημειώσεων · {title}",
"Take notes · {count} now": "Κράτηση σημειώσεων · {count} τώρα",
"Now": "Τώρα",
diff --git a/app/src/shared/locales/en.json b/app/src/shared/locales/en.json
index f0fce942..9b74653d 100644
--- a/app/src/shared/locales/en.json
+++ b/app/src/shared/locales/en.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Go to {date}",
"Previous day": "Previous day",
"Next day": "Next day",
"Take notes · {title}": "Take notes · {title}",
diff --git a/app/src/shared/locales/es.json b/app/src/shared/locales/es.json
index 108dfe38..fdc4834e 100644
--- a/app/src/shared/locales/es.json
+++ b/app/src/shared/locales/es.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Ir al {date}",
"Take notes · {title}": "Tomar notas · {title}",
"Take notes · {count} now": "Tomar notas · {count} ahora",
"Now": "Ahora",
diff --git a/app/src/shared/locales/fi.json b/app/src/shared/locales/fi.json
index c56b942b..0921712b 100644
--- a/app/src/shared/locales/fi.json
+++ b/app/src/shared/locales/fi.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Siirry päivään {date}",
"Take notes · {title}": "Tee muistiinpanoja · {title}",
"Take notes · {count} now": "Tee muistiinpanoja · {count} käynnissä",
"Now": "Nyt",
diff --git a/app/src/shared/locales/fil.json b/app/src/shared/locales/fil.json
index 7acc3e21..ae00a41c 100644
--- a/app/src/shared/locales/fil.json
+++ b/app/src/shared/locales/fil.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Pumunta sa {date}",
"Take notes · {title}": "Mag-note · {title}",
"Take notes · {count} now": "Mag-note · {count} ngayon",
"Now": "Ngayon",
diff --git a/app/src/shared/locales/fr.json b/app/src/shared/locales/fr.json
index 768c2ca1..320e47de 100644
--- a/app/src/shared/locales/fr.json
+++ b/app/src/shared/locales/fr.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Aller au {date}",
"Take notes · {title}": "Prendre des notes · {title}",
"Take notes · {count} now": "Prendre des notes · {count} en cours",
"Now": "En cours",
diff --git a/app/src/shared/locales/he.json b/app/src/shared/locales/he.json
index dbfbff69..4ba188a9 100644
--- a/app/src/shared/locales/he.json
+++ b/app/src/shared/locales/he.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "מעבר אל {date}",
"Take notes · {title}": "רישום הערות · {title}",
"Take notes · {count} now": "רישום הערות · {count} עכשיו",
"Now": "עכשיו",
diff --git a/app/src/shared/locales/hi.json b/app/src/shared/locales/hi.json
index 28c1832a..b75570ed 100644
--- a/app/src/shared/locales/hi.json
+++ b/app/src/shared/locales/hi.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "{date} पर जाएँ",
"Take notes · {title}": "नोट्स लें · {title}",
"Take notes · {count} now": "नोट्स लें · अभी {count}",
"Now": "अभी",
diff --git a/app/src/shared/locales/hu.json b/app/src/shared/locales/hu.json
index f1fff65d..e38a0750 100644
--- a/app/src/shared/locales/hu.json
+++ b/app/src/shared/locales/hu.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Ugrás erre a napra: {date}",
"Take notes · {title}": "Jegyzetelés · {title}",
"Take notes · {count} now": "Jegyzetelés · most {count}",
"Now": "Most",
diff --git a/app/src/shared/locales/id.json b/app/src/shared/locales/id.json
index c0a6f352..82510c9e 100644
--- a/app/src/shared/locales/id.json
+++ b/app/src/shared/locales/id.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Buka tanggal {date}",
"Take notes · {title}": "Catat · {title}",
"Take notes · {count} now": "Catat · {count} sekarang",
"Now": "Sekarang",
diff --git a/app/src/shared/locales/it.json b/app/src/shared/locales/it.json
index b73cd507..bcdbaf95 100644
--- a/app/src/shared/locales/it.json
+++ b/app/src/shared/locales/it.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Vai al {date}",
"Take notes · {title}": "Prendi appunti · {title}",
"Take notes · {count} now": "Prendi appunti · {count} in corso",
"Now": "In corso",
diff --git a/app/src/shared/locales/ja.json b/app/src/shared/locales/ja.json
index 845ee4f1..1bca3168 100644
--- a/app/src/shared/locales/ja.json
+++ b/app/src/shared/locales/ja.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "{date}に移動",
"Take notes · {title}": "メモを取る · {title}",
"Take notes · {count} now": "メモを取る · {count}件が進行中",
"Now": "進行中",
diff --git a/app/src/shared/locales/ko.json b/app/src/shared/locales/ko.json
index 700df189..b2bc3ca8 100644
--- a/app/src/shared/locales/ko.json
+++ b/app/src/shared/locales/ko.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "{date}로 이동",
"Take notes · {title}": "노트 기록 · {title}",
"Take notes · {count} now": "노트 기록 · {count}개 진행 중",
"Now": "진행 중",
diff --git a/app/src/shared/locales/ms.json b/app/src/shared/locales/ms.json
index c6487490..b4c2fefd 100644
--- a/app/src/shared/locales/ms.json
+++ b/app/src/shared/locales/ms.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Pergi ke {date}",
"Take notes · {title}": "Ambil nota · {title}",
"Take notes · {count} now": "Ambil nota · {count} sekarang",
"Now": "Sekarang",
diff --git a/app/src/shared/locales/nb.json b/app/src/shared/locales/nb.json
index 7317cca7..230162c2 100644
--- a/app/src/shared/locales/nb.json
+++ b/app/src/shared/locales/nb.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Gå til {date}",
"Take notes · {title}": "Ta notater · {title}",
"Take notes · {count} now": "Ta notater · {count} nå",
"Now": "Nå",
diff --git a/app/src/shared/locales/nl.json b/app/src/shared/locales/nl.json
index c2237eed..d173c226 100644
--- a/app/src/shared/locales/nl.json
+++ b/app/src/shared/locales/nl.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Ga naar {date}",
"Take notes · {title}": "Notities maken · {title}",
"Take notes · {count} now": "Notities maken · {count} nu",
"Now": "Nu",
diff --git a/app/src/shared/locales/pl.json b/app/src/shared/locales/pl.json
index 171f4a6a..5277974d 100644
--- a/app/src/shared/locales/pl.json
+++ b/app/src/shared/locales/pl.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Przejdź do {date}",
"Take notes · {title}": "Rób notatki · {title}",
"Take notes · {count} now": "Rób notatki · {count} teraz",
"Now": "Teraz",
diff --git a/app/src/shared/locales/pt-BR.json b/app/src/shared/locales/pt-BR.json
index e748828f..8067f622 100644
--- a/app/src/shared/locales/pt-BR.json
+++ b/app/src/shared/locales/pt-BR.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Ir para {date}",
"Take notes · {title}": "Fazer anotações · {title}",
"Take notes · {count} now": "Fazer anotações · {count} agora",
"Now": "Agora",
diff --git a/app/src/shared/locales/ro.json b/app/src/shared/locales/ro.json
index 9ef67b7b..67d3c110 100644
--- a/app/src/shared/locales/ro.json
+++ b/app/src/shared/locales/ro.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Mergi la {date}",
"Take notes · {title}": "Luați notițe · {title}",
"Take notes · {count} now": "Luați notițe · {count} acum",
"Now": "Acum",
diff --git a/app/src/shared/locales/ru.json b/app/src/shared/locales/ru.json
index 5106b42e..ceb56647 100644
--- a/app/src/shared/locales/ru.json
+++ b/app/src/shared/locales/ru.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Перейти к {date}",
"Take notes · {title}": "Вести заметки · {title}",
"Take notes · {count} now": "Вести заметки · {count} сейчас",
"Now": "Сейчас",
diff --git a/app/src/shared/locales/sv.json b/app/src/shared/locales/sv.json
index 9a3e384d..9e48523c 100644
--- a/app/src/shared/locales/sv.json
+++ b/app/src/shared/locales/sv.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Gå till {date}",
"Take notes · {title}": "Anteckna · {title}",
"Take notes · {count} now": "Anteckna · {count} nu",
"Now": "Nu",
diff --git a/app/src/shared/locales/th.json b/app/src/shared/locales/th.json
index 62b1c790..b019555c 100644
--- a/app/src/shared/locales/th.json
+++ b/app/src/shared/locales/th.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "ไปที่ {date}",
"Take notes · {title}": "จดโน้ต · {title}",
"Take notes · {count} now": "จดโน้ต · {count} รายการขณะนี้",
"Now": "ขณะนี้",
diff --git a/app/src/shared/locales/tr.json b/app/src/shared/locales/tr.json
index 84024563..2cf17003 100644
--- a/app/src/shared/locales/tr.json
+++ b/app/src/shared/locales/tr.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Şu tarihe git: {date}",
"Take notes · {title}": "Not al · {title}",
"Take notes · {count} now": "Not al · şu anda {count}",
"Now": "Şimdi",
diff --git a/app/src/shared/locales/uk.json b/app/src/shared/locales/uk.json
index f07c9870..f5820977 100644
--- a/app/src/shared/locales/uk.json
+++ b/app/src/shared/locales/uk.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Перейти до {date}",
"Take notes · {title}": "Вести нотатки · {title}",
"Take notes · {count} now": "Вести нотатки · {count} зараз",
"Now": "Зараз",
diff --git a/app/src/shared/locales/vi.json b/app/src/shared/locales/vi.json
index a385bf5c..8a4a1389 100644
--- a/app/src/shared/locales/vi.json
+++ b/app/src/shared/locales/vi.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "Đi đến {date}",
"Take notes · {title}": "Ghi chú · {title}",
"Take notes · {count} now": "Ghi chú · {count} đang diễn ra",
"Now": "Đang diễn ra",
diff --git a/app/src/shared/locales/zh-CN.json b/app/src/shared/locales/zh-CN.json
index 6c9d991a..f3741cdd 100644
--- a/app/src/shared/locales/zh-CN.json
+++ b/app/src/shared/locales/zh-CN.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "转到{date}",
"Take notes · {title}": "记笔记 · {title}",
"Take notes · {count} now": "记笔记 · {count} 个正在进行",
"Now": "正在进行",
diff --git a/app/src/shared/locales/zh-TW.json b/app/src/shared/locales/zh-TW.json
index a76f1ae9..ea99ecbe 100644
--- a/app/src/shared/locales/zh-TW.json
+++ b/app/src/shared/locales/zh-TW.json
@@ -1,4 +1,5 @@
{
+ "Go to {date}": "前往{date}",
"Take notes · {title}": "做筆記 · {title}",
"Take notes · {count} now": "做筆記 · {count} 個進行中",
"Now": "進行中",
diff --git a/app/test/i18n-tables.test.ts b/app/test/i18n-tables.test.ts
index e02863f2..139b1254 100644
--- a/app/test/i18n-tables.test.ts
+++ b/app/test/i18n-tables.test.ts
@@ -11,6 +11,16 @@ const load = (id: string): Record<string, Entry> => JSON.parse(readFileSync(join
const blanks = (s: string) => [...new Set(s.match(/\{\w+\}/g) ?? [])].sort()
const forms = (e: Entry) => (typeof e === 'string' ? [e] : Object.values(e))
+it('translates the agenda date command in every locale', () => {
+ const key = 'Go to {date}'
+ expect(keys).toContain(key)
+ for (const { id } of LOCALES) {
+ expect(load(id)[key]).toBeTypeOf('string')
+ expect(load(id)[key]).toContain('{date}')
+ if (id !== 'en') expect(load(id)[key]).not.toBe(key)
+ }
+})
+
it('translates day arrows and removes unused week arrows in every locale', () => {
for (const { id } of LOCALES) {
const table = load(id)
diff --git a/app/test/motionInteractions.test.ts b/app/test/motionInteractions.test.ts
index 4dc0dd23..8904b9c0 100644
--- a/app/test/motionInteractions.test.ts
+++ b/app/test/motionInteractions.test.ts
@@ -6,13 +6,15 @@ import { AskConversation } from '../src/renderer/src/components/AskConversation'
import type { ConversationView } from '../src/shared/types'
import { Workspace } from '../src/renderer/src/components/Workspace'
import { FoldersNav } from '../src/renderer/src/components/FoldersNav'
+import { Agenda } from '../src/renderer/src/components/Agenda'
vi.mock('react', async original => ({
...await original<typeof import('react')>(), useState: vi.fn(), useRef: vi.fn(), useEffect: vi.fn(), useLayoutEffect: vi.fn(),
+ useCallback: (callback: unknown) => callback,
}))
vi.mock('motion/react', async original => ({ ...await original<typeof import('motion/react')>(), useDragControls: () => ({ start: vi.fn() }) }))
vi.mock('react-dom', async original => ({ ...await original<typeof import('react-dom')>(), createPortal: (children: ReactNode) => children }))
-afterEach(() => { vi.unstubAllGlobals(); vi.clearAllMocks() })
+afterEach(() => { vi.unstubAllGlobals(); vi.clearAllMocks(); vi.useRealTimers() })
// Exercise the component's handlers and state without starting Electron or a browser.
function renderer(component: () => ReactNode) {
@@ -57,7 +59,7 @@ function find(node: ReactNode, testId: string): ReactElement<any> {
if (Array.isArray(value)) return value.map(visit).find(Boolean)
if (!value || typeof value !== 'object' || !('props' in value)) return
const element = value as ReactElement<any>
- if (element.props['data-testid'] === testId || element.props.id === testId) return element
+ if (element.props['data-testid'] === testId || element.props.id === testId || element.props['aria-label'] === testId || element.props.className === testId) return element
return visit(element.props.children)
}
const result = visit(node)
@@ -65,11 +67,80 @@ function find(node: ReactNode, testId: string): ReactElement<any> {
return result
}
+it.each([true, false])('offers and runs the date command only with an agenda (calendar: %s)', async calendar => {
+ vi.useFakeTimers()
+ vi.stubGlobal('document', { activeElement: null })
+ vi.stubGlobal('HTMLButtonElement', class {})
+ vi.stubGlobal('window', { yogurt: { capabilities: { calendar }, search: { query: vi.fn().mockResolvedValue([]) } } })
+ const onNavigate = vi.fn()
+ const render = renderer(() => Search({ onOpen() {}, onNavigate, onSettingsChange() {}, onShortcuts() {}, onClose() {}, sidebarCollapsed: false, onToggleSidebar() {} }))
+ find(render(), 'search-input').props.onChange({ target: { value: 'November 11, 2028' } })
+ render()
+ vi.mocked(useEffect).mock.calls.find(([, deps]) => deps?.length === 6)![0]()
+ await vi.runAllTimersAsync()
+ const tree = render()
+ expect(find(tree, 'search-date').props.children[1].props.title).toContain('2028')
+ if (!calendar) { expect(() => find(tree, 'command-agenda-date')).toThrow('Missing'); return }
+ const row = find(tree, 'command-agenda-date')
+ expect(row.props['aria-selected']).toBe(true)
+ expect(row.props.children[0].type.displayName).toBe('CalendarDays')
+ expect(row.props.children[1].props.children[0]).toBe('Go to Nov 11, 2028')
+ find(tree, 'search').props.onKeyDown({ key: 'Enter', nativeEvent: {}, preventDefault() {} })
+ expect(onNavigate).toHaveBeenCalledExactlyOnceWith('', new Date(2028, 10, 11).getTime())
+})
+
+it('jumps a mounted agenda to the day and week, closes details, and keeps arrows and repeated jumps working', async () => {
+ vi.useFakeTimers()
+ vi.setSystemTime(new Date(2026, 10, 14, 12))
+ const day = vi.fn(async (at: number) => ({ status: 'granted', events: [{ id: 'example', title: 'Example event', start: at, end: at + 60_000, attendees: [], url: null }] }))
+ vi.stubGlobal('window', { addEventListener() {}, removeEventListener() {}, yogurt: {
+ calendar: { day, onChange: () => () => {} }, meetings: { onChange: () => () => {} },
+ } })
+ let jumpTo: { at: number } | undefined
+ const render = renderer(() => Agenda({ revision: 0, onStart: async () => {}, onOpen() {}, jumpTo })) as () => ReturnType<typeof Agenda>
+ const applyJump = () => vi.mocked(useLayoutEffect).mock.calls.find(([, deps]) => deps?.length === 1 && deps[0] === jumpTo)![0]()
+ render()
+ jumpTo = { at: new Date(2028, 10, 11).getTime() }
+ render(); applyJump()
+ let tree = render()
+ expect(find(tree, 'agenda-month').props.children).toBe('November 2028')
+ expect(find(tree, 'Saturday, November 11').props['aria-pressed']).toBe(true)
+ expect(find(tree, 'Choose agenda date').props.children.map((button: ReactElement<any>) => button.props['aria-label'])).toEqual([
+ 'Sunday, November 5', 'Monday, November 6', 'Tuesday, November 7', 'Wednesday, November 8',
+ 'Thursday, November 9', 'Friday, November 10', 'Saturday, November 11',
+ ])
+ const cleanup = vi.mocked(useEffect).mock.calls.find(([, deps]) => deps?.length === 3 && typeof deps[0] === 'function')![0]()
+ await Promise.resolve(); await Promise.resolve(); await Promise.resolve(); await Promise.resolve()
+ tree = render()
+ expect(day).toHaveBeenLastCalledWith(new Date(2028, 10, 11, 12).getTime())
+ find(tree, 'coming-up').props.children[0].props.onInspect({ focus() {} }, false)
+ expect(render().props.children.at(-1)).toBeTruthy()
+ // A fresh request for the same day must close its event card too.
+ jumpTo = { ...jumpTo }; render(); applyJump()
+ tree = render()
+ expect(tree.props.children.at(-1)).toBeFalsy()
+ find(tree, 'Next day').props.onClick()
+ tree = render()
+ expect(find(tree, 'Sunday, November 12').props['aria-pressed']).toBe(true)
+ expect(find(tree, 'Choose agenda date').props.children[0].props['aria-label']).toBe('Sunday, November 12')
+ jumpTo = { ...jumpTo }; render(); applyJump()
+ tree = render()
+ expect(find(tree, 'Saturday, November 11').props['aria-pressed']).toBe(true)
+ find(tree, 'Previous day').props.onClick()
+ expect(find(render(), 'Friday, November 10').props['aria-pressed']).toBe(true)
+ vi.mocked(useEffect).mock.calls.find(([, deps]) => deps?.length === 2 && deps.every(value => typeof value === 'number'))![0]()
+ const remount = renderer(() => Agenda({ revision: 0, onStart: async () => {}, onOpen() {} }))
+ expect(find(remount(), 'Friday, November 10').props['aria-pressed']).toBe(true)
+ const arrival = renderer(() => Agenda({ revision: 0, onStart: async () => {}, onOpen() {}, jumpTo: { at: new Date(2030, 0, 1).getTime() } }))
+ expect(find(arrival(), 'Tuesday, January 1').props['aria-pressed']).toBe(true)
+ cleanup?.()
+})
+
it('keeps initial search results still, ignores stationary hover, and scrolls only for keyboard selection', async () => {
const meetings = [{ meetingId: 'm1', title: 'Recent meeting', startedAt: 1000, parts: [] }]
vi.stubGlobal('document', { activeElement: null })
vi.stubGlobal('HTMLButtonElement', class {})
- vi.stubGlobal('window', { yogurt: { search: { query: vi.fn().mockResolvedValue(meetings) } } })
+ vi.stubGlobal('window', { yogurt: { capabilities: { calendar: true }, search: { query: vi.fn().mockResolvedValue(meetings) } } })
const render = renderer(() => Search({ onOpen() {}, onNavigate() {}, onSettingsChange() {}, onShortcuts() {}, onClose() {}, sidebarCollapsed: false, onToggleSidebar() {} }))
const scrollIntoView = vi.fn()
const scroll = () => { vi.mocked(useEffect).mock.lastCall![0]() }
diff --git a/app/test/searchFilters.test.ts b/app/test/searchFilters.test.ts
index 80e1b032..347243a5 100644
--- a/app/test/searchFilters.test.ts
+++ b/app/test/searchFilters.test.ts
@@ -1,11 +1,58 @@
-import { describe, expect, it } from 'vitest'
-import { searchDateLabel, searchFilterEmptyMessage, searchFilterHighlights } from '../src/renderer/src/searchFilters'
+import { afterEach, describe, expect, it } from 'vitest'
+import { searchDateCommand, searchDateLabel, searchFilterEmptyMessage, searchFilterHighlights } from '../src/renderer/src/searchFilters'
+import { setLanguage } from '../src/shared/i18n'
import { matchSearchPeople, removeSearchSpan } from '../src/shared/searchPeople'
import { parseSearchQuery } from '../src/shared/searchQuery'
import { searchPalette } from '../src/renderer/src/searchRanking'
const person = { name: 'Riley Example', email: '[email protected]' }
const commands = [{ label: 'Settings', group: 'Go to' }]
+afterEach(() => setLanguage('en'))
+
+describe('agenda date command', () => {
+ const options = { now: new Date(2026, 10, 14, 12), locale: 'en-US', language: 'en' }
+ it.each(['November 11th, 2028', '11/11/2028', '2028-11-11', 'today', 'tomorrow', 'planning on November 11, 2028'])('offers a single-day jump for %s and keeps meeting results', query => {
+ const parsed = parseSearchQuery(query, options)
+ const command = searchDateCommand(parsed.date, query)!
+ expect(command).toMatchObject({ id: 'agenda-date', group: 'Go to', at: parsed.date!.start })
+ const meeting = { meetingId: 'example', confident: true }
+ const palette = searchPalette([...commands, command], [meeting], query, query, [], undefined, true)
+ expect(palette.rows.map(row => row.kind)).toEqual(['ask', 'command', 'meeting'])
+ expect(palette.rows[palette.active]).toEqual({ kind: 'command', command })
+ })
+ it.each(['', 'planning', 'November', 'in November', 'last week', 'past 7 days', 'November 11 to November 13, 2028', '02/30/2028'])('omits the jump for %s', query => {
+ expect(searchDateCommand(parseSearchQuery(query, options).date, query)).toBeUndefined()
+ })
+ it('formats the label in the app language, including the year', () => {
+ const date = parseSearchQuery('November 11, 2028', options).date
+ expect(searchDateCommand(date, 'November 11, 2028')?.label).toBe('Go to Nov 11, 2028')
+ setLanguage('fr')
+ expect(searchDateCommand(date, '11/11/2028')).toMatchObject({ group: 'Aller à', label: 'Aller au 11 nov. 2028' })
+ })
+ it('matches localized and relative input even when it differs from the label', () => {
+ setLanguage('de')
+ const query = '11. November 2028'
+ const command = searchDateCommand(parseSearchQuery(query, { ...options, language: 'de' }).date, query)!
+ expect(command.label).toBe('Zum 11. Nov. 2028 springen')
+ const palette = searchPalette([command], [], query, query, [], undefined, true)
+ expect(palette.rows[palette.active]).toEqual({ kind: 'command', command })
+ expect(searchPalette([command], [], 'last week', 'last week', [], undefined, true).rows.map(r => r.kind)).toEqual(['ask'])
+ })
+ it('recognizes single days on both daylight-saving transitions', () => {
+ const saved = process.env.TZ
+ try {
+ process.env.TZ = 'America/Los_Angeles'
+ for (const query of ['March 8, 2026', 'November 1, 2026']) {
+ const date = parseSearchQuery(query, options).date!
+ expect(date.end - date.start).not.toBe(24 * 60 * 60 * 1000)
+ expect(searchDateCommand(date, query)?.at).toBe(date.start)
+ }
+ } finally {
+ if (saved === undefined) delete process.env.TZ
+ else process.env.TZ = saved
+ }
+ })
+})
describe('search filters', () => {
it('shows a compact range pill and highlights and removes the complete range', () => {