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
Assistant settings onto the shared blocks: one save model, list lines, no cards in cards (PR 1920)
Janikcf7ec125877d
diff --git a/apps/web/src/inbox/useCallActions.ts b/apps/web/src/inbox/useCallActions.tsindex 9d63c267..f6ca8e8f 100644--- a/apps/web/src/inbox/useCallActions.ts+++ b/apps/web/src/inbox/useCallActions.ts@@ -114,7 +114,8 @@ export function useCallActions({ list, tab, searching, openId, setTab, setCursor.map(c => ({ call: c, change: make(c) })).filter((x): x is { call: Call; change: Change } => !!x.change && !isNoOp(x.call, x.change.steps)).filter(x => x.call.status !== 'live' || x.change.onLive)- if (!changes.length) return toaster.show(calls.some(c => c.status === 'live') ? liveNote() : i18n().t('inbox.toast.nothingToChange'))+ if (!changes.length)+ return toaster.show(calls.some(c => c.status === 'live') ? liveNote() : i18n().t('inbox.toast.nothingToChange'))for (const { change } of changes) runAll(change.steps)const leaving = new Set(changes@@ -175,13 +176,16 @@ export function useCallActions({ list, tab, searching, openId, setTab, setCursortoaster.show(toaster.withTip(label, key), true)}- /** A change made elsewhere that undoes itself (`revert`): one toast with Undo, undone with Z like the rest. */+ /**+ * A change made elsewhere that undoes itself (`revert`): one toast with Undo, undone with Z like the rest. `key`: the+ * change's own shortcut for the tip; '' for one without (a switch).+ */function undoable(label: string, key: string, revert: () => void) {undoStack.current = [...undoStack.current,{ steps: [], callId: '', tab, wasOpen: false, cancelWrite: () => false, page: true as const, revert },].slice(-UNDO_DEPTH)- toaster.show(toaster.withTip(label, key), true)+ toaster.show(key ? toaster.withTip(label, key) : label, true)}return {@@ -197,7 +201,9 @@ export function useCallActions({ list, tab, searching, openId, setTab, setCursortoggleUnread: (call: Call) => act(call, unreadChange(call)),remind: (call: Call, option: ReminderOption) => act(call, remindChange(call, option)),clearReminder: (call: Call) =>- tabOf(call) === 'reminders' ? act(call, clearReminderChange(call)) : toaster.show(i18n().t('inbox.toast.noReminder')),+ tabOf(call) === 'reminders'+ ? act(call, clearReminderChange(call))+ : toaster.show(i18n().t('inbox.toast.noReminder')),remove: (call: Call) => act(call, deleteChange(call)),/** Delete permanently now (owners and admins, call:erase): no undo. */erase: (call: Call) => act(call, eraseChange(call)),@@ -245,8 +251,7 @@ export function useCallActions({ list, tab, searching, openId, setTab, setCursorn => i18n().t('inbox.many.reminderCleared', { count: n }),),remove: (list: Call[]) => actMany(list, deleteChange, n => i18n().t('inbox.many.deleted', { count: n })),- erase: (list: Call[]) =>- actMany(list, eraseChange, n => i18n().t('inbox.many.deletedPermanently', { count: n })),+ erase: (list: Call[]) => actMany(list, eraseChange, n => i18n().t('inbox.many.deletedPermanently', { count: n })),assign: (list: Call[], userId: string | null, who: string) =>actMany(list,diff --git a/apps/web/src/settings/AssistantSettings.tsx b/apps/web/src/settings/AssistantSettings.tsxindex 91cbb149..663af08d 100644--- a/apps/web/src/settings/AssistantSettings.tsx+++ b/apps/web/src/settings/AssistantSettings.tsx@@ -112,7 +112,7 @@ import { Holidays, VacationMode } from './Holidays.tsx'import { Knowledge } from './Knowledge.tsx'import { countryNames, searchLanguages } from './languageSearch.ts'import { MissingProviderNote } from './MissingProviderNote.tsx'-import { HoursSummary, RulesSummary, TransfersSummary } from './Summaries.tsx'+import { TransfersSummary } from './Summaries.tsx'import { useWorkspaceSettings } from './settings-api.ts'import { TestCallButton, useTestCall } from './TestCall.tsx'import { TestCallPanel } from './TestCallPanel.tsx'@@ -232,6 +232,8 @@ const nameInSentence = (draft: Draft, t: ReturnType<typeof useT>) =>draft.name.trim() || t('settings.assistant.name.inSentence')type SectionProps = { draft: Draft; set: <K extends keyof Draft>(key: K, value: Draft[K]) => void }+/** A change saved at once (a switch, a select, a pick): it turns the assistant's settings into the new ones. */+type SaveChange = (change: (d: Draft) => Draft) => void/*** An optional greeting field: shown while it has text or was just added here; added with a starting text and@@ -272,25 +274,6 @@ function RemoveGreeting({ label, onRemove }: { label: string; onRemove: () => vo)}-/** The assistant's name, saved with the rest of the draft; the menu at the top only switches assistants. */-function AssistantNameSection({ draft, set }: SectionProps) {- const t = useT()- const problem = nameProblem(draft.name)- return (- <Section id="as-name-section">- <FormField id="as-name" label={t('settings.assistant.name.label')} error={problem}>- <TextInput- id="as-name"- value={draft.name}- onChange={v => set('name', v)}- invalid={!!problem}- placeholder="Maya"- />- </FormField>- </Section>- )-}-function Greeting({draft,set,@@ -312,8 +295,19 @@ function Greeting({// Without business hours there is no "closed": the outside greeting is neither shown nor offered.const outsideShown = hoursOn && outsideGreeting.shownconst canAddOutside = hoursOn && !outsideGreeting.shown+ const nameError = nameProblem(draft.name)return (+ // The assistant's name and what it says first, in one card (the menu at the top only switches assistants).<Section id="as-greeting">+ <FormField id="as-name" label={t('settings.assistant.name.label')} error={nameError}>+ <TextInput+ id="as-name"+ value={draft.name}+ onChange={v => set('name', v)}+ invalid={!!nameError}+ placeholder="Maya"+ />+ </FormField><FormFieldid="as-greet"label={t(outsideShown ? 'settings.assistant.greeting.labelDuringHours' : 'settings.assistant.greeting.label')}@@ -394,18 +388,17 @@ function CallerDetailsHint({ greeting }: { greeting: string }) {return <span className="help">{t('settings.assistant.greeting.callerDetails')}</span>}-/** The behaviour checklist: plain-language switches that add a line to the assistant's instructions. */-function Behaviours({ draft, set }: SectionProps) {+/** The behaviour checklist: plain-language switches that add a line to the assistant's instructions; each saves at once. */+function Behaviours({ draft, set, change }: SectionProps & { change: SaveChange }) {const t = useT()return (<Sectionid="as-behaviour"title={t('settings.assistant.rules.title')}- description={t('settings.assistant.rules.description')}help={t('settings.assistant.rules.help', { name: assistantName(draft, t) })}><div className="k-setrows as-checklist">- <AiDisclosureRow draft={draft} set={set} />+ <AiDisclosureRow draft={draft} change={change} /><SettingRowtitle={t('settings.assistant.rules.style')}description={t('settings.assistant.rules.styleDescription', { name: nameInSentence(draft, t) })}@@ -528,22 +521,22 @@ const STYLE_LABELS: Record<CommunicationStyle, MessageKey> = {* a mode that may break the law where the workspace is gets a hint, and "not even when asked" a warning* (aiDisclosureRisk; legal review 2026-11-17, A2).*/-export function AiDisclosureRow({ draft, set }: SectionProps) {+export function AiDisclosureRow({ draft, change }: { draft: Draft; change: SaveChange }) {const t = useT()const risk = aiDisclosureRisk(draft.ai_disclosure, useWorkspaceSettings().data?.resolvedCountry)- function pick(mode: AiDisclosure) {- const language = mainOf(draft)- const plain = withoutConsentQuestion(draft.greeting, language)- set('ai_disclosure', mode)- set(- 'greeting',- mode === 'at_start_consent'- ? greetingWithDisclosure(plain, draft.name, mode, language)- : disclosesAtStart(mode)- ? withDisclosure(plain, draft.name, language)- : withoutDisclosure(plain, draft.name, language),- )- }+ // The greeting changes with the mode: the saved one and, while it is being edited, the draft's (each by its own text).+ const pick = (mode: AiDisclosure) =>+ change(d => {+ const language = mainOf(d)+ const plain = withoutConsentQuestion(d.greeting, language)+ const greeting =+ mode === 'at_start_consent'+ ? greetingWithDisclosure(plain, d.name, mode, language)+ : disclosesAtStart(mode)+ ? withDisclosure(plain, d.name, language)+ : withoutDisclosure(plain, d.name, language)+ return { ...d, ai_disclosure: mode, greeting }+ })const name = nameInSentence(draft, t)const lawHint =risk.level === 'law'@@ -1047,6 +1040,41 @@ function Advanced({ draft, set }: SectionProps) {)}+/**+ * What assistant.update gets for `clean` (a normalized draft): only the fields that differ from `base`, so a save never+ * writes what it did not change (an API of the release before does not know every field; the server checks the+ * languages and the transfer numbers only when they change).+ */+function updateOf(clean: Draft, base: Draft): Record<string, unknown> {+ const fields = (d: Draft): Record<string, unknown> => ({+ name: d.name,+ greeting: d.greeting,+ ai_disclosure: d.ai_disclosure,+ communication_style: d.communication_style,+ business_profile: profileOf(d),+ ...outsideToSave(d),+ transfers: transfersToSave(d),+ ...silenceToSave(d),+ behaviours: behavioursToSave(d),+ ...languagesToSave(d),+ ...levelChoicesToSave(d),+ realtime_voice: d.realtime_voice,+ talking_speed_pct: d.talking_speed_pct,+ email_rules: d.email_rules,+ })+ const next = fields(clean)+ const before = fields(base)+ return Object.fromEntries(+ Object.entries(next).filter(([key, value]) => JSON.stringify(value) !== JSON.stringify(before[key])),+ )+}++/** The draft's fields of one section on top of the saved assistant: what that section's Save writes. */+function sectionOf(saved: Draft, draft: Draft, section: Exclude<SectionId, OwnSection>): Draft {+ const picked = Object.fromEntries(sectionFields[section].map(key => [key, draft[key]]))+ return { ...saved, ...picked }+}+/** `isInstanceAdmin`: the member runs the server (a test call nobody answers says what to fix there). *//** `agentChange`: owners and admins; the strip to finish the setup until go-live, then the top bar's buttons (AgentChange.tsx). *//** `undoable`: a toast with Undo for a change the page undoes itself (removing a call email rule). */@@ -1077,7 +1105,6 @@ function Form({undoable,}: FormProps) {const t = useT()- const format = useFormat()const run = useRun()const page = `assistant/${assistant.id}`const voiceOptions = useVoiceOptions().data@@ -1118,7 +1145,6 @@ function Form({if (current === 'advanced' && item === WEBHOOK_ITEM) return scrollToWhileSettling(WEBHOOK_SECTION_ID)}, [current, item])const hoursOn = useBusinessHoursOn()- const changed = dirtyconst unsaved = useMemo(() => {const clean = [normalized(draft), normalized(saved)] as constconst marked = new Set<SectionId>(@@ -1137,89 +1163,87 @@ function Form({setTimeout(() => document.getElementById(field)?.focus(), 0)}+ /**+ * Save writes the open section's text fields (the rest of the draft stays as it is, with its dot in the nav); a+ * switch, a select or a pick saves at once (saveNow). Hours, holidays and booking save on their own.+ */function save(e: FormEvent) {e.preventDefault()+ if (current === 'hours' || current === 'booking') return+ const 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(draft.name)) return goTo('general', 'as-name')- if (!draft.greeting.trim()) return goTo('general', 'as-greet')- const transfer = transferProblem(draft, outboundCountries)+ if (nameProblem(next.name)) return goTo('general', 'as-name')+ if (!next.greeting.trim()) return goTo('general', 'as-greet')+ const transfer = transferProblem(next, outboundCountries)if (transfer) {setTransferSaveTried(true)return goTo('transfers', transferFieldId(transfer.index, transfer.field))}- if (silenceProblem(draft)) return goTo('advanced', 'as-silence-gap')- if (languagesProblem(draft)) return goTo('general', 'as-languages-mode')- const noTopic = draft.email_rules.rules.findIndex(r => !r.when.trim())+ if (silenceProblem(next)) return goTo('advanced', 'as-silence-gap')+ if (languagesProblem(next)) return goTo('general', 'as-languages-mode')+ const noTopic = next.email_rules.rules.findIndex(r => !r.when.trim())if (noTopic >= 0) {setEmailSaveTried(true)return goTo('emails', emailRuleWhenId(noTopic))}- const problem = draftProblem(draft, outboundCountries)+ const problem = draftProblem(next, outboundCountries)if (problem) return toast(problem)- if (dirty) {- const clean = normalized(draft)- void run('assistant.update', {- assistantId: assistant.id,- name: clean.name,- greeting: clean.greeting,- ai_disclosure: clean.ai_disclosure,- communication_style: clean.communication_style,- business_profile: profileOf(clean),- ...outsideToSave(clean),- // Only when changed: putting calls through to a number waits for a confirmed email, other edits do not.- ...(JSON.stringify(clean.transfers) !== JSON.stringify(normalized(saved).transfers)- ? { transfers: transfersToSave(clean) }- : {}),- ...silenceToSave(clean),- behaviours: behavioursToSave(clean),- // Only when changed: the server checks the languages against the voice providers set up, and a main language- // that follows the workspace language is not the assistant's own choice to check.- ...(JSON.stringify(languagesToSave(clean)) !== JSON.stringify(languagesToSave(normalized(saved)))- ? languagesToSave(clean)- : {}),- ...levelChoicesToSave(clean),- // Only when changed: an API of the release before does not know it.- ...(clean.realtime_voice !== normalized(saved).realtime_voice ? { realtime_voice: clean.realtime_voice } : {}),- talking_speed_pct: clean.talking_speed_pct,- // Only when changed: an API of the release before does not know it.- ...(JSON.stringify(clean.email_rules) !== JSON.stringify(normalized(saved).email_rules)- ? { email_rules: clean.email_rules }- : {}),- })- setDraft(clean) // the form shows what was saved, so it is not "dirty" any more+ const clean = normalized(next)+ const changes = updateOf(clean, normalized(saved))+ if (Object.keys(changes).length) void run('assistant.update', { assistantId: assistant.id, ...changes })+ // The section shows what was saved, so it is not "dirty" any more; other sections keep their edits.+ setDraft(d => ({ ...d, ...Object.fromEntries(sectionFields[current].map(key => [key, clean[key]])) }))+ toast(t('settings.assistant.saved'))+ }++ /**+ * A switch, a select or a pick: saved at once, with Undo (rule 5). `change` turns an assistant's settings into the new+ * ones; it runs on the saved settings (what is written) and on the draft (so unsaved text edits stay). A change that+ * can't be saved yet (languages to pick without one picked) waits in the draft for Save.+ */+ function saveNow(change: (d: Draft) => Draft, note?: (next: Draft) => string | null) {+ const before = normalized(saved)+ const next = normalized(change(saved))+ setDraft(d => change(d))+ if (languagesProblem(next) || !canEdit) return+ const changes = updateOf(next, before)+ if (!Object.keys(changes).length) return+ void run('assistant.update', { assistantId: assistant.id, ...changes })+ const label = note?.(next) ?? t('settings.assistant.saved')+ const changed = (Object.keys(next) as (keyof Draft)[]).filter(+ key => JSON.stringify(next[key]) !== JSON.stringify(before[key]),+ )+ const undo = () => {+ setDraft(d => ({ ...d, ...Object.fromEntries(changed.map(key => [key, before[key]])) }))+ void run('assistant.update', { assistantId: assistant.id, ...updateOf(before, next) })}- toast(savedNote(normalized(draft)))+ if (undoable) undoable(label, '', undo)+ else toast(label)}- /** "Saved.", and on a new level what the calls cost now (or which level, where there are no prices). */- const savedNote = (clean: Draft) =>- levelSavedNote(assistantName(clean, t), clean.call_quality, saved.call_quality, voiceOptions?.callQuality) ??- t('settings.assistant.saved')+ /** On a new level, what the calls cost now (or which level, where there are no prices). */+ const levelNote = (next: Draft) =>+ levelSavedNote(assistantName(next, t), next.call_quality, saved.call_quality, voiceOptions?.callQuality)/*** A new main language: its default texts. The voice follows in VoiceSettings, which switches it when it can't* perform the assistant's languages (the same for a change of the other languages).*/function changeMainLanguage(code: Language) {- setDraft(d => withMainLanguage(d, code))+ saveNow(d => withMainLanguage(d, code))}- /** "Use country default": the workspace language again, and it follows the country from then on (once saved). */+ /** "Use country default": the workspace language again, and it follows the country from then on. */function followCountryLanguage() {- setDraft(d => withMainLanguage(d, mainLanguageOf(null, workspaceLanguage), true))+ saveNow(d => withMainLanguage(d, mainLanguageOf(null, workspaceLanguage), true))}+ /** One of the fields that save at once (a switch, a select, a pick). */+ const setNow: SectionProps['set'] = (key, value) => saveNow(d => ({ ...d, [key]: value }))+ /** Cancel: the open section's fields as saved; the other sections keep their edits. */function cancel() {- setDraft(saved)+ if (current === 'hours' || current === 'booking') return+ setDraft(d => sectionOf(d, saved, current))}- const elsewhere = [...unsaved].filter(id => id !== current)- const elsewhereNames = format.list(- elsewhere.map(id => shown.find(s => s.id === id)!.label),- { type: 'unit', style: 'short' },- )- const note =- elsewhere.length > 0- ? t(unsaved.has(current) ? 'settings.assistant.unsavedInAndHere' : 'settings.assistant.unsavedIn', {- sections: elsewhereNames,- })- : undefined+ // 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)// Hours and holidays have forms of their own; everything else is inside the draft's form.const body = (@@ -1230,7 +1254,6 @@ function Form({)}{current === 'general' && (<>- <AssistantNameSection draft={draft} set={set} /><Greetingdraft={draft}set={set}@@ -1241,7 +1264,7 @@ function Form({/><Languagesdraft={draft}- set={set}+ set={setNow}onMainLanguage={changeMainLanguage}onCountryLanguage={canEdit ? followCountryLanguage : undefined}country={workspaceCountry ? phoneCountryName(workspaceCountry.country, i18n()) : null}@@ -1252,7 +1275,7 @@ function Form({<NotAnswered setUp={setUp} /><CallQualitySettingspicks={draft}- onChange={picks => setDraft(d => ({ ...d, ...picks }))}+ onChange={picks => saveNow(d => ({ ...d, ...picks }), levelNote)}name={assistantName(draft, t)}savedLevel={saved.call_quality}/>@@ -1263,7 +1286,7 @@ function Form({{realtime ? (<RealtimeVoiceSettingsvoice={draft.realtime_voice}- onPick={v => set('realtime_voice', v)}+ onPick={v => setNow('realtime_voice', v)}canEdit={canEdit}language={mainOf(draft)}otherLanguages={otherLanguagesOf(draft.languages)}@@ -1273,7 +1296,7 @@ function Form({<VoiceSettingsassistantId={assistant.id}voice={draft.voice}- onPick={v => set('voice', withPickedVoice(v, draft.voice))}+ onPick={v => saveNow(d => ({ ...d, voice: withPickedVoice(v, d.voice) }))}canEdit={canEdit}toast={toast}language={mainOf(draft)}@@ -1285,12 +1308,7 @@ function Form({)}</>)}- {current === 'rules' && (- <>- <RulesSummary name={assistantName(draft, t)} draft={draft} />- <Behaviours draft={draft} set={set} />- </>- )}+ {current === 'rules' && <Behaviours draft={draft} set={setNow} change={change => saveNow(change)} />}{current === 'transfers' && (<><TransfersSummary name={assistantName(draft, t)} transfers={draft.transfers} hoursOn={hoursOn} />@@ -1323,7 +1341,7 @@ function Form({)}{current === 'booking' && <CalendarSettings assistant={assistant} canEdit={canEdit} toast={toast} />}{current === 'booking' && <BackToIntegrations key="booking" />}- {canEdit && <SaveBar dirty={changed} onCancel={cancel} note={note} />}+ {canEdit && <SaveBar dirty={changed} onCancel={cancel} />}</>)@@ -1360,11 +1378,6 @@ function Form({(current === 'emails' ? <Note tone="info">{t('settings.assistant.emails.readOnly')}</Note> : <ReadOnlyNote />)}{current === 'hours' ? (<>- <HoursSummary- assistantId={assistant.id}- name={assistantName(draft, t)}- outsideGreeting={!!draft.greeting_outside.trim()}- /><BusinessHours canEdit={canEdit} />{/* Holidays close days only while hours are used (businessHoursFor); vacation mode works either way. */}{hoursOn && <Holidays canEdit={canEdit} toast={toast} />}diff --git a/apps/web/src/settings/Calendar.tsx b/apps/web/src/settings/Calendar.tsxindex e92abc91..67a70264 100644--- a/apps/web/src/settings/Calendar.tsx+++ b/apps/web/src/settings/Calendar.tsx@@ -21,6 +21,7 @@ import { SignInMark } from '../ui/brand-logos.tsx'import { Checkbox, RadioCard, Switch } from '../ui/controls.tsx'import { Card, Dialog, Input, FormField } from '../ui/form.tsx'import { Badge, Button, cx, Icon } from '../ui/kit.tsx'+import { FoldOut } from '../ui/FoldOut.tsx'import { Loading, SkeletonList, useLoadState } from '../ui/LoadStates.tsx'import { EditButton, List, ListEmpty, ListRow, MenuButton } from '../ui/list.tsx'import { StatusMark } from '../ui/StatusMark.tsx'@@ -48,7 +49,6 @@ import {} from './calendarModel.ts'import { KeyConnectDialog } from './KeyConnect.tsx'import { MissingProviderNote } from './MissingProviderNote.tsx'-import { kindLabel } from './businessKind.ts'import { callAction, useWorkspaceSettings, useWriteAction } from './settings-api.ts'import './calendar.css'@@ -554,7 +554,7 @@ function TypeSuggestions({ types, canEdit }: { types: AppointmentType[]; canEditif (!open.length) return types.length ? null : <ListEmpty>{t('settings.calendar.noType')}</ListEmpty>return (<div className={cx('cal-suggest', types.length > 0 && 'cal-suggest-after')}>- <p className="cal-suggest-lead">{t('settings.calendar.suggest.lead', { kind: kindLabel(kind!) })}</p>+ <p className="cal-suggest-lead">{t('settings.calendar.suggest.lead')}</p><div className="cal-suggest-list" role="group" aria-label={t('settings.calendar.suggest.label')}>{open.map(s => (<button@@ -975,7 +975,6 @@ function Accounts({onToggle: (open: boolean) => void}) {const t = useT()- const format = useFormat()const write = useWriteAction()const [busy, setBusy] = useState<string | null>(null)const attention = connections.filter(c => c.status !== 'connected')@@ -992,26 +991,23 @@ function Accounts({}}return (- <details+ // What most people don't need once it works: folded at the end of the page, its list in a card when open.+ <FoldOutid="as-cal-accounts"className="cal-accounts"open={open}- onToggle={e => onToggle((e.currentTarget as HTMLDetailsElement).open)}+ onToggle={onToggle}+ title={open ? t('settings.calendar.accountsHide') : t('settings.calendar.accountsShow')}+ summary={+ <>+ {t('settings.calendar.accountsCount', { count: connections.length })}+ {attention.length > 0 && (+ <Badge tone="danger">{t('settings.calendar.accountsToReconnect', { count: attention.length })}</Badge>+ )}+ </>+ }>- <summary title={open ? t('settings.calendar.accountsHide') : t('settings.calendar.accountsShow')}>- <Icon name="down" size={14} className="cal-accounts-chevron" />- <span className="cal-accounts-title">{t('settings.calendar.accounts')}</span>- <span className="cal-accounts-marks" aria-hidden="true">- {connections.map(c => (- <SignInMark key={c.id} method={accountMark(c)} />- ))}- </span>- <span className="cal-accounts-count">{format.number(connections.length)}</span>- {attention.length > 0 && (- <Badge tone="danger">{t('settings.calendar.accountsToReconnect', { count: attention.length })}</Badge>- )}- </summary>- <div className="cal-accounts-body">+ <section className="k-card cal-accounts-body" aria-label={t('settings.calendar.accounts')}><List label={t('settings.calendar.accounts')}>{connections.map(c => (<AccountRow key={c.id} connection={c}>@@ -1047,43 +1043,50 @@ function Accounts({<AddAccount {...connector} /></div>)}- </div>- </details>+ </section>+ </FoldOut>)}-/** No account yet: a friendly start with one button per provider. */+/**+ * No account yet: the card every account will be listed in, empty, with one button per provider (a warning instead+ * when the server has none).+ */function Start({ name, canEdit, connector }: { name: string; canEdit: boolean; connector: Connector }) {const t = useT()return (- <section className="cal-start" aria-labelledby="cal-start-h">- <span className="cal-start-mark" aria-hidden="true">- <Icon name="calendar" size={22} />- </span>- <h2 id="cal-start-h">{t('settings.calendar.start.title', { name })}</h2>- <p>{t('settings.calendar.start.body', { name })}</p>+ <Card+ id="cal-start"+ className="st-sec"+ title={t('settings.calendar.accounts')}+ description={t('settings.calendar.start.body', { name })}+ >{connector.providers?.length === 0 ? (<MissingProviderNote kind="calendar" />) : (- canEdit && (- <div className="cal-connect cal-start-buttons">- {(connector.providers ?? []).map(p => (- <Button- key={p}- disabled={connector.busy !== null}- onClick={() => void connector.connect(p)}- title={t('settings.calendar.connectTip', { provider: PROVIDER_LABEL[p] })}- >- <SignInMark method={connectMark(p)} />- {connector.busy === p- ? t('settings.calendar.opening', { provider: PROVIDER_LABEL[p] })- : t('settings.calendar.connect', { provider: PROVIDER_LABEL[p] })}- </Button>- ))}- </div>- )+ <>+ <ListEmpty>{t('settings.calendar.start.empty', { name })}</ListEmpty>+ {canEdit && (+ <div className="cal-connect">+ {(connector.providers ?? []).map(p => (+ <Button+ key={p}+ size="sm"+ disabled={connector.busy !== null}+ onClick={() => void connector.connect(p)}+ title={t('settings.calendar.connectTip', { provider: PROVIDER_LABEL[p] })}+ >+ <SignInMark method={connectMark(p)} />+ {connector.busy === p+ ? t('settings.calendar.opening', { provider: PROVIDER_LABEL[p] })+ : t('settings.calendar.connect', { provider: PROVIDER_LABEL[p] })}+ </Button>+ ))}+ </div>+ )}+ </>)}- </section>+ </Card>)}diff --git a/apps/web/src/settings/Knowledge.tsx b/apps/web/src/settings/Knowledge.tsxindex 5c7648f0..c9e5e83f 100644--- a/apps/web/src/settings/Knowledge.tsx+++ b/apps/web/src/settings/Knowledge.tsx@@ -9,6 +9,7 @@ import { useEffect, useMemo, useRef, useState } from 'react'import { fmt } from '../i18n/format.ts'import { Input, Textarea, FormField } from '../ui/form.tsx'import { Badge, Button, cx, Icon } from '../ui/kit.tsx'+import { ListLine } from '../ui/FeatureLine.tsx'import {type AboutIssue,type AboutParts,@@ -287,7 +288,7 @@ function Questions(props: QuestionsProps) {</div>)}{nothing ? (- <ListEmpty>{t('settings.knowledge.qa.empty')}</ListEmpty>+ <ListEmpty>{t('settings.knowledge.qa.empty', { name })}</ListEmpty>) : (<><div className="kn-qlist">@@ -317,22 +318,21 @@ function Questions(props: QuestionsProps) {/>))}{(filter === null || filter === 'check') &&- shownAnswers.map(q =>- q.key === open ? (- <QuestionEditor- key={`edit${opened}`}- {...props}- update={update}- q={q}- issues={issuesOf(issues, q.key)}- onChange={change => setQuestion(q.key, change)}- onRemove={() => remove(q.key)}- onClose={() => openRow(null)}- />- ) : (- <QuestionRow key={q.key} q={q} issues={issuesOf(issues, q.key)} onClick={() => openRow(q.key)} />- ),- )}+ shownAnswers.map(q => (+ <QuestionLine+ // The open row keeps its editor while its key changes as the text is written (keyAfter).+ key={q.key === open ? `edit${opened}` : q.key}+ {...props}+ update={update}+ q={q}+ open={q.key === open}+ issues={issuesOf(issues, q.key)}+ onOpen={() => openRow(q.key)}+ onChange={change => setQuestion(q.key, change)}+ onRemove={() => remove(q.key)}+ onClose={() => openRow(null)}+ />+ ))}</div>{whole && groups.length + suggestions.length + answers.length === 0 && (<ListEmpty>{t('settings.knowledge.qa.noMatch')}</ListEmpty>@@ -357,49 +357,49 @@ function Questions(props: QuestionsProps) {)}-function QuestionRow(props: { q: AboutQuestion; issues: AboutIssue[]; onClick: () => void }) {- const { q, issues, onClick } = props- const t = useT()- return (- <button- type="button"- className="kn-qrow"- onClick={onClick}- aria-expanded={false}- title={t('settings.knowledge.qa.editTip')}- >- <span className="kn-qrow-main">- <b className={cx(!q.question.trim() && 'kn-untitled')}>- {q.question.trim() || t('settings.knowledge.qa.untitled')}- </b>- {q.answer && <span className="kn-qrow-answer">{q.answer}</span>}- {issues.length > 0 && (- <span className="kn-qrow-tags">- {issues.map(i => (- <Badge key={i.kind} tone="warning" dot>- {t(`settings.knowledge.issue.${i.kind}`)}- </Badge>- ))}- </span>- )}- </span>- </button>- )-}+// --- One question and its answer ------------------------------------------------------------------// --- Editing a row in place --------------------------------------------------------------------type EditorProps = QuestionsProps & {+type LineProps = QuestionsProps & {q: AboutQuestion+ open: booleanissues: AboutIssue[]+ onOpen: () => voidonChange: (change: Partial<AboutQuestion>) => voidonRemove: () => voidonClose: () => void}-/** One question and its answer, edited where its row is (one row open at a time; Esc or Done closes it). */-function QuestionEditor(props: EditorProps) {- const { q, issues, onChange, onRemove, onClose, canEdit, parts, update } = props+/** A question and its answer as a line of the list; Change opens both fields under it (one row open at a time). */+function QuestionLine(props: LineProps) {+ const { q, open, issues, onOpen, onRemove, onClose, canEdit } = props+ const t = useT()+ return (+ <ListLine+ className="kn-q"+ open={open}+ onToggle={onOpen}+ onClose={onClose}+ title={q.question.trim() || t('settings.knowledge.qa.untitled')}+ description={q.answer || undefined}+ before={issues.map(i => (+ <Badge key={i.kind} tone="warning" dot>+ {t(`settings.knowledge.issue.${i.kind}`)}+ </Badge>+ ))}+ >+ <QuestionEditor {...props} />+ <div className="kn-qedit-foot">+ <Button size="sm" variant="ghost" icon="trash" disabled={!canEdit} onClick={onRemove}>+ {t('settings.knowledge.panel.delete')}+ </Button>+ </div>+ </ListLine>+ )+}++/** One question's fields, edited where its row is; a fix for each issue the check found above them. */+function QuestionEditor(props: LineProps) {+ const { q, issues, onChange, canEdit, parts, update } = propsconst t = useT()const first = useRef<HTMLInputElement>(null)const [busy, setBusy] = useState<AboutIssue['kind'] | null>(null)@@ -412,13 +412,6 @@ function QuestionEditor(props: EditorProps) {useEffect(() => {if (isNew.current) first.current?.focus()}, [])- useEffect(() => {- function onKey(e: KeyboardEvent) {- if (e.key === 'Escape') onClose()- }- window.addEventListener('keydown', onKey)- return () => window.removeEventListener('keydown', onKey)- }, [onClose])async function improve(issue: AboutIssue) {const other = issue.kind === 'duplicate' ? parts.questions.find(x => x.key === issue.other) : undefined@@ -449,7 +442,7 @@ function QuestionEditor(props: EditorProps) {const otherOf = (i: AboutIssue) =>i.kind === 'duplicate' ? (parts.questions.find(x => x.key === i.other)?.question ?? '') : ''return (- <div className="kn-qedit" role="group" aria-label={t('settings.knowledge.panel.title')}>+ <>{issues.map(i => (<div key={i.kind} className="kn-issue"><Icon name="warning" size={14} />@@ -467,8 +460,7 @@ function QuestionEditor(props: EditorProps) {</Button></div>))}- <div className="kn-pfield">- <label htmlFor="kn-question">{t('settings.knowledge.panel.question')}</label>+ <FormField id="kn-question" label={t('settings.knowledge.panel.question')}><Inputid="kn-question"ref={first}@@ -480,9 +472,8 @@ function QuestionEditor(props: EditorProps) {onChange({ question: v })}}/>- </div>- <div className="kn-pfield">- <label htmlFor="kn-answer">{t('settings.knowledge.panel.answer')}</label>+ </FormField>+ <FormField id="kn-answer" label={t('settings.knowledge.panel.answer')}><Textareaid="kn-answer"rows={4}@@ -493,16 +484,8 @@ function QuestionEditor(props: EditorProps) {onChange({ answer: e.target.value })}}/>- </div>- <div className="kn-qedit-foot">- <Button size="sm" variant="ghost" icon="trash" disabled={!canEdit} onClick={onRemove}>- {t('settings.knowledge.panel.delete')}- </Button>- <Button size="sm" variant="primary" onClick={onClose} title={t('settings.knowledge.panel.closeTip')}>- {t('settings.knowledge.panel.done')}- </Button>- </div>- </div>+ </FormField>+ </>)}diff --git a/apps/web/src/settings/OpenQuestions.tsx b/apps/web/src/settings/OpenQuestions.tsxindex 5042c02c..c72951b3 100644--- a/apps/web/src/settings/OpenQuestions.tsx+++ b/apps/web/src/settings/OpenQuestions.tsx@@ -14,6 +14,7 @@ import { listTime, parseTs } from '../time.ts'import { appLink } from '../ui/AppLink.tsx'import { Textarea } from '../ui/form.tsx'import { Badge, Button } from '../ui/kit.tsx'+import { ListLine } from '../ui/FeatureLine.tsx'import { useWriteAction } from './settings-api.ts'/** The open question groups of this assistant, most asked first; [] while loading and for members. */@@ -55,7 +56,7 @@ type RowProps = {onAnswered: (question: string, answer: string) => void}-/** One open question: a row like the others with "No answer yet"; a click opens it to answer or dismiss in place. */+/** One open question: a line like the others with "No answer yet"; Answer opens it to answer or dismiss in place. */export function OpenQuestionRow({ group, canEdit, open, onOpen, toast, onAnswered }: RowProps) {const t = useT()const write = useWriteAction()@@ -84,33 +85,19 @@ export function OpenQuestionRow({ group, canEdit, open, onOpen, toast, onAnswereif (text.trim() && busy === null) void run('answer')}- if (!open)- return (- <button- type="button"- className="kn-qrow kn-open-row"- onClick={() => onOpen(true)}- aria-expanded={false}- title={t('settings.review.questions.addTip')}- >- <span className="kn-qrow-main">- <b>{group.question}</b>- <span className="kn-qrow-tags">- <Badge tone="warning" dot>- {t('settings.knowledge.open.badge')}- </Badge>- <AskedLine group={group} />- </span>- </span>- </button>- )-return (- <div className="kn-qedit kn-open-edit" role="group" aria-label={group.question}>- <span className="kn-qrow-main">- <b>{group.question}</b>- <AskedLine group={group} />- </span>+ <ListLine+ open={open}+ onToggle={() => onOpen(!open)}+ label={t('settings.knowledge.open.answer')}+ title={group.question}+ description={<AskedLine group={group} />}+ before={+ <Badge tone="warning" dot>+ {t('settings.knowledge.open.badge')}+ </Badge>+ }+ ><Textarearows={3}autoFocus@@ -124,7 +111,6 @@ export function OpenQuestionRow({ group, canEdit, open, onOpen, toast, onAnsweree.preventDefault()save()}- if (e.key === 'Escape') onOpen(false)}}/><div className="kn-qedit-foot">@@ -149,6 +135,6 @@ export function OpenQuestionRow({ group, canEdit, open, onOpen, toast, onAnswere{t('settings.review.questions.add')}</Button></div>- </div>+ </ListLine>)}diff --git a/apps/web/src/settings/SuggestedQuestions.tsx b/apps/web/src/settings/SuggestedQuestions.tsxindex cedf94a5..755afcd7 100644--- a/apps/web/src/settings/SuggestedQuestions.tsx+++ b/apps/web/src/settings/SuggestedQuestions.tsx@@ -8,6 +8,7 @@ import { useState } from 'react'import { draftOf, stateOf, type TopicDraft, useMailReview } from '../integrations/mailReview.ts'import { Input, Textarea } from '../ui/form.tsx'import { Badge, Button } from '../ui/kit.tsx'+import { ListLine } from '../ui/FeatureLine.tsx'export type Suggestion = { index: number; topic: MailTopic }@@ -37,19 +38,7 @@ type RowProps = {onAccepted: (question: string, answer: string) => void}-function Tags({ s }: { s: Suggestion }) {- const t = useT()- return (- <span className="kn-qrow-tags">- <Badge tone="info" dot>- {t('settings.knowledge.sugg.badge')}- </Badge>- <span className="kn-sub">{t('settings.knowledge.sugg.from', { count: s.topic.conversations })}</span>- </span>- )-}--/** One suggestion as a row of the list; a click opens it in place to adjust and add, or dismiss. */+/** One suggestion as a line of the list; Review opens it in place to adjust and add, or dismiss. */export function SuggestedRow({ s, assistantId, canEdit, open, onOpen, review, onAccepted }: RowProps) {const t = useT()const [draft, setDraft] = useState<TopicDraft>(() => draftOf(s.topic))@@ -58,32 +47,26 @@ export function SuggestedRow({ s, assistantId, canEdit, open, onOpen, review, onif (await review.accept(s.index, draft, assistantId)) onAccepted(draft.question.trim(), draft.answer.trim())}- if (!open)- return (- <button- type="button"- className="kn-qrow kn-sugg-row"- onClick={() => onOpen(true)}- aria-expanded={false}- title={t('settings.knowledge.sugg.openTip')}- >- <span className="kn-qrow-main">- <b>{draftOf(s.topic).question}</b>- <span className="kn-qrow-answer">{s.topic.answer}</span>- <Tags s={s} />- </span>- </button>- )-return (- <div className="kn-qedit kn-sugg-open" role="group" aria-label={draft.question}>- <Tags s={s} />+ <ListLine+ className="kn-q"+ open={open}+ onToggle={() => onOpen(!open)}+ label={t('settings.knowledge.sugg.review')}+ title={draftOf(s.topic).question}+ aside={t('settings.knowledge.sugg.from', { count: s.topic.conversations })}+ description={s.topic.answer}+ before={+ <Badge tone="info" dot>+ {t('settings.knowledge.sugg.badge')}+ </Badge>+ }+ ><Inputvalue={draft.question}disabled={!canEdit}aria-label={t('settings.knowledge.panel.question')}onChange={e => setDraft(d => ({ ...d, question: e.target.value }))}- onKeyDown={e => e.key === 'Escape' && onOpen(false)}/><Textarearows={3}@@ -91,7 +74,6 @@ export function SuggestedRow({ s, assistantId, canEdit, open, onOpen, review, ondisabled={!canEdit}aria-label={t('settings.knowledge.panel.answer')}onChange={e => setDraft(d => ({ ...d, answer: e.target.value }))}- onKeyDown={e => e.key === 'Escape' && onOpen(false)}/><div className="kn-qedit-foot"><Button@@ -114,6 +96,6 @@ export function SuggestedRow({ s, assistantId, canEdit, open, onOpen, review, on{t('settings.knowledge.sugg.add')}</Button></div>- </div>+ </ListLine>)}diff --git a/apps/web/src/settings/Summaries.tsx b/apps/web/src/settings/Summaries.tsxindex 7ee4a5b7..a6a2d0d5 100644--- a/apps/web/src/settings/Summaries.tsx+++ b/apps/web/src/settings/Summaries.tsx@@ -1,15 +1,13 @@-// The summary cards on top of Assistant › Hours & holidays, Rules and Transfers (LIN-392, LIN-443). The sentences come+// The summary card on top of Assistant › Transfers (LIN-392, LIN-443). The sentences come// from summaryModel.ts; these read the page's state (workspace settings, the assistant's draft) and show them.import { useT } from '@linedesk/i18n/react'import type { ReactNode } from 'react'-import { appLink } from '../ui/AppLink.tsx'import type { IconName } from '../ui/icons.ts'import { Sentence, SummaryCard } from '../ui/SummaryCard.tsx'-import type { Draft, TransferDraft } from './assistantDraft.ts'-import { useBusinessHours } from './BusinessHours.tsx'-import { closureState, upcomingDays } from './closedDaysModel.ts'+import type { TransferDraft } from './assistantDraft.ts'+import { closureState } from './closedDaysModel.ts'import { useClosedDays } from './Holidays.tsx'-import { hoursSummary, rulesSummary, type Summary, transfersSummary } from './summaryModel.ts'+import { type Summary, transfersSummary } from './summaryModel.ts'import { useContactWho } from './transferOwner.ts'type Tags = Record<string, (chunks: ReactNode[]) => ReactNode>@@ -36,31 +34,6 @@ export function SummaryView({ summary, icon, tags }: { summary: Summary; icon: I)}-/** Hours & holidays: when you are open, the next closed day, vacation mode. */-export function HoursSummary({- assistantId,- name,- outsideGreeting,-}: {- assistantId: string- name: string- outsideGreeting: boolean-}) {- const hours = useBusinessHours()- const { loaded, today, own, derived, calendar, closure } = useClosedDays()- if (!hours.saved || !loaded) return null- const summary = hoursSummary({- name,- on: hours.on,- days: hours.days,- upcoming: upcomingDays(own, derived, calendar, today),- closure,- today,- outsideGreeting,- })- return <SummaryView summary={summary} icon="clock" tags={{ link: appLink(`#assistant/${assistantId}/general`) }} />-}-/** Transfers: who calls are put through to, and what happens when nobody fits. From the draft: it changes as you type. */export function TransfersSummary({name,@@ -76,20 +49,3 @@ export function TransfersSummary({const who = useContactWho()return <SummaryView summary={transfersSummary({ name, transfers, hoursOn, vacationOn, who })} icon="phone-out" />}--/** Rules: the tone, when the assistant says it is an AI, and the switches that are on. From the draft. */-export function RulesSummary({- name,- draft,-}: {- name: string- draft: Pick<Draft, 'communication_style' | 'ai_disclosure' | 'behaviours'>-}) {- const summary = rulesSummary({- name,- style: draft.communication_style,- disclosure: draft.ai_disclosure,- behaviours: draft.behaviours,- })- return <SummaryView summary={summary} icon="checks" />-}diff --git a/apps/web/src/settings/TransferContacts.tsx b/apps/web/src/settings/TransferContacts.tsxindex 2a0607f8..250521b3 100644--- a/apps/web/src/settings/TransferContacts.tsx+++ b/apps/web/src/settings/TransferContacts.tsx@@ -1,6 +1,6 @@// Settings > Assistant > Transfers: the people the assistant puts callers through to (warm transfer),-// each with a plain-language condition, in order. One compact row per contact; a row opens in place to-// edit it (Done or Esc closes it). Part of the assistant's draft: saved with the page's Save. A field's error+// each with a plain-language condition, in order. One SettingRow per contact (its name, condition and number, its+// switch); Change opens its fields under it in place, like a FeatureLine (Close or Esc folds them). Part of the assistant's draft: saved with the page's Save. A field's error// shows once the field was left or a save was tried, never on a row just added. A row just added stays out of the// draft until one of its fields is changed: Esc, Done, Remove or leaving the section drops it (no unsaved change).import { countryList, type OutboundCountries, RING_SECONDS_MAX, RING_SECONDS_MIN } from '@linedesk/actions'@@ -12,7 +12,8 @@ import { Checkbox, Select, type SelectOption, Switch } from '../ui/controls.tsx'import { Input, Textarea, FormField } from '../ui/form.tsx'import { HelpTip } from '../ui/HelpTip.tsx'import { NO_PASSWORD_MANAGER } from '../ui/passwordManager.ts'-import { Badge, Button, cx } from '../ui/kit.tsx'+import { Button } from '../ui/kit.tsx'+import { ListLine } from '../ui/FeatureLine.tsx'import { LinkButton } from '../ui/AppLink.tsx'import { PhoneInput } from '../ui/PhoneInput.tsx'import { formatNumber, outboundE164 } from '../onboarding/flow.ts'@@ -142,7 +143,7 @@ export function TransferContacts({ transfers, onChange, hoursOn, assistantName,help={t('settings.transfer.help', { name: assistantName })}>{rows.length ? (- <ol className="tc-list">+ <div className="tc-rows">{rows.map((c, i) => {const isNew = isPendingRow(edit, i)const mine = problem?.index === i ? problem : null@@ -179,7 +180,7 @@ export function TransferContacts({ transfers, onChange, hoursOn, assistantName,/>)})}- </ol>+ </div>) : (<ListEmpty>{t('settings.transfer.empty', { name: assistantName })}</ListEmpty>)}@@ -343,7 +344,10 @@ export function ContactRow(props: RowProps) {// summary: one quiet line at the contact (under the number while the row is open). A contact added during this visit// says it only once its number field was left, like a field's error.const noNumber = inactive === 'noNumber' && (!added || numberLeft)- const name = who?.name ?? (c.name.trim() || t('settings.transfer.newContact'))+ // The owner's contact shows the owner's name, in the row and in its Name field alike (the saved word "Owner" stays+ // until the field is changed).+ const nameValue = who?.name ?? c.name+ const name = nameValue.trim() || t('settings.transfer.newContact')/** The number typed in the contact's line (null: the "Add a number" link shows). */const [typing, setTyping] = useState<string | null>(null)const [typedProblem, setTypedProblem] = useState<string | null>(null)@@ -357,238 +361,204 @@ export function ContactRow(props: RowProps) {const id = (field: TransferProblem['field']) => transferFieldId(index, field)const error = (field: TransferProblem['field']) => (problem?.field === field ? problem.message : null)const condition = useRef<HTMLTextAreaElement>(null)+ const summary = summaryOf(c, hoursOn)return (- <li- className={cx('tc-row', inactive && 'is-off', open && 'is-open')}- onKeyDown={e => {- // Esc closes the open row (a list or menu inside it closes first and marks the key as handled).- if (e.key !== 'Escape' || !open || e.defaultPrevented) return- e.preventDefault()- e.stopPropagation()- onClose()- }}- >- <div className="tc-line">- <span className="tc-order" aria-hidden>- {index + 1}+ <ListLine+ open={open}+ onToggle={onToggle}+ onClose={onClose}+ buttonId={transferFieldId(index, 'row')}+ buttonLabel={t('settings.transfer.editName', { name })}+ after={+ <Switch+ on={c.enabled}+ onChange={on => onChange({ enabled: on })}+ label={t('settings.transfer.toggle', { name })}+ />+ }+ title={name}+ aside={who?.you ? t('settings.transfer.you') : undefined}+ dimmed={inactive === 'off'}+ description={c.condition.trim() || t('settings.transfer.noCondition')}+ note={+ <span className="help tc-meta">+ {addHere ? (+ <AddNumberHere+ id={`tc-${index}-quick`}+ you={!!who?.you}+ name={name}+ typing={typing}+ problem={typedProblem}+ defaultCountry={defaultCountry}+ onStart={() => setTyping('')}+ onType={number => {+ setTyping(number)+ setTypedProblem(null)+ }}+ onCancel={() => {+ setTyping(null)+ setTypedProblem(null)+ setTimeout(() => document.getElementById(transferFieldId(index, 'row'))?.focus(), 0)+ }}+ onSave={form => {+ const number = typing ?? ''+ if (!number.trim()) return setTyping(null)+ const refused = numberProblem(number, countries)+ if (refused) return setTypedProblem(refused)+ onChange({ number })+ setTyping(null)+ // Saved like the page's Save, once the draft has the number (the form's handler reads the next render).+ setTimeout(() => form?.requestSubmit(), 0)+ }}+ />+ ) : (+ numberLabel(c.number)+ )}+ {typing === null && ` · ${summary}`}</span>- <div className={cx('tc-main', addHere && typing !== null && 'is-typing')}>- <span className="tc-title">- {/* The row's toggle: its area covers the whole line (CSS), the number link and field sit above it. */}- <button- type="button"- id={transferFieldId(index, 'row')}- className="tc-toggle"- onClick={onToggle}- aria-expanded={open}- title={open ? t('common.action.close') : t('settings.transfer.edit')}- >- <b>{name}</b>- </button>- {who?.you && <Badge>{t('settings.transfer.you')}</Badge>}- {addHere ? (- <AddNumberHere- id={`tc-${index}-quick`}- you={!!who?.you}- name={name}- typing={typing}- problem={typedProblem}- defaultCountry={defaultCountry}- onStart={() => setTyping('')}- onType={number => {- setTyping(number)- setTypedProblem(null)- }}- onCancel={() => {- setTyping(null)- setTypedProblem(null)- setTimeout(() => document.getElementById(transferFieldId(index, 'row'))?.focus(), 0)- }}- onSave={form => {- const number = typing ?? ''- if (!number.trim()) return setTyping(null)- const refused = numberProblem(number, countries)- if (refused) return setTypedProblem(refused)- onChange({ number })- setTyping(null)- // Saved like the page's Save, once the draft has the number (the form's handler reads the next render).- setTimeout(() => form?.requestSubmit(), 0)- }}- />- ) : (- <span className="tc-number">{numberLabel(c.number)}</span>+ }+ >+ <div className="tc-edit">+ <div className="tc-grid tc-grid-who">+ <FormField id={id('name')} label={t('settings.transfer.name')} error={error('name')}>+ <Input+ id={id('name')}+ {...NO_PASSWORD_MANAGER}+ value={nameValue}+ onChange={e => onChange({ name: e.target.value })}+ onBlur={() => onLeave('name')}+ placeholder={t('settings.transfer.namePlaceholder')}+ invalid={!!error('name')}+ />+ </FormField>+ <FormField id={id('number')} label={t('settings.transfer.number')} error={error('number')} help={numberTip}>+ <PhoneInput+ id={id('number')}+ value={c.number}+ defaultCountry={defaultCountry}+ autoComplete="off"+ onChange={number => onChange({ number })}+ onBlur={() => onLeave('number')}+ invalid={!!error('number')}+ />+ {noNumber && !error('number') && (+ <p className="k-field-desc tc-note">{t('settings.transfer.noNumberNote')}</p>)}- {inactive === 'off' && <span className="tc-status">{t('settings.assistant.draft.transferOff')}</span>}+ </FormField>+ </div>+ <div className="tc-briefing">+ <span className="bh-with">+ <Checkbox checked={c.briefing} onChange={on => onChange({ briefing: on })}>+ {t('settings.transfer.briefing')}+ </Checkbox>+ <HelpTip label={t('settings.transfer.briefingTipLabel')} text={t('settings.transfer.briefingTip')} /></span>- <span className="tc-cond">{c.condition.trim() || t('settings.transfer.noCondition')}</span>- <span className="tc-meta">{summaryOf(c, hoursOn)}</span>+ {/* TCPA: with the briefing a transfer is an outbound call that opens with an AI voice, so the person must have+ agreed (terms, A10). Without it nothing artificial is said to them: no hint, only what changes. */}+ <p className="tc-consent">{t(c.briefing ? 'settings.transfer.consent' : 'settings.transfer.briefingOff')}</p></div>- <span className="tc-actions">- {count > 1 && (- <>- <Button- size="sm"- variant="ghost"- icon="up"- title={t('settings.transfer.moveUp')}- aria-label={t('settings.transfer.moveUpName', { name })}- disabled={isNew || index === 0}- onClick={() => onMove(-1)}- />- <Button- size="sm"- variant="ghost"- icon="down"- title={t('settings.transfer.moveDown')}- aria-label={t('settings.transfer.moveDownName', { name })}- disabled={isNew || index === count - 1}- onClick={() => onMove(1)}- />- </>- )}- <Button- size="sm"- variant="ghost"- icon="trash"- title={t('settings.transfer.remove')}- aria-label={t('settings.transfer.removeName', { name })}- onClick={onRemove}- />- <Switch- on={c.enabled}- onChange={on => onChange({ enabled: on })}- label={t('settings.transfer.toggle', { name })}+ <FormField id={id('condition')} label={t('settings.transfer.condition')} error={error('condition')}>+ <Textarea+ id={id('condition')}+ ref={el => {+ condition.current = el+ grow(el)+ }}+ className="tc-cond-input"+ rows={2}+ value={c.condition}+ onChange={e => {+ onChange({ condition: e.target.value })+ grow(e.target)+ }}+ onBlur={() => onLeave('condition')}+ placeholder={t('settings.transfer.conditionPlaceholder')}+ invalid={!!error('condition')}/>- </span>- </div>- {open && (- <div className="tc-edit">- <div className="tc-grid tc-grid-who">- <FormField id={id('name')} label={t('settings.transfer.name')} error={error('name')}>- <Input- id={id('name')}- {...NO_PASSWORD_MANAGER}- value={c.name}- onChange={e => onChange({ name: e.target.value })}- onBlur={() => onLeave('name')}- placeholder={t('settings.transfer.namePlaceholder')}- invalid={!!error('name')}- />- </FormField>- <FormField id={id('number')} label={t('settings.transfer.number')} error={error('number')} help={numberTip}>- <PhoneInput- id={id('number')}- value={c.number}- defaultCountry={defaultCountry}- autoComplete="off"- onChange={number => onChange({ number })}- onBlur={() => onLeave('number')}- invalid={!!error('number')}- />- {noNumber && !error('number') && (- <p className="k-field-desc tc-note">{t('settings.transfer.noNumberNote')}</p>- )}- </FormField>- </div>- <div className="tc-briefing">- <span className="bh-with">- <Checkbox checked={c.briefing} onChange={on => onChange({ briefing: on })}>- {t('settings.transfer.briefing')}- </Checkbox>- <HelpTip label={t('settings.transfer.briefingTipLabel')} text={t('settings.transfer.briefingTip')} />+ {!c.condition.trim() && (+ <span className="tc-examples">+ {t('settings.transfer.examples')}+ {EXAMPLES.map(example => (+ <button+ key={example.label}+ type="button"+ className="tc-example"+ onClick={() => {+ onChange({ condition: t(example.condition) })+ setTimeout(() => condition.current?.focus(), 0)+ }}+ >+ {t(example.label)}+ </button>+ ))}</span>- {/* TCPA: with the briefing a transfer is an outbound call that opens with an AI voice, so the person must have- agreed (terms, A10). Without it nothing artificial is said to them: no hint, only what changes. */}- <p className="tc-consent">- {t(c.briefing ? 'settings.transfer.consent' : 'settings.transfer.briefingOff')}- </p>- </div>- <FormField id={id('condition')} label={t('settings.transfer.condition')} error={error('condition')}>- <Textarea- id={id('condition')}- ref={el => {- condition.current = el- grow(el)- }}- className="tc-cond-input"- rows={2}- value={c.condition}- onChange={e => {- onChange({ condition: e.target.value })- grow(e.target)- }}- onBlur={() => onLeave('condition')}- placeholder={t('settings.transfer.conditionPlaceholder')}- invalid={!!error('condition')}+ )}+ </FormField>+ <div className="tc-grid tc-grid-then">+ <FormField id={`tc-${index}-ring`} label={t('settings.transfer.ringFor')}>+ <Select+ id={`tc-${index}-ring`}+ label={t('settings.transfer.ringFor')}+ value={String(c.ring_seconds)}+ options={ringOptions}+ onChange={v => onChange({ ring_seconds: Number(v) })}/>- {!c.condition.trim() && (- <span className="tc-examples">- {t('settings.transfer.examples')}- {EXAMPLES.map(example => (- <button- key={example.label}- type="button"- className="tc-example"- onClick={() => {- onChange({ condition: t(example.condition) })- setTimeout(() => condition.current?.focus(), 0)- }}- >- {t(example.label)}- </button>- ))}- </span>- )}</FormField>- <div className="tc-grid tc-grid-then">- <FormField id={`tc-${index}-ring`} label={t('settings.transfer.ringFor')}>- <Select- id={`tc-${index}-ring`}- label={t('settings.transfer.ringFor')}- value={String(c.ring_seconds)}- options={ringOptions}- onChange={v => onChange({ ring_seconds: Number(v) })}- />- </FormField>- <FormField id={`tc-${index}-fallback`} label={t('settings.transfer.ifNobody')}>- <Select- id={`tc-${index}-fallback`}- label={t('settings.transfer.ifNobody')}- value={c.if_no_answer}- options={fallbackOptions}- onChange={v => onChange({ if_no_answer: v })}- />- </FormField>- </div>- <div className="tc-foot">- {/* The icon is inside the page's fieldset: disabled with it for members who cannot edit. */}- {hoursOn ? (- <span className="bh-with">- <Checkbox checked={c.hours_only} onChange={on => onChange({ hours_only: on })}>- {t('settings.transfer.hoursOnly')}- </Checkbox>- <EditBusinessHours canEdit />- </span>- ) : (- <span className="bh-with tc-anytime">- {t('settings.transfer.anyTime')}- <EditBusinessHours canEdit label={t('settings.transfer.setHours')} />- </span>- )}- {/* Remove and Done stay together at the end, also when the row wraps on a phone. */}- <span className="tc-foot-actions">- {added && (- <Button size="sm" variant="ghost" onClick={onRemove}>- {t('settings.transfer.remove')}- </Button>- )}- <Button size="sm" onClick={onClose} title={t('settings.transfer.doneTip')}>- {t('settings.transfer.done')}- </Button>+ <FormField id={`tc-${index}-fallback`} label={t('settings.transfer.ifNobody')}>+ <Select+ id={`tc-${index}-fallback`}+ label={t('settings.transfer.ifNobody')}+ value={c.if_no_answer}+ options={fallbackOptions}+ onChange={v => onChange({ if_no_answer: v })}+ />+ </FormField>+ </div>+ <div className="tc-foot">+ {/* The icon is inside the page's fieldset: disabled with it for members who cannot edit. */}+ {hoursOn ? (+ <span className="bh-with">+ <Checkbox checked={c.hours_only} onChange={on => onChange({ hours_only: on })}>+ {t('settings.transfer.hoursOnly')}+ </Checkbox>+ <EditBusinessHours canEdit />+ </span>+ ) : (+ <span className="bh-with tc-anytime">+ {t('settings.transfer.anyTime')}+ <EditBusinessHours canEdit label={t('settings.transfer.setHours')} /></span>- </div>+ )}+ {/* The order and Remove stay together at the end, also when the row wraps on a phone. */}+ <span className="tc-foot-actions">+ {count > 1 && !isNew && (+ <>+ <Button+ size="sm"+ variant="ghost"+ icon="up"+ title={t('settings.transfer.moveUp')}+ aria-label={t('settings.transfer.moveUpName', { name })}+ disabled={index === 0}+ onClick={() => onMove(-1)}+ />+ <Button+ size="sm"+ variant="ghost"+ icon="down"+ title={t('settings.transfer.moveDown')}+ aria-label={t('settings.transfer.moveDownName', { name })}+ disabled={index === count - 1}+ onClick={() => onMove(1)}+ />+ </>+ )}+ <Button size="sm" variant="ghost" icon="trash" onClick={onRemove}>+ {t('settings.transfer.remove')}+ </Button>+ </span></div>- )}- </li>+ </div>+ </ListLine>)}diff --git a/apps/web/src/settings/VoiceSettings.tsx b/apps/web/src/settings/VoiceSettings.tsxindex 5d4b0b3c..9f6daf1d 100644--- a/apps/web/src/settings/VoiceSettings.tsx+++ b/apps/web/src/settings/VoiceSettings.tsx@@ -28,7 +28,7 @@ import { workspaceHeaders } from '../tabWorkspace.ts'import { Checkbox, Select } from '../ui/controls.tsx'import { FormMessage, FormField } from '../ui/form.tsx'import { HelpTip } from '../ui/HelpTip.tsx'-import { Button, cx, Icon } from '../ui/kit.tsx'+import { Badge, Button, cx, Icon } from '../ui/kit.tsx'import { Loading, Skeleton, SkeletonList } from '../ui/LoadStates.tsx'import { Section, TextInput } from './fields.tsx'import { MissingProviderNote } from './MissingProviderNote.tsx'@@ -251,12 +251,11 @@ function PlayButton({ voice, preview, label, playKey, unavailable }: PlayProps)type RowProps = {/**- * null: the install's default voice, named by its own voice name ("Jessica (default)"); `defaultSample` is the- * voice it stands for, `defaultNote` the line under it.+ * null: the install's default voice, named by its own voice name with the Default badge; `defaultSample` is the+ * voice it stands for.*/voice: PickerVoice | nulldefaultSample?: { provider: string; id: string; name: string | null } | null- defaultNote?: stringchecked: booleanonPick: () => voiddisabled: boolean@@ -264,21 +263,27 @@ type RowProps = {facts?: string}-function VoiceRow({ voice, defaultSample, defaultNote, checked, onPick, disabled, preview, facts }: RowProps) {+function VoiceRow({ voice, defaultSample, checked, onPick, disabled, preview, facts }: RowProps) {const t = useT()const locale = useLocale()- const defaultName = defaultSample?.name- ? t('settings.voice.defaultNamed', { name: defaultSample.name })- : t('settings.voice.default')+ // The server's default voice: its name and the one Default badge (as on call quality and calendars), no line.+ const defaultName = defaultSample?.name || t('settings.voice.default')const shown = voice ? voiceWords(voice, locale) : null- const description = shown ? shown.description : (defaultNote ?? null)+ const description = shown ? shown.description : nullreturn (<div className={cx('vp-row', checked && 'on')}><label className="vp-pick"><input type="radio" name="voice" className="vp-radio" checked={checked} disabled={disabled} onChange={onPick} /><span className="vp-dot" aria-hidden="true" /><span className="vp-text">- <span className="vp-name">{shown ? shown.name : defaultName}</span>+ {voice ? (+ <span className="vp-name">{shown?.name}</span>+ ) : (+ <span className="vp-title">+ <span className="vp-name">{defaultName}</span>+ <Badge>{t('settings.voice.quality.defaultBadge')}</Badge>+ </span>+ )}{description && (<span className="vp-desc" title={description.length > 60 ? description : undefined}>{description}@@ -864,7 +869,6 @@ export function VoiceSettings({{!forLanguage.length && (<VoiceRowvoice={null}- defaultNote={t('settings.voice.defaultNote', { name: assistantName })}defaultSample={provider && options?.defaultVoice ? { provider, ...options.defaultVoice } : null}checked={current === ''}onPick={() => pick(null)}@@ -1060,7 +1064,6 @@ export function RealtimeVoiceSettings({<div className="vp-list" role="radiogroup" aria-labelledby="vp-suggested"><VoiceRowvoice={null}- defaultNote={t('settings.voice.defaultNote', { name: assistantName })}defaultSample={defaultVoice}checked={current === ''}onPick={() => onPick('')}diff --git a/apps/web/src/settings/WriteWithHelp.tsx b/apps/web/src/settings/WriteWithHelp.tsxindex 453a93ab..8a90ba75 100644--- a/apps/web/src/settings/WriteWithHelp.tsx+++ b/apps/web/src/settings/WriteWithHelp.tsx@@ -10,6 +10,7 @@ import { useState } from 'react'import { createPortal } from 'react-dom'import { Dialog, Input, FormField } from '../ui/form.tsx'import { Button, cx } from '../ui/kit.tsx'+import { LinkButton } from '../ui/AppLink.tsx'import type { Draft } from './assistantDraft.ts'import { TextArea } from './fields.tsx'import {@@ -52,6 +53,10 @@ export function WriteWithHelp({ assistant, draft, replace, toast, onClose }: Proconst [goalsNote, setGoalsNote] = useState('')const [busy, setBusy] = useState(false)const [proposal, setProposal] = useState<KnowledgeImportData | null>(null)+ /** What the proposal changes, and what of it the owner keeps (all of it at first). */+ const [review, setReview] = useState<ImportReview | null>(null)+ const [picks, setPicks] = useState<ImportPicks | null>(null)+ const language = useWorkspaceLanguage()/** What the website gave in step 1: its About text fills step 2, its pages join the proposal. */const [site, setSite] = useState<KnowledgeImportData | null>(null)@@ -85,7 +90,11 @@ export function WriteWithHelp({ assistant, draft, replace, toast, onClose }: Progoals: [...goals],...(goalsNote.trim() ? { goalsNote: goalsNote.trim() } : {}),})- setProposal(site ? withSite(data, site) : data)+ const next = site ? withSite(data, site) : data+ const changes = reviewImport(draft, next)+ setProposal(next)+ setReview(changes)+ setPicks(defaultPicks(changes, next))setStep('result')} catch (e) {toast((e as Error).message)@@ -101,19 +110,6 @@ export function WriteWithHelp({ assistant, draft, replace, toast, onClose }: Pro<Button key="cancel" variant="ghost" disabled={busy} onClick={onClose}>{t('common.action.cancel')}</Button>- <Button- key="skip"- variant="ghost"- disabled={busy}- onClick={() => {- setUrl('')- setSite(null)- setStep('business')- }}- title={t('settings.writeHelp.noWebsiteTip')}- >- {t('settings.writeHelp.noWebsite')}- </Button><Buttonbusy={busy}key="read"@@ -155,6 +151,25 @@ export function WriteWithHelp({ assistant, draft, replace, toast, onClose }: Pro{busy ? t('settings.writeHelp.writing') : t('settings.writeHelp.write')}</Button></>+ ) : proposal && picks ? (+ <>+ <Button key="back-goals" variant="ghost" onClick={() => setStep('goals')}>+ {t('settings.writeHelp.back')}+ </Button>+ <Button+ key="add"+ variant="primary"+ disabled={!picks.about && picks.useCases.size === 0}+ onClick={() => {+ replace(applyImport(draft, proposal, picks, language))+ toast(t('settings.writeHelp.added'))+ onClose()+ }}+ title={t('settings.writeHelp.addTip')}+ >+ {t('settings.writeHelp.add')}+ </Button>+ </>) : nullreturn createPortal(@@ -196,7 +211,22 @@ export function WriteWithHelp({ assistant, draft, replace, toast, onClose }: Pro}}/></FormField>- {busy && <p className="help">{t('settings.writeHelp.readingWebsite')}</p>}+ {busy ? (+ <p className="help">{t('settings.writeHelp.readingWebsite')}</p>+ ) : (+ <p className="help">+ <LinkButton+ title={t('settings.writeHelp.noWebsiteTip')}+ onClick={() => {+ setUrl('')+ setSite(null)+ setStep('business')+ }}+ >+ {t('settings.writeHelp.noWebsite')}+ </LinkButton>+ </p>+ )}</div>)}{step === 'business' && (@@ -254,17 +284,14 @@ export function WriteWithHelp({ assistant, draft, replace, toast, onClose }: Pro)}</div>)}- {step === 'result' && proposal && (+ {step === 'result' && proposal && review && picks && (<Resultdraft={draft}proposal={proposal}+ review={review}+ picks={picks}+ setPicks={change => setPicks(p => p && change(p))}name={name}- onBack={() => setStep('goals')}- onApply={next => {- replace(next)- toast(t('settings.writeHelp.added'))- onClose()- }}/>)}</Dialog>,@@ -282,23 +309,23 @@ const withSite = (data: KnowledgeImportData, site: KnowledgeImportData): Knowled/** The word diff with each part's position, which never changes for one diff (a stable key). */const diffParts = (before: string, after: string) => wordDiff(before, after).map((part, at) => ({ ...part, at }))+/** The proposal to pick from: the About text (as a word diff against the current one) and the common calls. */function Result({draft,proposal,+ review,+ picks,+ setPicks,name,- onBack,- onApply,}: {draft: Draftproposal: KnowledgeImportData+ review: ImportReview+ picks: ImportPicks+ setPicks: (change: (p: ImportPicks) => ImportPicks) => voidname: string- onBack: () => void- onApply: (next: Draft) => void}) {const t = useT()- const language = useWorkspaceLanguage()- const [review] = useState<ImportReview>(() => reviewImport(draft, proposal))- const [picks, setPicks] = useState<ImportPicks>(() => defaultPicks(review, proposal))const toggle = (list: 'useCases', i: number) =>setPicks(p => {const next = new Set(p[list])@@ -307,68 +334,50 @@ function Result({return { ...p, [list]: next }})const nothing = review.about === 'same' && !proposal.useCases.length- const picked = picks.about || picks.useCases.size > 0return (- <div className="ww-result">- <div className="ww-step ww-scroll">- {proposal.pages.length > 0 && (- <p className="help">{t('settings.writeHelp.pagesRead', { count: proposal.pages.length })}</p>- )}- {nothing && <p className="help">{t('settings.writeHelp.nothingNew')}</p>}- {review.about !== 'same' && (- <div className="kn-review-block">- <label className="kn-pick">- <input- type="checkbox"- checked={picks.about}- onChange={e => setPicks(p => ({ ...p, about: e.target.checked }))}- />- <b>- {review.about === 'empty' ? t('settings.writeHelp.useAbout') : t('settings.writeHelp.replaceAbout')}- </b>+ <div className="ww-step">+ {proposal.pages.length > 0 && (+ <p className="help">{t('settings.writeHelp.pagesRead', { count: proposal.pages.length })}</p>+ )}+ {nothing && <p className="help">{t('settings.writeHelp.nothingNew')}</p>}+ {review.about !== 'same' && (+ <div className="kn-review-block">+ <label className="kn-pick">+ <input+ type="checkbox"+ checked={picks.about}+ onChange={e => setPicks(p => ({ ...p, about: e.target.checked }))}+ />+ <b>{review.about === 'empty' ? t('settings.writeHelp.useAbout') : t('settings.writeHelp.replaceAbout')}</b>+ </label>+ <p className="help kn-about-note">{t('settings.writeHelp.aboutNote', { name })}</p>+ <p className="kn-about-text">+ {review.about === 'empty'+ ? proposal.about+ : diffParts(draft.instructions, proposal.about).map(part => (+ <span+ key={part.at}+ className={cx(part.kind === 'added' && 'kn-add', part.kind === 'removed' && 'kn-del')}+ >+ {part.text}+ </span>+ ))}+ </p>+ </div>+ )}+ {proposal.useCases.length > 0 && (+ <div className="kn-review-block">+ <b className="kn-review-h">{t('settings.writeHelp.commonCalls')}</b>+ <span className="help">{t('settings.writeHelp.commonCallsHelp')}</span>+ {proposal.useCases.map((u, i) => (+ // biome-ignore lint/suspicious/noArrayIndexKey: a fixed list for this review+ <label key={i} className="kn-pick">+ <input type="checkbox" checked={picks.useCases.has(i)} onChange={() => toggle('useCases', i)} />+ <span>{u}</span></label>- <p className="help kn-about-note">{t('settings.writeHelp.aboutNote', { name })}</p>- <p className="kn-about-text">- {review.about === 'empty'- ? proposal.about- : diffParts(draft.instructions, proposal.about).map(part => (- <span- key={part.at}- className={cx(part.kind === 'added' && 'kn-add', part.kind === 'removed' && 'kn-del')}- >- {part.text}- </span>- ))}- </p>- </div>- )}- {proposal.useCases.length > 0 && (- <div className="kn-review-block">- <b className="kn-review-h">{t('settings.writeHelp.commonCalls')}</b>- <span className="help">{t('settings.writeHelp.commonCallsHelp')}</span>- {proposal.useCases.map((u, i) => (- // biome-ignore lint/suspicious/noArrayIndexKey: a fixed list for this review- <label key={i} className="kn-pick">- <input type="checkbox" checked={picks.useCases.has(i)} onChange={() => toggle('useCases', i)} />- <span>{u}</span>- </label>- ))}- </div>- )}- </div>- <div className="kn-foot">- <Button variant="ghost" onClick={onBack}>- {t('settings.writeHelp.back')}- </Button>- <Button- variant="primary"- disabled={!picked}- onClick={() => onApply(applyImport(draft, proposal, picks, language))}- title={t('settings.writeHelp.addTip')}- >- {t('settings.writeHelp.add')}- </Button>- </div>+ ))}+ </div>+ )}</div>)}diff --git a/apps/web/src/settings/aiDisclosure.test.tsx b/apps/web/src/settings/aiDisclosure.test.tsxindex f1cac0bd..c4628592 100644--- a/apps/web/src/settings/aiDisclosure.test.tsx+++ b/apps/web/src/settings/aiDisclosure.test.tsx@@ -20,7 +20,7 @@ const { AiDisclosureRow } = await import('./AssistantSettings.tsx')const render = (ai_disclosure: string, country: string) => {settings.data = { resolvedCountry: country }const draft = { name: 'Maya', greeting: 'Thanks for calling Brightwater. How can I help?', ai_disclosure } as never- return renderToStaticMarkup(<AiDisclosureRow draft={draft} set={() => {}} />).replaceAll(''', "'")+ return renderToStaticMarkup(<AiDisclosureRow draft={draft} change={() => {}} />).replaceAll(''', "'")}const LAW_EU = 'In the EU, callers must be told that they are talking to an AI (EU AI Act, Art. 50)'diff --git a/apps/web/src/settings/assistant.css b/apps/web/src/settings/assistant.cssindex d5183c47..c4adb0ae 100644--- a/apps/web/src/settings/assistant.css+++ b/apps/web/src/settings/assistant.css@@ -207,6 +207,12 @@ a.as-chip:hover {font-weight: 600;color: var(--ink);}+.vp-title {+ display: flex;+ align-items: center;+ gap: 6px;+ min-width: 0;+}.vp-desc,.vp-facts {font-size: 12px;@@ -442,9 +448,6 @@ a.as-chip:hover {align-items: baseline;gap: 2px 8px;}-.as-languages-note {- margin: 0;-}/* With "Switch only to languages I pick": the picked ones as chips, then "Add language" (and the covered ones above). */.as-languages-picked {display: flex;@@ -513,81 +516,13 @@ a.as-chip:hover {min-width: 170px;}-/* Settings > Assistant > Transfers: one compact row per contact, opened in place to edit. */-.tc-list {- display: grid;- margin: 0;- padding: 0;- list-style: none;- border: 1px solid var(--line);- border-radius: var(--radius-md);-}-.tc-row + .tc-row {- border-top: 1px solid var(--line);-}-.tc-line {- display: flex;- align-items: center;- gap: 10px;- padding: 8px 10px;- min-width: 0;-}-.tc-order {- flex: none;- width: 20px;- height: 20px;- border-radius: var(--radius-full);- background: var(--surface-hover);- color: var(--ink-muted);- font-size: 12px;- line-height: 20px;- text-align: center;-}-.tc-main {- position: relative;+/* Settings > Assistant > Transfers: one ListLine per contact in the card; Change opens its fields under it. */+/* The fields under an open contact. */+.tc-edit {display: grid;- flex: 1;- gap: 1px;- min-width: 0;- padding: 4px 6px;- border-radius: var(--radius-sm);- color: var(--ink);-}-.tc-main:hover {- background: var(--surface-hover);-}-.tc-main:has(.tc-toggle:focus-visible) {- outline: 2px solid var(--focus);- outline-offset: 1px;-}-/* The row's toggle is the name; its area covers the whole line, so a click anywhere opens the row. */-.tc-toggle {- padding: 0;- border: 0;- background: none;- color: inherit;- font: inherit;- text-align: left;- cursor: pointer;-}-.tc-toggle::after {- content: "";- position: absolute;- inset: 0;- border-radius: inherit;-}-.tc-toggle:focus-visible {- outline: none;-}-.tc-title .k-badge {- align-self: center;-}-/* "Add your mobile number" in the line, and the phone field it turns into: above the toggle's area. */-.tc-add-number {- position: relative;- z-index: 1;- font-size: 13px;+ gap: 12px;}+/* "Add your mobile number" in the row's quiet line, and the phone field it turns into. */.tc-add-number.is-typing {display: inline-flex;flex-wrap: wrap;@@ -607,80 +542,12 @@ a.as-chip:hover {flex-basis: 100%;margin: 0;}-.tc-main.is-typing:hover {- background: none;-}-.tc-title {- display: flex;- flex-wrap: wrap;- align-items: baseline;- column-gap: 8px;- min-width: 0;-}-.tc-title b {- font-weight: 600;-}-.tc-number {- color: var(--ink-muted);- font-size: 13px;- white-space: nowrap;-}-.tc-status {- align-self: center;- padding: 0 6px;- border: 1px solid var(--line);- border-radius: var(--radius-sm);- color: var(--ink-muted);- font-size: 12px;- line-height: 16px;- white-space: nowrap;-}-/* The condition wraps to two lines at most; the summary below it stays whole. */-.tc-cond {- display: -webkit-box;- overflow: hidden;- -webkit-box-orient: vertical;- -webkit-line-clamp: 2;- font-size: 13px;- line-height: 18px;-}-.tc-meta {- color: var(--ink-muted);- font-size: 12px;- line-height: 16px;-}/* A contact switched on without a number: one quiet line, the field-note look (not red, no badge). */-.tc-note {- color: var(--ink-muted);- font-size: 12px;- line-height: 16px;-}.k-field-desc.tc-note {margin: 0;-}-.tc-actions {- display: flex;- flex: none;- align-items: center;- gap: 2px;-}-.tc-actions > :last-child {- margin-left: 6px;-}-.tc-row.is-off .tc-title b,-.tc-row.is-off .tc-cond {color: var(--ink-muted);-}-/* The editor lines up with the row's content (after the order mark), not with an extra indent. */-.tc-edit {- display: grid;- gap: 12px;- margin: 0 10px;- padding: 12px 0;- border-top: 1px solid var(--line);-}-.tc-row.is-open .tc-line {- padding-bottom: 6px;+ font-size: 12px;+ line-height: 16px;}/* Every label row is as tall as a label: a (?) never pushes its field down. */.tc-edit .k-field-label {@@ -751,26 +618,10 @@ a.as-chip:hover {}.tc-foot-actions {display: flex;- gap: 8px;+ gap: 4px;margin-left: auto;}@media (max-width: 640px) {- /* The actions go under the text, so the name and condition keep the full width. */- .tc-line {- flex-wrap: wrap;- align-items: flex-start;- }- .tc-order {- margin-top: 4px;- }- .tc-main {- flex-basis: calc(100% - 30px);- }- .tc-actions {- flex-basis: 100%;- justify-content: flex-end;- margin-top: -4px;- }.tc-grid-who,.tc-grid-then {grid-template-columns: minmax(0, 1fr);@@ -853,146 +704,10 @@ a.as-chip:hover {gap: 16px;min-height: 360px;}-.ah-list {- margin: 0;- padding: 0;- list-style: none;- display: grid;- align-content: start;- gap: 2px;- max-height: 520px;- overflow: auto;-}-.ah-item {- display: grid;- gap: 2px;- width: 100%;- padding: 8px 10px;- border: 0;- border-radius: var(--radius-sm);- background: none;- color: var(--ink);- font: inherit;- text-align: left;- cursor: pointer;-}-.ah-item:hover {- background: var(--surface-hover);-}-.ah-item.is-on {- background: var(--surface-hover);- box-shadow: inset 2px 0 0 var(--ink);-}-.ah-item-top {- display: flex;- align-items: center;- gap: 8px;-}-.ah-now {- font-size: 11px;- line-height: 16px;- padding: 0 6px;- border-radius: var(--radius-full);- background: var(--ink);- color: var(--surface);-}-.ah-sum {- font-size: 13px;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}-.ah-by,-.ah-detail-head span,-.ah-legend,-.ah-note,-.ah-empty,-.ah-fold {- font-size: 12px;- color: var(--ink-muted);-}-.ah-detail {- min-width: 0;- max-height: 520px;- overflow: auto;-}-.ah-detail-head {- display: flex;- align-items: baseline;- gap: 8px;- margin-bottom: 8px;-}-.ah-legend {- display: flex;- gap: 12px;- margin: 0 0 8px;-}-.ah-part {- margin-bottom: 14px;-}-.ah-part h4 {- margin: 0 0 4px;- font-size: 13px;- font-weight: 600;-}-.ah-lines {- border-radius: var(--radius-sm);- box-shadow: inset 0 0 0 1px var(--line);- padding: 4px 0;- font-size: 13px;- line-height: 19px;-}-.ah-line {- display: flex;- gap: 8px;- padding: 0 10px;- white-space: pre-wrap;- overflow-wrap: anywhere;-}-.ah-line > span:first-child {- flex: none;- width: 10px;- color: var(--ink-muted);-}-.ah-old {- color: var(--ink-muted);-}-.ah-line.ah-old {- background: var(--surface-hover);- text-decoration: line-through;- text-decoration-color: var(--line-control);-}-.ah-line.ah-new {- font-weight: 500;- box-shadow: inset 2px 0 0 var(--ink);-}-.ah-fold {- padding: 0 10px 0 28px;-}-.ah-done {- display: flex;- align-items: center;- justify-content: space-between;- gap: 12px;- margin-bottom: 12px;- padding: 8px 12px;- border-radius: var(--radius-sm);- background: var(--surface-hover);-}-.ah-problem {- margin: 0 0 12px;- color: var(--red, #b42318);-}-.ah-note {- margin-right: auto;-}@media (max-width: 720px) {.ah {grid-template-columns: 1fr;}- .ah-list {- max-height: 200px;- }}/* Settings > Assistant > Advanced: talking speed, a slider in 1% steps with Normal in the middle and its value in the header. */@@ -1199,15 +914,6 @@ a.as-chip:hover {margin: 0;}-/* Rules: the recording notice's sentence, right under its switch */-.as-notice {- display: grid;- gap: 4px;- margin-top: -4px;-}-.as-notice-error {- color: var(--danger);-}/* Calls are not recorded: one quiet line in the notice row's place, under the same divider as the rows above. */.as-checklist > .as-not-recorded {margin: 0;diff --git a/apps/web/src/settings/assistantDraft.test.ts b/apps/web/src/settings/assistantDraft.test.tsindex a238c038..e04c3c29 100644--- a/apps/web/src/settings/assistantDraft.test.ts+++ b/apps/web/src/settings/assistantDraft.test.ts@@ -131,9 +131,9 @@ describe('draft', () => {expect(draftProblem({ ...saved, instructions: '' })).toBeNull()})it('says how long the greeting takes', () => {- expect(spokenLength('Hi.')).toBe('about 1 second spoken')+ expect(spokenLength('Hi.')).toBe('About 1 s')expect(spokenLength(' ')).toBe('nothing to say yet')- expect(spokenLength('Thanks for calling Brightwater, this is Maya. How can I help?')).toBe('about 4 seconds spoken')+ expect(spokenLength('Thanks for calling Brightwater, this is Maya. How can I help?')).toBe('About 4 s')})})diff --git a/apps/web/src/settings/calendar.css b/apps/web/src/settings/calendar.cssindex 92e5fcc0..73f63c78 100644--- a/apps/web/src/settings/calendar.css+++ b/apps/web/src/settings/calendar.css@@ -101,18 +101,6 @@gap: 16px;}-/* The round icon of the start card (as the summary card's, ui/summary-card.css). */-.cal-start-mark {- flex: none;- display: grid;- place-items: center;- width: 34px;- height: 34px;- border-radius: var(--radius-full);- background: var(--surface-hover);- color: var(--ink);-}-/* A numbered step: the number in a small black circle before the title. */.cal-step .k-card-title h2 {gap: 10px;@@ -209,54 +197,10 @@color: var(--ink-muted);}-/* Calendar accounts: one compact, folded line at the bottom. */-.cal-accounts {- background: var(--surface);- border-radius: var(--radius-lg);- box-shadow: var(--shadow-1);-}-.cal-accounts summary {- display: flex;- align-items: center;- gap: 10px;- padding: 12px 16px;- list-style: none;- cursor: pointer;- border-radius: var(--radius-lg);-}-.cal-accounts summary::-webkit-details-marker {- display: none;-}-.cal-accounts summary:hover {- background: var(--surface-hover);-}-.cal-accounts-chevron {- color: var(--ink-muted);- transform: rotate(-90deg);- transition: transform 0.15s;-}-.cal-accounts[open] .cal-accounts-chevron {- transform: none;-}-.cal-accounts-title {- font-size: 13.5px;- font-weight: 600;-}-.cal-accounts-marks {- display: inline-flex;- align-items: center;- gap: 6px;- margin-left: 4px;-}-.cal-accounts-count {- margin-left: auto;- font-size: 12.5px;- color: var(--ink-muted);-}+/* Calendar accounts: a FoldOut at the end of the page; its list in a card when open. */.cal-accounts-body {display: grid;gap: 10px;- padding: 0 16px 14px;}.cal-accounts-foot {display: flex;@@ -267,37 +211,6 @@color: var(--ink-muted);}-/* No account yet: a friendly start. */-.cal-start {- display: grid;- justify-items: center;- gap: 10px;- padding: 32px 24px 28px;- text-align: center;- background: var(--surface);- border-radius: var(--radius-lg);- box-shadow: var(--shadow-1);-}-.cal-start-mark {- width: 44px;- height: 44px;-}-.cal-start h2 {- margin: 4px 0 0;- font-size: 17px;- font-weight: 600;-}-.cal-start p {- max-width: 460px;- margin: 0;- color: var(--ink-muted);- line-height: 21px;-}-.cal-start-buttons {- justify-content: center;- margin-top: 8px;-}-/* Suggested appointment types for the kind of business (LIN-774): one click adds one. Dashed: not a type yet. */.cal-suggest-after {margin-top: 14px;diff --git a/apps/web/src/settings/call-emails.css b/apps/web/src/settings/call-emails.cssindex 32664127..baed7fed 100644--- a/apps/web/src/settings/call-emails.css+++ b/apps/web/src/settings/call-emails.css@@ -1,22 +1,22 @@/* Settings › Assistant › Call emails (CallEmails.tsx) and the call view's "Emailed after the call" (EmailedAfterCall.tsx). */-/* One list of "which calls → who": a bordered block for every call, for assigned calls and per topic. */+/* One list of "which calls → who" in the card: a block for every call, for assigned calls and per topic, divided by+ hairlines like setting rows (no box around them: no cards in cards). */.ce-blocks {display: grid;grid-template-columns: minmax(0, 1fr);+ gap: 10px;margin: 0;padding: 0;list-style: none;- border: 1px solid var(--line);- border-radius: var(--radius-md);}.ce-block {display: grid;grid-template-columns: minmax(0, 1fr);- gap: 10px;- padding: 12px;+ gap: 8px;}.ce-block + .ce-block {+ padding-top: 10px;border-top: 1px solid var(--line);}.ce-block-head {@@ -28,7 +28,7 @@.ce-block-title {flex: none;margin: 0;- font-size: 13.5px;+ font-size: 13px;font-weight: 600;color: var(--ink);}diff --git a/apps/web/src/settings/knowledge.css b/apps/web/src/settings/knowledge.cssindex dfe68b80..51f576ca 100644--- a/apps/web/src/settings/knowledge.css+++ b/apps/web/src/settings/knowledge.css@@ -12,10 +12,6 @@padding: 6px 0;border-top: 1px solid var(--line);}-.kn-service {- border-top: 0;- padding: 3px 0;-}.kn-row:first-child {border-top: 0;padding-top: 0;@@ -41,52 +37,12 @@ a.kn-sub {a.kn-sub:hover {text-decoration: underline;}-.kn-actions {- display: flex;- gap: 6px;- flex: none;- padding-top: 22px;-}-.kn-svc-fields {- display: grid;- grid-template-columns: minmax(0, 1fr) 130px;- gap: 6px;- flex: 1;- min-width: 0;-}-.kn-svc-fields .kn-desc {- grid-column: 1 / -1;-}-/* A compact row opened for editing: its fields under the row's line. */-.kn-edit {- padding: 4px 0 8px;-}-.kn-untitled {- color: var(--ink-muted);- font-weight: 400;-}-.kn-price-tag {- font-size: 13px;- font-variant-numeric: tabular-nums;- white-space: nowrap;-}.kn-answer {display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;overflow: hidden;}-.kn-faq-fields {- display: grid;- gap: 6px;- flex: 1;- min-width: 0;-}-.kn-faq-fields .ta {- min-height: 32px;- field-sizing: content;- resize: none;-}.kn-review-block {display: grid;gap: 6px;@@ -107,26 +63,13 @@ a.kn-sub:hover {margin-top: 3px;accent-color: var(--ink);}-.kn-pick > span:not(.kn-tag) {+.kn-pick > span {flex: 1;min-width: 0;}.kn-pick b {font-weight: 500;}-.kn-tag {- flex: none;- padding: 0 6px;- border-radius: 4px;- background: var(--surface-hover);- color: var(--ink-muted);- font-size: 11px;- font-weight: 500;- line-height: 18px;-}-.kn-was {- color: var(--ink-muted);-}.kn-about-text {margin: 0 0 0 24px;padding: 10px 12px;@@ -144,23 +87,10 @@ a.kn-sub:hover {color: var(--ink-muted);text-decoration: line-through;}-.kn-foot {- display: flex;- justify-content: flex-end;- gap: 8px;- padding-top: 12px;- border-top: 1px solid var(--line);-}@media (max-width: 559px) {- .kn-svc-fields {- grid-template-columns: minmax(0, 1fr) 110px;- }.kn-row.kn-question {flex-wrap: wrap;}- .kn-actions {- padding-top: 0;- }}.kn-about-note {margin: 0 0 0 24px;@@ -180,15 +110,6 @@ a.kn-sub:hover {margin-bottom: 6px;font-weight: 500;}-.ww-result {- display: grid;- gap: 0;-}-.ww-scroll {- max-height: min(60vh, 560px);- overflow-y: auto;- padding-right: 4px;-}/* Business info as two parts (LIN-724): the business's own text and the questions and answers, with Try a question,a list to search and filter, and one question in a panel beside the page. */@@ -252,89 +173,26 @@ a.kn-sub:hover {color: var(--warning);}.kn-chip:focus-visible,-.kn-qrow:focus-visible,.kn-try-from:focus-visible {outline: 2px solid var(--focus);outline-offset: 1px;}+/* Questions and answers: ListLines (ui/FeatureLine.tsx) divided by hairlines; an answer shows on one line. */.kn-qlist {display: grid;- overflow: hidden;- border: 1px solid var(--line);- border-radius: var(--radius-md);}-.kn-qrow {- display: flex;- align-items: flex-start;- gap: var(--space-3);- width: 100%;- padding: 10px var(--space-3);- border: 0;- border-top: 1px solid var(--line);- background: var(--surface);- color: inherit;- font: inherit;- text-align: left;- cursor: pointer;-}-.kn-qrow:first-child {- border-top: 0;-}-.kn-qrow:hover,-.kn-qrow.is-at {- background: var(--surface-hover);-}-.kn-qrow.is-at {- box-shadow: inset 2px 0 0 var(--ink);-}-.kn-qrow-main {- display: grid;- flex: 1;- gap: 3px;- min-width: 0;-}-.kn-qrow-main b {- font-weight: 500;- overflow-wrap: anywhere;-}-.kn-qrow-answer {+.kn-q .k-setrow-text > .help {display: -webkit-box;overflow: hidden;- color: var(--ink-muted);- font-size: 13px;-webkit-line-clamp: 1;-webkit-box-orient: vertical;}-.kn-qrow-tags {- display: flex;- flex-wrap: wrap;- gap: 6px;-}-.kn-qedit {- display: grid;- gap: var(--space-3);- padding: var(--space-3);- border-top: 1px solid var(--line);- background: var(--surface);- box-shadow: inset 2px 0 0 var(--ink);-}-.kn-qedit:first-child {- border-top: 0;-}.kn-qedit-foot {display: flex;align-items: center;justify-content: space-between;gap: var(--space-2);}-.kn-pfield {- display: grid;- gap: 4px;-}-.kn-pfield > label {- font-size: 13px;- font-weight: 500;-}.kn-issue {display: flex;align-items: center;@@ -402,15 +260,6 @@ a.kn-sub:hover {margin-top: var(--space-4);}-/* Open questions as the first rows of the list (LIN-797): an amber edge while one is open to answer. */-.kn-qedit.kn-open-edit {- box-shadow: inset 2px 0 0 var(--warning);-}--/* Suggestions from the support mail review (LIN-809): a blue edge while one is open; Show more under long lists. */-.kn-qedit.kn-sugg-open {- box-shadow: inset 2px 0 0 var(--info);-}.kn-chip.is-info:not(.is-on) {border-color: var(--info-soft);background: var(--info-soft);diff --git a/apps/web/src/settings/realtimeVoice.test.tsx b/apps/web/src/settings/realtimeVoice.test.tsxindex 41067216..c6e7cad8 100644--- a/apps/web/src/settings/realtimeVoice.test.tsx+++ b/apps/web/src/settings/realtimeVoice.test.tsx@@ -52,16 +52,16 @@ function picker(voice: string, language = 'en') {describe('the realtime voice picker', () => {it("lists the server's default voice first, checked while the assistant picked none, then OpenAI's recommended ones", () => {expect(rowsOf(picker(''))).toEqual([- { name: 'Cedar (default)', facts: 'Native English', checked: true },- { name: 'Marin', facts: 'Native English', checked: false },+ { name: 'Cedar', facts: '', checked: true },+ { name: 'Marin', facts: '', checked: false },])})it('shows the picked voice as checked, also one that is not suggested', () => {expect(rowsOf(picker('marin')).find(r => r.checked)?.name).toBe('Marin')const ash = rowsOf(picker('ash'))- expect(ash.find(r => r.checked)).toEqual({ name: 'Ash', facts: 'Native English', checked: true })- expect(ash[0]).toMatchObject({ name: 'Cedar (default)', checked: false })+ expect(ash.find(r => r.checked)).toEqual({ name: 'Ash', facts: '', checked: true })+ expect(ash[0]).toMatchObject({ name: 'Cedar', checked: false })// The default voice picked by name: its own row is the checked one, next to the default row.expect(rowsOf(picker('cedar'))@@ -72,7 +72,7 @@ describe('the realtime voice picker', () => {it('says the voices speak another main language with the accent of their own, English (no gender claimed)', () => {expect(rowsOf(picker('', 'de'))[0]).toEqual({- name: 'Cedar (default)',+ name: 'Cedar',facts: 'German with an English accent',checked: true,})diff --git a/apps/web/src/settings/summaryModel.test.ts b/apps/web/src/settings/summaryModel.test.tsindex 6ea49a3e..69eed9a6 100644--- a/apps/web/src/settings/summaryModel.test.ts+++ b/apps/web/src/settings/summaryModel.test.ts@@ -3,16 +3,7 @@ import { fmt } from '../i18n/format.ts'import { i18n } from '../i18n/index.tsx'import type { SummarySentence } from '../ui/SummaryCard.tsx'import type { TransferDraft } from './assistantDraft.ts'-import { dayRows } from './businessHoursModel.ts'-import type { UpcomingDay } from './closedDaysModel.ts'-import {- hoursSummary,- nextClosedDay,- notificationsSummary,- rulesSummary,- type Summary,- transfersSummary,-} from './summaryModel.ts'+import { notificationsSummary, type Summary, transfersSummary } from './summaryModel.ts'/** A sentence as plain text: lists joined as the card joins them, tags (bold, a link) as their words. */function text(sentence: SummarySentence | null): string {@@ -28,71 +19,6 @@ function text(sentence: SummarySentence | null): string {}const all = (s: Summary) => s.sentences.map(text).join(' ')-const today = '2026-11-16'-const week = dayRows([- ...[1, 2, 3, 4, 5].map(weekday => ({ weekday, start: '08:00', end: '18:00' })),- { weekday: 6, start: '09:00', end: '13:00' },-])-const day = (date: string, name: string, more: Partial<UpcomingDay> = {}): UpcomingDay => ({- date,- name,- start: null,- end: null,- kind: 'holiday',- key: name,- yearly: false,- changed: false,- ...more,-})-const hours = { name: 'Maya', on: true, days: week, upcoming: [], closure: null, today, outsideGreeting: false }--test('hours: the open days grouped, the next closed day, vacation mode', () => {- expect(all(hoursSummary(hours))).toBe('You are open Mon–Fri 8:00 AM–6:00 PM and Sat 9:00 AM–1:00 PM.')- const thanksgiving = day('2026-11-26', 'Thanksgiving Day')- expect(all(hoursSummary({ ...hours, upcoming: [thanksgiving], outsideGreeting: true }))).toBe(- 'You are open Mon–Fri 8:00 AM–6:00 PM and Sat 9:00 AM–1:00 PM. Outside these hours, callers hear the after-hours greeting. Next closed day: Thanksgiving Day, Thu, Nov 26.',- )- const closure = { from: '2026-11-14', until: '2026-11-20', greeting: '' }- expect(hoursSummary({ ...hours, closure }).sentences.map(s => s.k)).toEqual([- 'settings.summary.hours.vacationOn',- 'settings.summary.hours.open',- ])- expect(text(hoursSummary({ ...hours, closure }).sentences[0]!)).toBe(- 'Vacation mode is on until Fri, Nov 20: Maya takes a message on every call.',- )- const later = { from: '2026-12-21', until: '2026-12-31', greeting: '' }- expect(text(hoursSummary({ ...hours, closure: later }).sentences.at(-1)!)).toBe(- 'Vacation mode is set for Mon, Dec 21 to Thu, Dec 31.',- )- // An ended closure says nothing.- expect(hoursSummary({ ...hours, closure: { ...closure, until: '2026-11-15' } }).sentences).toHaveLength(1)-})--test('hours: only closed days within 30 days, never a day opened this year', () => {- expect(nextClosedDay([day('2026-12-25', 'Christmas Day')], today)).toBeNull()- expect(nextClosedDay([day('2026-11-26', 'Thanksgiving Day', { kind: 'opened' })], today)).toBeNull()- const short = day('2026-11-27', '', { kind: 'own', start: '08:00', end: '12:00' })- expect(text(hoursSummary({ ...hours, upcoming: [short] }).sentences[1]!)).toBe(- 'Shorter hours on Fri, Nov 27: open 8:00 AM–Noon.',- )- expect(text(hoursSummary({ ...hours, upcoming: [day('2026-11-27', '', { kind: 'own' })] }).sentences[1]!)).toBe(- 'Next closed day: Fri, Nov 27.',- )-})--test('hours: none set is fine, never "Needs you"; off says so', () => {- const none = hoursSummary({ ...hours, days: dayRows([]) })- expect(all(none)).toBe('No business hours: Maya answers every call the same way, at any time.')- expect(none.needsYou).toBeNull()- const off = hoursSummary({ ...hours, on: false })- expect(all(off)).toBe('Business hours are off: Maya answers every call the same way, at any time.')- expect(off.needsYou).toBeNull()- // Closed days count only while hours are used: off names none, even with one coming up (LIN-692).- expect(all(hoursSummary({ ...hours, on: false, upcoming: [day('2026-11-26', 'Thanksgiving Day')] }))).not.toMatch(- /closed day/i,- )-})-const contact = (name: string, more: Partial<TransferDraft> = {}): TransferDraft => ({id: name,name,@@ -180,50 +106,3 @@ test('notifications: what you get and how', () => {)expect(all(notificationsSummary({ ...notify, email: false }))).toBe('You get no notifications.')})--test('rules: the demo defaults', () => {- const behaviours = {- ask_name: true,- offer_callback: true,- confirm_number: false,- caller_history: true,- ask_booking_name: false,- verified_caller_only: true,- }- expect(all(rulesSummary({ name: 'Maya', style: 'standard', disclosure: 'when_asked', behaviours }))).toBe(- "Maya speaks in its standard tone and says it is an AI only when asked. Maya asks for the caller's name, offers a callback when it can't answer, knows the caller's previous calls, and recognizes callers only when their carrier verified the number.",- )-})--test('rules: another tone, AI at the start, every switch off', () => {- const off = {- ask_name: false,- offer_callback: false,- confirm_number: false,- caller_history: false,- ask_booking_name: false,- verified_caller_only: false,- }- const s = rulesSummary({ name: 'Maya', style: 'formal', disclosure: 'at_start_consent', behaviours: off })- expect(all(s)).toBe(- 'Maya sounds formal and factual and says at the start that it is an AI and asks the caller to agree. All switches of the checklist are off.',- )- expect(s.needsYou).toBeNull()-})--test('rules: the AI disclosure modes that do not say it on their own', () => {- const off = {- ask_name: false,- offer_callback: false,- confirm_number: false,- caller_history: false,- ask_booking_name: false,- verified_caller_only: false,- }- expect(- all(rulesSummary({ name: 'Maya', style: 'standard', disclosure: 'never_confirm', behaviours: off })),- ).toContain('never says it is an AI, not even when asked')- expect(all(rulesSummary({ name: 'Maya', style: 'standard', disclosure: 'never', behaviours: off }))).toContain(- "doesn't bring up that it is an AI",- )-})diff --git a/apps/web/src/settings/summaryModel.ts b/apps/web/src/settings/summaryModel.tsindex d0cf98b1..806557d7 100644--- a/apps/web/src/settings/summaryModel.ts+++ b/apps/web/src/settings/summaryModel.ts@@ -1,132 +1,14 @@-// The summary cards of Hours & holidays, Rules, Transfers and Notifications without React (LIN-392, LIN-443): what the page's+// The summary cards of Transfers and Notifications without React (LIN-392, LIN-443): what the page's// settings do, as sentences (a message key and its values) for SummaryCard, and what needs the owner. Each reads// the same state as its page, so the card changes with every edit.-import { type AiDisclosure, BEHAVIOURS, type BehaviourId, type CommunicationStyle } from '@linedesk/actions'-import type { Closure } from '@linedesk/db/types'import { msg } from '@linedesk/i18n'import { i18n } from '../i18n/index.tsx'import type { SummarySentence } from '../ui/SummaryCard.tsx'-import { type DayHours, timeOptionLabel, weekGroups } from './businessHoursModel.ts'import type { TransferDraft } from './assistantDraft.ts'import type { ContactWho } from './transferOwner.ts'-import { addDays, closureState, shortDate, type UpcomingDay } from './closedDaysModel.ts'export type Summary = { sentences: SummarySentence[]; needsYou: SummarySentence | null }-/** A date that never breaks over two lines: "Thu, Nov 26". */-const dateOf = (date: string, today: string) => shortDate(date, today).replace(/ /g, '\u00a0')--/** How far ahead the hours card names the next closed day. */-export const NEXT_CLOSED_DAYS = 30--// ----------------------------------------------------------------------------------------------------------------// Hours & holidays--type HoursInput = {- /** The assistant's name. */- name: string- /** The workspace uses business hours. */- on: boolean- days: readonly DayHours[]- /** The closed days from today on (upcomingDays). */- upcoming: readonly UpcomingDay[]- closure: Closure | null- /** Today in the workspace's time zone (YYYY-MM-DD). */- today: string- /** The assistant has its own greeting for outside business hours. */- outsideGreeting: boolean-}--/** The first closed day (or day with shorter hours) within the next NEXT_CLOSED_DAYS days; none: null. */-export function nextClosedDay(upcoming: readonly UpcomingDay[], today: string): UpcomingDay | null {- const last = addDays(today, NEXT_CLOSED_DAYS)- return upcoming.find(d => d.kind !== 'opened' && d.date >= today && d.date <= last) ?? null-}--function closedDaySentence(day: UpcomingDay, today: string): SummarySentence {- const date = dateOf(day.date, today)- if (day.start && day.end)- return {- k: msg('settings.summary.hours.nextShorter'),- values: {- date,- hours: i18n().t('settings.hours.range', { start: timeOptionLabel(day.start), end: timeOptionLabel(day.end) }),- },- }- return day.name- ? { k: msg('settings.summary.hours.nextClosedNamed'), values: { date, day: day.name } }- : { k: msg('settings.summary.hours.nextClosed'), values: { date } }-}--function closureSentence(closure: Closure | null, today: string, name: string): SummarySentence | null {- if (!closure) return null- const state = closureState(closure, today)- if (state === 'on')- return { k: msg('settings.summary.hours.vacationOn'), values: { name, until: dateOf(closure.until, today) } }- if (state === 'scheduled')- return {- k: msg('settings.summary.hours.vacationScheduled'),- values: { from: dateOf(closure.from, today), until: dateOf(closure.until, today) },- }- return null-}--/** "You are open Mon–Fri 8:00 AM–6:00 PM and Sat 9:00 AM–1:00 PM. Next closed day: Thanksgiving Day, Thu, Nov 26." */-export function hoursSummary({ name, on, days, upcoming, closure, today, outsideGreeting }: HoursInput): Summary {- const groups = weekGroups(days)- const sentences: SummarySentence[] = []- const vacation = closureSentence(closure, today, name)- if (vacation && closureState(closure!, today) === 'on') sentences.push(vacation)- if (!groups.length) sentences.push({ k: msg('settings.summary.hours.none'), values: { name } })- else if (!on) sentences.push({ k: msg('settings.summary.hours.off'), values: { name } })- else {- sentences.push({ k: msg('settings.summary.hours.open'), values: { hours: groups } })- if (outsideGreeting) sentences.push({ k: msg('settings.summary.hours.outsideGreeting') })- }- // Closed days count only while hours are used (businessHoursFor), so they are named only then (LIN-692).- const next = on && groups.length ? nextClosedDay(upcoming, today) : null- if (next) sentences.push(closedDaySentence(next, today))- if (vacation && !sentences.includes(vacation)) sentences.push(vacation)- // No business hours is a choice, not a problem: the assistant answers every call the same way.- return { sentences, needsYou: null }-}--// ----------------------------------------------------------------------------------------------------------------// Rules--type RulesInput = {- name: string- style: CommunicationStyle- disclosure: AiDisclosure- /** The checklist as the draft holds it: every switch, on or off. */- behaviours: Readonly<Record<BehaviourId, boolean>>-}--/** What each switch of the checklist does, as a part of "Maya asks for the caller's name, …". */-const RULE_ITEMS = {- ask_name: msg('settings.summary.rules.item.askName'),- offer_callback: msg('settings.summary.rules.item.offerCallback'),- confirm_number: msg('settings.summary.rules.item.confirmNumber'),- caller_history: msg('settings.summary.rules.item.callerHistory'),- ask_booking_name: msg('settings.summary.rules.item.askBookingName'),- verified_caller_only: msg('settings.summary.rules.item.verifiedCallerOnly'),-} as const satisfies Record<BehaviourId, unknown>--/** "Maya speaks in its standard tone and says it is an AI only when asked. Maya asks for the caller's name, …" */-export function rulesSummary({ name, style, disclosure, behaviours }: RulesInput): Summary {- const { t } = i18n()- const items = BEHAVIOURS.filter(b => behaviours[b.id]).map(b => t(RULE_ITEMS[b.id]))- return {- sentences: [- { k: msg('settings.summary.rules.tone'), values: { name, style, disclosure } },- items.length- ? { k: msg('settings.summary.rules.does'), values: { name, items } }- : { k: msg('settings.summary.rules.none') },- ],- needsYou: null,- }-}-// ---------------------------------------------------------------------------------------------------------------// Transfersdiff --git a/apps/web/src/settings/transferBriefing.test.tsx b/apps/web/src/settings/transferBriefing.test.tsxindex d5034f24..9807659d 100644--- a/apps/web/src/settings/transferBriefing.test.tsx+++ b/apps/web/src/settings/transferBriefing.test.tsx@@ -64,16 +64,18 @@ test('briefing off: no consent hint, the row says what changes and that the callexpect(render(contact({ briefing: false }), false)).toContain('Rings 25s, then a message, put straight through')})-test('a contact just added: a Remove next to Done, no status yet, a placeholder that reads as an example', () => {+test('a contact just added: Close on its row, Remove under its fields, no status yet, an example placeholder', () => {const blank = contact({ name: '', number: '', condition: '' })const html = render(blank, true, true)- expect(html).toMatch(/>Remove<\/span><\/button><button[^>]*><span>Done</)+ expect(html).toContain('<span>Close</span>')+ expect(html).toContain('>Remove</span>')+ expect(html).not.toContain('Move up')expect(html).not.toContain(NO_NUMBER)expect(html).toContain('placeholder="e.g. Office"')- // A contact already in the list keeps only the trash button and says why it is not used.- const saved = render(blank, true, false)- expect(saved).not.toContain('>Remove</span>')- expect(saved).toContain(NO_NUMBER)+ // A contact already in the list says why it is not used.+ expect(render(blank, true, false)).toContain(NO_NUMBER)+ // Closed: Change opens it, like every line of settings.+ expect(render(contact(), false)).toContain('<span>Change</span>')})const NO_NUMBER = 'Add a number, or turn this contact off.'@@ -90,7 +92,6 @@ test('switched on without a number: the closed row offers to add it in place, thexpect(closed).toContain('<button type="button" class="k-link">Add a number</button>')expect(closed).not.toContain(NO_NUMBER)expect(closed).not.toContain('No number')- expect(closed).not.toContain('tc-status')expect(closed).not.toContain('Move up')// The owner's contact for the owner themself: their name, "You" and "Add your mobile number".const mine = renderToStaticMarkup(@@ -112,14 +113,39 @@ test('switched on without a number: the closed row offers to add it in place, thonRemove={noop}/>,)- expect(mine).toContain('<b>Mike Brennan</b>')- expect(mine).toContain('>You</span>')+ expect(mine).toContain('Mike Brennan<span class="k-setrow-aside">You</span>')expect(mine).toContain('Add your mobile number')- // Switched off: the "Off" chip, no note.+ // Switched off: the row greyed out (its switch says it), no note.const off = render(contact({ number: '', enabled: false }), false)- expect(off).toContain('>Off</span>')+ expect(off).toContain('is-dimmed')expect(off).not.toContain(NO_NUMBER)// Added during this visit: only once the number field was left.expect(render(missing, true, false, { added: true })).not.toContain(NO_NUMBER)expect(render(missing, true, false, { added: true, numberLeft: true })).toContain(NO_NUMBER)})++test("the owner's contact: its Name field says the owner's name, as its row does", () => {+ const owner = contact({ id: 'owner', name: 'Owner' })+ const html = renderToStaticMarkup(+ <ContactRow+ contact={owner}+ who={{ name: 'Mike Brennan', you: false }}+ index={0}+ count={1}+ open+ problem={null}+ hoursOn={false}+ numberTip=""+ defaultCountry="US"+ onToggle={noop}+ onClose={noop}+ onLeave={noop}+ onChange={noop}+ onMove={noop}+ onRemove={noop}+ />,+ )+ expect(html).toContain('<b class="k-setrow-title">Mike Brennan')+ expect(html).toMatch(/id="tc-0-name"[^>]*value="Mike Brennan"/)+ expect(html).not.toContain('value="Owner"')+})diff --git a/apps/web/src/settings/voiceModel.test.ts b/apps/web/src/settings/voiceModel.test.tsindex 62fd1f55..6ec3593d 100644--- a/apps/web/src/settings/voiceModel.test.ts+++ b/apps/web/src/settings/voiceModel.test.ts@@ -111,8 +111,8 @@ describe('voice picker', () => {{ value: 'de', label: 'German' },])expect(facetValues(voices, 'accent').map(f => f.label)).toEqual(['American', 'British'])- expect(voiceFacts(voices[3]!, 'en', [], 'Cartesia')).toBe('Male · British · Native English · Cartesia')- expect(voiceFacts(voices[2]!, 'en')).toBe('Female · Native English')+ expect(voiceFacts(voices[3]!, 'en', [], 'Cartesia')).toBe('Male · British · Cartesia')+ expect(voiceFacts(voices[2]!, 'en')).toBe('Female')expect(voiceFacts(voices[1]!, 'en')).toBe('Female · English with a German accent')expect([...voices].sort(byLanguageFit('en')).map(v => v.name)).toEqual(['Brooke', 'Jessica', 'Ronald', 'Lea'])expect([...voices].sort(byLanguageFit('de')).map(v => v.name)).toEqual(['Lea', 'Brooke', 'Jessica', 'Ronald'])@@ -296,7 +296,7 @@ describe('voices and the assistant’s languages', () => {const clone = voice('Mine', [])it('each row says how the voice speaks the main language', () => {- expect(languageLabel(lena, 'de')).toBe('Native German')+ expect(languageLabel(lena, 'de')).toBeNull()expect(languageLabel(jessica, 'de')).toBe('German with an American accent')expect(languageLabel(lucia, 'de')).toBe('German with a Latin American accent')// Cartesia's own accent for the language says more than the voice's; "a German accent" for German says nothing.@@ -309,7 +309,7 @@ describe('voices and the assistant’s languages', () => {)expect(languageLabel(voice('Odd', [{ code: 'de', accent: null, native: false }]), 'de')).toBe('German, non-native')expect(languageLabel(clone, 'de')).toBeNull()- expect(languageLabel(jessica, 'en')).toBe('Native English')+ expect(languageLabel(jessica, 'en')).toBeNull()})it('older data (language and accent only) is read as that language, native', () => {diff --git a/apps/web/src/settings/voiceModel.ts b/apps/web/src/settings/voiceModel.tsindex 0e776490..86655ab8 100644--- a/apps/web/src/settings/voiceModel.ts+++ b/apps/web/src/settings/voiceModel.ts@@ -303,7 +303,8 @@ function accentFor(v: PickerVoice, main: string): string | null {/*** Which of the assistant's languages the voice performs, for the muted line of its row, the main language first:- * "Native German · English" ("Native" on the voice's own language). The main language when it can't perform it: how+ * "Dutch · Native German" ("Native" on the voice's own language); a voice of the main language names only the others+ * ("English"), or nothing. The main language when it can't perform it: how* it speaks it, "German with an American accent", or "German, non-native" when its accent can't be told. null when the* provider says nothing about the voice's languages (a cloned voice).*/@@ -326,7 +327,9 @@ export function languageLabel(v: PickerVoice, main: string, others: readonly str: t('settings.voice.language.nonNative', { language: languageName(main) })}const more = others.filter(code => code !== main && canPerform(v, code)).map(named)- return [first, ...more].join(' · ')+ // A voice of the main language says nothing about it: "Native English" on every row is noise (settings audit).+ const parts = own === main && canPerform(v, main) ? more : [first, ...more]+ return parts.length ? parts.join(' · ') : null}/** "German", "German and English", "German, Dutch, and English", in the reader's language. */diff --git a/apps/web/src/settings/voiceNativeFirst.test.tsx b/apps/web/src/settings/voiceNativeFirst.test.tsxindex b718257e..07a70032 100644--- a/apps/web/src/settings/voiceNativeFirst.test.tsx+++ b/apps/web/src/settings/voiceNativeFirst.test.tsx@@ -59,7 +59,8 @@ describe('Suggested voices for a German assistant', () => {// The language's default voice (languageDefaultVoices) on top, then the voices recorded in German.expect(names[0]).toBe('Susi')expect(names.slice(1, 4).sort()).toEqual(['Alexandra', 'Jonas', 'Lena - Customer Support'])- expect(html).toContain('Native German')+ // A voice of the main language says nothing about it: no "Native German" on every row.+ expect(html).not.toContain('Native German')expect(html).not.toContain('American accent')})@@ -95,8 +96,9 @@ describe('Suggested voices for a German assistant', () => {it('an English assistant never waits for the list: the curated voices at once', () => {const { html, names } = card('en')- expect(names).toEqual(['Jessica (default)', 'Eric'])- expect(html).toContain('Native English')+ expect(names).toEqual(['Jessica', 'Eric'])+ expect(html).toContain('>Default<')+ expect(html).not.toContain('Native English')})it('the Business step can read the list ahead, for the assistant step after it', async () => {diff --git a/apps/web/src/settings/voiceSwitch.test.tsx b/apps/web/src/settings/voiceSwitch.test.tsxindex 69070daa..f3971380 100644--- a/apps/web/src/settings/voiceSwitch.test.tsx+++ b/apps/web/src/settings/voiceSwitch.test.tsx@@ -80,24 +80,22 @@ function more(main: string, others: string[] = []) {describe('labels: which of the assistant’s languages a voice performs', () => {const alexandra = byId('alexandra')- it('the voice’s own language is "Native", the others it is verified in are named, the main language first', () => {- expect(languageLabel(alexandra, 'de')).toBe('Native German')+ it('the voice’s own language is "Native" unless it is the main language, the others it is verified in are named, the main language first', () => {+ expect(languageLabel(alexandra, 'de')).toBeNull()expect(languageLabel(alexandra, 'nl')).toBe('Dutch')expect(languageLabel(alexandra, 'pt')).toBe('Portuguese')- expect(languageLabel(alexandra, 'de', ['nl', 'pt', 'en'])).toBe('Native German · Dutch · Portuguese')+ expect(languageLabel(alexandra, 'de', ['nl', 'pt', 'en'])).toBe('Dutch · Portuguese')expect(languageLabel(alexandra, 'nl', ['de'])).toBe('Dutch · Native German')- expect(languageLabel(byId('lena'), 'de', ['en'])).toBe('Native German · English')+ expect(languageLabel(byId('lena'), 'de', ['en'])).toBe('English')expect(languageLabel(byId('beatriz'), 'en', ['pt'])).toBe('English · Native Portuguese')})it('a main language it can’t perform says how it speaks it; a non-native Cartesia accent does not count', () => {expect(languageLabel(alexandra, 'en', ['nl'])).toBe('English with an Austrian accent · Dutch')expect(languageLabel(byId('klaus'), 'en')).toBe('English with a German accent')- expect(languageLabel(byId('klaus'), 'de', ['en'])).toBe('Native German')+ expect(languageLabel(byId('klaus'), 'de', ['en'])).toBeNull()})it('facts: gender, the accent of the main language where it performs it, the languages, the provider', () => {- expect(voiceFacts(alexandra, 'de', ['nl'], 'ElevenLabs')).toBe(- 'Female · Austrian · Native German · Dutch · ElevenLabs',- )+ expect(voiceFacts(alexandra, 'de', ['nl'], 'ElevenLabs')).toBe('Female · Austrian · Dutch · ElevenLabs')expect(voiceFacts(alexandra, 'nl')).toBe('Female · Dutch')})it('a voice listed once per language (an older catalog) is one voice with every language', () => {@@ -132,11 +130,11 @@ describe('switching the assistant’s languages several times in a row', () => {expect(suggested(voice, 'de')).toEqual({rows: [// German's default voice (languageDefaultVoices) is always offered on top.- { name: 'Susi', facts: 'Female · Native German', checked: false },- { name: 'Lena - Customer Support', facts: 'Female · Native German', checked: true },- { name: 'Alexandra', facts: 'Female · Austrian · Native German', checked: false },- { name: 'Jonas', facts: 'Male · Native German', checked: false },- { name: 'Klaus', facts: 'Male · Native German', checked: false },+ { name: 'Susi', facts: 'Female', checked: false },+ { name: 'Lena - Customer Support', facts: 'Female', checked: true },+ { name: 'Alexandra', facts: 'Female · Austrian', checked: false },+ { name: 'Jonas', facts: 'Male', checked: false },+ { name: 'Klaus', facts: 'Male', checked: false },],note: null,})@@ -150,27 +148,23 @@ describe('switching the assistant’s languages several times in a row', () => {expect(step.notice).toBe('Voice changed to Alexandra: speaks Dutch natively.')// Suggested: Dutch's default voice, then the voices recorded in Dutch, then Alexandra (recorded in German).expect(suggested(voice, 'nl').rows).toEqual([- { name: 'Noa', facts: 'Female · Native Dutch', checked: false },- { name: 'Daan', facts: 'Male · Native Dutch', checked: false },- { name: 'Sanne', facts: 'Female · Native Dutch', checked: false },+ { name: 'Noa', facts: 'Female', checked: false },+ { name: 'Daan', facts: 'Male', checked: false },+ { name: 'Sanne', facts: 'Female', checked: false },{ name: 'Alexandra', facts: 'Female · Dutch', checked: true },])const dutch = more('nl')expect(dutch.html).toContain('>Dutch<')expect(dutch.html).not.toContain('German')expect(dutch.names).toEqual(['Alexandra', 'Daan', 'Sanne'])- expect(dutch.facts).toEqual([- 'Female · Dutch · ElevenLabs',- 'Male · Native Dutch · ElevenLabs',- 'Female · Native Dutch · ElevenLabs',- ])+ expect(dutch.facts).toEqual(['Female · Dutch · ElevenLabs', 'Male · ElevenLabs', 'Female · ElevenLabs'])// Portuguese: Alexandra is verified in it too, so she stays; no notice.step = change(voice, 'pt')expect(step).toEqual({ voice, notice: null })expect(suggested(voice, 'pt').rows).toEqual([- { name: 'Raquel', facts: 'Female · Native Portuguese', checked: false },- { name: 'Beatriz', facts: 'Female · Brazilian · Native Portuguese', checked: false },+ { name: 'Raquel', facts: 'Female', checked: false },+ { name: 'Beatriz', facts: 'Female · Brazilian', checked: false },{ name: 'Alexandra', facts: 'Female · Portuguese', checked: true },])expect(more('pt').html).not.toMatch(/Dutch|German/)@@ -181,8 +175,8 @@ describe('switching the assistant’s languages several times in a row', () => {expect(voice).toEqual({ provider: 'elevenlabs', voice_id: '' })expect(step.notice).toBe('Voice changed to Jessica: speaks English natively.')expect(suggested(voice, 'en').rows[0]).toEqual({- name: 'Jessica (default)',- facts: 'Native English',+ name: 'Jessica',+ facts: '',checked: true,})expect(suggested(voice, 'en').rows.some(r => /Dutch|Portuguese|German/.test(r.facts))).toBe(false)@@ -197,7 +191,7 @@ describe('switching the assistant’s languages several times in a row', () => {expect(step).toEqual({ voice, notice: null })expect(suggested(voice, 'de', ['en']).rows[0]).toEqual({name: 'Lena - Customer Support',- facts: 'Female · Native German · English',+ facts: 'Female · English',checked: true,})expect(more('de', ['en']).names).toEqual(['Lena - Customer Support'])@@ -209,8 +203,8 @@ describe('switching the assistant’s languages several times in a row', () => {const three = suggested(voice, 'de', ['en', 'nl'])expect(three.note).toBe('No voice is verified in all of German, English, and Dutch; the closest are shown.')expect(three.rows.slice(0, 2)).toEqual([- { name: 'Lena - Customer Support', facts: 'Female · Native German · English', checked: true },- { name: 'Alexandra', facts: 'Female · Austrian · Native German · Dutch', checked: false },+ { name: 'Lena - Customer Support', facts: 'Female · English', checked: true },+ { name: 'Alexandra', facts: 'Female · Austrian · Dutch', checked: false },])// More voices: the closest, the ones that perform German.expect(more('de', ['en', 'nl']).names).toEqual(['Alexandra', 'Lena - Customer Support', 'Jonas', 'Klaus'])@@ -225,7 +219,7 @@ describe('switching the assistant’s languages several times in a row', () => {expect(two.note).toBeNull()expect(two.rows[0]).toEqual({name: 'Alexandra',- facts: 'Female · Austrian · Native German · Dutch',+ facts: 'Female · Austrian · Dutch',checked: true,})@@ -233,7 +227,7 @@ describe('switching the assistant’s languages several times in a row', () => {voice = beforeexpect(suggested(voice, 'de', ['nl']).rows.find(r => r.checked)).toEqual({name: 'Lena - Customer Support',- facts: 'Female · Native German',+ facts: 'Female',checked: true,})diff --git a/apps/web/src/ui/FeatureLine.tsx b/apps/web/src/ui/FeatureLine.tsxindex 46234c26..7df92469 100644--- a/apps/web/src/ui/FeatureLine.tsx+++ b/apps/web/src/ui/FeatureLine.tsx@@ -6,9 +6,9 @@ import { useT } from '@linedesk/i18n/react'import { type ReactNode, useId, useState } from 'react'import { CardInline } from './form.tsx'import { type HelpContent, HelpTip, helpContent } from './HelpTip.tsx'-import { Badge, Button } from './kit.tsx'+import { Badge, Button, cx } from './kit.tsx'import { Skeleton } from './LoadStates.tsx'-import { SettingRow } from './SettingRow.tsx'+import { SettingRow, type SettingRowProps } from './SettingRow.tsx'/*** A line's state in a word or two; null while it loads. `danger` for a state that needs the admin (sign-up closed),@@ -164,3 +164,82 @@ export function useOpenLines<Id extends string>(first: readonly Id[] = []) {export const onOff = (on: boolean | undefined, t: ReturnType<typeof useT>): LineState =>on === undefined ? null : { text: on ? t('admin.features.on') : t('admin.features.off'), on }++type ListLineProps = Omit<SettingRowProps, 'control' | 'as' | 'className'> & {+ open: boolean+ onToggle: () => void+ /** Close or Esc while open, when it does more than fold (a new transfer contact with nothing in it goes away). */+ onClose?: () => void+ /** The button's word when closed: Change, or what opening it is for (Answer, Review). */+ label?: string+ /** The button's name for screen readers when the row's title alone doesn't say it ("Change Mike Brennan"). */+ buttonLabel?: string+ buttonId?: string+ /** Controls before the button (status badges) and after it (the row's switch, at the right end). */+ before?: ReactNode+ after?: ReactNode+ className?: string+ children: ReactNode+}++/**+ * A FeatureLine as one row of a list inside a card (a transfer contact, a question and its answer): the same row and+ * Change/Close, its settings opening under it; rows divided by hairlines, no card of its own (no cards in cards).+ */+export function ListLine({+ open,+ onToggle,+ onClose,+ label,+ buttonLabel,+ buttonId,+ before,+ after,+ className,+ children,+ ...row+}: ListLineProps) {+ const t = useT()+ const bodyId = useId()+ const close = onClose ?? onToggle+ return (+ <div+ role="group"+ aria-label={typeof row.title === 'string' ? row.title : undefined}+ className={cx('k-list-line', open && 'is-open', className)}+ onKeyDown={e => {+ // Esc closes the open row (a list or menu inside it closes first and marks the key as handled).+ if (e.key !== 'Escape' || !open || e.defaultPrevented) return+ e.preventDefault()+ e.stopPropagation()+ close()+ }}+ >+ <SettingRow+ {...row}+ control={+ <>+ {before}+ <Button+ id={buttonId}+ size="sm"+ variant={open ? 'ghost' : 'secondary'}+ aria-expanded={open}+ aria-controls={bodyId}+ aria-label={open ? undefined : buttonLabel}+ onClick={open ? close : onToggle}+ >+ {open ? t('admin.features.close') : (label ?? t('admin.features.change'))}+ </Button>+ {after}+ </>+ }+ />+ {open && (+ <div id={bodyId} className="k-feature-body">+ {children}+ </div>+ )}+ </div>+ )+}diff --git a/apps/web/src/ui/FoldOut.tsx b/apps/web/src/ui/FoldOut.tsxindex e162a916..411a0560 100644--- a/apps/web/src/ui/FoldOut.tsx+++ b/apps/web/src/ui/FoldOut.tsx@@ -16,13 +16,15 @@ type Props = {onToggle?: (open: boolean) => void/** The summary's tooltip. */title?: string+ id?: stringclassName?: stringchildren: ReactNode}-export function FoldOut({ summary, openSummary, open, defaultOpen, onToggle, title, className, children }: Props) {+export function FoldOut({ summary, openSummary, open, defaultOpen, onToggle, title, id, className, children }: Props) {return (<details+ id={id}className={cx('k-fold', className)}open={open ?? defaultOpen}onToggle={e => onToggle?.(e.currentTarget.open)}diff --git a/apps/web/src/ui/SettingRow.tsx b/apps/web/src/ui/SettingRow.tsxindex 23f11c02..be397af1 100644--- a/apps/web/src/ui/SettingRow.tsx+++ b/apps/web/src/ui/SettingRow.tsx@@ -8,7 +8,7 @@ import { cx } from './kit.tsx'import { Skeleton } from './LoadStates.tsx'import './setting-row.css'-type SettingRowProps = {+export type SettingRowProps = {title: ReactNode/** One grey line under the title. */description?: ReactNodediff --git a/apps/web/src/ui/loadingStandard.test.ts b/apps/web/src/ui/loadingStandard.test.tsindex b0f3ac20..69de74a0 100644--- a/apps/web/src/ui/loadingStandard.test.ts+++ b/apps/web/src/ui/loadingStandard.test.ts@@ -79,8 +79,6 @@ const NO_SKELETON_NEEDED: Record<string, string> = {'partner/ClientSettingsDialog.tsx':'the AI keys switch shows only once the partner connected a key; the limit works at once','settings/CarrierNumberInput.tsx': 'the input works at once; the carrier numbers only add suggestions',- 'settings/OpenQuestions.tsx':- 'open questions join the questions and answers list once read; the list itself shows at once (LIN-797)','shell/BillingBanner.tsx': 'the billing line shows only when something about the bill needs the owner','shell/WorkspaceSwitcher.tsx': 'shown only with more than one workspace or an invitation',}diff --git a/apps/web/src/ui/setting-row.css b/apps/web/src/ui/setting-row.cssindex 10a28e7d..2794740e 100644--- a/apps/web/src/ui/setting-row.css+++ b/apps/web/src/ui/setting-row.css@@ -88,6 +88,16 @@padding-top: 12px;border-top: 1px solid var(--line);}+/* ListLine: a FeatureLine as a row of a list inside a card; rows divided by hairlines like SettingRows. */+.k-list-line {+ display: grid;+ gap: 12px;+ min-width: 0;+}+.k-list-line + .k-list-line {+ padding-top: 10px;+ border-top: 1px solid var(--line);+}/* An area's label above its lines (Phone, Voice, …): quiet words, never capitals. */.k-line-group {display: flex;diff --git a/docs/design-principles.md b/docs/design-principles.mdindex 8b41e850..0d6bd54d 100644--- a/docs/design-principles.md+++ b/docs/design-principles.md@@ -50,8 +50,8 @@ Linedesk should feel like a calm, native tool, not a dashboard. These rules comeServer admin and the workspace, assistant and account settings are built from one set of pieces in `ui/`; a page adds its own element only where none of these fits, and says why in a comment.- `SettingRow` (`ui/SettingRow.tsx`): one setting as a row: its name, at most one grey line, its control at the right end (a switch, a select, an sm button, a status badge). Rows in a list are divided by hairlines (`SettingRows`).-- `FeatureLine`, `LinkLine`, `LineGroup` (`ui/FeatureLine.tsx`): a SettingRow in its own card whose Change opens its settings in place, one that opens a page, and the quiet label above a group of them.-- `Card` (`ui/form.tsx`) for every raised section; `FormField` for every labelled control; `SaveBar` for a form of several fields (a switch or a select saves at once).+- `FeatureLine`, `LinkLine`, `ListLine`, `LineGroup` (`ui/FeatureLine.tsx`): a SettingRow in its own card whose Change opens its settings in place, one that opens a page, the same Change/Close as one row of a list inside a card (transfer contacts, questions and answers), and the quiet label above a group of them.+- `Card` (`ui/form.tsx`) for every raised section; `FormField` for every labelled control; `SaveBar` for a form of several fields, only for the open page's own edits (a switch, a select or a pick saves at once, with Undo).- `IdentityCard` (`ui/IdentityCard.tsx`): the workspace's or the person's card on top of General and Profile.- `FilterChips` (`ui/FilterChips.tsx`) above a list; `ColumnHeads` and `ListEmpty` (`ui/list.tsx`) for every list's headings and empty state; `FoldOut` (`ui/FoldOut.tsx`) for what most people don't need.- `DangerConfirmDialog` only for a delete that can't be undone; everything else acts at once with undo (rule 5). Dialog footers: Cancel, then one primary verb.diff --git a/packages/i18n/locales/de/settings.json b/packages/i18n/locales/de/settings.jsonindex 4cb5d045..1501d902 100644--- a/packages/i18n/locales/de/settings.json+++ b/packages/i18n/locales/de/settings.json@@ -50,7 +50,6 @@"assistant.draft.transferConditionMissing": "Gib an, wann Anrufe an diesen Kontakt gehen.","assistant.draft.transferNameMissing": "Gib dem Kontakt einen Namen.","assistant.draft.transferNameTaken": "Ein anderer Kontakt heißt schon „{name}“.",- "assistant.draft.transferOff": "Aus","assistant.draft.transferPresetCondition": "Der Anrufer möchte mit einer Person sprechen","assistant.draft.transferPresetName": "Inhaber","assistant.emails.add": "Person hinzufügen",@@ -128,7 +127,6 @@"assistant.realtimeVoice.body": "Die Standardstimme legt ein Server-Admin unter <link>Server-Admin › Anbieter</link> fest.","assistant.realtimeVoice.title": "Stimme","assistant.rules.changed": "Geändert",- "assistant.rules.description": "Wie Anrufe behandelt werden","assistant.rules.help": "{name} bekommt mit jedem Schalter einen Satz mehr in seine Anweisungen.","assistant.rules.style": "Kommunikationsstil","assistant.rules.styleDescription": "Der Ton, den {name} anschlägt",@@ -172,8 +170,6 @@"assistant.style.professional": "Professionell und freundlich","assistant.style.standard": "Standard","assistant.title": "Assistent",- "assistant.unsavedIn": "Nicht gespeicherte Änderungen in {sections}",- "assistant.unsavedInAndHere": "Nicht gespeicherte Änderungen in {sections} und hier","assistantHeader.added": "{name} hinzugefügt.","assistantHeader.deleteDescription": "Seine Nummern nimmt ab dann {name} an.","assistantHeader.deleteMenu": "{name} löschen…",@@ -541,10 +537,8 @@"calendar.rules.beforeAndAfter": "{before, number} Min. davor, {after, number} Min. danach","calendar.rules.buffer": "{minutes, number} Min. Puffer","calendar.start.body": "Verbinde den Kalender, den du schon nutzt. {name} bietet nur Zeiten an, die dort frei sind, und trägt jede neue Buchung direkt ein. Sonst ändert sich nichts in deinem Kalender.",- "calendar.start.title": "{name} Termine buchen lassen","calendar.suggest.add": "„{name}“ hinzufügen, {duration}","calendar.suggest.label": "Vorgeschlagene Terminarten",- "calendar.suggest.lead": "Vorgeschlagen für {kind}. Ein Klick fügt sie hinzu, ändern kannst du sie danach.","calendar.suggest.type.annual_physical": "Jahres-Check-up","calendar.suggest.type.bookkeeping_review": "Buchhaltungsbesprechung","calendar.suggest.type.buyer_consultation": "Käuferberatung",@@ -1452,16 +1446,11 @@"knowledge.open.badge": "Noch keine Antwort","knowledge.open.filter": "Noch keine Antwort","knowledge.panel.answer": "Antwort",- "knowledge.panel.closeTip": "Fertig (Esc)","knowledge.panel.delete": "Löschen",- "knowledge.panel.done": "Fertig","knowledge.panel.question": "Wenn ein Anrufer fragt",- "knowledge.panel.title": "Frage bearbeiten","knowledge.placeholder": "Wir sind ein familiengeführter Sanitärbetrieb in Portland.\nWir sind in Portland, Beaverton und Lake Oswego tätig.\nKostenvoranschläge vor Ort sind bei uns kostenlos.","knowledge.qa.add": "Hinzufügen","knowledge.qa.addTip": "Eine Frage und ihre Antwort hinzufügen",- "knowledge.qa.editTip": "Diese Frage und Antwort bearbeiten",- "knowledge.qa.empty": "Noch keine Fragen. Fragen von Anrufern, die dein Assistent nicht beantworten kann, erscheinen hier.","knowledge.qa.filter.check": "Zu prüfen","knowledge.qa.noMatch": "Keine Frage passt.","knowledge.qa.search": "Fragen und Antworten durchsuchen",@@ -1474,7 +1463,6 @@"knowledge.sugg.dismissTip": "Nicht nötig: diesen Vorschlag ausblenden","knowledge.sugg.filter": "Vorgeschlagen","knowledge.sugg.from": "{count, plural, one {Aus # Support-Mail} other {Aus # Support-Mails}}",- "knowledge.sugg.openTip": "Eine häufige Frage aus deinen Support-Mails: Prüfe die Antwort und füge sie dann hinzu","knowledge.theAssistant": "der Assistent","knowledge.title": "Über das Unternehmen","knowledge.try.addAsQuestion": "Nicht aus einer Frage unten. Als Frage hinzufügen?",@@ -1629,7 +1617,6 @@"recordings.oneYear": "1 Jahr","recordings.title": "Aufnahmen","review.questions.add": "Antwort hinzufügen",- "review.questions.addTip": "Die Antwort einmal schreiben, für jeden Anrufer","review.questions.added": "Zu „Über das Unternehmen“ hinzugefügt.","review.questions.answerLabel": "Antwort auf: {question}","review.questions.answerPlaceholder": "Deine Antwort",@@ -1714,26 +1701,8 @@"sip.values.label": "Verbindungsdaten für deine Telefonanlage","sip.values.password": "Passwort","sip.values.username": "Benutzername",- "summary.hours.nextClosed": "Nächster geschlossener Tag: <b>{date}</b>.",- "summary.hours.nextClosedNamed": "Nächster geschlossener Tag: <b>{day}</b>, {date}.",- "summary.hours.nextShorter": "Kürzere Öffnungszeiten am <b>{date}</b>: geöffnet {hours}.",- "summary.hours.none": "Keine Öffnungszeiten: {name} behandelt jeden Anruf gleich, zu jeder Uhrzeit.",- "summary.hours.off": "Öffnungszeiten sind aus: {name} behandelt jeden Anruf gleich, zu jeder Uhrzeit.",- "summary.hours.open": "Du hast {hours} geöffnet.",- "summary.hours.outsideGreeting": "Außerhalb dieser Zeiten hören Anrufer die <link>Begrüßung außerhalb der Öffnungszeiten</link>.",- "summary.hours.vacationOn": "Der Urlaubsmodus ist bis <b>{until}</b> an: {name} nimmt bei jedem Anruf eine Nachricht auf.",- "summary.hours.vacationScheduled": "Der Urlaubsmodus ist für <b>{from}</b> bis <b>{until}</b> geplant.","summary.label": "Zusammenfassung","summary.needsYou": "Offen",- "summary.rules.does": "{name} {items}.",- "summary.rules.item.askBookingName": "fragt nach dem Namen der Buchung, bevor er einen Termin ändert",- "summary.rules.item.askName": "fragt nach dem Namen des Anrufers",- "summary.rules.item.callerHistory": "kennt die früheren Anrufe des Anrufers",- "summary.rules.item.confirmNumber": "bestätigt die Rückrufnummer",- "summary.rules.item.offerCallback": "bietet einen Rückruf an, wenn er nicht weiterhelfen kann",- "summary.rules.item.verifiedCallerOnly": "erkennt Anrufer nur, wenn ihr Netzbetreiber die Nummer bestätigt hat",- "summary.rules.none": "Alle Schalter der Checkliste sind aus.",- "summary.rules.tone": "{name} <b>{style, select, professional {klingt professionell und freundlich} casual {klingt locker und entspannt} formal {klingt förmlich und sachlich} empathetic {klingt einfühlsam und herzlich} other {spricht im Standardton}}</b> und <b>{disclosure, select, never_confirm {sagt nie, dass er eine KI ist, auch nicht auf Nachfrage} never {erwähnt nicht von sich aus, dass er eine KI ist} at_start {sagt zu Beginn des Anrufs, dass er eine KI ist} at_start_consent {sagt zu Beginn, dass er eine KI ist, und bittet den Anrufer um Zustimmung} other {sagt nur auf Nachfrage, dass er eine KI ist}}</b>.","summary.transfers.allHoursOnly": "Außerhalb der Öffnungszeiten wird niemand durchgestellt.","summary.transfers.hoursOnly": "{count, plural, one {{contacts} nimmt Anrufe nur während der Öffnungszeiten an.} other {{contacts} nehmen Anrufe nur während der Öffnungszeiten an.}}","summary.transfers.noNumber": "{count, plural, one {{contacts} hat keine Nummer, deshalb überspringt {name} diesen Kontakt.} other {{contacts} haben keine Nummer, deshalb überspringt {name} sie.}}",@@ -1806,9 +1775,6 @@"transfer.consent": "Füge nur Personen hinzu, die zugestimmt haben, durchgestellte Anrufe zu bekommen. Jeder beginnt mit einer kurzen Ansage einer KI-Stimme.","transfer.defaultName": "Inhaber","transfer.description": "An wen Anrufer durchgestellt werden und wann. Passen mehrere, wird von oben nach unten probiert.",- "transfer.done": "Fertig",- "transfer.doneTip": "Diesen Kontakt schließen (Esc); „Speichern“ übernimmt die Änderungen",- "transfer.edit": "Bearbeiten","transfer.empty": "Keine Kontakte zum Weiterverbinden: {name} nimmt bei jedem Anruf eine Nachricht auf.","transfer.example.billing": "Fragen zur Rechnung","transfer.example.billingCondition": "Fragen zur Rechnung",@@ -1835,7 +1801,6 @@"transfer.numberTip": "Ein Handy oder Festnetzanschluss: das eigene Telefon der Person, keine {brand}-Nummer.","transfer.numberTipIn": "Ein Handy oder Festnetzanschluss in {countries}: das eigene Telefon der Person, keine {brand}-Nummer.","transfer.remove": "Entfernen",- "transfer.removeName": "{name} entfernen","transfer.ringFor": "Klingeln lassen","transfer.ringSeconds": "{count, plural, one {# Sekunde} other {# Sekunden}}","transfer.setHours": "Öffnungszeiten festlegen",@@ -1873,8 +1838,6 @@"voice.curated.smoothTrustworthy": "Sanft und vertrauenswürdig, männlich","voice.curated.warmBright": "Warm und hell, weiblich","voice.default": "Standardstimme",- "voice.defaultNamed": "{name} (Standard)",- "voice.defaultNote": "{name} spricht mit ihr, solange du keine andere wählst.","voice.filter.accent": "Akzent","voice.filter.allLanguages": "Alle Sprachen","voice.filter.allProviders": "Alle Anbieter",diff --git a/packages/i18n/locales/en/settings.json b/packages/i18n/locales/en/settings.jsonindex aa3a3651..9d3ec3e8 100644--- a/packages/i18n/locales/en/settings.json+++ b/packages/i18n/locales/en/settings.json@@ -17,10 +17,10 @@"assistant.answering.title": "Answering calls","assistant.behaviour.askBookingName": "Ask for the booking name before changing an appointment","assistant.behaviour.askName": "Ask for the caller's name if unknown",- "assistant.behaviour.callerHistory": "Know the caller's previous calls",+ "assistant.behaviour.callerHistory": "Remember past calls","assistant.behaviour.confirmNumber": "Confirm the callback number","assistant.behaviour.offerCallback": "Offer a callback when you can't answer",- "assistant.behaviour.verifiedCallerOnly": "Recognize callers only when their carrier verified the number",+ "assistant.behaviour.verifiedCallerOnly": "Only trust verified caller IDs","assistant.disclosure.atStart": "At the start of the call","assistant.disclosure.atStartConsent": "At the start, caller must agree","assistant.disclosure.description": "Whether and when {name} mentions it's an AI",@@ -44,13 +44,12 @@"assistant.draft.numberFormat": "Enter the number with its country code and area code, like {example}.","assistant.draft.reminderTooLong": "The reminder is at most {max, number} characters.","assistant.draft.reminders": "Ask 0 to {max, number} times.",- "assistant.draft.spoken": "{seconds, plural, one {about # second spoken} other {about # seconds spoken}}",+ "assistant.draft.spoken": "{seconds, plural, one {About # s} other {About # s}}","assistant.draft.spokenNothing": "nothing to say yet","assistant.draft.tooLong": "At most {max, number} characters.","assistant.draft.transferConditionMissing": "Say when calls go to this contact.","assistant.draft.transferNameMissing": "Give the contact a name.","assistant.draft.transferNameTaken": "Another contact is called \"{name}\".",- "assistant.draft.transferOff": "Off","assistant.draft.transferPresetCondition": "The caller asks to speak to a person","assistant.draft.transferPresetName": "Owner","assistant.emails.add": "Add person",@@ -85,8 +84,8 @@"assistant.greeting.addRecordingNotice": "Add recording notice","assistant.greeting.callerDetails": "Said before the caller says who they are, to anyone calling from that number: use only details they may hear.","assistant.greeting.empty": "The greeting cannot be empty.",- "assistant.greeting.label": "Greeting (first sentence)",- "assistant.greeting.labelDuringHours": "Greeting (first sentence), during business hours",+ "assistant.greeting.label": "Greeting",+ "assistant.greeting.labelDuringHours": "Greeting during business hours","assistant.greeting.noRecordingNotice": "Calls are recorded, but this greeting doesn't say so. In many US states, such as California, callers must be told first.","assistant.greeting.noRecordingNoticeEu": "Calls are recorded, but this greeting doesn't say so. In the EU and the UK, callers must be told, and recording usually needs their consent.","assistant.greeting.notRecorded": "Calls aren't recorded, but this greeting says they may be. <link>Recordings</link>",@@ -132,7 +131,6 @@"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",- "assistant.rules.description": "How calls are handled","assistant.rules.help": "Each switch adds a sentence to {name}'s instructions.","assistant.rules.style": "Communication style","assistant.rules.styleDescription": "The tone {name} uses",@@ -176,8 +174,6 @@"assistant.style.professional": "Professional and friendly","assistant.style.standard": "Standard","assistant.title": "Assistant",- "assistant.unsavedIn": "Unsaved changes in {sections}",- "assistant.unsavedInAndHere": "Unsaved changes in {sections} and here","assistantHeader.added": "{name} added.","assistantHeader.deleteDescription": "Its numbers are answered by {name} from then on.","assistantHeader.deleteMenu": "Delete {name}…",@@ -472,6 +468,7 @@"billing.zoneNote": "Dates in {zone} time","calendar.accessWithdrawn": "Access was withdrawn.","calendar.accounts": "Calendar accounts",+ "calendar.accountsCount": "{count, plural, one {# calendar account} other {# calendar accounts}}","calendar.accountsHide": "Hide calendar accounts","calendar.accountsNote": "Calendars and event types come from these accounts.","calendar.accountsShow": "Show calendar accounts",@@ -545,10 +542,10 @@"calendar.rules.beforeAndAfter": "{before, number} min before, {after, number} min after","calendar.rules.buffer": "{minutes, number} min buffer","calendar.start.body": "Connect the calendar you already use. {name} only offers times that are free there and puts each new booking straight in. Nothing else in your calendar changes.",- "calendar.start.title": "Let {name} book appointments",+ "calendar.start.empty": "No calendar connected yet.","calendar.suggest.add": "Add “{name}”, {duration}","calendar.suggest.label": "Suggested appointment types",- "calendar.suggest.lead": "Suggested for {kind}. One click adds it, and you can change it after.",+ "calendar.suggest.lead": "Suggested for you. Click to add.","calendar.suggest.type.annual_physical": "Annual physical","calendar.suggest.type.bookkeeping_review": "Bookkeeping review","calendar.suggest.type.buyer_consultation": "Buyer consultation",@@ -836,7 +833,7 @@"holidays.calendar.description": "Closed on these every year. Uncheck the holidays you are open on; that stays so in later years.","holidays.calendar.empty": "No public holidays known for the next twelve months.","holidays.calendar.nationwideOnly": "Nationwide only",- "holidays.calendar.notSet": "Closed on your public holidays, every year by itself.",+ "holidays.calendar.notSet": "Closed on public holidays, every year.","holidays.calendar.off": "Off: public holidays are not closed days.","holidays.calendar.state": "State or region","holidays.closeAgain": "Close again",@@ -849,7 +846,7 @@"holidays.closure.now": "Closed now, back on {back}.","holidays.closure.pickDays": "Pick the first and the last day.","holidays.closure.scheduled": "Closed {from} – {until}, back on {back}.",- "holidays.description": "Days you are closed, whatever the weekly hours say.",+ "holidays.description": "Overrides your weekly hours.","holidays.empty": "No closed days yet.","holidays.emptyWithHours": "No closed days yet: the weekly hours apply every day.","holidays.everyYear": "Every year",@@ -1467,19 +1464,16 @@"knowledge.length": "{count} / {max}","knowledge.more.answers": "Show all {count} questions","knowledge.more.suggestions": "{count, plural, one {Show # more suggestion} other {Show # more suggestions}}",+ "knowledge.open.answer": "Answer","knowledge.open.badge": "No answer yet","knowledge.open.filter": "No answer yet","knowledge.panel.answer": "Answer",- "knowledge.panel.closeTip": "Done (Esc)","knowledge.panel.delete": "Delete",- "knowledge.panel.done": "Done","knowledge.panel.question": "When a caller asks",- "knowledge.panel.title": "Edit question","knowledge.placeholder": "We are a family-run plumbing company in Portland.\nWe cover Portland, Beaverton and Lake Oswego.\nWe give free estimates on site.","knowledge.qa.add": "Add","knowledge.qa.addTip": "Add a question and its answer",- "knowledge.qa.editTip": "Edit this question and answer",- "knowledge.qa.empty": "No questions yet. Questions callers ask that your assistant cannot answer show up here.",+ "knowledge.qa.empty": "Questions {name} couldn't answer show up here.","knowledge.qa.filter.check": "Needs a look","knowledge.qa.noMatch": "No question matches.","knowledge.qa.search": "Search questions and answers",@@ -1492,7 +1486,7 @@"knowledge.sugg.dismissTip": "Not needed: hide this suggestion","knowledge.sugg.filter": "Suggested","knowledge.sugg.from": "{count, plural, one {From # support email} other {From # support emails}}",- "knowledge.sugg.openTip": "A common question from your support mail: check the answer, then add it",+ "knowledge.sugg.review": "Review","knowledge.theAssistant": "The assistant","knowledge.title": "About the business","knowledge.try.addAsQuestion": "Not from a question below. Add it as a question?",@@ -1651,7 +1645,6 @@"recordings.summary": "How long call recordings are kept","recordings.title": "Recordings","review.questions.add": "Add answer",- "review.questions.addTip": "Write the answer once, for every caller","review.questions.added": "Added to About the business.","review.questions.answerLabel": "Answer to: {question}","review.questions.answerPlaceholder": "Your answer",@@ -1743,26 +1736,8 @@"sip.values.label": "Connection details for your phone system","sip.values.password": "Password","sip.values.username": "User name",- "summary.hours.nextClosed": "Next closed day: <b>{date}</b>.",- "summary.hours.nextClosedNamed": "Next closed day: <b>{day}</b>, {date}.",- "summary.hours.nextShorter": "Shorter hours on <b>{date}</b>: open {hours}.",- "summary.hours.none": "No business hours: {name} answers every call the same way, at any time.",- "summary.hours.off": "Business hours are off: {name} answers every call the same way, at any time.",- "summary.hours.open": "You are open {hours}.",- "summary.hours.outsideGreeting": "Outside these hours, callers hear the <link>after-hours greeting</link>.",- "summary.hours.vacationOn": "Vacation mode is on until <b>{until}</b>: {name} takes a message on every call.",- "summary.hours.vacationScheduled": "Vacation mode is set for <b>{from}</b> to <b>{until}</b>.","summary.label": "Summary","summary.needsYou": "Needs you",- "summary.rules.does": "{name} {items}.",- "summary.rules.item.askBookingName": "asks for the booking name before it changes an appointment",- "summary.rules.item.askName": "asks for the caller's name",- "summary.rules.item.callerHistory": "knows the caller's previous calls",- "summary.rules.item.confirmNumber": "confirms the callback number",- "summary.rules.item.offerCallback": "offers a callback when it can't answer",- "summary.rules.item.verifiedCallerOnly": "recognizes callers only when their carrier verified the number",- "summary.rules.none": "All switches of the checklist are off.",- "summary.rules.tone": "{name} <b>{style, select, professional {sounds professional and friendly} casual {sounds casual and relaxed} formal {sounds formal and factual} empathetic {sounds empathetic and warm} other {speaks in its standard tone}}</b> and <b>{disclosure, select, never_confirm {never says it is an AI, not even when asked} never {doesn't bring up that it is an AI} at_start {says at the start of the call that it is an AI} at_start_consent {says at the start that it is an AI and asks the caller to agree} other {says it is an AI only when asked}}</b>.","summary.transfers.allHoursOnly": "Outside business hours, nobody is put through.","summary.transfers.hoursOnly": "{count, plural, one {{contacts} takes calls only during business hours.} other {{contacts} take calls only during business hours.}}","summary.transfers.noNumber": "{count, plural, one {{contacts} has no number, so {name} skips it.} other {{contacts} have no number, so {name} skips them.}}",@@ -1834,10 +1809,8 @@"transfer.conditionPlaceholder": "The caller asks for a person","transfer.consent": "Only add someone who agreed to get transferred calls. Each one starts with a short AI-voice briefing.","transfer.defaultName": "Owner",- "transfer.description": "Who callers are put through to, and when. When several fit, they are tried from the top.",- "transfer.done": "Done",- "transfer.doneTip": "Close this contact (Esc); Save keeps the changes",- "transfer.edit": "Edit",+ "transfer.description": "Who callers are put through to, and when.",+ "transfer.editName": "Change {name}","transfer.empty": "No transfer contacts: {name} takes a message on every call.","transfer.example.billing": "Billing questions","transfer.example.billingCondition": "Billing questions",@@ -1846,7 +1819,7 @@"transfer.examples": "Examples:","transfer.fallback.message": "Take a message","transfer.fallback.next": "Try the next contact that fits",- "transfer.help": "{name} calls the contact first and tells whoever answers who is calling and why. If they press 1 or say yes, {name} connects the caller; that conversation isn't recorded. If no one picks up in time or they decline, {name} does what the contact says: take a message (urgent or not) or try the next contact that fits. {name} always tells the caller what is happening.",+ "transfer.help": "When several contacts fit, they are tried from the top. {name} calls the contact first and tells whoever answers who is calling and why. If they press 1 or say yes, {name} connects the caller; that conversation isn't recorded. If no one picks up in time or they decline, {name} does what the contact says: take a message (urgent or not) or try the next contact that fits. {name} always tells the caller what is happening.","transfer.hoursOnly": "Only during business hours","transfer.ifNobody": "If nobody accepts","transfer.moveDown": "Move down",@@ -1864,7 +1837,6 @@"transfer.numberTip": "A mobile or landline: the person's own phone, not a {brand} number.","transfer.numberTipIn": "A mobile or landline in {countries}: the person's own phone, not a {brand} number.","transfer.remove": "Remove",- "transfer.removeName": "Remove {name}","transfer.ringFor": "Ring for","transfer.ringSeconds": "{count, plural, one {# second} other {# seconds}}","transfer.setHours": "Set business hours",@@ -1902,8 +1874,6 @@"voice.curated.smoothTrustworthy": "Smooth and trustworthy, male","voice.curated.warmBright": "Warm and bright, female","voice.default": "Default voice",- "voice.defaultNamed": "{name} (default)",- "voice.defaultNote": "{name} speaks with it unless you pick another.","voice.filter.accent": "Accent","voice.filter.allLanguages": "All languages","voice.filter.allProviders": "All providers",@@ -2037,7 +2007,7 @@"webhooks.testResult.details": "Answered {status} with {details}.","webhooks.testResult.failed": "Test failed: {error}","webhooks.testResult.noDetails": "Answered {status}, but with no caller details.",- "webhooks.title": "Webhook",+ "webhooks.title": "Webhooks","workspace.nav.billing.description": "Plan, balance, invoices, card","workspace.nav.billing.label": "Billing","workspace.nav.danger.description": "Leave or delete this workspace",diff --git a/packages/i18n/locales/es/settings.json b/packages/i18n/locales/es/settings.jsonindex 07fb0c3d..d519a0a7 100644--- a/packages/i18n/locales/es/settings.json+++ b/packages/i18n/locales/es/settings.json@@ -50,7 +50,6 @@"assistant.draft.transferConditionMissing": "Indica cuándo se pasan las llamadas a este contacto.","assistant.draft.transferNameMissing": "Ponle un nombre al contacto.","assistant.draft.transferNameTaken": "Otro contacto ya se llama “{name}”.",- "assistant.draft.transferOff": "Desactivado","assistant.draft.transferPresetCondition": "Quien llama pide hablar con una persona","assistant.draft.transferPresetName": "Propietario","assistant.emails.add": "Agregar persona",@@ -128,7 +127,6 @@"assistant.realtimeVoice.body": "La voz predeterminada la define un administrador del servidor en <link>Administración del servidor › Proveedores</link>.","assistant.realtimeVoice.title": "Voz","assistant.rules.changed": "Modificado",- "assistant.rules.description": "Cómo se gestionan las llamadas","assistant.rules.help": "Cada interruptor agrega una frase a las instrucciones de {name}.","assistant.rules.style": "Estilo de comunicación","assistant.rules.styleDescription": "El tono que usa {name}",@@ -172,8 +170,6 @@"assistant.style.professional": "Profesional y amable","assistant.style.standard": "Estándar","assistant.title": "Asistente",- "assistant.unsavedIn": "Cambios sin guardar en {sections}",- "assistant.unsavedInAndHere": "Cambios sin guardar en {sections} y aquí","assistantHeader.added": "{name} agregado.","assistantHeader.deleteDescription": "Desde entonces, sus números los contesta {name}.","assistantHeader.deleteMenu": "Eliminar {name}…",@@ -541,10 +537,8 @@"calendar.rules.beforeAndAfter": "{before, number} min antes, {after, number} min después","calendar.rules.buffer": "{minutes, number} min de margen","calendar.start.body": "Conecta el calendario que ya usas. {name} solo ofrece horarios libres en él y pone cada reserva nueva directamente. Nada más cambia en tu calendario.",- "calendar.start.title": "Deja que {name} reserve citas","calendar.suggest.add": "Agregar “{name}”, {duration}","calendar.suggest.label": "Tipos de cita sugeridos",- "calendar.suggest.lead": "Sugerencias para {kind}. Cada una se agrega con un clic y puedes cambiarla después.","calendar.suggest.type.annual_physical": "Chequeo anual","calendar.suggest.type.bookkeeping_review": "Revisión contable","calendar.suggest.type.buyer_consultation": "Consulta para compradores",@@ -1452,16 +1446,11 @@"knowledge.open.badge": "Sin respuesta aún","knowledge.open.filter": "Sin respuesta aún","knowledge.panel.answer": "Respuesta",- "knowledge.panel.closeTip": "Listo (Esc)","knowledge.panel.delete": "Eliminar",- "knowledge.panel.done": "Listo","knowledge.panel.question": "Cuando quien llama pregunta",- "knowledge.panel.title": "Editar pregunta","knowledge.placeholder": "Somos una empresa familiar de plomería en Portland.\nCubrimos Portland, Beaverton y Lake Oswego.\nHacemos presupuestos gratis en el lugar.","knowledge.qa.add": "Agregar","knowledge.qa.addTip": "Agregar una pregunta y su respuesta",- "knowledge.qa.editTip": "Editar esta pregunta y su respuesta",- "knowledge.qa.empty": "Todavía no hay preguntas. Aquí aparecen las preguntas de quienes llaman que tu asistente no puede responder.","knowledge.qa.filter.check": "Por revisar","knowledge.qa.noMatch": "Ninguna pregunta coincide.","knowledge.qa.search": "Buscar en preguntas y respuestas",@@ -1474,7 +1463,6 @@"knowledge.sugg.dismissTip": "No hace falta: ocultar esta sugerencia","knowledge.sugg.filter": "Sugeridas","knowledge.sugg.from": "{count, plural, one {De # correo de soporte} many {De # correos de soporte} other {De # correos de soporte}}",- "knowledge.sugg.openTip": "Una pregunta frecuente de tu correo de soporte: revisa la respuesta y luego agrégala","knowledge.theAssistant": "el asistente","knowledge.title": "Sobre el negocio","knowledge.try.addAsQuestion": "No viene de ninguna pregunta de abajo. ¿Agregarla como pregunta?",@@ -1629,7 +1617,6 @@"recordings.oneYear": "1 año","recordings.title": "Grabaciones","review.questions.add": "Agregar respuesta",- "review.questions.addTip": "Escribe la respuesta una vez, para todos los que llamen","review.questions.added": "Agregado a Sobre el negocio.","review.questions.answerLabel": "Respuesta a: {question}","review.questions.answerPlaceholder": "Tu respuesta",@@ -1714,26 +1701,8 @@"sip.values.label": "Datos de conexión para tu sistema telefónico","sip.values.password": "Contraseña","sip.values.username": "Nombre de usuario",- "summary.hours.nextClosed": "Próximo día cerrado: <b>{date}</b>.",- "summary.hours.nextClosedNamed": "Próximo día cerrado: <b>{day}</b>, {date}.",- "summary.hours.nextShorter": "Horario reducido el <b>{date}</b>: abierto {hours}.",- "summary.hours.none": "Sin horario de atención: {name} contesta todas las llamadas igual, a cualquier hora.",- "summary.hours.off": "El horario de atención está desactivado: {name} contesta todas las llamadas igual, a cualquier hora.",- "summary.hours.open": "Atiendes {hours}.",- "summary.hours.outsideGreeting": "Fuera de este horario, quien llama oye el <link>saludo de fuera del horario</link>.",- "summary.hours.vacationOn": "El modo vacaciones está activado hasta el <b>{until}</b>: {name} toma un mensaje en cada llamada.",- "summary.hours.vacationScheduled": "El modo vacaciones está programado del <b>{from}</b> al <b>{until}</b>.","summary.label": "Resumen","summary.needsYou": "Pendientes",- "summary.rules.does": "{name} {items}.",- "summary.rules.item.askBookingName": "pide el nombre de la reserva antes de cambiar una cita",- "summary.rules.item.askName": "pregunta el nombre de quien llama",- "summary.rules.item.callerHistory": "conoce las llamadas anteriores de quien llama",- "summary.rules.item.confirmNumber": "confirma el número para devolver la llamada",- "summary.rules.item.offerCallback": "ofrece devolver la llamada cuando no puede responder",- "summary.rules.item.verifiedCallerOnly": "reconoce a quien llama solo cuando su operador verificó el número",- "summary.rules.none": "Todos los interruptores de la lista están desactivados.",- "summary.rules.tone": "{name} <b>{style, select, professional {suena profesional y amable} casual {suena informal y relajado} formal {suena formal y objetivo} empathetic {suena empático y cálido} other {habla con su tono estándar}}</b> y <b>{disclosure, select, never_confirm {nunca dice que es una IA, ni siquiera si se lo preguntan} never {no menciona por su cuenta que es una IA} at_start {dice al inicio de la llamada que es una IA} at_start_consent {dice al inicio que es una IA y pide a quien llama que lo acepte} other {dice que es una IA solo si se lo preguntan}}</b>.","summary.transfers.allHoursOnly": "Fuera del horario de atención no se transfiere a nadie.","summary.transfers.hoursOnly": "{count, plural, one {{contacts} recibe llamadas solo en horario de atención.} many {{contacts} reciben llamadas solo en horario de atención.} other {{contacts} reciben llamadas solo en horario de atención.}}","summary.transfers.noNumber": "{count, plural, one {{contacts} no tiene número, así que {name} lo omite.} many {{contacts} no tienen número, así que {name} los omite.} other {{contacts} no tienen número, así que {name} los omite.}}",@@ -1806,9 +1775,6 @@"transfer.consent": "Agrega solo a alguien que haya aceptado recibir llamadas transferidas. Cada una empieza con un breve aviso de una voz de IA.","transfer.defaultName": "Propietario","transfer.description": "A quién se pasan las llamadas y cuándo. Si encajan varios, se prueban de arriba abajo.",- "transfer.done": "Listo",- "transfer.doneTip": "Cerrar este contacto (Esc); Guardar conserva los cambios",- "transfer.edit": "Editar","transfer.empty": "No hay contactos de transferencia: {name} toma un mensaje en cada llamada.","transfer.example.billing": "Preguntas de facturación","transfer.example.billingCondition": "Preguntas de facturación",@@ -1835,7 +1801,6 @@"transfer.numberTip": "Un celular o un fijo: el teléfono propio de la persona, no un número de {brand}.","transfer.numberTipIn": "Un celular o un fijo en {countries}: el teléfono propio de la persona, no un número de {brand}.","transfer.remove": "Quitar",- "transfer.removeName": "Quitar a {name}","transfer.ringFor": "Sonar durante","transfer.ringSeconds": "{count, plural, one {# segundo} many {# segundos} other {# segundos}}","transfer.setHours": "Configurar horario de atención",@@ -1873,8 +1838,6 @@"voice.curated.smoothTrustworthy": "Suave y confiable, masculina","voice.curated.warmBright": "Cálida y alegre, femenina","voice.default": "Voz predeterminada",- "voice.defaultNamed": "{name} (predeterminada)",- "voice.defaultNote": "{name} habla con ella a menos que elijas otra.","voice.filter.accent": "Acento","voice.filter.allLanguages": "Todos los idiomas","voice.filter.allProviders": "Todos los proveedores",diff --git a/packages/i18n/locales/fr/settings.json b/packages/i18n/locales/fr/settings.jsonindex 62b550d8..9be1e5a6 100644--- a/packages/i18n/locales/fr/settings.json+++ b/packages/i18n/locales/fr/settings.json@@ -50,7 +50,6 @@"assistant.draft.transferConditionMissing": "Indiquez quand les appels sont transférés à ce contact.","assistant.draft.transferNameMissing": "Donnez un nom au contact.","assistant.draft.transferNameTaken": "Un autre contact s'appelle déjà « {name} ».",- "assistant.draft.transferOff": "Désactivé","assistant.draft.transferPresetCondition": "L'appelant demande à parler à une personne","assistant.draft.transferPresetName": "Propriétaire","assistant.emails.add": "Ajouter une personne",@@ -128,7 +127,6 @@"assistant.realtimeVoice.body": "La voix par défaut est définie par un administrateur du serveur dans <link>Administration du serveur › Fournisseurs</link>.","assistant.realtimeVoice.title": "Voix","assistant.rules.changed": "Modifié",- "assistant.rules.description": "Comment les appels sont traités","assistant.rules.help": "Chaque option ajoute une phrase aux instructions de {name}.","assistant.rules.style": "Style de communication","assistant.rules.styleDescription": "Le ton qu'adopte {name}",@@ -172,8 +170,6 @@"assistant.style.professional": "Professionnel et aimable","assistant.style.standard": "Standard","assistant.title": "Assistant",- "assistant.unsavedIn": "Modifications non enregistrées dans {sections}",- "assistant.unsavedInAndHere": "Modifications non enregistrées dans {sections} et ici","assistantHeader.added": "{name} ajouté.","assistantHeader.deleteDescription": "Ses numéros seront ensuite pris en charge par {name}.","assistantHeader.deleteMenu": "Supprimer {name}…",@@ -541,10 +537,8 @@"calendar.rules.beforeAndAfter": "{before, number} min avant, {after, number} min après","calendar.rules.buffer": "{minutes, number} min de marge","calendar.start.body": "Connectez l'agenda que vous utilisez déjà. {name} ne propose que les créneaux qui y sont libres et y inscrit directement chaque nouvelle réservation. Rien d'autre ne change dans votre agenda.",- "calendar.start.title": "Laissez {name} réserver des rendez-vous","calendar.suggest.add": "Ajouter « {name} », {duration}","calendar.suggest.label": "Types de rendez-vous suggérés",- "calendar.suggest.lead": "Suggéré pour : {kind}. Un clic l'ajoute, et vous pouvez le modifier ensuite.","calendar.suggest.type.annual_physical": "Bilan de santé annuel","calendar.suggest.type.bookkeeping_review": "Révision comptable","calendar.suggest.type.buyer_consultation": "Consultation acheteur",@@ -1452,16 +1446,11 @@"knowledge.open.badge": "Sans réponse","knowledge.open.filter": "Sans réponse","knowledge.panel.answer": "Réponse",- "knowledge.panel.closeTip": "Terminé (Esc)","knowledge.panel.delete": "Supprimer",- "knowledge.panel.done": "Terminé","knowledge.panel.question": "Quand un appelant demande",- "knowledge.panel.title": "Modifier la question","knowledge.placeholder": "Nous sommes une entreprise familiale de plomberie à Portland.\nNous couvrons Portland, Beaverton et Lake Oswego.\nNous faisons des devis gratuits sur place.","knowledge.qa.add": "Ajouter","knowledge.qa.addTip": "Ajouter une question et sa réponse",- "knowledge.qa.editTip": "Modifier cette question et sa réponse",- "knowledge.qa.empty": "Aucune question pour l'instant. Les questions des appelants auxquelles votre assistant ne sait pas répondre apparaissent ici.","knowledge.qa.filter.check": "À vérifier","knowledge.qa.noMatch": "Aucune question ne correspond.","knowledge.qa.search": "Rechercher dans les questions et réponses",@@ -1474,7 +1463,6 @@"knowledge.sugg.dismissTip": "Inutile : masquer cette suggestion","knowledge.sugg.filter": "Suggérées","knowledge.sugg.from": "{count, plural, one {D'après # e-mail de support} many {D'après # e-mails de support} other {D'après # e-mails de support}}",- "knowledge.sugg.openTip": "Une question fréquente dans vos e-mails de support : vérifiez la réponse, puis ajoutez-la","knowledge.theAssistant": "l'assistant","knowledge.title": "À propos de l'entreprise","knowledge.try.addAsQuestion": "Ne vient d'aucune question ci-dessous. L'ajouter comme question ?",@@ -1629,7 +1617,6 @@"recordings.oneYear": "1 an","recordings.title": "Enregistrements","review.questions.add": "Ajouter une réponse",- "review.questions.addTip": "Rédiger la réponse une fois, pour tous les appelants","review.questions.added": "Ajouté à À propos de l'entreprise.","review.questions.answerLabel": "Réponse à : {question}","review.questions.answerPlaceholder": "Votre réponse",@@ -1714,26 +1701,8 @@"sip.values.label": "Informations de connexion pour votre système téléphonique","sip.values.password": "Mot de passe","sip.values.username": "Nom d'utilisateur",- "summary.hours.nextClosed": "Prochain jour de fermeture : <b>{date}</b>.",- "summary.hours.nextClosedNamed": "Prochain jour de fermeture : <b>{day}</b>, {date}.",- "summary.hours.nextShorter": "Horaires réduits le <b>{date}</b> : ouvert {hours}.",- "summary.hours.none": "Pas d'horaires d'ouverture : {name} répond à chaque appel de la même façon, à toute heure.",- "summary.hours.off": "Les horaires d'ouverture sont désactivés : {name} répond à chaque appel de la même façon, à toute heure.",- "summary.hours.open": "Vous êtes ouvert {hours}.",- "summary.hours.outsideGreeting": "En dehors de ces horaires, les appelants entendent le <link>message d'accueil hors horaires</link>.",- "summary.hours.vacationOn": "Le mode vacances est activé jusqu'au <b>{until}</b> : {name} prend un message à chaque appel.",- "summary.hours.vacationScheduled": "Le mode vacances est prévu du <b>{from}</b> au <b>{until}</b>.","summary.label": "Résumé","summary.needsYou": "À traiter",- "summary.rules.does": "{name} {items}.",- "summary.rules.item.askBookingName": "demande le nom de la réservation avant de modifier un rendez-vous",- "summary.rules.item.askName": "demande le nom de l'appelant",- "summary.rules.item.callerHistory": "connaît les appels précédents de l'appelant",- "summary.rules.item.confirmNumber": "confirme le numéro de rappel",- "summary.rules.item.offerCallback": "propose un rappel quand il ne peut pas répondre",- "summary.rules.item.verifiedCallerOnly": "ne reconnaît les appelants que si leur opérateur a vérifié le numéro",- "summary.rules.none": "Tous les interrupteurs de la liste sont désactivés.",- "summary.rules.tone": "{name} <b>{style, select, professional {a un ton professionnel et aimable} casual {a un ton décontracté et détendu} formal {a un ton formel et factuel} empathetic {a un ton empathique et chaleureux} other {parle sur son ton standard}}</b> et <b>{disclosure, select, never_confirm {ne dit jamais qu'il est une IA, même si on le lui demande} never {ne mentionne pas de lui-même qu'il est une IA} at_start {dit au début de l'appel qu'il est une IA} at_start_consent {dit au début qu'il est une IA et demande l'accord de l'appelant} other {ne dit qu'il est une IA que si on le lui demande}}</b>.","summary.transfers.allHoursOnly": "En dehors des horaires d'ouverture, aucun appel n'est transféré.","summary.transfers.hoursOnly": "{count, plural, one {{contacts} ne prend des appels que pendant les horaires d'ouverture.} many {{contacts} ne prennent des appels que pendant les horaires d'ouverture.} other {{contacts} ne prennent des appels que pendant les horaires d'ouverture.}}","summary.transfers.noNumber": "{count, plural, one {{contacts} n'a pas de numéro, donc {name} l'ignore.} many {{contacts} n'ont pas de numéro, donc {name} les ignore.} other {{contacts} n'ont pas de numéro, donc {name} les ignore.}}",@@ -1806,9 +1775,6 @@"transfer.consent": "N'ajoutez que des personnes qui ont accepté de recevoir des appels transférés. Chacun commence par une courte présentation par une voix d'IA.","transfer.defaultName": "Propriétaire","transfer.description": "À qui les appelants sont transférés, et quand. Si plusieurs correspondent, ils sont essayés de haut en bas.",- "transfer.done": "Terminé",- "transfer.doneTip": "Fermer ce contact (Esc) ; Enregistrer conserve les modifications",- "transfer.edit": "Modifier","transfer.empty": "Aucun contact de transfert : {name} prend un message à chaque appel.","transfer.example.billing": "Questions de facturation","transfer.example.billingCondition": "Questions de facturation",@@ -1835,7 +1801,6 @@"transfer.numberTip": "Un mobile ou un fixe : le téléphone de la personne, pas un numéro {brand}.","transfer.numberTipIn": "Un mobile ou un fixe en {countries} : le téléphone de la personne, pas un numéro {brand}.","transfer.remove": "Retirer",- "transfer.removeName": "Retirer {name}","transfer.ringFor": "Faire sonner","transfer.ringSeconds": "{count, plural, one {# seconde} many {# secondes} other {# secondes}}","transfer.setHours": "Définir les horaires d'ouverture",@@ -1873,8 +1838,6 @@"voice.curated.smoothTrustworthy": "Douce et digne de confiance, masculine","voice.curated.warmBright": "Chaleureuse et lumineuse, féminine","voice.default": "Voix par défaut",- "voice.defaultNamed": "{name} (par défaut)",- "voice.defaultNote": "{name} parle avec cette voix, sauf si vous en choisissez une autre.","voice.filter.accent": "Accent","voice.filter.allLanguages": "Toutes les langues","voice.filter.allProviders": "Tous les fournisseurs",diff --git a/packages/i18n/locales/ja/settings.json b/packages/i18n/locales/ja/settings.jsonindex 2c23b7d2..b43a5184 100644--- a/packages/i18n/locales/ja/settings.json+++ b/packages/i18n/locales/ja/settings.json@@ -50,7 +50,6 @@"assistant.draft.transferConditionMissing": "この連絡先に取り次ぐ条件を入力してください。","assistant.draft.transferNameMissing": "連絡先に名前を付けてください。","assistant.draft.transferNameTaken": "「{name}」という名前の連絡先がすでにあります。",- "assistant.draft.transferOff": "オフ","assistant.draft.transferPresetCondition": "発信者が担当者との会話を希望したとき","assistant.draft.transferPresetName": "オーナー","assistant.emails.add": "メンバーを追加",@@ -128,7 +127,6 @@"assistant.realtimeVoice.body": "既定の音声は、サーバー管理者が<link>「サーバー管理 › プロバイダー」</link>で設定します。","assistant.realtimeVoice.title": "音声","assistant.rules.changed": "変更あり",- "assistant.rules.description": "通話の扱い方","assistant.rules.help": "スイッチをオンにするごとに、{name}への指示に1文が加わります。","assistant.rules.style": "話し方のスタイル","assistant.rules.styleDescription": "{name}の話し方のトーン",@@ -172,8 +170,6 @@"assistant.style.professional": "プロフェッショナルで親しみやすい","assistant.style.standard": "標準","assistant.title": "アシスタント",- "assistant.unsavedIn": "{sections}に未保存の変更があります",- "assistant.unsavedInAndHere": "{sections}とここに未保存の変更があります","assistantHeader.added": "{name}を追加しました。","assistantHeader.deleteDescription": "以後、この番号には{name}が応答します。","assistantHeader.deleteMenu": "{name}を削除…",@@ -541,10 +537,8 @@"calendar.rules.beforeAndAfter": "前に{before, number}分、後に{after, number}分","calendar.rules.buffer": "前後に{minutes, number}分の余裕","calendar.start.body": "いつも使っているカレンダーを接続してください。{name}は、そこで空いている時間だけを提案し、新しい予約をそのまま入れます。カレンダーのほかの内容は変わりません。",- "calendar.start.title": "{name}に予約を任せる","calendar.suggest.add": "「{name}」({duration})を追加","calendar.suggest.label": "おすすめの予約の種類",- "calendar.suggest.lead": "{kind}向けのおすすめです。ワンクリックで追加でき、後から変更できます。","calendar.suggest.type.annual_physical": "年1回の健康診断","calendar.suggest.type.bookkeeping_review": "帳簿の確認","calendar.suggest.type.buyer_consultation": "購入相談",@@ -1452,16 +1446,11 @@"knowledge.open.badge": "未回答","knowledge.open.filter": "未回答","knowledge.panel.answer": "回答",- "knowledge.panel.closeTip": "完了(Esc)","knowledge.panel.delete": "削除",- "knowledge.panel.done": "完了","knowledge.panel.question": "発信者がこう尋ねたら",- "knowledge.panel.title": "質問を編集","knowledge.placeholder": "私たちはポートランドの家族経営の配管工事会社です。\n対応エリアはポートランド、ビーバートン、レイクオスウィーゴです。\n現地での見積もりは無料です。","knowledge.qa.add": "追加","knowledge.qa.addTip": "質問と回答を追加します",- "knowledge.qa.editTip": "この質問と回答を編集",- "knowledge.qa.empty": "まだ質問はありません。発信者に尋ねられてアシスタントが答えられなかった質問が、ここに表示されます。","knowledge.qa.filter.check": "要確認","knowledge.qa.noMatch": "一致する質問はありません。","knowledge.qa.search": "質問と回答を検索",@@ -1474,7 +1463,6 @@"knowledge.sugg.dismissTip": "不要:この提案を非表示","knowledge.sugg.filter": "提案","knowledge.sugg.from": "{count, plural, other {サポートメール#件から}}",- "knowledge.sugg.openTip": "サポートメールでよくある質問です。回答を確認してから追加してください","knowledge.theAssistant": "アシスタント","knowledge.title": "ビジネスについて","knowledge.try.addAsQuestion": "下の質問からの回答ではありません。質問として追加しますか?",@@ -1629,7 +1617,6 @@"recordings.oneYear": "1年","recordings.title": "録音","review.questions.add": "回答を追加",- "review.questions.addTip": "回答を一度書けば、すべての発信者に使われます","review.questions.added": "「ビジネスについて」に追加しました。","review.questions.answerLabel": "回答:{question}","review.questions.answerPlaceholder": "回答",@@ -1714,26 +1701,8 @@"sip.values.label": "電話システム用の接続情報","sip.values.password": "パスワード","sip.values.username": "ユーザー名",- "summary.hours.nextClosed": "次の休業日:<b>{date}</b>。",- "summary.hours.nextClosedNamed": "次の休業日:<b>{day}</b>({date})。",- "summary.hours.nextShorter": "<b>{date}</b>は短縮営業です({hours})。",- "summary.hours.none": "営業時間なし:{name}は時間を問わず、すべての通話に同じように応答します。",- "summary.hours.off": "営業時間はオフです:{name}は時間を問わず、すべての通話に同じように応答します。",- "summary.hours.open": "営業時間は{hours}です。",- "summary.hours.outsideGreeting": "この時間外は、発信者に<link>営業時間外のあいさつ</link>が流れます。",- "summary.hours.vacationOn": "<b>{until}</b>まで休暇モードがオンです。{name}はすべての通話で伝言を預かります。",- "summary.hours.vacationScheduled": "休暇モードは<b>{from}</b>から<b>{until}</b>までの予定です。","summary.label": "概要","summary.needsYou": "要対応",- "summary.rules.does": "{name}は{items}。",- "summary.rules.item.askBookingName": "予約を変更する前に予約者の名前を確認します",- "summary.rules.item.askName": "発信者の名前を尋ねます",- "summary.rules.item.callerHistory": "発信者の過去の通話を把握しています",- "summary.rules.item.confirmNumber": "折り返しの番号を確認します",- "summary.rules.item.offerCallback": "答えられないときは折り返しを提案します",- "summary.rules.item.verifiedCallerOnly": "通信事業者が番号を確認した場合にのみ発信者を識別します",- "summary.rules.none": "チェックリストのスイッチはすべてオフです。",- "summary.rules.tone": "{name}は<b>{style, select, professional {プロフェッショナルで親しみやすい口調} casual {くだけた気さくな口調} formal {丁寧で事務的な口調} empathetic {共感的で温かい口調} other {標準の口調}}</b>で話し、<b>{disclosure, select, never_confirm {尋ねられてもAIであることは伝えません} never {自分からはAIであることを伝えません} at_start {通話の最初にAIであることを伝えます} at_start_consent {最初にAIであることを伝え、発信者に同意を求めます} other {尋ねられたときだけAIであることを伝えます}}</b>。","summary.transfers.allHoursOnly": "営業時間外は誰にも取り次ぎません。","summary.transfers.hoursOnly": "{count, plural, other {{contacts}は営業時間内のみ通話を受けます。}}","summary.transfers.noNumber": "{count, plural, other {{contacts}には番号がないため、{name}はスキップします。}}",@@ -1806,9 +1775,6 @@"transfer.consent": "取り次ぎの通話を受けることに同意した人だけを追加してください。各通話は、AI音声による短い説明から始まります。","transfer.defaultName": "オーナー","transfer.description": "発信者の取り次ぎ先と取り次ぐ条件です。複数が当てはまる場合は上から順に試します。",- "transfer.done": "完了",- "transfer.doneTip": "この連絡先を閉じます(Esc)。変更は「保存」で保存されます",- "transfer.edit": "編集","transfer.empty": "取り次ぎ先がありません。{name}はすべての通話で伝言を預かります。","transfer.example.billing": "請求に関する質問","transfer.example.billingCondition": "請求に関する質問",@@ -1835,7 +1801,6 @@"transfer.numberTip": "携帯電話または固定電話:その人自身の電話で、{brand}の番号ではありません。","transfer.numberTipIn": "{countries}の携帯電話または固定電話:その人自身の電話で、{brand}の番号ではありません。","transfer.remove": "削除",- "transfer.removeName": "{name}を削除","transfer.ringFor": "呼び出し時間","transfer.ringSeconds": "{count, plural, other {#秒}}","transfer.setHours": "営業時間を設定",@@ -1873,8 +1838,6 @@"voice.curated.smoothTrustworthy": "なめらかで信頼感のある男性の声","voice.curated.warmBright": "温かく明るい女性の声","voice.default": "デフォルトの音声",- "voice.defaultNamed": "{name}(デフォルト)",- "voice.defaultNote": "ほかの音声を選ばない限り、{name}はこの音声で話します。","voice.filter.accent": "アクセント","voice.filter.allLanguages": "すべての言語","voice.filter.allProviders": "すべてのプロバイダー",diff --git a/packages/i18n/locales/pt-BR/settings.json b/packages/i18n/locales/pt-BR/settings.jsonindex 19844af9..62fd5d5f 100644--- a/packages/i18n/locales/pt-BR/settings.json+++ b/packages/i18n/locales/pt-BR/settings.json@@ -50,7 +50,6 @@"assistant.draft.transferConditionMissing": "Diga quando as chamadas vão para este contato.","assistant.draft.transferNameMissing": "Dê um nome ao contato.","assistant.draft.transferNameTaken": "Outro contato já se chama “{name}”.",- "assistant.draft.transferOff": "Desativado","assistant.draft.transferPresetCondition": "Quem ligou pede para falar com uma pessoa","assistant.draft.transferPresetName": "Proprietário","assistant.emails.add": "Adicionar pessoa",@@ -128,7 +127,6 @@"assistant.realtimeVoice.body": "A voz padrão é definida por um administrador do servidor em <link>Administração do servidor › Provedores</link>.","assistant.realtimeVoice.title": "Voz","assistant.rules.changed": "Alterado",- "assistant.rules.description": "Como as chamadas são tratadas","assistant.rules.help": "Cada chave adiciona uma frase às instruções de {name}.","assistant.rules.style": "Estilo de comunicação","assistant.rules.styleDescription": "O tom que {name} usa",@@ -172,8 +170,6 @@"assistant.style.professional": "Profissional e simpático","assistant.style.standard": "Padrão","assistant.title": "Assistente",- "assistant.unsavedIn": "Alterações não salvas em {sections}",- "assistant.unsavedInAndHere": "Alterações não salvas em {sections} e aqui","assistantHeader.added": "{name} adicionado.","assistantHeader.deleteDescription": "A partir daí, os números dele passam a ser atendidos por {name}.","assistantHeader.deleteMenu": "Excluir {name}…",@@ -541,10 +537,8 @@"calendar.rules.beforeAndAfter": "{before, number} min antes, {after, number} min depois","calendar.rules.buffer": "{minutes, number} min de intervalo","calendar.start.body": "Conecte a agenda que você já usa. {name} só oferece horários livres nela e coloca cada novo agendamento direto lá. Nada mais na sua agenda muda.",- "calendar.start.title": "Deixe {name} agendar compromissos","calendar.suggest.add": "Adicionar “{name}”, {duration}","calendar.suggest.label": "Tipos de agendamento sugeridos",- "calendar.suggest.lead": "Sugeridos para {kind}. Um clique adiciona, e você pode alterar depois.","calendar.suggest.type.annual_physical": "Check-up anual","calendar.suggest.type.bookkeeping_review": "Revisão contábil","calendar.suggest.type.buyer_consultation": "Consulta para compradores",@@ -1452,16 +1446,11 @@"knowledge.open.badge": "Ainda sem resposta","knowledge.open.filter": "Ainda sem resposta","knowledge.panel.answer": "Resposta",- "knowledge.panel.closeTip": "Concluir (Esc)","knowledge.panel.delete": "Excluir",- "knowledge.panel.done": "Concluir","knowledge.panel.question": "Quando quem liga pergunta",- "knowledge.panel.title": "Editar pergunta","knowledge.placeholder": "Somos uma empresa familiar de encanamento em Portland.\nAtendemos Portland, Beaverton e Lake Oswego.\nFazemos orçamentos grátis no local.","knowledge.qa.add": "Adicionar","knowledge.qa.addTip": "Adicionar uma pergunta e a resposta",- "knowledge.qa.editTip": "Editar esta pergunta e resposta",- "knowledge.qa.empty": "Nenhuma pergunta ainda. As perguntas de quem liga que seu assistente não consegue responder aparecem aqui.","knowledge.qa.filter.check": "Precisa de revisão","knowledge.qa.noMatch": "Nenhuma pergunta corresponde.","knowledge.qa.search": "Buscar perguntas e respostas",@@ -1474,7 +1463,6 @@"knowledge.sugg.dismissTip": "Não é necessária: ocultar esta sugestão","knowledge.sugg.filter": "Sugeridas","knowledge.sugg.from": "{count, plural, one {De # e-mail de suporte} many {De # e-mails de suporte} other {De # e-mails de suporte}}",- "knowledge.sugg.openTip": "Uma pergunta comum dos seus e-mails de suporte: confira a resposta e depois adicione","knowledge.theAssistant": "o assistente","knowledge.title": "Sobre a empresa","knowledge.try.addAsQuestion": "Não vem de uma pergunta abaixo. Adicionar como pergunta?",@@ -1629,7 +1617,6 @@"recordings.oneYear": "1 ano","recordings.title": "Gravações","review.questions.add": "Adicionar resposta",- "review.questions.addTip": "Escreva a resposta uma vez, para todos que ligarem","review.questions.added": "Adicionado em Sobre a empresa.","review.questions.answerLabel": "Resposta para: {question}","review.questions.answerPlaceholder": "Sua resposta",@@ -1714,26 +1701,8 @@"sip.values.label": "Dados de conexão do seu sistema telefônico","sip.values.password": "Senha","sip.values.username": "Nome de usuário",- "summary.hours.nextClosed": "Próximo dia fechado: <b>{date}</b>.",- "summary.hours.nextClosedNamed": "Próximo dia fechado: <b>{day}</b>, {date}.",- "summary.hours.nextShorter": "Horário reduzido em <b>{date}</b>: aberto {hours}.",- "summary.hours.none": "Sem horário de atendimento: {name} atende todas as chamadas da mesma forma, a qualquer hora.",- "summary.hours.off": "O horário de atendimento está desativado: {name} atende todas as chamadas da mesma forma, a qualquer hora.",- "summary.hours.open": "Você atende {hours}.",- "summary.hours.outsideGreeting": "Fora desse horário, quem liga ouve a <link>saudação de fora do horário</link>.",- "summary.hours.vacationOn": "O modo férias está ativado até <b>{until}</b>: {name} anota um recado em cada chamada.",- "summary.hours.vacationScheduled": "O modo férias está programado de <b>{from}</b> a <b>{until}</b>.","summary.label": "Resumo","summary.needsYou": "Pendentes",- "summary.rules.does": "{name} {items}.",- "summary.rules.item.askBookingName": "pede o nome da reserva antes de mudar um agendamento",- "summary.rules.item.askName": "pergunta o nome de quem liga",- "summary.rules.item.callerHistory": "conhece as chamadas anteriores de quem liga",- "summary.rules.item.confirmNumber": "confirma o número para retorno",- "summary.rules.item.offerCallback": "oferece retornar a ligação quando não sabe responder",- "summary.rules.item.verifiedCallerOnly": "só reconhece quem liga quando a operadora verificou o número",- "summary.rules.none": "Todas as opções da lista estão desativadas.",- "summary.rules.tone": "{name} <b>{style, select, professional {soa profissional e simpático} casual {soa descontraído e tranquilo} formal {soa formal e objetivo} empathetic {soa empático e acolhedor} other {fala no tom padrão}}</b> e <b>{disclosure, select, never_confirm {nunca diz que é uma IA, nem quando perguntam} never {não menciona por conta própria que é uma IA} at_start {diz no início da ligação que é uma IA} at_start_consent {diz no início que é uma IA e pede a concordância de quem liga} other {diz que é uma IA só quando perguntam}}</b>.","summary.transfers.allHoursOnly": "Fora do horário de atendimento, ninguém recebe transferências.","summary.transfers.hoursOnly": "{count, plural, one {{contacts} recebe chamadas só no horário de atendimento.} many {{contacts} recebem chamadas só no horário de atendimento.} other {{contacts} recebem chamadas só no horário de atendimento.}}","summary.transfers.noNumber": "{count, plural, one {{contacts} não tem número, então {name} o pula.} many {{contacts} não têm número, então {name} os pula.} other {{contacts} não têm número, então {name} os pula.}}",@@ -1806,9 +1775,6 @@"transfer.consent": "Adicione só quem concordou em receber chamadas transferidas. Cada uma começa com um breve aviso de uma voz de IA.","transfer.defaultName": "Proprietário","transfer.description": "Para quem as chamadas são transferidas e quando. Se vários se encaixarem, são tentados de cima para baixo.",- "transfer.done": "Concluído",- "transfer.doneTip": "Fechar este contato (Esc); Salvar mantém as alterações",- "transfer.edit": "Editar","transfer.empty": "Nenhum contato de transferência: {name} anota um recado em toda chamada.","transfer.example.billing": "Dúvidas de cobrança","transfer.example.billingCondition": "Dúvidas de cobrança",@@ -1835,7 +1801,6 @@"transfer.numberTip": "Um celular ou fixo: o telefone da própria pessoa, não um número do {brand}.","transfer.numberTipIn": "Um celular ou fixo em {countries}: o telefone da própria pessoa, não um número do {brand}.","transfer.remove": "Remover",- "transfer.removeName": "Remover {name}","transfer.ringFor": "Tocar por","transfer.ringSeconds": "{count, plural, one {# segundo} many {# segundos} other {# segundos}}","transfer.setHours": "Definir horário de atendimento",@@ -1873,8 +1838,6 @@"voice.curated.smoothTrustworthy": "Suave e confiável, masculina","voice.curated.warmBright": "Calorosa e alegre, feminina","voice.default": "Voz padrão",- "voice.defaultNamed": "{name} (padrão)",- "voice.defaultNote": "{name} fala com ela, a menos que você escolha outra.","voice.filter.accent": "Sotaque","voice.filter.allLanguages": "Todos os idiomas","voice.filter.allProviders": "Todos os provedores",