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
Phone numbers built around forwarding, in each assistant and the workspace; "your number" (PR 1933)
Janik698684bbf76b
diff --git a/apps/api/src/emails/__snapshots__/templates.test.ts.snap b/apps/api/src/emails/__snapshots__/templates.test.ts.snapindex 40430c62..df1dabb8 100644--- a/apps/api/src/emails/__snapshots__/templates.test.ts.snap+++ b/apps/api/src/emails/__snapshots__/templates.test.ts.snap@@ -84,7 +84,7 @@ Linedesk · desk.example.comMaya is set up for Brightwater Plumbing & Heating. One thing is left before callers reach Maya:-If you haven't yet, forward the calls you don't pick up on your business line to +1 503 555 0142. The steps for your phone company are in Linedesk.+If you haven't yet, forward the calls you don't pick up on your number to +1 503 555 0142. The steps for your phone company are in Linedesk.Finish setup:https://desk.example.com/#workspace/phone/pn_preview?ws=ws_demo@@ -103,7 +103,7 @@ Linedesk · desk.example.comNo real calls have reached Maya yet. The one thing left:-If you haven't yet, forward the calls you don't pick up on your business line to +1 503 555 0142. The steps for your phone company are in Linedesk.+If you haven't yet, forward the calls you don't pick up on your number to +1 503 555 0142. The steps for your phone company are in Linedesk.Finish setup:https://desk.example.com/#workspace/phone/pn_preview?ws=ws_demo@@ -141,7 +141,7 @@ Linedesk · desk.example.comNo real calls have reached Maya yet. The one thing left:-If you haven't yet, forward the calls you don't pick up on your business line to +1 503 555 0142. The steps for your phone company are in Linedesk.+If you haven't yet, forward the calls you don't pick up on your number to +1 503 555 0142. The steps for your phone company are in Linedesk.Finish setup:https://desk.example.com/#workspace/phone/pn_preview?ws=ws_demo@@ -165,7 +165,7 @@ Linedesk · desk.example.comNo real calls have reached Maya yet. The one thing left:-Call your business number from a phone that isn't one of yours (a friend's) and let it ring. When you don't pick up, Maya does.+Call your number from a phone that isn't one of yours (a friend's) and let it ring. When you don't pick up, Maya does.Open your inbox:https://desk.example.com/#calls?ws=ws_demodiff --git a/apps/api/test/forwarding-check.test.ts b/apps/api/test/forwarding-check.test.tsindex 4d52f844..8687c147 100644--- a/apps/api/test/forwarding-check.test.ts+++ b/apps/api/test/forwarding-check.test.ts@@ -136,7 +136,7 @@ describe('starting a check', () => {const other = await createWorkspace('Other Refusals Plumbing')const check = (input: object, who = ws.owner) =>act(who, 'phoneNumber.checkForwarding', { phoneNumberId: pn!.id, ...input })- expect((await check({})).body.error).toMatch(/business number first/)+ expect((await check({})).body.error).toMatch(/your number first/)// Another workspace's Linedesk number (given one the check would otherwise accept).const linedeskNumber = checkable('503')await db.update(phone_numbers).set({ e164: linedeskNumber }).where(eq(phone_numbers.workspace_id, other.id))diff --git a/apps/web/src/app.css b/apps/web/src/app.cssindex 5b4988fa..f05afd9d 100644--- a/apps/web/src/app.css+++ b/apps/web/src/app.css@@ -1599,39 +1599,63 @@ a.k-btn {font-size: 13px;color: var(--ink-muted);}-/* Settings, Phone numbers: one list row per number (ui/list.css), Manage opens the rest. */-.pn-status {+/* Settings, Phone numbers: one card per number (settings/NumberCard.tsx), the page's label with Add number above. */+.pn-head {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 12px;+ min-height: 28px;+}+.pn-head > .k-line-group {+ margin: 0 2px;+}+.pn-cards {+ display: grid;+ grid-template-columns: minmax(0, 1fr);+ gap: 12px;+}+.pn-card .k-card-title h2 {+ overflow-wrap: anywhere;+}+.pn-card-sk {+ display: grid;+ gap: 6px;+}+/* Forwarding's state: the mark and its words, like the other rows' grey values. */+.pn-forwarding {display: inline-flex;align-items: center;gap: 6px;font-size: 12.5px;color: var(--ink-muted);+ white-space: nowrap;}-.pn-status::before {- content: "";- width: 6px;- height: 6px;- border-radius: var(--radius-full);- background: var(--ink-disabled);+/* Assistant › Phone: the empty card with Add a number, and the line to the full list with Add a number below. */+.pn-empty {+ justify-items: start;}-.pn-status.is-on {- color: var(--ink);+.pn-foot {+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ justify-content: space-between;+ gap: 8px 12px;+ margin: 0 2px;}-.pn-status.is-on::before {- background: var(--live-dot, var(--ink));+.pn-foot .help {+ margin: 0;}-/* Forwarding not verified yet: the status opens the number, where the check is. */-.pn-status-link {- padding: 0;- border: 0;- background: none;- font-family: inherit;- cursor: pointer;+/* Your number, asked for under the Forwarding row when none is saved yet. */+.pn-ask {+ display: grid;+ gap: 8px;+ padding: 4px 0 8px;}-.pn-status-link:hover {- color: var(--ink);- text-decoration: underline;- text-underline-offset: 2px;+.pn-ask-foot {+ display: flex;+ justify-content: flex-end;+ gap: 8px;}/* The "?" next to "How calls reach <assistant>": every mode with its explanation (settings/NumberMode.tsx). */.pn-mode-help {@@ -1651,15 +1675,6 @@ a.k-btn {.pn-release {color: var(--danger);}-/* Whether the assistant answers a number: its status mark and words (Settings › Phone numbers). */-.pn-answering {- display: inline-flex;- align-items: center;- gap: 6px;- font-size: 12.5px;- color: var(--ink-muted);- white-space: nowrap;-}.pn-carrier-form {display: grid;gap: 16px;diff --git a/apps/web/src/onboarding/forwarding-check.test.ts b/apps/web/src/onboarding/forwarding-check.test.tsindex a91b95bf..edffc2ea 100644--- a/apps/web/src/onboarding/forwarding-check.test.ts+++ b/apps/web/src/onboarding/forwarding-check.test.ts@@ -29,7 +29,7 @@ describe('forwarding check results', () => {{ status: 'not_checked', ringSeconds: null, detail: 'Could not check: no number to call from.' },'Maya',).next,- ).toMatch(/^Could not check: no number to call from\. Call your business number/)+ ).toMatch(/^Could not check: no number to call from\. Call your number/)})test('a simulated check (development carrier) never reads as verified', () => {@@ -52,7 +52,7 @@ describe('forwarding check results', () => {test('forward-all speaks of every call, not the unanswered ones', () => {expect(checkResultText({ status: 'works', ringSeconds: null, detail: null }, 'Maya', true).title).toBe(- 'Verified: calls to your business number reach Maya.',+ 'Verified: calls to your number reach Maya.',)expect(checkResultText({ status: 'rang_through', ringSeconds: null, detail: null }, 'Maya', true).next).toMatch(/forward-all code/,diff --git a/apps/web/src/settings/AssistantHeader.tsx b/apps/web/src/settings/AssistantHeader.tsxindex 277ac705..5fa5abc7 100644--- a/apps/web/src/settings/AssistantHeader.tsx+++ b/apps/web/src/settings/AssistantHeader.tsx@@ -7,7 +7,6 @@ import { type KeyboardEvent, useEffect, useRef, useState } from 'react'import { formatNumber } from '../onboarding/flow.ts'import { useRun } from '../store.tsx'import { Dialog } from '../ui/form.tsx'-import { AppLink } from '../ui/AppLink.tsx'import { Button, Icon } from '../ui/kit.tsx'import './assistant.css'@@ -113,19 +112,17 @@ function SwitchMenu({ assistant, assistants, canEdit, onPick, onNew, onDuplicate}/**- * Which numbers this assistant answers. Each opens its settings (Workspace settings, Phone numbers), the one place that picks- * the assistant answering a number: a number has exactly one, so it is chosen there, not taken from another here.+ * Which numbers this assistant answers. Each opens its card in the assistant's Phone section (how calls reach it,+ * whether forwarding works); who answers a number is picked on Workspace settings › Phone numbers.*/function NumberChips({assistant,isDefault,numbers,- canEdit,}: {assistant: AssistantisDefault: booleannumbers: PhoneNumber[]- canEdit: boolean}) {const t = useT()const mine = numbers.filter(n => n.assistant_id === assistant.id || (!n.assistant_id && isDefault))@@ -135,20 +132,14 @@ function NumberChips({<akey={n.id}className="as-chip"- href={`#workspace/phone/${n.id}`}+ href={`#assistant/${assistant.id}/phone/${n.id}`}title={t('settings.assistantHeader.numberTip')}>{formatNumber(n.e164)}</a>))}- {!mine.length &&- (canEdit ? (- <a className="help" href="#workspace/phone" title={t('settings.assistantHeader.noNumberTip')}>- {t('settings.assistantHeader.noNumberChoose')}- </a>- ) : (- <span className="help">{t('settings.assistantHeader.noNumber')}</span>- ))}+ {/* Adding one is the Phone section's, the first thing below. */}+ {!mine.length && <span className="help">{t('settings.assistantHeader.noNumber')}</span>}</div>)}@@ -201,12 +192,10 @@ export function AssistantHeader({ assistant, assistants, numbers, canEdit, onPic</div>{numbers.length === 0 ? (<div className="as-numbers">- <span className="help">- <AppLink to="#workspace/phone">{t('settings.assistantHeader.noPhoneNumber')}</AppLink>- </span>+ <span className="help">{t('settings.assistantHeader.noPhoneNumber')}</span></div>) : (- <NumberChips assistant={assistant} isDefault={isDefault} numbers={numbers} canEdit={canEdit} />+ <NumberChips assistant={assistant} isDefault={isDefault} numbers={numbers} />)}{deleting && fallback && (<Dialogdiff --git a/apps/web/src/settings/AssistantPhone.tsx b/apps/web/src/settings/AssistantPhone.tsxnew file mode 100644index 00000000..2e8ff9a9--- /dev/null+++ b/apps/web/src/settings/AssistantPhone.tsx@@ -0,0 +1,71 @@+// Assistant › Phone (LIN-852, mockup A): how calls reach this assistant. Its numbers as the same cards as Workspace+// settings › Phone numbers (the sentence, Forwarding with Test, how calls reach its number), without Answered by: the+// page is the assistant's. Add a number gives a number to this assistant. The carrier, the own phone system and who+// answers a number stay on Workspace settings › Phone numbers, the full list, linked below.+import type { Assistant } from '@linedesk/db/types'+import { T, useT } from '@linedesk/i18n/react'+import { useState } from 'react'+import type { PhoneSetupStatus } from '../auth.ts'+import { useAssistants, useRows } from '../store.tsx'+import { appLink } from '../ui/AppLink.tsx'+import { Card } from '../ui/form.tsx'+import { Button } from '../ui/kit.tsx'+import { ListEmpty } from '../ui/list.tsx'+import { sectionHash } from '../ui/SettingsLayout.tsx'+import { AddNumberDialog, NumberList, usePhoneStatus } from './PhoneNumbers.tsx'++type Props = {+ assistant: Assistant+ canEdit: boolean+ phoneSetup: PhoneSetupStatus | null+ extraNumberCents: number | null+}++export function AssistantPhone({ assistant, canEdit, phoneSetup, extraNumberCents }: Props) {+ const t = useT()+ const assistants = useAssistants()+ // Numbers that name no assistant are the first (default) one's.+ const isDefault = assistants[0]?.id === assistant.id+ const numbers = useRows('phone_numbers')+ .filter(n => n.assistant_id === assistant.id || (!n.assistant_id && isDefault))+ .sort((a, b) => a.created_at.localeCompare(b.created_at))+ const { status } = usePhoneStatus(canEdit, phoneSetup)+ const canAdd = canEdit && !!status?.available+ const [adding, setAdding] = useState(false)+ const add = (variant: 'primary' | 'secondary') => (+ <Button size="sm" variant={variant} icon="plus" onClick={() => setAdding(true)}>+ {t('settings.assistant.phone.add')}+ </Button>+ )+ return (+ <>+ <NumberList+ numbers={numbers}+ assistants={assistants}+ canEdit={canEdit}+ page={`assistant/${assistant.id}`}+ answeredBy={false}+ empty={+ <Card className="pn-empty">+ <ListEmpty>{t('settings.assistant.phone.empty', { name: assistant.name })}</ListEmpty>+ {canAdd && add('primary')}+ </Card>+ }+ />+ <div className="pn-foot">+ <p className="help">+ <T k="settings.assistant.phone.allNumbers" values={{ link: appLink(sectionHash('workspace', 'phone')) }} />+ </p>+ {canAdd && numbers.length > 0 && add('secondary')}+ </div>+ {adding && (+ <AddNumberDialog+ status={status}+ extraNumberCents={extraNumberCents}+ assistant={assistant}+ onClose={() => setAdding(false)}+ />+ )}+ </>+ )+}diff --git a/apps/web/src/settings/AssistantSettings.tsx b/apps/web/src/settings/AssistantSettings.tsxindex b352cb71..eef528a2 100644--- a/apps/web/src/settings/AssistantSettings.tsx+++ b/apps/web/src/settings/AssistantSettings.tsx@@ -37,6 +37,7 @@ import {withRecordingSentence,} from '@linedesk/actions'import type { Assistant, PhoneNumber } from '@linedesk/db/types'+import type { PhoneSetupStatus } from '../auth.ts'import { languageInSentence, languageLabel, type MessageKey, msg } from '@linedesk/i18n'import { T, useFormat, useLocale, useT } from '@linedesk/i18n/react'import { type CSSProperties, type FormEvent, Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react'@@ -100,6 +101,7 @@ import {withPickedVoice,} from './assistantDraft.ts'import { canonicalAssistantHash, OLD_SECTIONS, WEBHOOK_ITEM } from './assistantLinks.ts'+import { AssistantPhone } from './AssistantPhone.tsx'import { BusinessHours } from './BusinessHours.tsx'import { EditBusinessHours } from './BusinessHoursDialog.tsx'import { CalendarSettings } from './Calendar.tsx'@@ -128,8 +130,10 @@ import { RealtimeVoiceSettings, useVoiceOptions, VoiceLoading, VoiceSettings } fimport { WEBHOOK_SECTION_ID, Webhooks } from './Webhooks.tsx'import { FoldOutButton } from '../ui/FoldOut.tsx'-type SectionId = 'general' | 'business' | 'hours' | 'rules' | 'transfers' | 'emails' | 'booking' | 'advanced'+type SectionId = 'phone' | 'general' | 'business' | 'hours' | 'rules' | 'transfers' | 'emails' | 'booking' | 'advanced'+/** Phone first: how calls reach the assistant (LIN-852). */const SECTION_IDS: readonly SectionId[] = [+ 'phone','general','business','hours',@@ -141,11 +145,11 @@ const SECTION_IDS: readonly SectionId[] = []/** Each section's name and line in the nav, in the active language. */// i18n-dynamic: settings.assistant.section.*-const sectionsIn = (t: ReturnType<typeof useT>): readonly PageSection<SectionId>[] =>+const sectionsIn = (t: ReturnType<typeof useT>, name: string): readonly PageSection<SectionId>[] =>SECTION_IDS.map(id => ({id,label: t(`settings.assistant.section.${id}.label`),- description: t(`settings.assistant.section.${id}.description`),+ description: t(`settings.assistant.section.${id}.description`, { name }),}))/**@@ -200,7 +204,7 @@ function NotAnswered({ setUp }: { setUp: PipelinesSetUp | null }) {}/** Sections that save on their own, outside the assistant's draft. */-type OwnSection = 'hours' | 'booking'+type OwnSection = 'phone' | 'hours' | 'booking'/** Which draft fields each section holds. */const sectionFields: Record<Exclude<SectionId, OwnSection>, (keyof Draft)[]> = {business: ['instructions', 'website'],@@ -1092,6 +1096,10 @@ type Props = {isInstanceAdmin?: booleanagentChange?: booleanundoable?: Undoable+ /** Where numbers can be bought or connected (Assistant › Phone's Add a number). */+ phoneSetup?: PhoneSetupStatus | null+ /** On a bill: what each number beyond the included one costs a month; null otherwise. */+ extraNumberCents?: number | null}type FormProps = Props & {@@ -1111,6 +1119,8 @@ function Form({isInstanceAdmin = false,agentChange = false,undoable,+ phoneSetup = null,+ extraNumberCents = null,}: FormProps) {const t = useT()const run = useRun()@@ -1143,8 +1153,8 @@ function Form({? t('settings.assistant.section.booking.needsCalendar', { name: assistantName(saved, t) }): nullconst shown = useMemo(- () => sectionsFor(sectionsIn(t), canEdit, openItems, bookingTodo),- [t, canEdit, openItems, bookingTodo],+ () => sectionsFor(sectionsIn(t, assistantName(saved, t)), canEdit, openItems, bookingTodo),+ [t, canEdit, openItems, bookingTodo, saved],)const current = useSection(page, shown)// `#assistant/<id>/advanced/webhook` (also where the old Webhook section's links land): Advanced, at the webhook.@@ -1177,7 +1187,7 @@ function Form({*/function save(e: FormEvent) {e.preventDefault()- if (current === 'hours' || current === 'booking') return+ if (current === 'phone' || current === 'hours' || current === 'booking') returnconst next = sectionOf(saved, draft, current)// Name and greeting show their error under the field: go there instead of a toast that outlives the fix.if (nameProblem(next.name)) return goTo('general', 'as-name')@@ -1247,11 +1257,11 @@ function Form({/** Cancel: the open section's fields as saved; the other sections keep their edits. */function cancel() {- if (current === 'hours' || current === 'booking') return+ if (current === 'phone' || current === 'hours' || current === 'booking') returnsetDraft(d => sectionOf(d, saved, current))}// The bar shows only for the open section's own unsaved edits; another section's keep their dot in the nav.- const changed = current !== 'hours' && current !== 'booking' && unsaved.has(current)+ const changed = current !== 'phone' && current !== 'hours' && current !== 'booking' && unsaved.has(current)// Hours and holidays have forms of their own; everything else is inside the draft's form.const body = (@@ -1384,7 +1394,14 @@ function Form({{!canEdit &&// Email notifications: every member switches their own row there.(current === 'emails' ? <Note tone="info">{t('settings.assistant.emails.readOnly')}</Note> : <ReadOnlyNote />)}- {current === 'hours' ? (+ {current === 'phone' ? (+ <AssistantPhone+ assistant={assistant}+ canEdit={canEdit}+ phoneSetup={phoneSetup}+ extraNumberCents={extraNumberCents}+ />+ ) : current === 'hours' ? (<><BusinessHours canEdit={canEdit} />{/* Holidays close days only while hours are used (businessHoursFor); vacation mode works either way. */}@@ -1441,6 +1458,7 @@ const useBusinessHoursOn = (): boolean => useWorkspaceSettings().data?.businessH/** How many cards each section shows, so its skeleton has the same number and nothing jumps when they arrive. */const SECTION_CARDS: Record<SectionId, number> = {+ phone: 1,general: 4,business: 1,hours: 3,@@ -1486,7 +1504,7 @@ function AssistantSkeleton({ slow }: { slow: boolean }) {</div>}actions={<Skeleton width={136} height={32} />}- sections={sectionsIn(t)}+ sections={sectionsIn(t, t('common.assistant.unnamed'))}current={current}><Loadingdiff --git a/apps/web/src/settings/NumberCard.tsx b/apps/web/src/settings/NumberCard.tsxnew file mode 100644index 00000000..b23c3f59--- /dev/null+++ b/apps/web/src/settings/NumberCard.tsx@@ -0,0 +1,375 @@+// One number on Settings › Phone numbers, built around how calls reach the assistant (LIN-852, mockup C): its title is+// one plain sentence ("Calls you miss on +1 503 555 0100 go to Maya."), a grey line says how, and the rows are+// Forwarding (whether it was seen to work, and Test forwarding), How calls come in and Answered by. The ⋯ menu keeps+// Manage (the forwarding codes and the full check) and disconnecting. The test is the forwarding check of onboarding+// (phoneNumber.checkForwarding): one real call to the business number, ringing up to 40 s, within the server's limits.+import { FORWARDING_CHECKS_PER_NUMBER_DAY, FORWARDING_RING_SECONDS, type ForwardingCheckView } from '@linedesk/actions'+import type { Assistant, PhoneNumber } from '@linedesk/db/types'+import { useT } from '@linedesk/i18n/react'+import { useEffect, useRef, useState } from 'react'+import { refreshGoLiveChecklist } from '../inbox/GoLiveChecklist.tsx'+import { checkResultText, type ForwardedCall, noCheckText } from '../onboarding/forwarding-check.ts'+import { formatNumber, outboundE164 } from '../onboarding/flow.ts'+import { useDefaultPhoneCountry } from '../phoneCountry.ts'+import { codeOf, rejectionText } from '../shell/rejections.ts'+import { useRun } from '../store.tsx'+import { LinkButton } from '../ui/AppLink.tsx'+import { Select } from '../ui/controls.tsx'+import { Card, Dialog, FormField } from '../ui/form.tsx'+import { Button, Note } from '../ui/kit.tsx'+import { MenuButton, type MenuItem } from '../ui/list.tsx'+import { Skeleton, SkeletonPart, useLoading } from '../ui/LoadStates.tsx'+import { PhoneInput } from '../ui/PhoneInput.tsx'+import { SettingRow, SettingRows } from '../ui/SettingRow.tsx'+import { StatusMark } from '../ui/StatusMark.tsx'+import { NumberModeField } from './NumberMode.tsx'+import { forwardingState, forwards, numberSentence, numberWay, wayValue, worksText } from './phoneNumberModel.ts'+import { readAction, useWriteAction } from './settings-api.ts'++const POLL_MS = 2000++/**+ * The number's last forwarding check and whether this server can run one (null until read), read again every few+ * seconds while one runs; `start` begins a check of the business number (the saved one when left out).+ */+function useForwardingTest(number: PhoneNumber, enabled: boolean) {+ const write = useWriteAction()+ const [check, setCheck] = useState<ForwardingCheckView | null>(null)+ const [available, setAvailable] = useState<boolean | null>(null)+ const dialing = check?.status === 'dialing'+ useEffect(() => {+ if (!enabled) return+ let stop = false+ let timer: ReturnType<typeof setTimeout> | undefined+ const load = async () => {+ const data = await readAction<{ check: ForwardingCheckView | null; available: boolean }>(+ 'phoneNumber.forwardingCheck',+ { phoneNumberId: number.id },+ ).catch(() => null)+ if (stop) return+ // A read that failed: no button to start a check that may not run; the dialog's check says more.+ if (!data) return setAvailable(false)+ setCheck(data.check)+ setAvailable(data.available)+ if (data.check?.status === 'dialing') timer = setTimeout(load, POLL_MS)+ }+ timer = setTimeout(load, dialing ? POLL_MS : 0)+ return () => {+ stop = true+ clearTimeout(timer)+ }+ }, [number.id, enabled, dialing])++ // A check that just worked verified the number: the go-live checklist's forwarding row ticks at once.+ const last = useRef(check?.status)+ useEffect(() => {+ if (check?.status === 'works' && last.current === 'dialing' && !check.simulated) void refreshGoLiveChecklist()+ last.current = check?.status+ }, [check?.status, check?.simulated])++ // A change of the number's way of use makes the last result about the old one.+ const mode = useRef(number.mode)+ useEffect(() => {+ if (mode.current === number.mode) return+ mode.current = number.mode+ setCheck(current => (current?.status === 'dialing' ? current : null))+ }, [number.mode])++ async function start(businessNumber?: string) {+ setCheck(+ await write<ForwardingCheckView>('phoneNumber.checkForwarding', {+ phoneNumberId: number.id,+ ...(businessNumber ? { businessNumber } : {}),+ }),+ )+ }+ return { check, available, start }+}++type Props = {+ number: PhoneNumber+ assistant: Assistant | undefined+ assistants: Assistant[]+ calls: readonly ForwardedCall[]+ canEdit: boolean+ /** The Answered by row: on Workspace settings › Phone numbers only (an assistant's page is that assistant's). */+ answeredBy?: boolean+ menu: MenuItem[]+ /** Opens the number's Manage dialog (the forwarding codes and the full check). */+ onManage: () => void+}++export function NumberCard({+ number,+ assistant,+ assistants,+ calls,+ canEdit,+ answeredBy = true,+ menu,+ onManage,+}: Props) {+ const t = useT()+ const run = useRun()+ const name = assistant?.name ?? t('settings.phone.row.theAssistant')+ const sentence = numberSentence(number, name)+ const [editing, setEditing] = useState<'way' | 'assistant' | null>(null)+ const way = numberWay(number)+ return (+ <Card+ id={`pn-${number.id}`}+ className="pn-card"+ title={sentence.title}+ description={sentence.how}+ actions={+ <MenuButton title={t('settings.phone.card.actions', { number: formatNumber(number.e164) })} items={menu} />+ }+ >+ <SettingRows>+ {forwards(number) && (+ <ForwardingRow number={number} assistant={name} calls={calls} canEdit={canEdit} onManage={onManage} />+ )}+ <SettingRow+ title={t('settings.phone.card.way.title', { assistant: name })}+ help={t('settings.phone.card.way.help', { assistant: name })}+ control={+ <>+ <span className="k-setrow-value">{wayValue(number)}</span>+ {canEdit && way !== 'sip' && (+ <Button size="sm" onClick={() => setEditing('way')}>+ {t('common.action.change')}+ </Button>+ )}+ </>+ }+ />+ {answeredBy && (+ <SettingRow+ title={t('settings.phone.card.answeredBy.title')}+ control={+ <>+ <span className="k-setrow-value">{name}</span>+ {canEdit && assistants.length > 1 && (+ <Button size="sm" onClick={() => setEditing('assistant')}>+ {t('common.action.change')}+ </Button>+ )}+ </>+ }+ />+ )}+ </SettingRows>+ {editing === 'way' && (+ <Dialog+ title={formatNumber(number.e164)}+ size="sm"+ onClose={() => setEditing(null)}+ footer={+ <Button variant="primary" onClick={() => setEditing(null)}>+ {t('settings.phone.manage.done')}+ </Button>+ }+ >+ <NumberModeField+ mode={number.mode}+ name={name}+ disabled={!canEdit}+ onChange={mode => void run('phoneNumber.update', { phoneNumberId: number.id, mode })}+ />+ </Dialog>+ )}+ {editing === 'assistant' && (+ <Dialog+ title={t('settings.phone.card.answeredBy.dialog', { number: formatNumber(number.e164) })}+ size="sm"+ onClose={() => setEditing(null)}+ footer={+ <Button variant="primary" onClick={() => setEditing(null)}>+ {t('settings.phone.manage.done')}+ </Button>+ }+ >+ <FormField id={`pn-who-${number.id}`} label={t('settings.phone.manage.assistant')}>+ <div>+ <Select+ id={`pn-who-${number.id}`}+ value={assistant?.id ?? ''}+ label={t('settings.phone.manage.assistant')}+ options={assistants.map(a => ({ value: a.id, label: a.name }))}+ onChange={assistantId => void run('phoneNumber.update', { phoneNumberId: number.id, assistantId })}+ />+ </div>+ </FormField>+ </Dialog>+ )}+ </Card>+ )+}++/**+ * Whether the number's forwarding was seen to work, and the test: "Works · checked Nov 24" with Test again, or "Not+ * checked yet" with Test forwarding. Without a saved business number the test asks for it here, under the row. A+ * server that can't run a test says so, with how to test by hand.+ */+function ForwardingRow({+ number,+ assistant,+ calls,+ canEdit,+ onManage,+}: {+ number: PhoneNumber+ assistant: string+ calls: readonly ForwardedCall[]+ canEdit: boolean+ onManage: () => void+}) {+ const t = useT()+ const test = useForwardingTest(number, canEdit)+ const state = forwardingState(number, calls, test.check)+ const [asking, setAsking] = useState(false)+ const [typed, setTyped] = useState('')+ const [starting, setStarting] = useState(false)+ const [problem, setProblem] = useState<string | null>(null)+ const phoneCountry = useDefaultPhoneCountry()+ // The button needs the server's answer (can it run a test here?): its shape until then (rule 15).+ const buttonView = useLoading(canEdit && test.available === null)+ const known = number.forwarded_from ?? test.check?.businessNumber ?? null+ const testing = state.kind === 'testing'+ const result = state.kind === 'failed' ? checkResultText(state.check, assistant, number.mode === 'forward_all') : null+ const simulated = test.check?.simulated && test.check.status === 'works'++ async function begin(businessNumber?: string) {+ if (starting || testing) return+ setProblem(null)+ setStarting(true)+ try {+ await test.start(businessNumber)+ setAsking(false)+ } catch (e) {+ setProblem(rejectionText('phoneNumber.checkForwarding', e instanceof Error ? e.message : String(e), codeOf(e)))+ } finally {+ setStarting(false)+ }+ }++ function onTest() {+ if (known) return void begin()+ setAsking(true)+ }++ const words =+ state.kind === 'works'+ ? worksText(state)+ : state.kind === 'testing'+ ? t('settings.phone.card.forwarding.testing')+ : state.kind === 'failed'+ ? t('settings.phone.card.forwarding.failed')+ : t('settings.phone.card.forwarding.unchecked')+ const mark =+ state.kind === 'works'+ ? 'works'+ : state.kind === 'testing'+ ? 'checking'+ : state.kind === 'failed'+ ? 'failing'+ : 'partly'+ const description = testing ? (+ t('settings.phone.card.forwarding.testingLine', { seconds: FORWARDING_RING_SECONDS })+ ) : state.kind === 'failed' ? (+ <>+ {[result?.title, result?.next].filter(Boolean).join(' ')}{' '}+ <LinkButton onClick={onManage} title={t('settings.phone.card.forwarding.codesTip')}>+ {t('settings.phone.card.forwarding.forwardingCodes')}+ </LinkButton>+ </>+ ) : simulated ? (+ checkResultText(test.check!, assistant, number.mode === 'forward_all').title+ ) : canEdit && test.available === false && state.kind !== 'works' ? (+ noCheckText(assistant)+ ) : undefined+ const tip = t('settings.phone.card.forwarding.testTip', {+ seconds: FORWARDING_RING_SECONDS,+ assistant,+ perNumber: FORWARDING_CHECKS_PER_NUMBER_DAY,+ })+ // While the business number is asked for below, its form has the one Test forwarding; while a test runs, the mark+ // says so.+ const button =+ !canEdit || asking || testing ? null : buttonView.phase !== 'content' ? (+ <SkeletonPart reserved={buttonView.phase === 'reserve'}>+ <Skeleton width={112} height={28} />+ </SkeletonPart>+ ) : test.available ? (+ <Button+ size="sm"+ variant={state.kind === 'works' ? 'secondary' : 'primary'}+ busy={starting}+ aria-expanded={known ? undefined : asking}+ title={tip}+ onClick={onTest}+ >+ {state.kind === 'unchecked'+ ? t('settings.phone.card.forwarding.test')+ : t('settings.phone.card.forwarding.testAgain')}+ </Button>+ ) : null+ const businessNumber = outboundE164(typed)+ return (+ <>+ <SettingRow+ title={t('settings.phone.card.forwarding.title')}+ description={description}+ control={+ <>+ <span+ className="pn-forwarding"+ title={canEdit && test.available === false ? noCheckText(assistant) : undefined}+ >+ <StatusMark state={mark} label={words} />+ <span>{words}</span>+ </span>+ {button}+ </>+ }+ />+ {asking && !testing && (+ <form+ className="pn-ask"+ onSubmit={e => {+ e.preventDefault()+ if (!businessNumber) return setProblem(t('onboarding.forwardingCheck.enterNumber'))+ void begin(businessNumber)+ }}+ >+ <FormField+ id={`pn-business-${number.id}`}+ label={t('onboarding.forwardingCheck.numberLabel')}+ help={t('onboarding.forwardingCheck.numberTip')}+ >+ <PhoneInput+ id={`pn-business-${number.id}`}+ value={typed}+ defaultCountry={phoneCountry}+ autoComplete="off"+ autoFocus+ onChange={value => {+ setTyped(value)+ setProblem(null)+ }}+ />+ </FormField>+ <div className="pn-ask-foot">+ <Button size="sm" variant="ghost" onClick={() => setAsking(false)}>+ {t('common.action.cancel')}+ </Button>+ <Button size="sm" type="submit" variant="primary" busy={starting} title={tip}>+ {t('settings.phone.card.forwarding.test')}+ </Button>+ </div>+ </form>+ )}+ {problem && <Note tone="danger">{problem}</Note>}+ </>+ )+}diff --git a/apps/web/src/settings/NumberMode.test.tsx b/apps/web/src/settings/NumberMode.test.tsxindex 09981cfb..287eb39f 100644--- a/apps/web/src/settings/NumberMode.test.tsx+++ b/apps/web/src/settings/NumberMode.test.tsx@@ -55,15 +55,13 @@ describe('the explanation behind the "?"', () => {})test('says for each mode which number customers dial, what rings and when to pick it', () => {- expect(help).toContain('Customers dial your business number and it rings you first.')- expect(help).toContain('forward here to Maya; callers never see this number. Pick this to keep answering yourself.')- expect(help).toContain(- "Customers dial your business number, but it doesn't ring you: every call forwards here to Maya",- )+ expect(help).toContain('Customers call your number and it rings you first.')+ expect(help).toContain("forward to Maya's number; callers never see it. Pick this to keep answering yourself.")+ expect(help).toContain("Customers call your number, but it doesn't ring you: every call forwards to Maya's number")expect(help).toContain('Pick this when Maya should take all calls.')expect(help).toContain('Customers dial this number itself')expect(help).toContain('Your other number rings as it does today. Pick this for a separate line.')- expect(help).toContain('Customers dial it as always and Maya answers, with no forwarding.')+ expect(help).toContain('Customers call it as always and Maya answers, with no forwarding.')expect(help).toContain('Pick this only once the move is done.')})diff --git a/apps/web/src/settings/PhoneNumbers.tsx b/apps/web/src/settings/PhoneNumbers.tsxindex 01368e00..12f3a235 100644--- a/apps/web/src/settings/PhoneNumbers.tsx+++ b/apps/web/src/settings/PhoneNumbers.tsx@@ -25,7 +25,6 @@ import {existingLinkText,firstPickup,formatNumber,- numberModeLabel,offersBuying,type PhoneOption,phoneOptionSetup,@@ -52,24 +51,25 @@ import {import { useDefaultPhoneCountry } from '../phoneCountry.ts'import { providerAudience } from '../providerAudience.ts'import { notAnsweringWhy } from '../inbox/goLive.ts'-import { type Presence, usePresence } from '../shell/presence.ts'+import { usePresence } from '../shell/presence.ts'import { useAssistantName, useAssistants, useClaimedRejection, useRows, useRun } from '../store.tsx'import { RadioCard, Select } from '../ui/controls.tsx'import { Card, Dialog, FormField } from '../ui/form.tsx'import { AppLink } from '../ui/AppLink.tsx'-import { Badge, Button, Note } from '../ui/kit.tsx'+import { Button, Note } from '../ui/kit.tsx'import { StatusMark } from '../ui/StatusMark.tsx'-import { List, ListEmpty, ListRow, MenuButton } from '../ui/list.tsx'+import { ListEmpty } from '../ui/list.tsx'import { PhoneInput } from '../ui/PhoneInput.tsx'-import { Loading, Skeleton, SkeletonList, SkeletonPart, useLoading, useLoadState } from '../ui/LoadStates.tsx'-import { SettingRows } from '../ui/SettingRow.tsx'+import { Loading, Skeleton, useLoadState } from '../ui/LoadStates.tsx'+import { SettingRows, SkeletonSettingRows } from '../ui/SettingRow.tsx'+import { LineGroup } from '../ui/FeatureLine.tsx'+import { NumberCard } from './NumberCard.tsx'import { sectionHash, sectionParts } from '../ui/SettingsLayout.tsx'import { CarrierLine, useCarrierStatus } from './Carrier.tsx'import { OwnPhoneSystemLine } from './OwnPhoneSystem.tsx'import { AreaCodeInput } from './AreaCodeInput.tsx'import { NearbyAreaCodes } from './NearbyAreaCodes.tsx'import { CarrierNumberInput } from './CarrierNumberInput.tsx'-import { Section } from './fields.tsx'import { NumberModeField } from './NumberMode.tsx'import { useWorkspaceSettings } from './settings-api.ts'import { useWorkspaceCountry } from '../workspaceLocale.ts'@@ -88,175 +88,75 @@ type Props = {const answeredBy = (number: PhoneNumber, assistants: Assistant[]) =>assistants.find(a => a.id === number.assistant_id) ?? assistants[0]+/**+ * Where this workspace can get numbers: a workspace with its own carrier account can add numbers there, whatever the+ * install has (the session's status may be from before the carrier was changed here); else the server's status.+ */+export function usePhoneStatus(canEdit: boolean, serverStatus: PhoneSetupStatus | null) {+ const carrier = useCarrierStatus(canEdit)+ const ownCarrier = !!carrier && carrier.carrier !== 'default'+ const status: PhoneSetupStatus | null = ownCarrier+ ? {+ provider: carrier.carrier,+ available: carrier.sipReady,+ detail: null,+ canAttach: true,+ account: 'workspace',+ // A workspace's own carrier account buys where every install does (Germany only on the install's).+ buy: [...BASE_BUY_OFFERS],+ }+ : serverStatus+ return { status, ownCarrier }+}+export function PhoneNumbers({ canEdit, status: serverStatus, isInstanceAdmin, extraNumberCents = null }: Props) {const t = useT()- // A workspace with its own carrier account can add numbers there, whatever the install has; the- // session's status may be from before the carrier was changed here.- const carrier = useCarrierStatus(canEdit)- const status: PhoneSetupStatus | null =- carrier && carrier.carrier !== 'default'- ? {- provider: carrier.carrier,- available: carrier.sipReady,- detail: null,- canAttach: true,- account: 'workspace',- // A workspace's own carrier account buys where every install does (Germany only on the install's).- buy: [...BASE_BUY_OFFERS],- }- : serverStatus+ const { status, ownCarrier } = usePhoneStatus(canEdit, serverStatus)const numbers = useRows('phone_numbers').sort((a, b) => a.created_at.localeCompare(b.created_at))const numbersLoad = useLoadState('phone_numbers')const calls = useRows('calls')const assistants = useAssistants()const presence = usePresence()const answering = presence.kind === 'answering'- // Whether calls are answered is not known yet (the first status check is on its way): a skeleton in the badge's- // shape, never a guess (rule 15: none for a quick answer, at least 320 ms once shown). Offline is not "unknown".- const statusView = useLoading(presence.kind === 'unknown')- const statusWaiting = statusView.phase !== 'content'const [adding, setAdding] = useState(false)- /** The number whose dialog is open, and whether it opens on releasing it. */- const [managing, setManaging] = useState<{- id: string- release: boolean- } | null>(null)- const managed = numbers.find(n => n.id === managing?.id)- // A link to one number (`#settings/phone/<id>`, from the assistant's page) opens its dialog once the numbers are- // loaded; the address then names the section only, so closing the dialog or reloading does not open it again.- const linkedNumber = numbers.find(n => n.id === sectionParts('workspace', window.location.hash).item)?.id- useEffect(() => {- if (!linkedNumber) return- setManaging({ id: linkedNumber, release: false })- window.history.replaceState(null, '', sectionHash('workspace', 'phone'))- }, [linkedNumber])const canAdd = canEdit && !!status?.availablereturn (<>- {/* Why calls are not answered: above the card, not a box inside it (settings audit, 2026-11-26). */}- {numbersLoad === 'ready' && !statusWaiting && (+ {/* Why calls are not answered: above the cards, not a box inside one (settings audit, 2026-11-26). */}+ {numbersLoad === 'ready' && (<NotAnsweringNotenumber={numbers.find(n => !answering && !forwardingUnverified(n, calls))}assistants={assistants}canFix={isInstanceAdmin}/>)}- <Section- id="st-phone"- title={t('settings.phone.title')}- actions={- canAdd && (- <Button size="sm" icon="plus" onClick={() => setAdding(true)}>- {t('settings.phone.add')}- </Button>- )- }- >- {canEdit && status && !status.available && (- <Unavailable- detail={status.detail}- isInstanceAdmin={isInstanceAdmin}- ownCarrier={!!carrier && carrier.carrier !== 'default'}- />+ {/* The page's label with Add number at its right: a LineGroup has no place for a button, so the two share a row. */}+ <div className="pn-head" id="st-phone">+ <LineGroup as="h2">{t('settings.phone.title')}</LineGroup>+ {canAdd && (+ <Button size="sm" icon="plus" onClick={() => setAdding(true)}>+ {t('settings.phone.add')}+ </Button>)}- <Loading- what={t('settings.phone.what')}- loading={numbersLoad !== 'ready'}- error={numbersLoad === 'slow'}- skeleton={<SkeletonList rows={1} aside action />}- >- {numbers.length > 0 && statusWaiting && (- <span className="sr-only" role="status">- {t('common.load.loading', { what: t('settings.phone.row.statusWhat') })}- </span>- )}- {numbers.length > 0 ? (- <List label={t('settings.phone.title')} busy={statusWaiting}>- {numbers.map(n => (- <ListRow- key={n.id}- title={formatNumber(n.e164)}- sub={t('settings.phone.row.sub', {- assistant: answeredBy(n, assistants)?.name ?? t('settings.phone.row.theAssistant'),- // A number of the business's own phone system: that system decides which calls it sends.- mode: n.carrier_account === 'sip' ? t('settings.sip.rowMode') : numberModeLabel[n.mode],- })}- aside={- // Forwarding nobody has seen work yet (the go-live checklist's rule): not "Answering" until it is,- // and the check is in the number's dialog.- forwardingUnverified(n, calls) ? (- <button- type="button"- className="pn-status-link"- title={t('settings.phone.row.checkTip')}- onClick={() => setManaging({ id: n.id, release: false })}- >- <Badge>- <StatusMark state="untested" label={t('settings.phone.row.unverified')} />- {t('settings.phone.row.unverified')}- </Badge>- </button>- ) : (- <AnsweringMark- presence={presence}- waiting={statusWaiting}- reserved={statusView.phase === 'reserve'}- />- )- }- actions={- <MenuButton- title={t('settings.phone.row.actions', { number: formatNumber(n.e164) })}- items={[- {- id: 'manage',- label: canEdit ? t('settings.phone.row.manage') : t('settings.phone.row.details'),- onSelect: () => setManaging({ id: n.id, release: false }),- },- ...(canEdit- ? [- {- id: 'release',- label: n.purchased- ? t('settings.phone.release.menu')- : t('settings.phone.disconnect.menu'),- danger: true,- onSelect: () => setManaging({ id: n.id, release: true }),- },- ]- : []),- ]}- />- }- />- ))}- </List>- ) : (+ </div>+ {canEdit && status && !status.available && (+ <Unavailable detail={status.detail} isInstanceAdmin={isInstanceAdmin} ownCarrier={ownCarrier} />+ )}+ <NumberList+ numbers={numbers}+ assistants={assistants}+ canEdit={canEdit}+ page="workspace"+ empty={+ <Card><ListEmpty>{canEdit ? t('settings.phone.empty') : t('settings.phone.emptyMember')}</ListEmpty>- )}- </Loading>- {adding && (- <Dialog title={t('settings.phone.addTitle')} size="md" onClose={() => setAdding(false)}>- <ConnectNumber- status={status}- // The workspace's own carrier account is not billed by us: its numbers cost what that carrier charges.- extraNumberCents={billedExtraNumberCents(extraNumberCents, status)}- onDone={() => setAdding(false)}- onCancel={() => setAdding(false)}- />- </Dialog>- )}- {managed && (- <ManageNumber- number={managed}- assistants={assistants}- canEdit={canEdit}- release={managing?.release}- onClose={() => setManaging(null)}- />- )}- </Section>- {/* Where numbers come from: the carrier and the own phone system, as setting rows in their own card. */}+ </Card>+ }+ />+ {adding && (+ <AddNumberDialog status={status} extraNumberCents={extraNumberCents} onClose={() => setAdding(false)} />+ )}+ {/* Where numbers come from: the carrier and the own phone system, as setting rows in their own quiet card. */}{canEdit && (<Card id="st-phone-carrier"><SettingRows>@@ -269,33 +169,135 @@ export function PhoneNumbers({ canEdit, status: serverStatus, isInstanceAdmin, e)}+/** Add number in its dialog; from an assistant's Phone section the new number is that assistant's. */+export function AddNumberDialog({+ status,+ extraNumberCents,+ assistant,+ onClose,+}: {+ status: PhoneSetupStatus | null+ extraNumberCents: number | null+ assistant?: Assistant+ onClose: () => void+}) {+ const t = useT()+ return (+ <Dialog title={t('settings.phone.addTitle')} size="md" onClose={onClose}>+ <ConnectNumber+ status={status}+ // The workspace's own carrier account is not billed by us: its numbers cost what that carrier charges.+ extraNumberCents={billedExtraNumberCents(extraNumberCents, status)}+ assistant={assistant}+ onDone={onClose}+ onCancel={onClose}+ />+ </Dialog>+ )+}+/**- * Whether the assistant answers a number's calls (one answer for every number: usePresence). Only a known "not- * answering" says so: while the answer is on its way a skeleton holds the mark's place (the list is aria-busy), and- * offline a neutral "Offline" (the app-wide offline bar says why), never a false "Not answering" (LIN-771).+ * The number cards of Workspace settings › Phone numbers (every number) and of an assistant's Phone section (its own),+ * with their ⋯ menu and Manage dialog. Only the workspace's list says and changes who answers a number+ * (`answeredBy`): on an assistant's page that is the page itself. A link to one number (`#<page>/phone/<id>`, from the+ * Settings overview's "Forwarding not checked") scrolls to its card once the numbers are loaded; the address then names+ * the section only, so a reload starts at the top.*/-function AnsweringMark({ presence, waiting, reserved }: { presence: Presence; waiting: boolean; reserved: boolean }) {+export function NumberList({+ numbers,+ assistants,+ canEdit,+ page,+ answeredBy: showAnsweredBy = true,+ empty,+}: {+ numbers: PhoneNumber[]+ assistants: Assistant[]+ canEdit: boolean+ /** The page the cards are on, for links to one number: `workspace` or `assistant/<id>`. */+ page: string+ answeredBy?: boolean+ /** The words of the empty list; null: the page shows its own. */+ empty: ReactNode+}) {const t = useT()- if (waiting)- return (- <SkeletonPart reserved={reserved}>- <Skeleton width={104} height={20} className="sk-round" />- </SkeletonPart>- )- if (presence.kind === 'answering')- return (- <span className="pn-answering">- <StatusMark state="works" label={t('settings.phone.row.answering')} />- {t('settings.phone.row.answering')}- </span>- )- if (presence.kind === 'offline')- return <Badge title={t('inbox.presence.offlineTitle')}>{t('settings.phone.row.offline')}</Badge>+ const numbersLoad = useLoadState('phone_numbers')+ const calls = useRows('calls')+ /** The number whose dialog is open, and whether it opens on releasing it. */+ const [managing, setManaging] = useState<{ id: string; release: boolean } | null>(null)+ const managed = numbers.find(n => n.id === managing?.id)+ const linkedNumber = numbers.find(n => n.id === sectionParts(page, window.location.hash).item)?.id+ useEffect(() => {+ if (!linkedNumber) return+ requestAnimationFrame(() => document.getElementById(`pn-${linkedNumber}`)?.scrollIntoView({ block: 'center' }))+ window.history.replaceState(null, '', sectionHash(page, 'phone'))+ }, [linkedNumber, page])+ const menu = (n: PhoneNumber) => [+ {+ id: 'manage',+ label: canEdit ? t('settings.phone.row.manage') : t('settings.phone.row.details'),+ onSelect: () => setManaging({ id: n.id, release: false }),+ },+ ...(canEdit+ ? [+ {+ id: 'release',+ label: n.purchased ? t('settings.phone.release.menu') : t('settings.phone.disconnect.menu'),+ danger: true,+ onSelect: () => setManaging({ id: n.id, release: true }),+ },+ ]+ : []),+ ]+ return (+ <>+ <Loading+ what={t('settings.phone.what')}+ loading={numbersLoad !== 'ready'}+ error={numbersLoad === 'slow'}+ className="pn-cards"+ skeleton={<NumberCardSkeleton rows={showAnsweredBy ? 3 : 2} />}+ >+ {numbers.length > 0+ ? numbers.map(n => (+ <NumberCard+ key={n.id}+ number={n}+ assistant={answeredBy(n, assistants)}+ assistants={assistants}+ calls={calls}+ canEdit={canEdit}+ answeredBy={showAnsweredBy}+ menu={menu(n)}+ onManage={() => setManaging({ id: n.id, release: false })}+ />+ ))+ : empty}+ </Loading>+ {managed && (+ <ManageNumber+ number={managed}+ assistants={assistants}+ canEdit={canEdit}+ pickAssistant={showAnsweredBy}+ release={managing?.release}+ onClose={() => setManaging(null)}+ />+ )}+ </>+ )+}++/** A number's card while the numbers load: its sentence, the grey line and its rows, as grey shapes. */+function NumberCardSkeleton({ rows }: { rows: number }) {return (- <span className="pn-answering">- <StatusMark state="off" label={t('settings.phone.row.notAnswering')} />- {t('settings.phone.row.notAnswering')}- </span>+ <Card className="pn-card">+ <div className="pn-card-sk">+ <Skeleton shape="text" width={300} />+ <Skeleton shape="text" width={240} />+ </div>+ <SkeletonSettingRows rows={rows} description={false} control="button" />+ </Card>)}@@ -364,6 +366,8 @@ type ManageProps = {number: PhoneNumberassistants: Assistant[]canEdit: boolean+ /** Who answers it can be picked here (not on an assistant's own page, which is that assistant's). */+ pickAssistant?: boolean/** Opens on releasing (or disconnecting) the number, from the row's menu. */release?: booleanonClose: () => void@@ -373,7 +377,14 @@ type ManageProps = {* Everything about one number: how it is used, who answers it, the forwarding codes, and disconnecting it. Also opened* from the agent setup page's Call forwarding row (onboarding/SetupRowActions.tsx).*/-export function ManageNumber({ number, assistants, canEdit, release = false, onClose }: ManageProps) {+export function ManageNumber({+ number,+ assistants,+ canEdit,+ pickAssistant = true,+ release = false,+ onClose,+}: ManageProps) {const t = useT()const run = useRun()const [releasing, setReleasing] = useState(canEdit && release)@@ -418,7 +429,7 @@ export function ManageNumber({ number, assistants, canEdit, release = false, onC<ReleaseNumber number={number} onCancel={() => setReleasing(false)} />) : (<>- {assistants.length > 1 && (+ {pickAssistant && assistants.length > 1 && (<FormFieldid="pn-who"label={t('settings.phone.manage.assistant')}@@ -684,8 +695,11 @@ export function ConnectNumber({extraNumberCents = null,onDone,onCancel,+ assistant,}: {status: PhoneSetupStatus | null+ /** The assistant that answers the new number (Assistant › Phone); default: the workspace's first. */+ assistant?: Assistant/** On a bill and the install's carrier account: the extra number's monthly price, said instead of the carrier's. */extraNumberCents?: number | null/** Step 2 finished (Done). */@@ -694,7 +708,8 @@ export function ConnectNumber({}) {const t = useT()const run = useRun()- const name = useAssistantName()+ const defaultName = useAssistantName()+ const name = assistant?.name ?? defaultNameconst numbers = useRows('phone_numbers')const count = numbers.length// Numbers already in the carrier account: the server says who may connect one (canAttach: the workspace's own@@ -773,7 +788,7 @@ export function ConnectNumber({if ('problem' in result) return setProblem(result.problem)setProblem(null)setSentAt(count)- void run('phoneNumber.setup', result.input)+ void run('phoneNumber.setup', assistant ? { ...result.input, assistantId: assistant.id } : result.input)}function submit() {if (sentAt !== null || nothingToConnect) returndiff --git a/apps/web/src/settings/SettingsHome.tsx b/apps/web/src/settings/SettingsHome.tsxindex f37f9f17..6543b910 100644--- a/apps/web/src/settings/SettingsHome.tsx+++ b/apps/web/src/settings/SettingsHome.tsx@@ -8,7 +8,7 @@ import { useT } from '@linedesk/i18n/react'import { type ReactNode, useEffect, useState } from 'react'import { auth } from '../auth.ts'import { notAnsweringWhy } from '../inbox/goLive.ts'-import { formatNumber } from '../onboarding/flow.ts'+import type { ForwardedCall } from '../onboarding/forwarding-check.ts'import { usePresence } from '../shell/presence.ts'import { pages } from '../shell/pages.tsx'import { WorkspaceMark, workspaceIconOf } from '../shell/WorkspaceMark.tsx'@@ -23,6 +23,7 @@ import { Loading, Skeleton, useLoadState } from '../ui/LoadStates.tsx'import { SettingRow, SettingRows } from '../ui/SettingRow.tsx'import { sectionHash } from '../ui/SettingsLayout.tsx'import { StatusMark } from '../ui/StatusMark.tsx'+import { type AssistantCallState, assistantCallState, dialLine } from './phoneNumberModel.ts'import './settings-home.css'/** The global keys that open the (first) assistant; shown in its row's tooltip, never as chips (rule 4). */@@ -89,6 +90,7 @@ const numbersOf = (assistant: Assistant, isDefault: boolean, numbers: PhoneNumbefunction AssistantRows({ assistants, isInstanceAdmin }: { assistants: Assistant[]; isInstanceAdmin: boolean }) {const t = useT()const numbers = useRows('phone_numbers').sort((a, b) => a.created_at.localeCompare(b.created_at))+ const calls = useRows('calls')if (!assistants.length)return (<Row@@ -100,49 +102,93 @@ function AssistantRows({ assistants, isInstanceAdmin }: { assistants: Assistant[)return assistants.map((a, i) => {const name = a.name.trim() || t('settings.assistant.name.fallback')- const own = numbersOf(a, i === 0, numbers)return (- <Row+ <AssistantRowkey={a.id}- href={`#assistant/${a.id}/general`}- lead={<AssistantMark />}- title={name}- aside={own[0] ? formatNumber(own[0].e164) : undefined}- status={<AnswerState assistant={name} hasNumber={own.length > 0} isInstanceAdmin={isInstanceAdmin} />}+ id={a.id}+ name={name}+ numbers={numbersOf(a, i === 0, numbers)}+ calls={calls}+ isInstanceAdmin={isInstanceAdmin}tip={i === 0 ? `${name} (${ASSISTANT_KEYS.join(' ')})` : undefined}/>)})}-/** Whether calls to the assistant are answered, as a quiet mark with its words; nothing while unknown. */-function AnswerState({- assistant,- hasNumber,+/**+ * One assistant: the number customers dial and how (its first number), and its state: "Forwarding not checked" (a+ * link to that number on Phone numbers) while one of its forwarding numbers has no proof, else whether calls are+ * answered (LIN-852, mockup B).+ */+function AssistantRow({+ id,+ name,+ numbers,+ calls,isInstanceAdmin,+ tip,}: {- assistant: string- hasNumber: boolean+ id: string+ name: string+ numbers: PhoneNumber[]+ calls: readonly ForwardedCall[]isInstanceAdmin: boolean+ tip?: string}) {const t = useT()const presence = usePresence()- const why = notAnsweringWhy(presence, assistant, isInstanceAdmin)- const [state, words] = !hasNumber- ? (['missing', t('settings.home.assistant.noNumber')] as const)- : presence.kind === 'answering'- ? (['works', t('settings.home.assistant.answering')] as const)+ const why = notAnsweringWhy(presence, name, isInstanceAdmin)+ const answering =+ presence.kind === 'answering'+ ? 'answering': why? why.reason === 'failing'- ? (['failing', t('settings.home.assistant.cannotAnswer')] as const)- : (['partly', t('settings.home.assistant.cannotAnswerYet')] as const)- : [null, null]- if (!state) return null+ ? 'failing'+ : 'notAnswering'+ : 'unknown'+ const state = assistantCallState(numbers, calls, answering)return (- <span className="sh-state">- <StatusMark state={state} label={words} />+ <Row+ href={`#assistant/${id}/general`}+ lead={<AssistantMark />}+ title={name}+ line={numbers[0] ? dialLine(numbers[0]) : undefined}+ status={<AnswerState state={state} />}+ statusHref={+ state.kind === 'unchecked'+ ? {+ href: `#assistant/${id}/phone/${state.numberId}`,+ tip: t('settings.home.assistant.forwardingUncheckedTip'),+ }+ : undefined+ }+ tip={tip}+ />+ )+}++/** Whether calls to the assistant reach it, as a quiet mark with its words; nothing while unknown. */+function AnswerState({ state }: { state: AssistantCallState }) {+ const t = useT()+ const [mark, words] =+ state.kind === 'noNumber'+ ? (['missing', t('settings.home.assistant.noNumber')] as const)+ : state.kind === 'unchecked'+ ? (['partly', t('settings.home.assistant.forwardingUnchecked')] as const)+ : state.kind === 'answering'+ ? (['works', t('settings.home.assistant.answering')] as const)+ : state.kind === 'cannotAnswer'+ ? state.failing+ ? (['failing', t('settings.home.assistant.cannotAnswer')] as const)+ : (['partly', t('settings.home.assistant.cannotAnswerYet')] as const)+ : [null, null]+ if (!mark) return null+ return (+ <>+ <StatusMark state={mark} label={words} /><span>{words}</span>- </span>+ </>)}@@ -223,7 +269,9 @@ function AssistantMark() {/*** One row: a SettingRow (mark, title with a quiet detail, at most one grey line, the state at the right end) and the- * chevron. All of it is one link to the area's page; SettingRow has no link of its own, so the row wraps it.+ * chevron. All of it is one link to the area's page; SettingRow has no link of its own, so the row wraps it. A state+ * that opens another place (`statusHref`) can't sit inside that link: then the row's link lies over the whole row and+ * the state's own link above it.*/function Row({href,@@ -232,6 +280,7 @@ function Row({aside,line,status,+ statusHref,tip,}: {href: string@@ -240,18 +289,37 @@ function Row({aside?: stringline?: stringstatus?: ReactNode+ statusHref?: { href: string; tip: string }tip?: string}) {- return (- <a className="sh-row" href={href} title={tip}>+ const row = (state: ReactNode) => (+ <><SettingRowlead={<span className="sh-lead">{lead}</span>}title={<span className="sh-title">{title}</span>}aside={aside}description={line}- control={status}+ control={state}/><Icon name="right" size={16} className="sh-go" />+ </>+ )+ if (statusHref)+ return (+ <div className="sh-row sh-row-split">+ <a className="sh-cover" href={href} title={tip}>+ <span className="sr-only">{title}</span>+ </a>+ {row(+ <a className="sh-state sh-state-link" href={statusHref.href} title={statusHref.tip}>+ {status}+ </a>,+ )}+ </div>+ )+ return (+ <a className="sh-row" href={href} title={tip}>+ {row(status && <span className="sh-state">{status}</span>)}</a>)}diff --git a/apps/web/src/settings/assistantLinks.test.ts b/apps/web/src/settings/assistantLinks.test.tsindex f7825ad2..525d95c7 100644--- a/apps/web/src/settings/assistantLinks.test.ts+++ b/apps/web/src/settings/assistantLinks.test.ts@@ -27,3 +27,8 @@ test('old section ids and notifications', () => {expect(canonicalAssistantHash('#assistant/as_1/calendar', ids)).toBe('#assistant/as_1/booking')expect(canonicalAssistantHash('#assistant/as_1/notifications', ids)).toBe('#account/profile')})++test("a link to one number in the assistant's Phone section stays (the overview's Forwarding not checked)", () => {+ expect(canonicalAssistantHash('#assistant/as_2/phone/pn_1', ids)).toBeNull()+ expect(canonicalAssistantHash('#assistant/phone', ids)).toBe('#assistant/as_1/phone')+})diff --git a/apps/web/src/settings/numberCard.test.tsx b/apps/web/src/settings/numberCard.test.tsxnew file mode 100644index 00000000..19d0dd6b--- /dev/null+++ b/apps/web/src/settings/numberCard.test.tsx@@ -0,0 +1,60 @@+// The number card on Workspace settings › Phone numbers and on Assistant › Phone (LIN-852): the sentence, Forwarding,+// how calls reach the assistant's number, and Answered by only on the workspace's list.+import type { PhoneNumber } from '@linedesk/db/types'+import { renderToStaticMarkup } from 'react-dom/server'+import { describe, expect, test, vi } from 'vitest'++vi.mock('../phoneCountry.ts', () => ({ useDefaultPhoneCountry: () => 'US' }))+vi.mock('./settings-api.ts', () => ({ readAction: vi.fn(() => new Promise(() => {})), useWriteAction: () => vi.fn() }))+vi.mock('../store.tsx', () => ({ useRun: () => vi.fn() }))+vi.mock('../inbox/GoLiveChecklist.tsx', () => ({ refreshGoLiveChecklist: vi.fn() }))++const { NumberCard } = await import('./NumberCard.tsx')++const maya = { id: 'as_1', name: 'Maya' } as never+const leo = { id: 'as_2', name: 'Leo' } as never+const number = {+ id: 'pn_1',+ e164: '+15035550142',+ mode: 'forward_conditional',+ carrier_account: 'install',+ forwarded_from: '+15035550100',+ verified_at: '2026-11-24T10:00:00.000Z',+ created_at: '2026-11-20T10:00:00.000Z',+ purchased: true,+ assistant_id: 'as_1',+} as PhoneNumber++const render = (answeredBy: boolean, n: PhoneNumber = number) =>+ renderToStaticMarkup(+ <NumberCard+ number={n}+ assistant={maya}+ assistants={[maya, leo]}+ calls={[]}+ canEdit+ answeredBy={answeredBy}+ menu={[]}+ onManage={() => {}}+ />,+ )++describe('the number card', () => {+ test('says how calls reach the assistant, the forwarding state and the way in', () => {+ const html = render(true)+ expect(html).toContain('Calls you miss on your number +1 503 555 0100 go to Maya.')+ expect(html).toContain('Works · checked Nov 24')+ expect(html).toContain('How calls reach Maya's number')+ expect(html).toContain('Answered by')+ })++ test("on the assistant's own page there is no Answered by", () => {+ expect(render(false)).not.toContain('Answered by')+ })++ test('a number customers dial itself has no Forwarding row', () => {+ const html = render(false, { ...number, mode: 'new' })+ expect(html).toContain('Callers dial +1 503 555 0142. Maya answers.')+ expect(html).not.toContain('Forwarding')+ })+})diff --git a/apps/web/src/settings/phoneNumberModel.test.ts b/apps/web/src/settings/phoneNumberModel.test.tsnew file mode 100644index 00000000..02982bef--- /dev/null+++ b/apps/web/src/settings/phoneNumberModel.test.ts@@ -0,0 +1,183 @@+import type { ForwardingCheckView } from '@linedesk/actions'+import { describe, expect, test } from 'vitest'+import {+ assistantCallState,+ dialLine,+ forwardingState,+ numberSentence,+ wayValue,+ worksText,+} from './phoneNumberModel.ts'++const number = {+ id: 'pn_1',+ e164: '+15035550142',+ mode: 'forward_conditional' as const,+ carrier_account: 'install' as const,+ forwarded_from: '+15035550100',+ verified_at: null as string | null,+ created_at: '2026-11-20T10:00:00.000Z',+}++const call = (over: Partial<{ to_number: string; started_at: string; from_own_number: boolean }> = {}) => ({+ source: 'phone' as const,+ direction: 'in' as const,+ from_own_number: false,+ outcome: 'message' as const,+ to_number: '+15035550142',+ started_at: '2026-11-22T09:00:00.000Z',+ ...over,+})++const check = (over: Partial<ForwardingCheckView> = {}): ForwardingCheckView => ({+ id: 'fwc_1',+ phoneNumberId: 'pn_1',+ businessNumber: '+15035550100',+ status: 'works',+ detail: null,+ ringSeconds: 12,+ simulated: false,+ startedAt: '2026-11-25T10:00:00.000Z',+ finishedAt: '2026-11-25T10:00:30.000Z',+ ...over,+})++describe('the sentence per number', () => {+ test('forwarding missed calls names the business number and the assistant, then how', () => {+ expect(numberSentence(number, 'Maya')).toEqual({+ title: 'Calls you miss on your number +1 503 555 0100 go to Maya.',+ how: "Your number forwards them to Maya's number +1 503 555 0142.",+ })+ })++ test('without a saved number customers call it says "your number" and asks for it', () => {+ expect(numberSentence({ ...number, forwarded_from: null }, 'Maya')).toEqual({+ title: 'Calls you miss on your number go to Maya.',+ how: "Your number forwards them to Maya's number +1 503 555 0142. Add your number to test forwarding.",+ })+ expect(numberSentence({ ...number, mode: 'forward_all', forwarded_from: null }, 'Leo').title).toBe(+ 'Every call to your number goes to Leo.',+ )+ })++ test('forwarding every call', () => {+ expect(numberSentence({ ...number, mode: 'forward_all' }, 'Leo')).toEqual({+ title: 'Every call to your number +1 503 555 0100 goes to Leo.',+ how: "Your number forwards them to Leo's number +1 503 555 0142. It doesn't ring you.",+ })+ })++ test('a number customers dial itself, a ported one and the own phone system', () => {+ expect(numberSentence({ ...number, mode: 'new', e164: '+15035550199' }, 'Leo')).toEqual({+ title: 'Callers dial +1 503 555 0199. Leo answers.',+ how: 'A number of its own, for your website and ads.',+ })+ expect(numberSentence({ ...number, mode: 'ported' }, 'Maya').title).toBe(+ 'Callers dial +1 503 555 0142. Maya answers.',+ )+ expect(numberSentence({ ...number, mode: 'new', carrier_account: 'sip' }, 'Maya')).toEqual({+ title: 'Your phone system sends calls to +1 503 555 0142. Maya answers.',+ how: 'Your own phone system decides which calls it sends.',+ })+ })++ test('the way in a few words', () => {+ expect(wayValue(number)).toBe('You answer first')+ expect(wayValue({ ...number, mode: 'forward_all' })).toBe('Every call forwards')+ expect(wayValue({ ...number, mode: 'new' })).toBe('Customers dial it')+ expect(wayValue({ ...number, carrier_account: 'sip' })).toBe('Own phone system')+ })+})++describe('the overview line: the number customers dial', () => {+ test('the business number for forwarding, else the number itself', () => {+ expect(dialLine(number)).toBe('Calls you miss on your number +1 503 555 0100')+ expect(dialLine({ ...number, mode: 'forward_all' })).toBe('Every call to your number +1 503 555 0100')+ expect(dialLine({ ...number, forwarded_from: null })).toBe('Calls you miss on your number')+ expect(dialLine({ ...number, mode: 'new' })).toBe('Callers dial +1 503 555 0142')+ })+})++describe('whether forwarding was seen to work', () => {+ test('a number that does not forward has no forwarding row', () => {+ expect(forwardingState({ ...number, mode: 'new' }, [], null)).toEqual({ kind: 'none' })+ expect(forwardingState({ ...number, carrier_account: 'sip' }, [], null)).toEqual({ kind: 'none' })+ })++ test('unchecked until a check or a real call proves it', () => {+ expect(forwardingState(number, [], null)).toEqual({ kind: 'unchecked' })+ // The business's own phones, other numbers and calls from before the number don't count.+ expect(+ forwardingState(+ number,+ [+ call({ from_own_number: true }),+ call({ to_number: '+15035550199' }),+ call({ started_at: '2026-11-19T09:00:00.000Z' }),+ ],+ null,+ ),+ ).toEqual({ kind: 'unchecked' })+ })++ test('works since the check, or since the first real call', () => {+ expect(forwardingState({ ...number, verified_at: '2026-11-24T10:00:00.000Z' }, [], null)).toEqual({+ kind: 'works',+ by: 'check',+ at: '2026-11-24T10:00:00.000Z',+ })+ expect(forwardingState(number, [call(), call({ started_at: '2026-11-21T09:00:00.000Z' })], null)).toEqual({+ kind: 'works',+ by: 'call',+ at: '2026-11-21T09:00:00.000Z',+ })+ // A check that just worked shows before the synced number has its verified_at.+ expect(forwardingState(number, [], check())).toMatchObject({ kind: 'works', by: 'check' })+ })++ test('testing while the check calls; a simulated check proves nothing', () => {+ expect(forwardingState(number, [], check({ status: 'dialing', finishedAt: null }))).toEqual({ kind: 'testing' })+ expect(forwardingState(number, [], check({ simulated: true }))).toEqual({ kind: 'unchecked' })+ })++ test('a failed check newer than the proof says so; an older one does not', () => {+ const failed = check({ status: 'rang_through', startedAt: '2026-11-25T10:00:00.000Z' })+ expect(forwardingState({ ...number, verified_at: '2026-11-24T10:00:00.000Z' }, [], failed)).toEqual({+ kind: 'failed',+ check: failed,+ })+ expect(forwardingState({ ...number, verified_at: '2026-11-26T10:00:00.000Z' }, [], failed)).toMatchObject({+ kind: 'works',+ })+ })++ test('"Works · checked Nov 24" and "Works · a call came in Nov 21"', () => {+ expect(worksText({ kind: 'works', by: 'check', at: '2026-11-24T10:00:00.000Z' })).toBe('Works · checked Nov 24')+ expect(worksText({ kind: 'works', by: 'call', at: '2026-11-21T10:00:00.000Z' })).toBe(+ 'Works · a call came in Nov 21',+ )+ })+})++describe("the overview's state per assistant", () => {+ test('no number yet', () => {+ expect(assistantCallState([], [], 'answering')).toEqual({ kind: 'noNumber' })+ })++ test('"Forwarding not checked" wins while a forwarding number has no proof, naming that number', () => {+ const checked = { ...number, id: 'pn_ok', verified_at: '2026-11-24T10:00:00.000Z' }+ const open = { ...number, id: 'pn_open', e164: '+15035550160' }+ expect(assistantCallState([checked, open], [], 'answering')).toEqual({ kind: 'unchecked', numberId: 'pn_open' })+ expect(assistantCallState([open], [], 'failing')).toEqual({ kind: 'unchecked', numberId: 'pn_open' })+ })++ test('else whether calls are answered', () => {+ const own = [{ ...number, mode: 'new' as const }]+ expect(assistantCallState(own, [], 'answering')).toEqual({ kind: 'answering' })+ expect(assistantCallState(own, [], 'notAnswering')).toEqual({ kind: 'cannotAnswer', failing: false })+ expect(assistantCallState(own, [], 'failing')).toEqual({ kind: 'cannotAnswer', failing: true })+ expect(assistantCallState(own, [], 'unknown')).toEqual({ kind: 'unknown' })+ // A real call proved the forwarding: the answering state again.+ expect(assistantCallState([number], [call()], 'answering')).toEqual({ kind: 'answering' })+ })+})diff --git a/apps/web/src/settings/phoneNumberModel.ts b/apps/web/src/settings/phoneNumberModel.tsnew file mode 100644index 00000000..5be367e4--- /dev/null+++ b/apps/web/src/settings/phoneNumberModel.ts@@ -0,0 +1,176 @@+// Settings › Phone numbers and the Settings overview, built around how calls reach the assistant (LIN-852, mockups C and+// B): one plain sentence per number and mode ("Calls you miss on +1 503 555 0100 go to Maya."), the number customers+// dial, whether its forwarding was seen to work, and the overview's state per assistant. Pure, so it is tested alone.+import { type ForwardingCheckView, isRealCall } from '@linedesk/actions'+import type { PhoneNumber } from '@linedesk/db/types'+import { brandName } from '../brand.ts'+import { i18n } from '../i18n/index.tsx'+import { goLiveDate } from '../inbox/goLive.ts'+import type { ForwardedCall } from '../onboarding/forwarding-check.ts'+import { formatNumber } from '../onboarding/flow.ts'++type NumberRow = Pick<PhoneNumber, 'e164' | 'mode' | 'carrier_account' | 'forwarded_from'>++/** How calls reach the assistant on a number: the number's mode, or the business's own phone system. */+export type NumberWay = PhoneNumber['mode'] | 'sip'++export const numberWay = (number: Pick<PhoneNumber, 'mode' | 'carrier_account'>): NumberWay =>+ number.carrier_account === 'sip' ? 'sip' : number.mode++/** The business phone forwards to this number (calls it misses, or every call). */+export const forwards = (number: Pick<PhoneNumber, 'mode' | 'carrier_account'>): boolean => {+ const way = numberWay(number)+ return way === 'forward_conditional' || way === 'forward_all'+}++/** Without the number customers call, forwarding can't be tested: the grey line asks for it. */+const addYourNumber = (how: string, business: string | null) =>+ business ? how : i18n().t('settings.phone.card.how.addYourNumber', { how })++/** A number card's title and the grey line under it: who answers what, then how. */+export function numberSentence(number: NumberRow, assistant: string): { title: string; how: string } {+ const { t } = i18n()+ const own = formatNumber(number.e164)+ const business = number.forwarded_from ? formatNumber(number.forwarded_from) : null+ switch (numberWay(number)) {+ case 'forward_conditional':+ return {+ title: business+ ? t('settings.phone.card.title.forwardConditional', { business, assistant })+ : t('settings.phone.card.title.forwardConditionalUnknown', { assistant }),+ how: addYourNumber(t('settings.phone.card.how.forwardConditional', { number: own, assistant }), business),+ }+ case 'forward_all':+ return {+ title: business+ ? t('settings.phone.card.title.forwardAll', { business, assistant })+ : t('settings.phone.card.title.forwardAllUnknown', { assistant }),+ how: addYourNumber(t('settings.phone.card.how.forwardAll', { number: own, assistant }), business),+ }+ case 'new':+ return {+ title: t('settings.phone.card.title.dial', { number: own, assistant }),+ how: t('settings.phone.card.how.new'),+ }+ case 'ported':+ return {+ title: t('settings.phone.card.title.dial', { number: own, assistant }),+ how: t('settings.phone.card.how.ported', { brand: brandName() }),+ }+ case 'sip':+ return {+ title: t('settings.phone.card.title.sip', { number: own, assistant }),+ how: t('settings.phone.card.how.sip'),+ }+ }+}++/** The "How calls come in" row's value: the way in a few words. */+export function wayValue(number: Pick<PhoneNumber, 'mode' | 'carrier_account'>): string {+ const { t } = i18n()+ const words: Record<NumberWay, () => string> = {+ forward_conditional: () => t('settings.phone.card.way.forwardConditional'),+ forward_all: () => t('settings.phone.card.way.forwardAll'),+ new: () => t('settings.phone.card.way.new'),+ ported: () => t('settings.phone.card.way.ported', { brand: brandName() }),+ sip: () => t('settings.phone.card.way.sip'),+ }+ return words[numberWay(number)]()+}++/** The Settings overview's line under an assistant: the number customers dial, and how. */+export function dialLine(number: NumberRow): string {+ const { t } = i18n()+ const business = number.forwarded_from ? formatNumber(number.forwarded_from) : null+ switch (numberWay(number)) {+ case 'forward_conditional':+ return business+ ? t('settings.home.assistant.dial.forwardConditional', { number: business })+ : t('settings.home.assistant.dial.forwardConditionalUnknown')+ case 'forward_all':+ return business+ ? t('settings.home.assistant.dial.forwardAll', { number: business })+ : t('settings.home.assistant.dial.forwardAllUnknown')+ default:+ return t('settings.home.assistant.dial.direct', { number: formatNumber(number.e164) })+ }+}++/** When the first real caller reached this number since it was set up (the server's rule, realCallReached). */+export function firstRealCallAt(+ number: Pick<PhoneNumber, 'e164' | 'created_at'>,+ calls: readonly ForwardedCall[],+): string | null {+ const since = Date.parse(number.created_at)+ let first: string | null = null+ for (const c of calls) {+ if (!isRealCall(c) || c.to_number !== number.e164 || Date.parse(c.started_at) < since) continue+ if (!first || c.started_at < first) first = c.started_at+ }+ return first+}++/**+ * Whether a number's forwarding was seen to work. `none`: the number doesn't forward. `testing`: a check is calling the+ * business number now. `works`: a check verified it (`check`) or a real caller got through (`call`), since `at`.+ * `failed`: the last check, newer than any proof, didn't reach the assistant. `unchecked`: nothing proved it yet (a+ * simulated check never does).+ */+export type ForwardingState =+ | { kind: 'none' }+ | { kind: 'testing' }+ | { kind: 'works'; by: 'check' | 'call'; at: string }+ | { kind: 'failed'; check: ForwardingCheckView }+ | { kind: 'unchecked' }++export function forwardingState(+ number: Pick<PhoneNumber, 'e164' | 'mode' | 'carrier_account' | 'verified_at' | 'created_at'>,+ calls: readonly ForwardedCall[],+ check: ForwardingCheckView | null,+): ForwardingState {+ if (!forwards(number)) return { kind: 'none' }+ if (check?.status === 'dialing') return { kind: 'testing' }+ const checked =+ check?.status === 'works' && !check.simulated ? (check.finishedAt ?? check.startedAt) : number.verified_at+ const called = firstRealCallAt(number, calls)+ const proof = checked+ ? { kind: 'works' as const, by: 'check' as const, at: checked }+ : called+ ? { kind: 'works' as const, by: 'call' as const, at: called }+ : null+ const failed = check && check.status !== 'works' && !(proof && proof.at > check.startedAt)+ if (failed) return { kind: 'failed', check }+ return proof ?? { kind: 'unchecked' }+}++/** "Works · checked Nov 24", "Works · a call came in Nov 24". */+export function worksText(state: Extract<ForwardingState, { kind: 'works' }>): string {+ const date = goLiveDate(new Date(state.at))+ return state.by === 'check'+ ? i18n().t('settings.phone.card.forwarding.checked', { date })+ : i18n().t('settings.phone.card.forwarding.called', { date })+}++/**+ * The Settings overview's state for one assistant: no number yet; "Forwarding not checked" (with the number it is+ * about) while one of its forwarding numbers has no proof that forwarding works; else whether calls are answered.+ */+export type AssistantCallState =+ | { kind: 'noNumber' }+ | { kind: 'unchecked'; numberId: string }+ | { kind: 'answering' }+ | { kind: 'cannotAnswer'; failing: boolean }+ | { kind: 'unknown' }++export function assistantCallState(+ numbers: readonly Pick<PhoneNumber, 'id' | 'e164' | 'mode' | 'carrier_account' | 'verified_at' | 'created_at'>[],+ calls: readonly ForwardedCall[],+ answering: 'answering' | 'notAnswering' | 'failing' | 'unknown',+): AssistantCallState {+ if (!numbers.length) return { kind: 'noNumber' }+ const unchecked = numbers.find(n => forwardingState(n, calls, null).kind === 'unchecked')+ if (unchecked) return { kind: 'unchecked', numberId: unchecked.id }+ if (answering === 'answering') return { kind: 'answering' }+ if (answering === 'unknown') return { kind: 'unknown' }+ return { kind: 'cannotAnswer', failing: answering === 'failing' }+}diff --git a/apps/web/src/settings/settings-home.css b/apps/web/src/settings/settings-home.cssindex 41d69c10..33ad44ee 100644--- a/apps/web/src/settings/settings-home.css+++ b/apps/web/src/settings/settings-home.css@@ -143,3 +143,40 @@ button.sh-row:disabled {padding-left: 44px;}}++/* A row whose state opens another place (Forwarding not checked → Phone numbers): the row's link lies over the whole+ row, the words let clicks through to it, and the state's own link sits above (SettingsHome.tsx, Row). */+.sh-row-split {+ position: relative;+}+.sh-row-split:has(.sh-cover:hover) {+ background: var(--surface-hover);+}+.sh-cover {+ position: absolute;+ inset: 0;+ z-index: 1;+}+.sh-cover:focus-visible {+ outline: 2px solid var(--focus);+ outline-offset: -2px;+}+.sh-row-split > .k-setrow,+.sh-row-split > .sh-go {+ pointer-events: none;+}+.sh-state-link {+ position: relative;+ z-index: 2;+ pointer-events: auto;+ text-decoration: none;+ border-radius: var(--radius-xs);+}+.sh-state-link:hover > span:last-child {+ text-decoration: underline;+ text-underline-offset: 2px;+}+.sh-state-link:focus-visible {+ outline: 2px solid var(--focus);+ outline-offset: 2px;+}diff --git a/apps/web/src/shell/pages.tsx b/apps/web/src/shell/pages.tsxindex 6551d963..45c8166f 100644--- a/apps/web/src/shell/pages.tsx+++ b/apps/web/src/shell/pages.tsx@@ -99,6 +99,8 @@ export const pages = {toast={p.toast}undoable={p.undoable}isInstanceAdmin={p.isInstanceAdmin}+ phoneSetup={p.phoneSetup}+ extraNumberCents={p.extraNumberCents}/>),},diff --git a/packages/i18n/locales/de/settings.json b/packages/i18n/locales/de/settings.jsonindex b4f5d28f..32c2bba3 100644--- a/packages/i18n/locales/de/settings.json+++ b/packages/i18n/locales/de/settings.json@@ -179,8 +179,6 @@"assistantHeader.menu": "Assistenten","assistantHeader.new": "Neuer Assistent","assistantHeader.noNumber": "Nimmt noch keine Nummer an",- "assistantHeader.noNumberChoose": "Nimmt noch keine Nummer an. Wähl eine unter Telefonnummern",- "assistantHeader.noNumberTip": "Welcher Assistent eine Nummer annimmt, legst du unter Workspace-Einstellungen › Telefonnummern fest","assistantHeader.noPhoneNumber": "Noch keine Telefonnummer","assistantHeader.numberTip": "Diese Nummer öffnen: welcher Assistent sie annimmt, wie Anrufe sie erreichen","assistantHeader.switchTip": "Assistenten wechseln, hinzufügen oder kopieren",@@ -1569,17 +1567,9 @@"phone.release.helpNoCarrier": "{name} nimmt keine Anrufe auf dieser Nummer mehr an und die Nummer geht zurück an den Anbieter. Die monatlichen Kosten entfallen, und du kannst die Nummer nicht zurückbekommen.","phone.release.menu": "Freigeben…","phone.release.title": "{number} freigeben?",- "phone.row.actions": "Aktionen für {number}",- "phone.row.answering": "Nimmt an",- "phone.row.checkTip": "Rufumleitung dieser Nummer prüfen","phone.row.details": "Details…","phone.row.manage": "Verwalten…",- "phone.row.notAnswering": "Nimmt nicht an",- "phone.row.offline": "Offline",- "phone.row.statusWhat": "Annahmestatus",- "phone.row.sub": "{assistant} · {mode}","phone.row.theAssistant": "Der Assistent",- "phone.row.unverified": "Rufumleitung nicht geprüft","phone.title": "Telefonnummern","phone.unavailable.ask": "Frag den Betreiber dieses Servers.","phone.unavailable.connect": "Verbinde einen unter Server-Admin › Anbieter",@@ -1660,7 +1650,6 @@"sip.password.new": "Neues Passwort","sip.password.once": "Kopiere das Passwort jetzt und speichere es in deiner Telefonanlage. Es wird nur dieses eine Mal angezeigt.","sip.password.warning": "Das alte Passwort funktioniert sofort nicht mehr. Anrufe werden abgelehnt, bis deine Telefonanlage das neue hat.",- "sip.rowMode": "Eigene Telefonanlage","sip.test.busy": "Die Leitung war besetzt. Deine Telefonanlage hat den Anruf angenommen.","sip.test.call": "Klingeln lassen","sip.test.no_answer": "Das Telefon wurde nicht rechtzeitig abgenommen. Deine Telefonanlage hat den Anruf angenommen.",diff --git a/packages/i18n/locales/en/email.json b/packages/i18n/locales/en/email.jsonindex fe8d60e7..f1316ae4 100644--- a/packages/i18n/locales/en/email.json+++ b/packages/i18n/locales/en/email.json@@ -570,10 +570,10 @@"setup.openInbox": "Open your inbox","setup.partner": "Rather have someone do it for you? A partner can set up {brand} for {workspace}, phone settings included.","setup.reason": "You get a few emails while {workspace} gets set up. They stop once {assistant} answers real calls.",- "setup.stepCallAll": "Call your business number from a phone that isn't one of yours (a friend's): {assistant} answers.",- "setup.stepCallMissed": "Call your business number from a phone that isn't one of yours (a friend's) and let it ring. When you don't pick up, {assistant} does.",- "setup.stepForwardAll": "If you haven't yet, forward your business line to {to}. The steps for your phone company are in {brand}.",- "setup.stepForwardMissed": "If you haven't yet, forward the calls you don't pick up on your business line to {to}. The steps for your phone company are in {brand}.",+ "setup.stepCallAll": "Call your number from a phone that isn't one of yours (a friend's): {assistant} answers.",+ "setup.stepCallMissed": "Call your number from a phone that isn't one of yours (a friend's) and let it ring. When you don't pick up, {assistant} does.",+ "setup.stepForwardAll": "If you haven't yet, forward your number to {to}. The steps for your phone company are in {brand}.",+ "setup.stepForwardMissed": "If you haven't yet, forward the calls you don't pick up on your number to {to}. The steps for your phone company are in {brand}.","setup.stepNumber": "Pick a phone number for {assistant}. It takes a minute in {brand}.","setup.turnOff": "Turn off setup emails","setup.yourNumber": "your {brand} number",diff --git a/packages/i18n/locales/en/onboarding.json b/packages/i18n/locales/en/onboarding.jsonindex 8af473af..6f522117 100644--- a/packages/i18n/locales/en/onboarding.json+++ b/packages/i18n/locales/en/onboarding.json@@ -384,7 +384,7 @@"forwarding.dialTitle": "Android: open the phone’s dialer with this code (Enter). On an iPhone, type it instead.","forwarding.goodToKnow": "Good to know","forwarding.guideNetwork": "{kind} · {network} network",- "forwarding.leadDesk": "{count, plural, one {From your business line (the desk phone), dial:} other {From your business line (the desk phone), dial these one after the other:}}",+ "forwarding.leadDesk": "{count, plural, one {From the desk phone on your number, dial:} other {From the desk phone on your number, dial these one after the other:}}","forwarding.leadMobile": "{count, plural, one {Type this code in your business cell phone’s Phone app and press call:} other {Type these codes, one after the other, in your business cell phone’s Phone app and press call:}}","forwarding.leadSettings": "In {where}:","forwarding.noSteps": "{carrier} has no documented way to do this.",@@ -407,10 +407,10 @@"forwardingCheck.busyNext": "Hang up any call on that line and check again. Busy calls forward only after you dial the busy code too.","forwardingCheck.check": "Check forwarding","forwardingCheck.checkAgain": "Check again",- "forwardingCheck.checkTitle": "Call your business number and watch for the forwarded call",- "forwardingCheck.dialing": "Calling your business number. Let it ring, don’t pick up.",- "forwardingCheck.enterNumber": "Enter your business number, the one your callers dial.",- "forwardingCheck.enterNumberClient": "Enter the client's business number, the one their callers dial.",+ "forwardingCheck.checkTitle": "Call your number and watch for the forwarded call",+ "forwardingCheck.dialing": "Calling your number. Let it ring, don’t pick up.",+ "forwardingCheck.enterNumber": "Enter your number, the one your customers call.",+ "forwardingCheck.enterNumberClient": "Enter the client's number, the one their customers call.","forwardingCheck.forwardAllInstead": "Forward every call instead","forwardingCheck.forwardsElsewhere": "Your phone forwards to a different number.","forwardingCheck.forwardsElsewhereNext": "Dial the code shown here again from your business phone, then check again.",@@ -424,25 +424,25 @@"forwardingCheck.lostResult": "The check’s result could not be read. Check your connection.","forwardingCheck.noAssistant": "Forwarding works, but {assistant} did not pick up.","forwardingCheck.noAssistantNext": "The call reached {brand}, but the assistant is not running right now. Whoever runs this server can check the voice agent; then check again.",- "forwardingCheck.noCheck": "Automatic checks are not available on this server. To test forwarding, call your business number from another phone and let it ring: {assistant} should answer.",+ "forwardingCheck.noCheck": "Automatic checks are not available on this server. To test forwarding, call your number from another phone and let it ring: {assistant} should answer.","forwardingCheck.notChecked": "We could not check it this time.",- "forwardingCheck.notCheckedNext": "Call your business number from another phone and let it ring: {assistant} should answer.",- "forwardingCheck.notCheckedNextDetail": "{detail} Call your business number from another phone and let it ring: {assistant} should answer.",- "forwardingCheck.numberLabel": "Your business number",- "forwardingCheck.numberLabelClient": "The client's business number",- "forwardingCheck.numberTip": "The number your callers dial today. We look up its carrier for the right codes.",- "forwardingCheck.numberTipClient": "The number the client's callers dial today. We look up its carrier for the right codes.",+ "forwardingCheck.notCheckedNext": "Call your number from another phone and let it ring: {assistant} should answer.",+ "forwardingCheck.notCheckedNextDetail": "{detail} Call your number from another phone and let it ring: {assistant} should answer.",+ "forwardingCheck.numberLabel": "Your number",+ "forwardingCheck.numberLabelClient": "The client's number",+ "forwardingCheck.numberTip": "The number your customers call today.",+ "forwardingCheck.numberTipClient": "The number the client's customers call today.","forwardingCheck.rangThrough": "It rang on your phone but was never forwarded.","forwardingCheck.rangThroughNext": "Dial the code again and wait for the confirmation tone, then check again. If it still rings through, your line may not forward missed calls: forward every call instead, or give out your assistant’s number.","forwardingCheck.rangThroughNextAll": "Dial the forward-all code again and wait for the confirmation tone, then check again.",- "forwardingCheck.simulated": "{calls, select, all {Simulated: calls to your business number would reach {assistant}.} other {Simulated: calls you don’t answer would reach {assistant}.}}",+ "forwardingCheck.simulated": "{calls, select, all {Simulated: calls to your number would reach {assistant}.} other {Simulated: calls you don’t answer would reach {assistant}.}}","forwardingCheck.simulatedMark": "Development mode: simulated","forwardingCheck.suggestCarrier": "Your carrier looks like {carrier}.","forwardingCheck.switchGuide": "Switch guide",- "forwardingCheck.unreachable": "Your business number could not be reached.",+ "forwardingCheck.unreachable": "Your number could not be reached.","forwardingCheck.unreachableNext": "Check the number you entered and that the phone has a signal, then check again.",- "forwardingCheck.verified": "{calls, select, all {Verified: calls to your business number reach {assistant}.} other {Verified: calls you don’t answer reach {assistant}.}}",- "forwardingCheck.verifiedAfter": "{calls, select, all {Verified: calls to your business number reach {assistant} after about {seconds, plural, one {# second} other {# seconds}}.} other {Verified: calls you don’t answer reach {assistant} after about {seconds, plural, one {# second} other {# seconds}}.}}",+ "forwardingCheck.verified": "{calls, select, all {Verified: calls to your number reach {assistant}.} other {Verified: calls you don’t answer reach {assistant}.}}",+ "forwardingCheck.verifiedAfter": "{calls, select, all {Verified: calls to your number reach {assistant} after about {seconds, plural, one {# second} other {# seconds}}.} other {Verified: calls you don’t answer reach {assistant} after about {seconds, plural, one {# second} other {# seconds}}.}}","frame.agent": "Set up with AI","frame.agentBack": "Back to AI setup","frame.agentTitle": "Back to the AI agent setup: what you saved here stays",@@ -564,10 +564,10 @@"phone.connected.forwardFailed": "Couldn't switch on forwarding. Try again in a moment.","phone.connected.forwardMissedToo": "Forward the calls I miss on my current number too","phone.connected.forwardMissedTooClient": "Forward the calls they miss on their current number too",- "phone.connected.keepAll": "Keep your business number. Every call goes to {name}.",- "phone.connected.keepAllClient": "The client keeps their business number. Every call goes to {name}.",- "phone.connected.keepMissed": "Keep your business number. Missed and busy calls go to {name}.",- "phone.connected.keepMissedClient": "The client keeps their business number. Missed and busy calls go to {name}.",+ "phone.connected.keepAll": "Keep your number. Every call goes to {name}.",+ "phone.connected.keepAllClient": "The client keeps their number. Every call goes to {name}.",+ "phone.connected.keepMissed": "Keep your number. Missed and busy calls go to {name}.",+ "phone.connected.keepMissedClient": "The client keeps their number. Missed and busy calls go to {name}.","phone.connected.onlyNew": "Only calls to {number} reach {name}. Calls to your current number ring as they do today.","phone.connected.onlyNewClient": "Only calls to {number} reach {name}. Calls to the client's current number ring as they do today.","phone.connected.pickCarrier": "Pick your carrier or phone system to see how to forward.",diff --git a/packages/i18n/locales/en/server.json b/packages/i18n/locales/en/server.jsonindex 6663d855..8c7fcad5 100644--- a/packages/i18n/locales/en/server.json+++ b/packages/i18n/locales/en/server.json@@ -169,7 +169,7 @@"api.forwardingCheck.checkNumber": "That is the number Linedesk checks from. Enter the number your callers dial today.","api.forwardingCheck.didNotFinish": "The check did not finish. Try again.","api.forwardingCheck.enterLandline": "Enter your business landline or mobile (no toll-free, premium-rate or service numbers).",- "api.forwardingCheck.enterNumber": "Enter your business number first.",+ "api.forwardingCheck.enterNumber": "Enter your number first.","api.forwardingCheck.forwardsElsewhere": "Your phone forwards to another number, not to {linedesk}.","api.forwardingCheck.forwardsTo": "Your phone forwards to {number}, not to {linedesk}.","api.forwardingCheck.linedeskNumber": "That is a Linedesk number. Enter the number your callers dial today.",@@ -577,11 +577,11 @@"setupAgent.phoneCountryGuessed": "The country above ({country}) is only worked out, from {source}, not set: if the business is elsewhere, set its country first (workspace_updateSettings '{' {w}, country '}').","setupAgent.prompt.changeAssistant": "You are helping me change the settings of my assistant {assistant} in my workspace {workspace} in Linedesk, the open-source AI receptionist. Linedesk answers my business's phone calls with an AI assistant. It is set up already; I want to change some of its settings with you, through the Linedesk setup tools.\n\nThe assistant is {assistant} (assistantId {assistantId}) in the workspace {workspace} (workspaceId {workspaceId}).\n\n{tools}\n\nWhat to do:\n1. Call setup_status first and read the current settings (setup_status, and the details it gives for this workspace and this assistant). Do not change anything yet.\n2. Greet me in one line and ask what I want to change, in one short question. Tell me briefly what is set now where it helps.\n3. Change only what I ask for, nothing else, and only in this assistant and workspace. Before you save, say in one line what will change. After saving, read it back and tell me it is done.\n - Ask before anything that costs money (buying a phone number) or that I cannot undo, and say what it costs.\n - If something cannot be changed with these tools, tell me where it is in the app instead.\n4. When I am done, give me a short summary of what changed, then end your own access with setup_endAccess.\n\nKeep messages short and plain, without technical terms. Ask one question at a time. If a tool refuses, read its message: it says what to do.\n\nTalk to me in English.","setupAgent.prompt.changeWorkspace": "You are helping me change the settings of my workspace {workspace} in Linedesk, the open-source AI receptionist. Linedesk answers my business's phone calls with an AI assistant. It is set up already; I want to change some of its settings with you, through the Linedesk setup tools.\n\nThe workspace is {workspace} (workspaceId {workspaceId}).\n\n{tools}\n\nWhat to do:\n1. Call setup_status first and read the current settings (setup_status, and the details it gives for this workspace). Do not change anything yet.\n2. Greet me in one line and ask what I want to change, in one short question. Tell me briefly what is set now where it helps.\n3. Change only what I ask for, nothing else, and only in this workspace. Before you save, say in one line what will change. After saving, read it back and tell me it is done.\n - Ask before anything that costs money (buying a phone number) or that I cannot undo, and say what it costs.\n - If something cannot be changed with these tools, tell me where it is in the app instead.\n4. When I am done, give me a short summary of what changed, then end your own access with setup_endAccess.\n\nKeep messages short and plain, without technical terms. Ask one question at a time. If a tool refuses, read its message: it says what to do.\n\nTalk to me in English.",- "setupAgent.prompt.install": "You are helping me set up Linedesk, the open-source AI receptionist, on my server. Linedesk answers my business's phone calls with an AI assistant. Please set it up end to end with me, through the Linedesk setup tools. It takes about 10 minutes, plus the time to make accounts.\n\n{tools}\n\nHow to start: call setup_status first. It has what Linedesk already knows about my business (workspaces[].known: its name, what it does, city, country, website). Also use what you already know about me and my business from your own memory or this conversation. Your first reply is only this: one short greeting, then the business in one line to confirm, for example \"I'll set up Linedesk for Brightwater Plumbing (plumber, Portland, OR). Is that right?\". No plan, no list of steps. If there are several workspaces, suggest which one to start with.\n\nHow to work: go step by step, one question at a time, and set up only what matters for the first calls. Do as much as you can yourself: from what you know (above all the type of business), propose concrete values for the next step (greeting, services, opening hours, the mobile number for urgent calls, an area code) and ask me only to confirm or correct them. Say when a value is your suggestion. When you reach a step, say in one plain sentence what it is for.\n\nThe steps, in this order (for you; do not list them to me):\n1. The AI that talks to callers: an account with an AI provider (OpenAI is the simplest). I make the account and paste the key here; you store it and test it.\n2. The phone carrier that brings calls in (Telnyx is the default). I make the account and paste the key; you store it and test it.\n3. Email, so Linedesk can send call summaries and sign-in codes (Resend is the default). I make the account and paste the key; you send me a test code.\n4. My business: its name, website, services and opening hours. I give the name or website; you draft the rest with business_search and business_import, and I check it. If I run more than one business or location, each one gets its own workspace (workspace_create); we set them up one after the other.\n5. What my customers usually ask: right after we confirm my business, ask me once: \"Shall I look through your emails for typical customer requests and how you usually answer them?\" Only with my yes. If my email is connected in your app (Gmail, Google Workspace or Outlook), read customer requests from the last 3 to 6 months, never personal or internal mail. If it is not connected, tell me in one line where to connect it (Claude: {claudeConnectors}, ChatGPT: {chatgptPlugins}), or I paste a few emails here, or we skip it. Make a short list of typical questions and my usual answers (prices, call-out fee, service area, hours, booking, emergencies, what I don't do), show it to me, and after I agree save only that list, each as a line \"If a caller asks \"…\": …\" in the About text. Never save an email, a customer's name, address, email address or phone number. Before saving, tell me what you will save.\n6. My assistant, when it answers, and call alerts: its name and greeting, whether it takes only missed calls, calls after hours or every call, and who gets the email after each call and the mobile urgent calls go to.\n7. Phone number: a new local number for the assistant, or I keep my business number and forward the calls I miss to it. You say what it costs before buying.\n8. Forwarding and a test call: you show me the codes to dial on my business phone, and I call my assistant once on the setup page.\n9. Optional, only after the steps above: more providers that calls do not need (setup_status.optional: sign-in with Google or Microsoft, calendar apps, apps, recording storage, business lookup, partner domains). Ask me once, in one line, whether I want any of them now; I can add them later too. If I say no, skip them.\n\nWhile we work:\n- Call setup_status first, and again after each step. It says what is done and exactly how to do the next step. Read the setup server's instructions too.\n- One question at a time, short plain messages, no technical terms. Recommend a default and say why in one line.\n- Ask before anything that costs money (a phone number) or cannot be undone, and say what it costs.\n- If a tool refuses, read its message: it says what to do.\n- At the end, give me a short summary of what is set up and what is left for me, and ask me once whether to send the Linedesk team a short report of what went wrong or was slow (I will see it first). Then end your own access with setup_endAccess (if steps are still open, ask me first).\n- I make accounts, accept terms, pay and copy keys myself; you never enter payment details. Give me the exact page to open and what to click, then ask me to paste the key here in the chat. Store it right away (provider_setKeys, or provider_connectOneKey for a single OpenAI key) and tell me the test result in a few words. Never send me to Linedesk to paste a key, never show a key back to me, never write it into a file.\n\nTalk to me in English.",+ "setupAgent.prompt.install": "You are helping me set up Linedesk, the open-source AI receptionist, on my server. Linedesk answers my business's phone calls with an AI assistant. Please set it up end to end with me, through the Linedesk setup tools. It takes about 10 minutes, plus the time to make accounts.\n\n{tools}\n\nHow to start: call setup_status first. It has what Linedesk already knows about my business (workspaces[].known: its name, what it does, city, country, website). Also use what you already know about me and my business from your own memory or this conversation. Your first reply is only this: one short greeting, then the business in one line to confirm, for example \"I'll set up Linedesk for Brightwater Plumbing (plumber, Portland, OR). Is that right?\". No plan, no list of steps. If there are several workspaces, suggest which one to start with.\n\nHow to work: go step by step, one question at a time, and set up only what matters for the first calls. Do as much as you can yourself: from what you know (above all the type of business), propose concrete values for the next step (greeting, services, opening hours, the mobile number for urgent calls, an area code) and ask me only to confirm or correct them. Say when a value is your suggestion. When you reach a step, say in one plain sentence what it is for.\n\nThe steps, in this order (for you; do not list them to me):\n1. The AI that talks to callers: an account with an AI provider (OpenAI is the simplest). I make the account and paste the key here; you store it and test it.\n2. The phone carrier that brings calls in (Telnyx is the default). I make the account and paste the key; you store it and test it.\n3. Email, so Linedesk can send call summaries and sign-in codes (Resend is the default). I make the account and paste the key; you send me a test code.\n4. My business: its name, website, services and opening hours. I give the name or website; you draft the rest with business_search and business_import, and I check it. If I run more than one business or location, each one gets its own workspace (workspace_create); we set them up one after the other.\n5. What my customers usually ask: right after we confirm my business, ask me once: \"Shall I look through your emails for typical customer requests and how you usually answer them?\" Only with my yes. If my email is connected in your app (Gmail, Google Workspace or Outlook), read customer requests from the last 3 to 6 months, never personal or internal mail. If it is not connected, tell me in one line where to connect it (Claude: {claudeConnectors}, ChatGPT: {chatgptPlugins}), or I paste a few emails here, or we skip it. Make a short list of typical questions and my usual answers (prices, call-out fee, service area, hours, booking, emergencies, what I don't do), show it to me, and after I agree save only that list, each as a line \"If a caller asks \"…\": …\" in the About text. Never save an email, a customer's name, address, email address or phone number. Before saving, tell me what you will save.\n6. My assistant, when it answers, and call alerts: its name and greeting, whether it takes only missed calls, calls after hours or every call, and who gets the email after each call and the mobile urgent calls go to.\n7. Phone number: a new local number for the assistant, or I keep my own number and forward the calls I miss to it. You say what it costs before buying.\n8. Forwarding and a test call: you show me the codes to dial on my business phone, and I call my assistant once on the setup page.\n9. Optional, only after the steps above: more providers that calls do not need (setup_status.optional: sign-in with Google or Microsoft, calendar apps, apps, recording storage, business lookup, partner domains). Ask me once, in one line, whether I want any of them now; I can add them later too. If I say no, skip them.\n\nWhile we work:\n- Call setup_status first, and again after each step. It says what is done and exactly how to do the next step. Read the setup server's instructions too.\n- One question at a time, short plain messages, no technical terms. Recommend a default and say why in one line.\n- Ask before anything that costs money (a phone number) or cannot be undone, and say what it costs.\n- If a tool refuses, read its message: it says what to do.\n- At the end, give me a short summary of what is set up and what is left for me, and ask me once whether to send the Linedesk team a short report of what went wrong or was slow (I will see it first). Then end your own access with setup_endAccess (if steps are still open, ask me first).\n- I make accounts, accept terms, pay and copy keys myself; you never enter payment details. Give me the exact page to open and what to click, then ask me to paste the key here in the chat. Store it right away (provider_setKeys, or provider_connectOneKey for a single OpenAI key) and tell me the test result in a few words. Never send me to Linedesk to paste a key, never show a key back to me, never write it into a file.\n\nTalk to me in English.","setupAgent.prompt.installEdit": "You are helping me change my Linedesk server, the open-source AI receptionist. Linedesk answers my business's phone calls with an AI assistant. It is set up already; I want to change its providers or connect more of them with you, through the Linedesk setup tools.\n\n{tools}\n\nWhat to do:\n1. Call setup_status and providers_list first and read what is connected now. Do not change anything yet.\n2. Greet me in one line and ask what I want, in one short question: change a provider that is connected (a new key or another service), or connect one I do not use yet. The ones I do not use yet are in setup_status.optional (for example sign-in with Google or Microsoft, calendar apps, apps, recording storage, business lookup, partner domains): name them in plain words in one short list.\n3. Do only what I ask. For each provider: give me the exact page to open and what to click, I paste the key here, you store it right away (provider_setKeys) and tell me the test result in a few words. Before you switch a provider that calls use now, say in one line what changes for calls.\n - Ask before anything that costs money or that I cannot undo, like clearing a provider's keys.\n - Billing keys are set only in the Linedesk app; if I ask, tell me where.\n4. When I am done, give me a short summary of what changed, then end your own access with setup_endAccess.\n\nKeep messages short and plain, without technical terms. Ask one question at a time. If a tool refuses, read its message: it says what to do. Never show a key back to me and never write it into a file.\n\nTalk to me in English.","setupAgent.prompt.toolsConnector": "How to reach the tools:\n- Use the tools of the Linedesk setup connector (setup_status, {example} and so on).\n- If you do not see them, tell me to turn the connector on in this chat first.","setupAgent.prompt.toolsServer": "How to reach the tools (the setup server is {url}):\n- If you have tools named setup_status, {example} and so on (the \"linedesk-setup\" MCP server), use them.\n- If not, but you can run shell commands, call the same tools over HTTP. Each call is one POST:\n {curl}\n The answer is a line starting with \"data: \" followed by JSON. Use \"method\":\"tools/list\" once to see every tool and its input.\n- If you can do neither, tell me to connect you to that address as an MCP server first.\nThe address contains a setup key that stops working after {hours} hours, for security. Do not repeat it, post it or save it anywhere.",- "setupAgent.prompt.workspace": "You are helping me set up my business in Linedesk, an AI receptionist that answers my business's phone calls. The server is already run for me; please set up my business end to end with me, through the Linedesk setup tools. It takes about 10 minutes.\n\n{tools}\n\nHow to start: call setup_status first. It has what Linedesk already knows about my business (workspaces[].known: its name, what it does, city, country, website). Also use what you already know about me and my business from your own memory or this conversation. Your first reply is only this: one short greeting, then the business in one line to confirm, for example \"I'll set up Linedesk for Brightwater Plumbing (plumber, Portland, OR). Is that right?\". No plan, no list of steps. If there are several workspaces, suggest which one to start with.\n\nHow to work: go step by step, one question at a time, and set up only what matters for the first calls. Do as much as you can yourself: from what you know (above all the type of business), propose concrete values for the next step (greeting, services, opening hours, the mobile number for urgent calls, an area code) and ask me only to confirm or correct them. Say when a value is your suggestion. When you reach a step, say in one plain sentence what it is for.\n\nThe steps, in this order (for you; do not list them to me):\n1. My business: its name, website, services and opening hours, so the assistant can answer callers. I give the name or website; you draft the rest with business_search and business_import, and I check it.\n2. What my customers usually ask: right after we confirm my business, ask me once: \"Shall I look through your emails for typical customer requests and how you usually answer them?\" Only with my yes. If my email is connected in your app (Gmail, Google Workspace or Outlook), read customer requests from the last 3 to 6 months, never personal or internal mail. If it is not connected, tell me in one line where to connect it (Claude: {claudeConnectors}, ChatGPT: {chatgptPlugins}), or I paste a few emails here, or we skip it. Make a short list of typical questions and my usual answers (prices, call-out fee, service area, hours, booking, emergencies, what I don't do), show it to me, and after I agree save only that list, each as a line \"If a caller asks \"…\": …\" in the About text. Never save an email, a customer's name, address, email address or phone number. Before saving, tell me what you will save.\n3. My assistant: its name, greeting and voice. You suggest them; I keep them or change them.\n4. When it answers: only calls I miss, only after hours, or every call. I choose.\n5. Call alerts: after every call I get an email with a short summary, and urgent calls can be put through to my mobile. I give the mobile number.\n6. Starting my free trial (or my plan, if I get no trial): only if setup_status lists this step. I do it myself on the setup page with my card; you never start it and never ask for card details. The phone number follows once it runs.\n7. Phone number: the number my callers reach the assistant on. Either a new local number, or I keep my business number and forward the calls I miss to it. setup_status says what it costs.\n8. Forwarding and a test call: you show me the codes to dial on my business phone, and I call my assistant once on the setup page.\n\nWhile we work:\n- Call setup_status first, and again after each step. It says what is done and exactly how to do the next step. Read the setup server's instructions too.\n- One question at a time, short plain messages, no technical terms. Recommend a default and say why in one line.\n- Ask before anything that costs money (a phone number) or cannot be undone, and say what it costs.\n- If a tool refuses, read its message: it says what to do.\n- At the end, give me a short summary of what is set up and what is left for me, then end your own access with setup_endAccess (if steps are still open, ask me first).\n\nTalk to me in English.",+ "setupAgent.prompt.workspace": "You are helping me set up my business in Linedesk, an AI receptionist that answers my business's phone calls. The server is already run for me; please set up my business end to end with me, through the Linedesk setup tools. It takes about 10 minutes.\n\n{tools}\n\nHow to start: call setup_status first. It has what Linedesk already knows about my business (workspaces[].known: its name, what it does, city, country, website). Also use what you already know about me and my business from your own memory or this conversation. Your first reply is only this: one short greeting, then the business in one line to confirm, for example \"I'll set up Linedesk for Brightwater Plumbing (plumber, Portland, OR). Is that right?\". No plan, no list of steps. If there are several workspaces, suggest which one to start with.\n\nHow to work: go step by step, one question at a time, and set up only what matters for the first calls. Do as much as you can yourself: from what you know (above all the type of business), propose concrete values for the next step (greeting, services, opening hours, the mobile number for urgent calls, an area code) and ask me only to confirm or correct them. Say when a value is your suggestion. When you reach a step, say in one plain sentence what it is for.\n\nThe steps, in this order (for you; do not list them to me):\n1. My business: its name, website, services and opening hours, so the assistant can answer callers. I give the name or website; you draft the rest with business_search and business_import, and I check it.\n2. What my customers usually ask: right after we confirm my business, ask me once: \"Shall I look through your emails for typical customer requests and how you usually answer them?\" Only with my yes. If my email is connected in your app (Gmail, Google Workspace or Outlook), read customer requests from the last 3 to 6 months, never personal or internal mail. If it is not connected, tell me in one line where to connect it (Claude: {claudeConnectors}, ChatGPT: {chatgptPlugins}), or I paste a few emails here, or we skip it. Make a short list of typical questions and my usual answers (prices, call-out fee, service area, hours, booking, emergencies, what I don't do), show it to me, and after I agree save only that list, each as a line \"If a caller asks \"…\": …\" in the About text. Never save an email, a customer's name, address, email address or phone number. Before saving, tell me what you will save.\n3. My assistant: its name, greeting and voice. You suggest them; I keep them or change them.\n4. When it answers: only calls I miss, only after hours, or every call. I choose.\n5. Call alerts: after every call I get an email with a short summary, and urgent calls can be put through to my mobile. I give the mobile number.\n6. Starting my free trial (or my plan, if I get no trial): only if setup_status lists this step. I do it myself on the setup page with my card; you never start it and never ask for card details. The phone number follows once it runs.\n7. Phone number: the number my callers reach the assistant on. Either a new local number, or I keep my own number and forward the calls I miss to it. setup_status says what it costs.\n8. Forwarding and a test call: you show me the codes to dial on my business phone, and I call my assistant once on the setup page.\n\nWhile we work:\n- Call setup_status first, and again after each step. It says what is done and exactly how to do the next step. Read the setup server's instructions too.\n- One question at a time, short plain messages, no technical terms. Recommend a default and say why in one line.\n- Ask before anything that costs money (a phone number) or cannot be undone, and say what it costs.\n- If a tool refuses, read its message: it says what to do.\n- At the end, give me a short summary of what is set up and what is left for me, then end your own access with setup_endAccess (if steps are still open, ask me first).\n\nTalk to me in English.","setupAgent.report.anAgent": "an AI agent","setupAgent.report.askLater": "Right after a step fails or blocks you, offer the admin a short setup report about it; at the end of the setup ask once (feedback_send; its first call only shows the preview).","setupAgent.report.askNow": "The setup is done: ask the admin now, once, whether to send the Linedesk team a short setup report, even if all went well (feedback_send; its first call only shows the preview).",diff --git a/packages/i18n/locales/en/settings.json b/packages/i18n/locales/en/settings.jsonindex e86c4f9a..ae211e4d 100644--- a/packages/i18n/locales/en/settings.json+++ b/packages/i18n/locales/en/settings.json@@ -128,6 +128,9 @@"assistant.name.fallback": "The assistant","assistant.name.inSentence": "your assistant","assistant.name.label": "Assistant name",+ "assistant.phone.add": "Add a number",+ "assistant.phone.allNumbers": "All numbers and carrier: <link>Workspace › Phone numbers</link>",+ "assistant.phone.empty": "{name} answers no number yet.","assistant.realtimeVoice.body": "The default voice is set by an instance admin under <link>Server admin › Providers</link>.","assistant.realtimeVoice.title": "Voice","assistant.rules.changed": "Changed",@@ -149,6 +152,8 @@"assistant.section.general.label": "General","assistant.section.hours.description": "Weekly hours, holidays, vacation mode","assistant.section.hours.label": "Hours & holidays",+ "assistant.section.phone.description": "How calls reach {name}",+ "assistant.section.phone.label": "Phone","assistant.section.rules.description": "AI disclosure, tone and how calls are handled","assistant.section.rules.label": "Rules","assistant.section.transfers.description": "Who calls are put through to",@@ -183,10 +188,8 @@"assistantHeader.menu": "Assistants","assistantHeader.new": "New assistant","assistantHeader.noNumber": "Answers no number yet",- "assistantHeader.noNumberChoose": "Answers no number yet. Choose one in Phone numbers",- "assistantHeader.noNumberTip": "Choose which assistant answers a number in Workspace settings › Phone numbers","assistantHeader.noPhoneNumber": "No phone number yet",- "assistantHeader.numberTip": "Open this number: which assistant answers it, how calls reach it",+ "assistantHeader.numberTip": "How calls reach this number and whether forwarding works","assistantHeader.switchTip": "Switch, add or copy an assistant","billing.auto.amount": "Charge","billing.auto.offTerms": "Off: buy minutes yourself. Turning it on charges your card {amount} whenever your balance falls below {threshold}, at most {cap} a month.",@@ -897,6 +900,13 @@"home.assistant.answering": "Answering calls","home.assistant.cannotAnswer": "Can't answer calls","home.assistant.cannotAnswerYet": "Can't answer calls yet",+ "home.assistant.dial.direct": "Callers dial {number}",+ "home.assistant.dial.forwardAll": "Every call to your number {number}",+ "home.assistant.dial.forwardAllUnknown": "Every call to your number",+ "home.assistant.dial.forwardConditional": "Calls you miss on your number {number}",+ "home.assistant.dial.forwardConditionalUnknown": "Calls you miss on your number",+ "home.assistant.forwardingUnchecked": "Forwarding not checked",+ "home.assistant.forwardingUncheckedTip": "Open Phone to test the forwarding","home.assistant.noNumber": "No number yet","home.group.assistants": "Assistants","home.group.workspace": "Workspace",@@ -1532,6 +1542,40 @@"missingProvider.voice.title": "No voice provider yet","phone.add": "Add number","phone.addTitle": "Add a number",+ "phone.card.actions": "Actions for {number}",+ "phone.card.answeredBy.dialog": "Who answers {number}",+ "phone.card.answeredBy.title": "Answered by",+ "phone.card.forwarding.called": "Works · a call came in {date}",+ "phone.card.forwarding.checked": "Works · checked {date}",+ "phone.card.forwarding.codesTip": "The code to dial on your business phone, and the check step by step",+ "phone.card.forwarding.failed": "Last test didn't work",+ "phone.card.forwarding.forwardingCodes": "Forwarding codes",+ "phone.card.forwarding.test": "Test forwarding",+ "phone.card.forwarding.testAgain": "Test again",+ "phone.card.forwarding.testTip": "We call your number once and let it ring up to {seconds} seconds, to see the call reach {assistant}. Up to {perNumber} tests of one number a day.",+ "phone.card.forwarding.testing": "Testing",+ "phone.card.forwarding.testingLine": "Your business phone rings for up to {seconds} seconds. Let it ring.",+ "phone.card.forwarding.title": "Forwarding",+ "phone.card.forwarding.unchecked": "Not checked yet",+ "phone.card.how.addYourNumber": "{how} Add your number to test forwarding.",+ "phone.card.how.forwardAll": "Your number forwards them to {assistant}'s number {number}. It doesn't ring you.",+ "phone.card.how.forwardConditional": "Your number forwards them to {assistant}'s number {number}.",+ "phone.card.how.new": "A number of its own, for your website and ads.",+ "phone.card.how.ported": "Your number itself, moved to {brand}. No forwarding needed.",+ "phone.card.how.sip": "Your own phone system decides which calls it sends.",+ "phone.card.title.dial": "Callers dial {number}. {assistant} answers.",+ "phone.card.title.forwardAll": "Every call to your number {business} goes to {assistant}.",+ "phone.card.title.forwardAllUnknown": "Every call to your number goes to {assistant}.",+ "phone.card.title.forwardConditional": "Calls you miss on your number {business} go to {assistant}.",+ "phone.card.title.forwardConditionalUnknown": "Calls you miss on your number go to {assistant}.",+ "phone.card.title.sip": "Your phone system sends calls to {number}. {assistant} answers.",+ "phone.card.way.forwardAll": "Every call forwards",+ "phone.card.way.forwardConditional": "You answer first",+ "phone.card.way.help": "Pick how your calls get to {assistant}; this shows the matching setup steps.",+ "phone.card.way.new": "Customers dial it",+ "phone.card.way.ported": "Moved to {brand}",+ "phone.card.way.sip": "Own phone system",+ "phone.card.way.title": "How calls reach {assistant}'s number","phone.connect.addATest": "Add a test number","phone.connect.addTest": "Add test number","phone.connect.areaCode": "Area code",@@ -1562,7 +1606,7 @@"phone.forwardStep.no.description": "Only callers who dial {number} reach {name}. Your current number rings as it does today.","phone.forwardStep.no.title": "No forwarding","phone.forwardStep.title": "Forward your current number here?",- "phone.forwardStep.yes.description": "Calls to your business number reach {name} too. You dial a short code once on your business phone.",+ "phone.forwardStep.yes.description": "Calls to your number reach {name} too. You dial a short code once on your phone.","phone.forwardStep.yes.title": "Yes, forward my current number","phone.forwarding.carrier": "Your carrier or phone system","phone.forwarding.pick": "Pick your carrier or phone system to see how to forward.",@@ -1575,10 +1619,10 @@"phone.manage.forwardingAllTip": "Set it up once on your business phone or phone system. From then on, every call goes to your assistant.","phone.manage.forwardingConditionalTip": "Set it up once on your business phone or phone system. From then on, calls you don't answer or can't take because you're on the line go to your assistant.","phone.manage.modeHelp.change": "Changing this here doesn't reroute any calls. For forwarding, dial the code under Call forwarding on your business phone.",- "phone.manage.modeHelp.forwardAll": "Customers dial your business number, but it doesn't ring you: every call forwards here to {name}, and callers never see this number. Pick this when {name} should take all calls.",- "phone.manage.modeHelp.forwardConditional": "Customers dial your business number and it rings you first. Calls you miss, or can't take because you're on the line, forward here to {name}; callers never see this number. Pick this to keep answering yourself.",+ "phone.manage.modeHelp.forwardAll": "Customers call your number, but it doesn't ring you: every call forwards to {name}'s number, and callers never see it. Pick this when {name} should take all calls.",+ "phone.manage.modeHelp.forwardConditional": "Customers call your number and it rings you first. Calls you miss, or can't take because you're on the line, forward to {name}'s number; callers never see it. Pick this to keep answering yourself.","phone.manage.modeHelp.new": "Customers dial this number itself, for example from your website or ads, and {name} answers. Your other number rings as it does today. Pick this for a separate line.",- "phone.manage.modeHelp.ported": "Your business number itself moved (ported) to {brand}. Customers dial it as always and {name} answers, with no forwarding. Pick this only once the move is done.",+ "phone.manage.modeHelp.ported": "Your number itself moved (ported) to {brand}. Customers call it as always and {name} answers, with no forwarding. Pick this only once the move is done.","phone.manage.modeHelpLabel": "About how calls reach {name}","phone.manage.modeHint.forwardAll": "Your phone doesn't ring. Every call goes to {name}.","phone.manage.modeHint.forwardConditional": "You answer first. Calls you miss go to {name}.",@@ -1595,17 +1639,9 @@"phone.release.helpNoCarrier": "{name} stops answering it and the number goes back to the carrier. Its monthly cost stops, and you cannot get the number back.","phone.release.menu": "Release…","phone.release.title": "Release {number}?",- "phone.row.actions": "Actions for {number}",- "phone.row.answering": "Answering",- "phone.row.checkTip": "Check the forwarding of this number","phone.row.details": "Details…","phone.row.manage": "Manage…",- "phone.row.notAnswering": "Not answering",- "phone.row.offline": "Offline",- "phone.row.statusWhat": "Answering status",- "phone.row.sub": "{assistant} · {mode}","phone.row.theAssistant": "The assistant",- "phone.row.unverified": "Forwarding not verified","phone.title": "Phone numbers","phone.unavailable.ask": "Ask whoever runs this server.","phone.unavailable.connect": "Connect one in Server admin › Providers",@@ -1699,7 +1735,6 @@"sip.password.new": "New password","sip.password.once": "Copy the password now and save it in your phone system. It is shown only this once.","sip.password.warning": "The old password stops working at once. Calls are refused until your phone system has the new one.",- "sip.rowMode": "Own phone system","sip.test.busy": "The line was busy. Your phone system took the call.","sip.test.call": "Ring it","sip.test.no_answer": "The phone was not answered in time. Your phone system took the call.",diff --git a/packages/i18n/locales/es/settings.json b/packages/i18n/locales/es/settings.jsonindex 616dda2d..4fa184fd 100644--- a/packages/i18n/locales/es/settings.json+++ b/packages/i18n/locales/es/settings.json@@ -179,8 +179,6 @@"assistantHeader.menu": "Asistentes","assistantHeader.new": "Nuevo asistente","assistantHeader.noNumber": "Todavía no contesta ningún número",- "assistantHeader.noNumberChoose": "Todavía no contesta ningún número. Elige uno en Números de teléfono",- "assistantHeader.noNumberTip": "Elige qué asistente contesta cada número en Configuración del espacio de trabajo › Números de teléfono","assistantHeader.noPhoneNumber": "Todavía no hay número de teléfono","assistantHeader.numberTip": "Abrir este número: qué asistente lo contesta y cómo le llegan las llamadas","assistantHeader.switchTip": "Cambiar, agregar o copiar un asistente",@@ -1569,17 +1567,9 @@"phone.release.helpNoCarrier": "{name} deja de contestarlo y el número vuelve al operador. Su costo mensual se detiene y no podrás recuperar el número.","phone.release.menu": "Liberar…","phone.release.title": "¿Liberar {number}?",- "phone.row.actions": "Acciones para {number}",- "phone.row.answering": "Contestando",- "phone.row.checkTip": "Comprobar el desvío de este número","phone.row.details": "Detalles…","phone.row.manage": "Gestionar…",- "phone.row.notAnswering": "No contesta",- "phone.row.offline": "Sin conexión",- "phone.row.statusWhat": "el estado de respuesta",- "phone.row.sub": "{assistant} · {mode}","phone.row.theAssistant": "El asistente",- "phone.row.unverified": "Desvío no verificado","phone.title": "Números de teléfono","phone.unavailable.ask": "Pregúntale a quien administra este servidor.","phone.unavailable.connect": "Conecta uno en Administración del servidor › Proveedores",@@ -1660,7 +1650,6 @@"sip.password.new": "Nueva contraseña","sip.password.once": "Copia la contraseña ahora y guárdala en tu sistema telefónico. Solo se muestra esta vez.","sip.password.warning": "La contraseña anterior deja de funcionar de inmediato. Las llamadas se rechazan hasta que tu sistema telefónico tenga la nueva.",- "sip.rowMode": "Sistema telefónico propio","sip.test.busy": "La línea estaba ocupada. Tu sistema telefónico aceptó la llamada.","sip.test.call": "Llamar","sip.test.no_answer": "Nadie contestó el teléfono a tiempo. Tu sistema telefónico aceptó la llamada.",diff --git a/packages/i18n/locales/fr/settings.json b/packages/i18n/locales/fr/settings.jsonindex 14bcccaa..500049e2 100644--- a/packages/i18n/locales/fr/settings.json+++ b/packages/i18n/locales/fr/settings.json@@ -179,8 +179,6 @@"assistantHeader.menu": "Assistants","assistantHeader.new": "Nouvel assistant","assistantHeader.noNumber": "Ne répond encore à aucun numéro",- "assistantHeader.noNumberChoose": "Ne répond encore à aucun numéro. Choisissez-en un dans Numéros de téléphone",- "assistantHeader.noNumberTip": "Choisissez quel assistant répond à un numéro dans Réglages de l'espace de travail › Numéros de téléphone","assistantHeader.noPhoneNumber": "Pas encore de numéro de téléphone","assistantHeader.numberTip": "Ouvrir ce numéro : quel assistant y répond, comment les appels y arrivent","assistantHeader.switchTip": "Changer, ajouter ou copier un assistant",@@ -1569,17 +1567,9 @@"phone.release.helpNoCarrier": "{name} n'y répond plus et le numéro retourne chez l'opérateur. Son coût mensuel s'arrête, et vous ne pourrez pas récupérer le numéro.","phone.release.menu": "Libérer…","phone.release.title": "Libérer {number} ?",- "phone.row.actions": "Actions pour {number}",- "phone.row.answering": "Répond",- "phone.row.checkTip": "Vérifier le renvoi de ce numéro","phone.row.details": "Détails…","phone.row.manage": "Gérer…",- "phone.row.notAnswering": "Ne répond pas",- "phone.row.offline": "Hors ligne",- "phone.row.statusWhat": "l'état de réponse",- "phone.row.sub": "{assistant} · {mode}","phone.row.theAssistant": "L'assistant",- "phone.row.unverified": "Renvoi non vérifié","phone.title": "Numéros de téléphone","phone.unavailable.ask": "Demandez à la personne qui gère ce serveur.","phone.unavailable.connect": "Connectez-en un dans Administration du serveur › Fournisseurs",@@ -1660,7 +1650,6 @@"sip.password.new": "Nouveau mot de passe","sip.password.once": "Copiez le mot de passe maintenant et enregistrez-le dans votre système téléphonique. Il n'est affiché que cette fois.","sip.password.warning": "L'ancien mot de passe cesse de fonctionner immédiatement. Les appels sont refusés tant que votre système téléphonique n'a pas le nouveau.",- "sip.rowMode": "Système téléphonique propre","sip.test.busy": "La ligne était occupée. Votre système téléphonique a accepté l'appel.","sip.test.call": "Faire sonner","sip.test.no_answer": "Personne n'a décroché à temps. Votre système téléphonique a accepté l'appel.",diff --git a/packages/i18n/locales/ja/settings.json b/packages/i18n/locales/ja/settings.jsonindex 8e1ee0bd..2100700c 100644--- a/packages/i18n/locales/ja/settings.json+++ b/packages/i18n/locales/ja/settings.json@@ -179,8 +179,6 @@"assistantHeader.menu": "アシスタント","assistantHeader.new": "新しいアシスタント","assistantHeader.noNumber": "まだどの番号にも応答していません",- "assistantHeader.noNumberChoose": "まだどの番号にも応答していません。「電話番号」で選んでください",- "assistantHeader.noNumberTip": "どのアシスタントが番号に応答するかは「ワークスペースの設定 › 電話番号」で選びます","assistantHeader.noPhoneNumber": "電話番号はまだありません","assistantHeader.numberTip": "この番号を開く:応答するアシスタント、通話の届き方","assistantHeader.switchTip": "アシスタントの切り替え、追加、コピー",@@ -1569,17 +1567,9 @@"phone.release.helpNoCarrier": "{name}はこの番号に応答しなくなり、番号は通信事業者に返却されます。月額料金はかからなくなり、番号を取り戻すことはできません。","phone.release.menu": "解約…","phone.release.title": "{number}を解約しますか?",- "phone.row.actions": "{number}の操作",- "phone.row.answering": "応答中",- "phone.row.checkTip": "この番号の転送を確認","phone.row.details": "詳細…","phone.row.manage": "管理…",- "phone.row.notAnswering": "応答していません",- "phone.row.offline": "オフライン",- "phone.row.statusWhat": "応答状況",- "phone.row.sub": "{assistant} · {mode}","phone.row.theAssistant": "アシスタント",- "phone.row.unverified": "転送は未確認です","phone.title": "電話番号","phone.unavailable.ask": "このサーバーの運用者に問い合わせてください。","phone.unavailable.connect": "「サーバー管理 › プロバイダー」で接続してください",@@ -1660,7 +1650,6 @@"sip.password.new": "新しいパスワード","sip.password.once": "今すぐパスワードをコピーして、電話システムに保存してください。表示されるのはこの1回だけです。","sip.password.warning": "古いパスワードはすぐに使えなくなります。電話システムに新しいパスワードを設定するまで、通話は拒否されます。",- "sip.rowMode": "自社の電話システム","sip.test.busy": "話し中でした。電話システムは通話を受け付けました。","sip.test.call": "呼び出す","sip.test.no_answer": "時間内に電話に出ませんでした。電話システムは通話を受け付けました。",diff --git a/packages/i18n/locales/pt-BR/settings.json b/packages/i18n/locales/pt-BR/settings.jsonindex f9193581..94cccf67 100644--- a/packages/i18n/locales/pt-BR/settings.json+++ b/packages/i18n/locales/pt-BR/settings.json@@ -179,8 +179,6 @@"assistantHeader.menu": "Assistentes","assistantHeader.new": "Novo assistente","assistantHeader.noNumber": "Ainda não atende nenhum número",- "assistantHeader.noNumberChoose": "Ainda não atende nenhum número. Escolha um em Números de telefone",- "assistantHeader.noNumberTip": "Escolha qual assistente atende cada número em Configurações do espaço de trabalho › Números de telefone","assistantHeader.noPhoneNumber": "Ainda não há número de telefone","assistantHeader.numberTip": "Abrir este número: qual assistente o atende e como as chamadas chegam a ele","assistantHeader.switchTip": "Trocar, adicionar ou copiar um assistente",@@ -1569,17 +1567,9 @@"phone.release.helpNoCarrier": "{name} deixa de atendê-lo e o número volta para a operadora. O custo mensal para, e você não poderá recuperar o número.","phone.release.menu": "Liberar…","phone.release.title": "Liberar {number}?",- "phone.row.actions": "Ações para {number}",- "phone.row.answering": "Atendendo",- "phone.row.checkTip": "Verificar o encaminhamento deste número","phone.row.details": "Detalhes…","phone.row.manage": "Gerenciar…",- "phone.row.notAnswering": "Não atende",- "phone.row.offline": "Offline",- "phone.row.statusWhat": "o status de atendimento",- "phone.row.sub": "{assistant} · {mode}","phone.row.theAssistant": "O assistente",- "phone.row.unverified": "Encaminhamento não verificado","phone.title": "Números de telefone","phone.unavailable.ask": "Pergunte a quem administra este servidor.","phone.unavailable.connect": "Conecte uma em Administração do servidor › Provedores",@@ -1660,7 +1650,6 @@"sip.password.new": "Nova senha","sip.password.once": "Copie a senha agora e salve-a no seu sistema telefônico. Ela só é mostrada esta vez.","sip.password.warning": "A senha antiga para de funcionar na hora. As chamadas são recusadas até seu sistema telefônico ter a nova.",- "sip.rowMode": "Sistema telefônico próprio","sip.test.busy": "A linha estava ocupada. Seu sistema telefônico aceitou a chamada.","sip.test.call": "Chamar","sip.test.no_answer": "O telefone não foi atendido a tempo. Seu sistema telefônico aceitou a chamada.",