The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.
TypeScript ai-receptionistanswering-serviceappointment-bookinglivekitlocal-firstmcpopen-sourceself-hostedsiptelephonytypescriptvoice-agentvoice-ai
Agent-usable UI follow-ups: read/unread row action, whole short lists, Insights view in the address, commands name their action (PR 1992)
Tim Gutberletb1eb6a976a84
diff --git a/apps/web/e2e/agent.e2e.ts b/apps/web/e2e/agent.e2e.tsindex 9830a0b6..eeb2613a 100644--- a/apps/web/e2e/agent.e2e.ts+++ b/apps/web/e2e/agent.e2e.ts@@ -63,21 +63,34 @@ test('row actions are there without hovering; the result stays readable after thawait expect(page.locator(`[data-call-id="${id}"]`)).toHaveAttribute('data-state', 'open')})-test('read and unread show as state on the row, changed through the command menu', async ({ page }) => {+test("read and unread: a row action of its own, and a command of the row's menu", async ({ page }) => {await openInbox(page)- const row = page.locator('[data-unread="true"]').first()- const id = (await row.getAttribute('data-call-id'))!- const same = page.locator(`[data-call-id="${id}"]`)- // The row's own "All commands" opens the menu for this call: a combobox with its commands as options.- const run = async (command: RegExp) => {- await same.getByRole('button', { name: /^All commands/ }).click()- await page.getByRole('combobox').fill(command.source.replace(/\W/g, ' ').trim())- await page.getByRole('option', { name: command }).first().click()- }- await run(/Mark read/)- await expect(same).not.toHaveAttribute('data-unread')- await run(/Mark unread/)- await expect(same).toHaveAttribute('data-unread', 'true')+ const id = (await page.locator('[data-unread="true"]').first().getAttribute('data-call-id'))!+ const row = page.locator(`[data-call-id="${id}"]`)+ // The dot under the select box is no button: a click there ticks the call. Marking read is a button by name.+ await row.getByRole('button', { name: /^Mark read/ }).click()+ await expect(row).not.toHaveAttribute('data-unread')+ // The same through the row's "All commands": a combobox with the commands as options, each naming its action.+ await row.getByRole('button', { name: /^All commands/ }).click()+ await page.getByRole('combobox').fill('Mark unread')+ const option = page.getByRole('option', { name: /Mark unread/ }).first()+ await expect(option).toHaveAttribute('data-action', 'call.markUnread')+ await option.click()+ await expect(row).toHaveAttribute('data-unread', 'true')+})++test('Insights: the period and the chart are in the address', async ({ page }) => {+ await page.goto('/#insights?period=7d&metric=messages')+ await expect(page.getByRole('button', { name: /Last 7 days/ })).toBeVisible({ timeout: 30_000 })+ await expect(page.getByRole('tab', { selected: true })).toContainText(/messages/i)+ // Another chart: the address follows, and a reload opens the same view.+ await page+ .getByRole('tab')+ .filter({ hasText: /missed/i })+ .click()+ await expect(page).toHaveURL(/#insights\?period=7d&metric=missed$/)+ await page.reload()+ await expect(page.getByRole('tab', { selected: true })).toContainText(/missed/i)})test('every page of the navigation is a link; a contact opens through its link', async ({ page }) => {diff --git a/apps/web/src/inbox/Inbox.tsx b/apps/web/src/inbox/Inbox.tsxindex 5a1257d9..b9696c34 100644--- a/apps/web/src/inbox/Inbox.tsx+++ b/apps/web/src/inbox/Inbox.tsx@@ -173,6 +173,11 @@ function useStableHandlers(handlers: RowHandlers): RowHandlers {* keeping more of them costs little.*/const OVERSCAN = 60+/**+ * Up to this many calls the whole list is in the page, not only the rows near the window: a screen reader, the+ * browser's own search and a browser agent then find every call without scrolling. Longer lists keep the window.+ */+export const WHOLE_LIST_MAX = 150/** A row's height before it is measured: one line on wide windows, stacked lines on phones (app.css). */const estimateRowHeight = () => (window.matchMedia('(max-width: 719px)').matches ? 72 : 36)@@ -244,7 +249,7 @@ export function Inbox({getScrollElement: () => listRef.current,estimateSize: estimateRowHeight,getItemKey: i => list[i]!.id,- overscan: OVERSCAN,+ overscan: list.length <= WHOLE_LIST_MAX ? list.length : OVERSCAN,scrollMargin: rowsTop,scrollPaddingStart: rowsTop,})diff --git a/apps/web/src/inbox/Row.tsx b/apps/web/src/inbox/Row.tsxindex ca1b05f2..5b44eaa9 100644--- a/apps/web/src/inbox/Row.tsx+++ b/apps/web/src/inbox/Row.tsx@@ -311,17 +311,28 @@ export const Row = memo(function Row({if (!isCursor) on.onHover?.(call)}}>- <span- className={cx('r-dot', unread && 'is-unread')}- role="button"- tabIndex={-1}- title={t('common.withKey', { label: unread ? t('inbox.row.markRead') : t('inbox.row.markUnread'), key: 'U' })}- aria-label={unread ? t('inbox.row.unreadMarkRead') : t('inbox.row.readMarkUnread')}- onClick={stop(() => on.onToggleUnread?.(call))}- >- <i />- {on.onSelect && <SelectBox call={call} selected={selected} onSelect={on.onSelect} />}- </span>+ {on.onSelect ? (+ // Where calls can be ticked, the box lies over the dot and takes every click: the dot only shows the state+ // (the row's name says "unread"), and marking read or unread is a row action of its own below.+ <span className={cx('r-dot', unread && 'is-unread')}>+ <i />+ <SelectBox call={call} selected={selected} onSelect={on.onSelect} />+ </span>+ ) : (+ <span+ className={cx('r-dot', unread && 'is-unread')}+ role="button"+ tabIndex={-1}+ title={t('common.withKey', {+ label: unread ? t('inbox.row.markRead') : t('inbox.row.markUnread'),+ key: 'U',+ })}+ aria-label={unread ? t('inbox.row.unreadMarkRead') : t('inbox.row.readMarkUnread')}+ onClick={stop(() => on.onToggleUnread?.(call))}+ >+ <i />+ </span>+ )}<span className="r-time" title={fullTime(parseTs(call.started_at))}>{listTime(parseTs(call.started_at))}</span>@@ -374,6 +385,17 @@ export const Row = memo(function Row({onClick={() => on.onToggleDone!(call)}/>)}+ {on.onSelect && on.onToggleUnread && (+ <RowAction+ title={t('common.withKey', {+ label: unread ? t('inbox.row.markRead') : t('inbox.row.markUnread'),+ key: 'U',+ })}+ icon="checks"+ tabbable={isCursor}+ onClick={() => on.onToggleUnread!(call)}+ />+ )}{on.onAssign && <AssignAction call={call} onAssign={on.onAssign} tabbable={isCursor} />}{reminded? on.onClearReminder && (diff --git a/apps/web/src/insights/Insights.tsx b/apps/web/src/insights/Insights.tsxindex 9d73bd18..e000c5c0 100644--- a/apps/web/src/insights/Insights.tsx+++ b/apps/web/src/insights/Insights.tsx@@ -4,6 +4,7 @@import type { CallExportData, InsightPeriod, InsightsData, JobValueCurrency } from '@linedesk/actions'import { insightPeriods } from '@linedesk/actions'import { useEffect, useRef, useState } from 'react'+import { hashForPlace, placeFromHash } from './place.ts'import { setQueryData, useQuery } from '../cachedQuery.ts'import { callAction, readAction } from '../settings/settings-api.ts'import { useAssistantNameOrNull } from '../store.tsx'@@ -63,9 +64,25 @@ type Props = { canEdit: boolean; toast: (text: string) => void }export function Insights({ canEdit, toast }: Props) {const t = useT()- const [period, setPeriod] = useState<Choice>('30d')- const [range, setRange] = useState<Range | null>(null)- const [metric, setMetric] = useState<ChartMetric>('answered')+ // The view lives in the address (place.ts): a link or a reload opens the same period, range and chart.+ const [place, setPlace] = useState(() => placeFromHash(window.location.hash))+ const { period, range, metric } = place+ const setPeriod = (period: Choice) => setPlace(p => ({ ...p, period }))+ const setRange = (range: Range | null) => setPlace(p => ({ ...p, range }))+ const setMetric = (metric: ChartMetric) => setPlace(p => ({ ...p, metric }))+ useEffect(() => {+ const hash = hashForPlace(place)+ if (window.location.hash.startsWith('#insights') && window.location.hash !== hash)+ window.history.replaceState(null, '', hash)+ }, [place])+ // An address typed or opened while the page is on screen (another period's link) shows that view.+ useEffect(() => {+ const onHash = () => {+ if (window.location.hash.startsWith('#insights')) setPlace(placeFromHash(window.location.hash))+ }+ window.addEventListener('hashchange', onHash)+ return () => window.removeEventListener('hashchange', onHash)+ }, [])const shownRange = range ?? { from: '', to: '' }const query = useQuery(queryKey(period, shownRange), load(period, shownRange), { persist: true })// Null until the assistants arrive: the lede and the summary wait for the name instead of saying "Assistant" first.diff --git a/apps/web/src/insights/place.test.ts b/apps/web/src/insights/place.test.tsnew file mode 100644index 00000000..ca43a7b3--- /dev/null+++ b/apps/web/src/insights/place.test.ts@@ -0,0 +1,25 @@+import { insightPeriods } from '@linedesk/actions'+import { expect, test } from 'vitest'+import { DEFAULT_PLACE, hashForPlace, placeFromHash } from './place.ts'++test('the defaults keep the plain address; every other view round-trips', () => {+ expect(hashForPlace(DEFAULT_PLACE)).toBe('#insights')+ expect(placeFromHash('#insights')).toEqual(DEFAULT_PLACE)+ for (const period of insightPeriods)+ for (const metric of ['answered', 'booked', 'messages', 'missed'] as const) {+ const place = { period, range: null, metric }+ expect(placeFromHash(hashForPlace(place)), `${period} ${metric}`).toEqual(place)+ }+ const custom = { period: 'custom', range: { from: '2026-11-01', to: '2026-11-15' }, metric: 'booked' } as const+ expect(hashForPlace(custom)).toBe('#insights?period=custom&from=2026-11-01&to=2026-11-15&metric=booked')+ expect(placeFromHash(hashForPlace(custom))).toEqual(custom)+})++test('what an address says wrongly is the default', () => {+ expect(placeFromHash('#insights?period=forever&metric=money')).toEqual(DEFAULT_PLACE)+ expect(placeFromHash('#insights?period=custom&from=2026-11-15&to=2026-11-01')).toEqual(DEFAULT_PLACE)+ expect(placeFromHash('#insights?period=custom&from=yesterday&to=today')).toEqual(DEFAULT_PLACE)+ expect(placeFromHash('#contacts?period=7d')).toEqual(DEFAULT_PLACE)+ // A custom range still being typed (no dates yet) is not in the address.+ expect(hashForPlace({ period: 'custom', range: null, metric: 'answered' })).toBe('#insights')+})diff --git a/apps/web/src/insights/place.ts b/apps/web/src/insights/place.tsnew file mode 100644index 00000000..4d0c4b14--- /dev/null+++ b/apps/web/src/insights/place.ts@@ -0,0 +1,42 @@+// The Insights view in the address: `#insights?period=7d&metric=booked`, a custom range as+// `#insights?period=custom&from=2026-11-01&to=2026-11-15`. A link, a reload and a browser agent open the same view;+// the defaults (30 days, answered calls) are left out, so the plain address stays `#insights`.+import { type InsightPeriod, insightPeriods } from '@linedesk/actions'+import type { ChartMetric } from './insightsModel.ts'++export type InsightsPlace = {+ period: InsightPeriod | 'custom'+ /** Set with `custom`. */+ range: { from: string; to: string } | null+ metric: ChartMetric+}+export const DEFAULT_PLACE: InsightsPlace = { period: '30d', range: null, metric: 'answered' }++const METRICS: readonly ChartMetric[] = ['answered', 'booked', 'messages', 'missed']+const DAY = /^\d{4}-\d{2}-\d{2}$/++/** The view an address names; what it does not say, or says wrongly, is the default. */+export function placeFromHash(hash: string): InsightsPlace {+ const [path, query = ''] = hash.replace(/^#/, '').split('?')+ if (path !== 'insights') return DEFAULT_PLACE+ const params = new URLSearchParams(query)+ const metric = METRICS.find(m => m === params.get('metric')) ?? DEFAULT_PLACE.metric+ const from = params.get('from') ?? ''+ const to = params.get('to') ?? ''+ if (params.get('period') === 'custom' && DAY.test(from) && DAY.test(to) && from <= to)+ return { period: 'custom', range: { from, to }, metric }+ const period = insightPeriods.find(p => p === params.get('period')) ?? DEFAULT_PLACE.period+ return { period, range: null, metric }+}++export function hashForPlace({ period, range, metric }: InsightsPlace): string {+ const params = new URLSearchParams()+ if (period === 'custom' && range) {+ params.set('period', 'custom')+ params.set('from', range.from)+ params.set('to', range.to)+ } else if (period !== 'custom' && period !== DEFAULT_PLACE.period) params.set('period', period)+ if (metric !== DEFAULT_PLACE.metric) params.set('metric', metric)+ const query = params.toString()+ return query ? `#insights?${query}` : '#insights'+}diff --git a/apps/web/src/shell/commands.test.ts b/apps/web/src/shell/commands.test.tsindex 94e1c687..5bc525fe 100644--- a/apps/web/src/shell/commands.test.ts+++ b/apps/web/src/shell/commands.test.ts@@ -1,4 +1,4 @@-import { avatarUrlOf } from '@linedesk/actions'+import { actions, avatarUrlOf } from '@linedesk/actions'import type { Call, WorkspaceMember } from '@linedesk/db/types'import { describe, expect, it, vi } from 'vitest'import { type CommandContext, commandGroups } from './commands.ts'@@ -163,3 +163,56 @@ describe('Delete… (A7: delete permanently now)', () => {expect(labels(c)).not.toContain('Delete…')})})++describe('⌘K and the action registry (LIN-878)', () => {+ /** Public actions on a call that ⌘K does not offer, each with where the app offers it instead. */+ const NOT_A_COMMAND: Record<string, string> = {+ 'call.restore': 'Undo (Z) after Delete',+ 'call.setActionItems': 'edited in the call view, next to the summary',+ 'call.dial': 'the Outbound calls page',+ 'call.guide': 'the live call on the Outbound calls page',+ }+ const call = (over: Partial<Call>) =>+ ({ id: 'c1', unread: false, inbox_state: 'open', outcome: 'answered', urgency: 'normal', ...over }) as Call+ /** The commands of a call in every state that changes which ones are offered. */+ function offered(): string[] {+ const states: Partial<Call>[] = [+ {},+ { unread: true },+ { inbox_state: 'done' },+ { outcome: 'spam' },+ { urgency: 'urgent' },+ { reminder_at: '2999-01-01 09:00:00+00', assignee_id: 'u_2' },+ ]+ const found = new Set<string>()+ for (const blocked of [false, true])+ for (const state of states) {+ const c: CommandContext = {+ ...context(),+ target: call(state),+ isBlocked: () => blocked,+ setUrgent: () => {},+ assign: { members: [], open: () => {}, to: () => {}, showMember: () => {} },+ }+ for (const item of commandGroups(c).flatMap(g => g.items)) if (item.action) found.add(item.action)+ }+ return [...found]+ }++ it('every command that names an action names one of the registry', () => {+ for (const name of offered()) expect(actions.has(name), name).toBe(true)+ })++ it('every public action on a call is a command, or is listed with the place that offers it', () => {+ const named = new Set(offered())+ for (const def of actions.values()) {+ if (!def.public || def.readOnly || !def.name.startsWith('call.')) continue+ if (def.name in NOT_A_COMMAND)+ expect(named.has(def.name), `${def.name} is a command now: take it off the list`).toBe(false)+ else expect(named.has(def.name), `${def.name}: no ⌘K command; add one or list it with its place`).toBe(true)+ }+ for (const name of Object.keys(NOT_A_COMMAND)) expect(actions.has(name), name).toBe(true)+ // Blocking belongs to the contact, and ⌘K offers it on the call.+ expect(named.has('contact.block') && named.has('contact.unblock')).toBe(true)+ })+})diff --git a/apps/web/src/shell/commands.ts b/apps/web/src/shell/commands.tsindex 05134765..4de890dd 100644--- a/apps/web/src/shell/commands.ts+++ b/apps/web/src/shell/commands.ts@@ -81,12 +81,14 @@ function callCommands(call: Call, c: CommandContext): Command[] {hint: t('inbox.action.notDoneHint'),icon: 'restart',shortcut: ['⇧', 'E'],+ action: 'call.markNotDone',run: () => c.markNotDone(call),}: {label: t('shell.command.markDone'),icon: 'check',shortcut: ['E'],+ action: 'call.markDone',run: () => c.markDone(call),},...(callBack@@ -104,6 +106,7 @@ function callCommands(call: Call, c: CommandContext): Command[] {label: t('shell.command.remindMe'),icon: 'clock',shortcut: ['H'],+ action: 'call.remind',run: () => c.openRemind(call),},...(c.assign ? assignCommands(call, c.assign, c.me) : []),@@ -113,6 +116,7 @@ function callCommands(call: Call, c: CommandContext): Command[] {label: t('shell.command.clearReminder'),icon: 'restart',shortcut: ['⇧', 'H'],+ action: 'call.clearReminder',run: () => c.clearReminder(call),} satisfies Command,]@@ -122,6 +126,7 @@ function callCommands(call: Call, c: CommandContext): Command[] {keywords: 'read unread',icon: 'checks',shortcut: ['U'],+ action: call.unread ? 'call.markRead' : 'call.markUnread',run: () => c.toggleUnread(call),},call.outcome === 'spam'@@ -130,6 +135,7 @@ function callCommands(call: Call, c: CommandContext): Command[] {keywords: 'rescue real caller',icon: 'restart',shortcut: ['!'],+ action: 'call.markNotSpam',run: () => c.toggleSpam(call),}: {@@ -137,6 +143,7 @@ function callCommands(call: Call, c: CommandContext): Command[] {keywords: 'junk sales robocall',icon: 'flag',shortcut: ['!'],+ action: 'call.markSpam',run: () => c.toggleSpam(call),},{@@ -144,6 +151,7 @@ function callCommands(call: Call, c: CommandContext): Command[] {keywords: 'blocklist robocall spam caller',icon: 'ban',shortcut: ['⇧', 'B'],+ action: c.isBlocked(call) ? 'contact.unblock' : 'contact.block',run: () => c.toggleBlock(call),},{@@ -151,6 +159,7 @@ function callCommands(call: Call, c: CommandContext): Command[] {keywords: 'remove trash',icon: 'trash',shortcut: ['#'],+ action: 'call.delete',run: () => c.remove(call),},...(c.confirmDelete@@ -179,6 +188,7 @@ function urgentCommands(call: Call, c: CommandContext): Command[] {label: t('shell.command.notUrgent'),keywords: 'urgent flag emergency priority',icon: 'close',+ action: 'call.setUrgency',run: () => setUrgent(call, false),},]@@ -187,6 +197,7 @@ function urgentCommands(call: Call, c: CommandContext): Command[] {label: t('shell.command.markUrgent'),keywords: 'urgent flag emergency priority',icon: 'flag',+ action: 'call.setUrgency',run: () => setUrgent(call, true),},]@@ -205,6 +216,7 @@ function assignCommands(call: Call, a: NonNullable<CommandContext['assign']>, mekeywords: 'assign teammate hand over owner',icon: 'user',shortcut: ['A'],+ action: 'call.assign',run: () => a.open(call),},...(call.assignee_id@@ -213,6 +225,7 @@ function assignCommands(call: Call, a: NonNullable<CommandContext['assign']>, melabel: t('shell.command.unassign'),keywords: 'assign nobody remove',icon: 'close',+ action: 'call.assign',run: () => a.to(call, null, ''),} satisfies Command,]@@ -224,6 +237,7 @@ function assignCommands(call: Call, a: NonNullable<CommandContext['assign']>, meavatar: memberLabel(m),avatarSrc: memberAvatar(m),searchOnly: true,+ action: 'call.assign',run: () => a.to(call, m.user_id, memberLabel(m)),}),),diff --git a/apps/web/src/ui/CommandMenu.tsx b/apps/web/src/ui/CommandMenu.tsxindex 2fb4e5f5..a7ef36ef 100644--- a/apps/web/src/ui/CommandMenu.tsx+++ b/apps/web/src/ui/CommandMenu.tsx@@ -16,6 +16,8 @@ export type CommandItem = {hint?: stringkeywords?: stringsearchOnly?: boolean+ /** The registry action the command runs (`call.markDone`), when it is one: the option carries it as `data-action`. */+ action?: string}export type CommandGroup<T extends CommandItem = CommandItem> = { label: string | null; items: T[] }export type SelectVia = 'key' | 'mouse'@@ -113,7 +115,14 @@ export function CommandMenu<T extends CommandItem>({let n = -1return (- <div className="k-cmd" ref={panel} tabIndex={-1} role="dialog" aria-modal="true" aria-label={label ?? t('common.commandMenu.label')}>+ <div+ className="k-cmd"+ ref={panel}+ tabIndex={-1}+ role="dialog"+ aria-modal="true"+ aria-label={label ?? t('common.commandMenu.label')}+ ><div className="k-cmd-search"><Icon name="search" /><input@@ -147,11 +156,16 @@ export function CommandMenu<T extends CommandItem>({id={optionId(me)}className="k-cmd-item"role="option"+ data-action={it.action}aria-selected={me === index}onMouseEnter={() => setActive(me)}onClick={() => onSelect(it, 'mouse')}>- {it.avatar !== undefined ? <Avatar name={it.avatar} size={20} src={it.avatarSrc} /> : it.icon && <Icon name={it.icon} />}+ {it.avatar !== undefined ? (+ <Avatar name={it.avatar} size={20} src={it.avatarSrc} />+ ) : (+ it.icon && <Icon name={it.icon} />+ )}<span>{it.label}{it.hint && <small className="k-cmd-hint">{it.hint}</small>}diff --git a/docs/api.md b/docs/api.mdindex d2060abc..28d141c9 100644--- a/docs/api.md+++ b/docs/api.md@@ -98,7 +98,7 @@ The coverage test `apps/api/test/ui-parity.test.ts` fails when an action has noA browser with a built-in agent that supports WebMCP (`document.modelContext`, a W3C draft; other browsers get nothing and nothing changes) finds the app's tools on the page while a person is signed in (`apps/web/src/agentTools.ts`):- one tool per public action the person may run, with the MCP server's names (`call_markDone`), descriptions and schemas. A member gets no destructive tool (delete, block, spam, cancel, an outbound call); owners and admins get them marked `consequentialHint`, so the browser can ask first, as are `call.dial`, `call.guide` and `call.export`. `feedback.send` and `integration.*` are not offered.-- `app_view`: the place (the address after `#`), the calls of the list on screen with their ids, and what the last actions answered; `app_open`: opens a call, a contact or a page of the navigation, no other address.+- `app_view`: the place (the address after `#`), the calls of the list on screen with their ids, and what the last actions answered; `app_open`: opens a call, a contact or a page of the navigation (with its view: `calls?q=…`, `insights?period=7d&metric=missed`), no other address.A tool runs as the signed-in person through `POST /v1/actions/<name>`, like a click: the server checks the session and the role again. Every result comes inside `untrusted_caller_content` with the MCP server's notice, and every tool carries `untrustedContentHint`: names, summaries and notes come from callers and are data, never instructions. Not during support access. An agent that works without a person at the page uses the MCP server with a key instead.diff --git a/docs/design-principles.md b/docs/design-principles.mdindex 7078c21e..fd2c6f99 100644--- a/docs/design-principles.md+++ b/docs/design-principles.md@@ -45,11 +45,14 @@ Linedesk should feel like a calm, native tool, not a dashboard. These rules come18. **Links in text: every pointer to another place in the app is a link, one look everywhere.** When a help line, hint, note, banner, empty state or error names a place ("change that under Account › Preferences", "set Answered by under Advanced"), that name is a link to it: underlined, in the text's own ink, with the focus ring, never coloured or bold. It is a plain hash link, so it opens the place the way the menu does and ⌘-click opens a new tab. A place in Server admin is a link only for instance admins; everyone else reads the same words without a link. Walkthrough steps keep rule 14 (a hint, or a new tab). An action inside text ("Try again", "Change") looks the same but is a button. How: `AppLink` and `LinkButton` from `ui/AppLink.tsx`; in a message the place is a tag (`"change that under <link>Account › Preferences</link>"`) rendered with `<T values={{ link: appLink('#account/preferences') }} />` or `adminLink('#admin/providers/…')`, never a sentence split into pieces. `apps/web/src/ui/linkStandard.test.ts` fails on the link class written by hand and on an `<a>` built inside a message tag. Tooltips (`title`) stay plain words: they can't hold a link.19. **Notice boxes: icon, text and actions vertically centered.** In every box of an icon, text and optional buttons or links (a `Note`, the setup line, a check result), the icon, the text block and the actions share one centre line (`align-items: center`), never the icon pinned to the first text line or a `margin-top`/`padding-top` nudge. When the actions wrap below the text on a narrow screen, the icon still centres with the text block. How: `Note` from `ui/kit.tsx`; a box built by hand gets the same `align-items: center`. `apps/web/src/ui/noticeStandard.test.ts` fails on a `.k-note` that goes back to top alignment.20. **A browser agent and a screen reader find everything by role and name.** People send their own agents to the app (browser agents, a browser's built-in agent); what works for them is what works for assistive tech. The rules, checked by `apps/web/e2e` (CI job `agent ui`):- - **A place is a link.** A row that opens a call or a contact carries an `<a href>` with its address (`r-link` around its name; the row's click still opens it in place); navigation items are links. Every view has its own address.+ - **A place is a link.** A row that opens a call or a contact carries an `<a href>` with its address (`r-link` around its name; the row's click still opens it in place); navigation items are links. Every view has its own address, with what it shows (the inbox's view and search, the Insights period and chart: `#insights?period=7d&metric=missed`).- **A control is in the page before the pointer is on it.** Actions that show on hover are hidden with `opacity`, not `display: none`, where the only pointer is a mouse (`.r-acts`; never on a device with a touch screen, where a tap would hit a button nobody sees), and keep their `aria-label`. Tab skips the ones not on screen.- **Names don't change.** A control's name is its `aria-label` or its text; `title` adds the keys. The tooltip script gives a `title` back when the pointer leaves.+ - **A short list is whole in the page.** Up to 150 calls the inbox renders every row, not only those near the window (`WHOLE_LIST_MAX`); a longer list says its length (`aria-setsize`).+ - **One control per place.** Where one control lies over another (the select box over the read dot), only the one that takes the click is a control; the other action gets a place of its own (Mark read is a row action).- **State is readable.** A list row says which record it is and its state (`data-call-id`, `data-state`, `data-unread`), besides its `aria-label`.- **A result outlasts its toast.** Every toast that answers an action is also a line of the hidden "Recent results" list (`ResultLog`), so "Marked done" or "Couldn't …" can be read after the toast is gone.+ - **A command names its action.** A ⌘K command that runs a registry action carries its name (`action`, `data-action` on the option); `commands.test.ts` fails when a public call action has neither a command nor a listed place.- **The page's tools are the registry's.** A browser with WebMCP (`document.modelContext`) gets the public actions the signed-in person may run and the page's view (`apps/web/src/agentTools.ts`); nothing is built for agents beside the registry.## Building blocks