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
Settings: one IdentityCard, FormField only, LinkButton, one dialog footer, values as text (PR 1917)
Janikc95eac23c16f
diff --git a/apps/web/src/admin/Billing.tsx b/apps/web/src/admin/Billing.tsxindex edca4345..3dc80f99 100644--- a/apps/web/src/admin/Billing.tsx+++ b/apps/web/src/admin/Billing.tsx@@ -2316,7 +2316,9 @@ function ReasonDialog({onSubmit={e => void onSubmit(e)}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Button type="submit" variant={danger ? 'danger' : 'primary'} busy={busy}>{submit}</Button>diff --git a/apps/web/src/admin/Overview.tsx b/apps/web/src/admin/Overview.tsxindex d6a613f4..b86bb50a 100644--- a/apps/web/src/admin/Overview.tsx+++ b/apps/web/src/admin/Overview.tsx@@ -190,7 +190,11 @@ export function Overview({ onOpen }: Props) {<FeatureLinetitle={t('admin.overview.costs.title')}summary={t('admin.overview.costs.note')}- state={o ? { text: t('admin.overview.costs.state', { amount: money(costTotals(o).month) }), on: false } : null}+ state={+ o+ ? { text: t('admin.overview.costs.state', { amount: money(costTotals(o).month) }), on: false, value: true }+ : null+ }view{...line('costs')}>diff --git a/apps/web/src/admin/PartnerBrands.tsx b/apps/web/src/admin/PartnerBrands.tsxindex d3586fc6..4ffcd90d 100644--- a/apps/web/src/admin/PartnerBrands.tsx+++ b/apps/web/src/admin/PartnerBrands.tsx@@ -218,7 +218,9 @@ function ReviewDialog({onSubmit={e => void submit(e)}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Button type="submit" variant={approve ? 'primary' : 'danger'} busy={busy}>{t(approve ? 'admin.partners.brands.approve' : 'admin.partners.brands.reset')}</Button>diff --git a/apps/web/src/admin/Settings.tsx b/apps/web/src/admin/Settings.tsxindex 71f2cad7..f1916a94 100644--- a/apps/web/src/admin/Settings.tsx+++ b/apps/web/src/admin/Settings.tsx@@ -59,7 +59,7 @@ export function CallQualityPage(providers: ProvidersProps) {: nullconst transcriptState: LineState = transcript? transcript.selected- ? { text: transcriptServiceLabels[transcript.selected], on: true }+ ? { text: transcriptServiceLabels[transcript.selected], on: true, value: true }: { text: t('admin.features.off'), on: false }: nullconst median = latency ? replyMedian(latency.pipelines) : undefineddiff --git a/apps/web/src/admin/SettingsCards.tsx b/apps/web/src/admin/SettingsCards.tsxindex 1fc75f23..aa9e8c52 100644--- a/apps/web/src/admin/SettingsCards.tsx+++ b/apps/web/src/admin/SettingsCards.tsx@@ -23,11 +23,10 @@ import { type ReactNode, useState } from 'react'import { brandName } from '../brand.ts'import { setQueryData, useQuery } from '../cachedQuery.ts'import { agentLabel } from '../onboarding/AgentPicker.tsx'-import { Field } from '../settings/fields.tsx'import { externalLink } from '../settings/ZapierGuide.tsx'import { appLink, ExternalLink, LinkButton } from '../ui/AppLink.tsx'import { Switch } from '../ui/controls.tsx'-import { Card, Input } from '../ui/form.tsx'+import { Card, Input, FormField } from '../ui/form.tsx'import { Badge, Button, cx, Note } from '../ui/kit.tsx'import { Loading, Skeleton, SkeletonRows } from '../ui/LoadStates.tsx'import { SettingRow } from '../ui/SettingRow.tsx'@@ -300,10 +299,10 @@ export function GermanNumbers() {void save({ requirementGroupId: groupValue.trim(), ...(askCodes ? { areaCodes: typedCodes } : {}) })}}>- <Field+ <FormFieldid="adm-de-group"label={t('admin.system.germanNumbersGroup')}- help={t('admin.system.germanNumbersGroupHelp')}+ description={t('admin.system.germanNumbersGroupHelp')}><Input id="adm-de-group" value={groupValue} onChange={e => setGroup(e.target.value)} autoComplete="off" />{data.requirementGroupId && (@@ -314,7 +313,7 @@ export function GermanNumbers() {onCheck={() => void checkGroup()}/>)}- </Field>+ </FormField>{local && found && (<div className="k-field" role="group" aria-labelledby="adm-de-area"><div className="k-field-label">@@ -331,13 +330,13 @@ export function GermanNumbers() {</div>)}{askCodes && (- <Field+ <FormFieldid="adm-de-codes"label={t('admin.system.germanNumbersAreaCodes')}- help={t('admin.system.germanNumbersAreaCodesHelp')}+ description={t('admin.system.germanNumbersAreaCodesHelp')}><Input id="adm-de-codes" value={codesValue} onChange={e => setCodes(e.target.value)} autoComplete="off" />- </Field>+ </FormField>)}<div className="ob2-row"><Button type="submit" size="sm" disabled={!changed || saving} busy={saving}>diff --git a/apps/web/src/admin/SignupAccessPage.tsx b/apps/web/src/admin/SignupAccessPage.tsxindex ad6c30b6..84601c3d 100644--- a/apps/web/src/admin/SignupAccessPage.tsx+++ b/apps/web/src/admin/SignupAccessPage.tsx@@ -51,7 +51,7 @@ export function SignupAccessPage({ notify }: { notify: Notify }) {: nullconst founderState: LineState = founder? founder.sender- ? { text: founder.sender.name, on: true }+ ? { text: founder.sender.name, on: true, value: true }: { text: t('admin.features.off'), on: false }: nullreturn (diff --git a/apps/web/src/app.css b/apps/web/src/app.cssindex d1f0cac9..4837a632 100644--- a/apps/web/src/app.css+++ b/apps/web/src/app.css@@ -1732,22 +1732,14 @@ a.k-btn {.pn-carrier-loading .sk-text {margin: 4px 0;}-.pn-carrier-change {- padding: 0;- border: 0;- background: none;- font: inherit;+/* Whether the assistant answers a number: its status mark and words (Settings › Phone numbers). */+.pn-answering {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ font-size: 12.5px;color: var(--ink-muted);- text-decoration: underline;- text-underline-offset: 2px;- cursor: pointer;-}-.pn-carrier-change:hover {- color: var(--ink);-}-.pn-carrier-change:focus-visible {- outline: 2px solid var(--focus);- outline-offset: 2px;+ white-space: nowrap;}.pn-carrier-form {display: grid;@@ -2906,33 +2898,12 @@ button.k-link {}}-/* Workspace settings › General (LIN-837): the business card on top (icon, name, one line; Edit opens the fields under a- hairline), then the Calls lines in Server admin › Features' look. */+/* Workspace settings › General and User settings › Profile (LIN-837): the identity card (ui/IdentityCard.tsx), then+ their lines in Server admin › Features' look. */.ws-general {display: grid;gap: 12px;}-.ws-identity-head {- display: flex;- align-items: center;- gap: 14px;- min-width: 0;-}-.ws-identity-text {- display: grid;- gap: 2px;- flex: 1;- min-width: 0;-}-.ws-identity-text h2 {- margin: 0;- font-size: 17px;- line-height: 22px;- overflow-wrap: anywhere;-}-.ws-identity .k-feature-body {- margin-top: 14px;-}.ws-general > .k-line-group {margin-top: 12px;}diff --git a/apps/web/src/contacts/ImportContacts.tsx b/apps/web/src/contacts/ImportContacts.tsxindex d8df1bd5..024d7fb9 100644--- a/apps/web/src/contacts/ImportContacts.tsx+++ b/apps/web/src/contacts/ImportContacts.tsx@@ -24,7 +24,6 @@ import {guessColumns,IMPORT_FIELDS,type ImportField,- type ImportPlan,type ImportRow,MULTI_COLUMN_FIELDS,parseCsv,@@ -172,7 +171,9 @@ export function ImportContacts({ onClose, toast }: Props) {onClose={onClose}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button>{file ? (<Buttonbusy={busy}diff --git a/apps/web/src/contacts/MergeContacts.tsx b/apps/web/src/contacts/MergeContacts.tsxindex 50438215..a78ffeea 100644--- a/apps/web/src/contacts/MergeContacts.tsx+++ b/apps/web/src/contacts/MergeContacts.tsx@@ -88,7 +88,9 @@ export function MergeContacts({ first, second, all, onClose, toast }: Props) {onSubmit={submit}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Button type="submit" variant="primary">{t('contacts.merge.merge')}</Button>diff --git a/apps/web/src/integrations/Developers.tsx b/apps/web/src/integrations/Developers.tsxindex 1462e214..9c4a42c7 100644--- a/apps/web/src/integrations/Developers.tsx+++ b/apps/web/src/integrations/Developers.tsx@@ -14,11 +14,11 @@ import { type MessageKey, msg } from '@linedesk/i18n'import { useT } from '@linedesk/i18n/react'import { type FormEvent, useEffect, useState } from 'react'import { pollWhileVisible, setQueryData, useQuery } from '../cachedQuery.ts'-import { Field, Section } from '../settings/fields.tsx'+import { Section } from '../settings/fields.tsx'import { callAction, readAction } from '../settings/settings-api.ts'import { ZapierGuide } from '../settings/ZapierGuide.tsx'import { Select, type SelectOption } from '../ui/controls.tsx'-import { Dialog, Input } from '../ui/form.tsx'+import { Dialog, Input, FormField } from '../ui/form.tsx'import { Badge, Button } from '../ui/kit.tsx'import { Loading, SkeletonList } from '../ui/LoadStates.tsx'import { List, ListEmpty, ListRow } from '../ui/list.tsx'@@ -223,7 +223,7 @@ function SubscriptionRow({sub={<>{t('settings.developers.integrations.viaKey', { name: subscription.api_key_name })}{' '}- <code className="dev-prefix">{subscription.api_key_prefix}…</code> ·{' '}+ <code className="k-key-prefix">{subscription.api_key_prefix}…</code> ·{' '}{subscription.last_delivery_at? t('settings.developers.usedOn', {created: day(subscription.created_at),@@ -291,7 +291,7 @@ function KeyRow({ apiKey, toast }: { apiKey: ApiKeySummary; toast: Props['toast'title={apiKey.name}sub={<>- <code className="dev-prefix">{apiKey.prefix}…</code> ·{' '}+ <code className="k-key-prefix">{apiKey.prefix}…</code> ·{' '}{apiKey.last_used_at? t('settings.developers.usedOn', { created: day(apiKey.created_at), used: day(apiKey.last_used_at) }): t('settings.developers.neverUsed', { created: day(apiKey.created_at) })}@@ -370,7 +370,7 @@ function CreateKey({ onClose, toast }: { onClose: () => void; toast: Props['toas</Button>}>- <div className="dev-secret">+ <div className="k-secret-row"><InputreadOnlyvalue={created}@@ -398,14 +398,16 @@ function CreateKey({ onClose, toast }: { onClose: () => void; toast: Props['toasonSubmit={submit}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Button busy={saving} type="submit" variant="primary" disabled={saving || !name.trim()}>{saving ? t('settings.developers.dialog.creating') : t('settings.developers.dialog.create')}</Button></>}>- <Field id="dev-key-name" label={t('settings.developers.dialog.name')} error={error}>+ <FormField id="dev-key-name" label={t('settings.developers.dialog.name')} error={error}><Inputid="dev-key-name"maxLength={60}@@ -414,8 +416,8 @@ function CreateKey({ onClose, toast }: { onClose: () => void; toast: Props['toasinvalid={Boolean(error)}onChange={e => setName(e.target.value)}/>- </Field>- <Field id="dev-key-role" label={t('settings.developers.dialog.access')}>+ </FormField>+ <FormField id="dev-key-role" label={t('settings.developers.dialog.access')}><div><Selectid="dev-key-role"@@ -425,7 +427,7 @@ function CreateKey({ onClose, toast }: { onClose: () => void; toast: Props['toaslabel={t('settings.developers.dialog.access')}/></div>- </Field>+ </FormField></Dialog>)}diff --git a/apps/web/src/integrations/ShopifySetup.tsx b/apps/web/src/integrations/ShopifySetup.tsxindex 297e94f9..5c855392 100644--- a/apps/web/src/integrations/ShopifySetup.tsx+++ b/apps/web/src/integrations/ShopifySetup.tsx@@ -8,9 +8,8 @@ import type { ShopifySetupRequest, ShopifySetupStatusData } from '@linedesk/actiimport { useT } from '@linedesk/i18n/react'import { type FormEvent, useEffect, useRef, useState } from 'react'import { setQueryData, useQuery } from '../cachedQuery.ts'-import { Field } from '../settings/fields.tsx'import { callAction, readAction } from '../settings/settings-api.ts'-import { Dialog, Input } from '../ui/form.tsx'+import { Dialog, Input, FormField } from '../ui/form.tsx'import { brandName } from '../brand.ts'import { Button, Note } from '../ui/kit.tsx'import { nameKey } from './catalog.ts'@@ -255,13 +254,14 @@ function RequestDialog({size="sm"footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Buttontype="submit"variant="primary"busy={sending}disabled={!shop.trim()}- shortcut={['↵']}title={t('settings.integrations.app.shopify.request.submitTip')}>{t('settings.integrations.app.shopify.request.submit')}@@ -269,10 +269,10 @@ function RequestDialog({</>}>- <Field+ <FormFieldid="shopify-store"label={t('settings.integrations.app.shopify.request.store')}- help={t('settings.integrations.app.shopify.request.storeHelp')}+ description={t('settings.integrations.app.shopify.request.storeHelp')}error={error}><Input@@ -284,7 +284,7 @@ function RequestDialog({spellCheck={false}onChange={e => setShop(e.target.value)}/>- </Field>+ </FormField></Dialog>)}diff --git a/apps/web/src/integrations/developers.css b/apps/web/src/integrations/developers.cssindex 84b04f36..6ca463c6 100644--- a/apps/web/src/integrations/developers.css+++ b/apps/web/src/integrations/developers.css@@ -1,18 +1,4 @@/* Integrations › API keys and Zapier: the API keys list is the kit's (ui/list.css). */-.dev-prefix {- font-family: var(--font-mono);-}-.dev-secret {- display: flex;- gap: 8px;-}-.dev-secret .k-input {- flex: 1;-}-.dev-secret input {- font-family: var(--font-mono);- font-size: 12.5px;-}.dev-support {margin: 4px 0 0;color: var(--ink-muted);@@ -33,7 +19,7 @@display: grid;gap: 8px;}-.dev-guide .dev-secret {+.dev-guide .k-secret-row {margin-top: 6px;max-width: 420px;}diff --git a/apps/web/src/onboarding/AssistantStep.tsx b/apps/web/src/onboarding/AssistantStep.tsxindex 02d2221d..4c7f0d45 100644--- a/apps/web/src/onboarding/AssistantStep.tsx+++ b/apps/web/src/onboarding/AssistantStep.tsx@@ -5,7 +5,7 @@ import type { Assistant } from '@linedesk/db/types'import { T, useT } from '@linedesk/i18n/react'import { useState } from 'react'import { ASSISTANT_NAME_MAX, staleGreetingName } from '../settings/assistantDraft.ts'-import { Field, TextArea, TextInput } from '../settings/fields.tsx'+import { TextArea, TextInput } from '../settings/fields.tsx'import { useWriteAction } from '../settings/settings-api.ts'import { TestCallButton, useTestCall } from '../settings/TestCall.tsx'import { TestCallPanel } from '../settings/TestCallPanel.tsx'@@ -18,6 +18,7 @@ import { useClientWord } from './clientWords.tsx'import { Foot, StepLoading } from './Frame.tsx'import { type AssistantDraft, assistantChanges, greetingInLanguage, renameInGreeting } from './flow.ts'import { useSetupKeys } from './setup-keys.ts'+import { FormField } from '../ui/form.tsx'/*** `operator`: the member runs the server (a test call nobody answers says what to fix there). `assistantId`: the@@ -119,7 +120,7 @@ function AssistantForm({ assistant, onBack, onNext, operator = false }: Props &<p className="ob-lede">{name ? t('onboarding.assistant.lede', { name }) : t('onboarding.assistant.ledeUnnamed')}</p>- <Field id="ob-name" label={t('onboarding.assistant.nameLabel')} error={nameProblem}>+ <FormField id="ob-name" label={t('onboarding.assistant.nameLabel')} error={nameProblem}><TextInputid="ob-name"value={draft.name}@@ -127,11 +128,11 @@ function AssistantForm({ assistant, onBack, onNext, operator = false }: Props &placeholder="Maya"invalid={!!nameProblem}/>- </Field>- <Field+ </FormField>+ <FormFieldid="ob-greeting"label={t('onboarding.assistant.greetingLabel')}- tip={t('onboarding.assistant.greetingTip')}+ help={t('onboarding.assistant.greetingTip')}error={greetingProblem}><TextArea@@ -152,7 +153,7 @@ function AssistantForm({ assistant, onBack, onNext, operator = false }: Props &</Button></span>)}- </Field>+ </FormField><VoiceLoading>{realtime ? (<RealtimeVoiceSettingsdiff --git a/apps/web/src/onboarding/BusinessStep.tsx b/apps/web/src/onboarding/BusinessStep.tsxindex 45f49c17..3eb6aa39 100644--- a/apps/web/src/onboarding/BusinessStep.tsx+++ b/apps/web/src/onboarding/BusinessStep.tsx@@ -21,7 +21,7 @@ import { useDefaultPhoneCountry } from '../phoneCountry.ts'import { TimeZoneSelect } from '../settings/BusinessHours.tsx'import { kindOptions } from '../settings/businessKind.ts'import { CountrySelect } from '../settings/CountrySelect.tsx'-import { Field, TextArea, TextInput } from '../settings/fields.tsx'+import { TextArea, TextInput } from '../settings/fields.tsx'import { callAction, patchWorkspaceSettings, useWorkspaceSettings } from '../settings/settings-api.ts'import { preloadVoiceCatalog } from '../settings/VoiceSettings.tsx'import { explicitCountryPatch } from '../settings/workspaceLocaleModel.ts'@@ -56,6 +56,7 @@ import { useClientWord } from './clientWords.tsx'import { Foot, StepLoading } from './Frame.tsx'import { useSetupKeys } from './setup-keys.ts'import { readStoredJson, writeStoredJson } from '../safeStorage.ts'+import { FormField } from '../ui/form.tsx'type Props = {businessName: string@@ -260,7 +261,7 @@ function FindBusiness({{phase.kind === 'loading' && <ImportProgress what={phase.what} stages={phase.stages} />}{phase.kind === 'find' && (<>- <Field id="ob-biz-q" label={t('onboarding.business.find.label')}>+ <FormField id="ob-biz-q" label={t('onboarding.business.find.label')}><div className="ob-biz-search"><TextInputid="ob-biz-q"@@ -279,7 +280,7 @@ function FindBusiness({{t('common.search.button')}</Button></div>- </Field>+ </FormField>{results && results.length === 0 && <p className="ob2-note">{t('onboarding.business.find.none')}</p>}{results && results.length > 0 && (<ResultList@@ -313,20 +314,20 @@ function FindBusiness({)}{phase.kind === 'manual' && (<>- <Field id="ob-biz-name" label={t('onboarding.business.field.name')}>+ <FormField id="ob-biz-name" label={t('onboarding.business.field.name')}><TextInputid="ob-biz-name"value={name}onChange={setName}placeholder={t(word('onboarding.business.manual.namePlaceholder'))}/>- </Field>+ </FormField>{site === 'field' && (- <Field+ <FormFieldid="ob-biz-site"label={t('onboarding.business.field.website')}aside={t('onboarding.business.field.optional')}- tip={t('onboarding.business.manual.websiteTip')}+ help={t('onboarding.business.manual.websiteTip')}><TextInputid="ob-biz-site"@@ -334,7 +335,7 @@ function FindBusiness({onChange={setWebsite}placeholder={t('onboarding.business.field.websitePlaceholder')}/>- </Field>+ </FormField>)}{site === 'paused' && <p className="ob2-note">{t('onboarding.business.manual.paused')}</p>}{site === 'needs_model' && (@@ -687,13 +688,13 @@ function ReviewProfile({countries: i18n().format.list((served ?? []).map(c => phoneCountryName(c, i18n()))),})}</Note>- <Field+ <FormFieldid="ob-biz-country"label={t('settings.general.country.label')}- tip={t('settings.general.country.tip')}+ help={t('settings.general.country.tip')}><CountrySelect id="ob-biz-country" value="" onChange={pickCountry} served={served} />- </Field>+ </FormField></div><Foot onBack={onBack} canContinue={false} /></>@@ -712,18 +713,18 @@ function ReviewProfile({{proposal.failures.map(f => (<ProblemNote key={f.provider} problem={providerProblem(f, 'listing')} admin={admin} />))}- <Field id="ob-biz-name" label={t('onboarding.business.field.name')} error={problems.name}>+ <FormField id="ob-biz-name" label={t('onboarding.business.field.name')} error={problems.name}><TextInputid="ob-biz-name"value={draft.name}onChange={v => setDraft(d => renameBusiness(d, v))}invalid={!!problems.name}/>- </Field>- <Field+ </FormField>+ <FormFieldid="ob-biz-kind"label={t('onboarding.business.field.kind')}- tip={t('onboarding.business.field.kindTip')}+ help={t('onboarding.business.field.kindTip')}error={problems.kind}><Select<BusinessKind | typeof NO_KIND>@@ -733,20 +734,20 @@ function ReviewProfile({options={kindOptions()}onChange={kind => kind && setDraft(d => switchKind(d, kind))}/>- </Field>+ </FormField><div className="ob-biz-pair">- <Field id="ob-biz-addr" label={t('onboarding.business.field.address')}>+ <FormField id="ob-biz-addr" label={t('onboarding.business.field.address')}><TextInput id="ob-biz-addr" value={draft.address} onChange={v => set({ address: v })} />- </Field>- <Field id="ob-biz-area" label={t('onboarding.business.field.area')}>+ </FormField>+ <FormField id="ob-biz-area" label={t('onboarding.business.field.area')}><TextInputid="ob-biz-area"value={draft.area}onChange={v => set({ area: v })}placeholder={t('onboarding.business.field.areaPlaceholder')}/>- </Field>- <Field id="ob-biz-phone" label={t('onboarding.business.field.phone')} error={problems.phone}>+ </FormField>+ <FormField id="ob-biz-phone" label={t('onboarding.business.field.phone')} error={problems.phone}><PhoneInputid="ob-biz-phone"value={draft.phone}@@ -755,8 +756,8 @@ function ReviewProfile({onChange={v => set({ phone: v })}invalid={!!problems.phone}/>- </Field>- <Field id="ob-biz-web" label={t('onboarding.business.field.website')} error={problems.website}>+ </FormField>+ <FormField id="ob-biz-web" label={t('onboarding.business.field.website')} error={problems.website}>{changingWebsite || !draft.website.trim() || problems.website ? (<TextInputid="ob-biz-web"@@ -781,11 +782,11 @@ function ReviewProfile({</Button></span>)}- </Field>- <Field+ </FormField>+ <FormFieldid="ob-biz-country"label={t('settings.general.country.label')}- tip={t('settings.general.country.tip')}+ help={t('settings.general.country.tip')}>{changingCountry ? (<CountrySelect id="ob-biz-country" value={country} onChange={pickCountry} served={served} />@@ -804,16 +805,16 @@ function ReviewProfile({</Button></span>)}- </Field>+ </FormField>{zone && (- <Field+ <FormFieldid="ob-biz-zone"label={t('settings.general.timeZone.label')}- tip={t('settings.general.timeZone.tip')}+ help={t('settings.general.timeZone.tip')}>{/* Not asked before, so a plain field: the owner checks it here (the country above was given already). */}<TimeZoneSelect id="ob-biz-zone" value={zone} onChange={setPickedZone} />- </Field>+ </FormField>)}</div>{!!draft.hours?.length && (@@ -838,17 +839,17 @@ function ReviewProfile({<span>{t('onboarding.business.more.what')}</span></summary><div className="ob-more-body">- <Field+ <FormFieldid="ob-biz-services"label={t('onboarding.business.field.services')}- help={t('onboarding.business.field.servicesHelp')}+ description={t('onboarding.business.field.servicesHelp')}><TextArea id="ob-biz-services" value={draft.services} onChange={v => set({ services: v })} />- </Field>- <Field+ </FormField>+ <FormFieldid="ob-biz-about"label={t('onboarding.business.field.about')}- help={t('onboarding.business.field.aboutHelp', { assistant: assistant.name })}+ description={t('onboarding.business.field.aboutHelp', { assistant: assistant.name })}><TextAreaid="ob-biz-about"@@ -856,14 +857,14 @@ function ReviewProfile({onChange={v => set({ about: v })}placeholder={t('onboarding.business.field.aboutPlaceholder')}/>- </Field>- <Field+ </FormField>+ <FormFieldid="ob-biz-calls"label={t('onboarding.business.field.calls')}- help={t('onboarding.business.field.callsHelp')}+ description={t('onboarding.business.field.callsHelp')}><TextArea id="ob-biz-calls" value={draft.useCases} onChange={v => set({ useCases: v })} tall />- </Field>+ </FormField></div></details>{/* The greeting with the business's name is saved too; the owner hears and edits it in the next step. */}diff --git a/apps/web/src/onboarding/ForwardingCheck.tsx b/apps/web/src/onboarding/ForwardingCheck.tsxindex f67e84f6..8500826b 100644--- a/apps/web/src/onboarding/ForwardingCheck.tsx+++ b/apps/web/src/onboarding/ForwardingCheck.tsx@@ -12,7 +12,6 @@ import { useT } from '@linedesk/i18n/react'import { i18n } from '../i18n/index.tsx'import { type ReactNode, useEffect, useRef, useState } from 'react'import { callAction, readAction, useWriteAction } from '../settings/settings-api.ts'-import { Field } from '../settings/fields.tsx'import { refreshGoLiveChecklist } from '../inbox/GoLiveChecklist.tsx'import { codeOf, rejectionText } from '../shell/rejections.ts'import { useAssistantName, useRun } from '../store.tsx'@@ -30,6 +29,7 @@ import { formatNumber, outboundE164 } from './flow.ts'import { useClientWord } from './clientWords.tsx'import { useOutboundCountries } from './outbound-number.ts'import { useDefaultPhoneCountry } from '../phoneCountry.ts'+import { FormField } from '../ui/form.tsx'const POLL_MS = 2000/** Reads that fail in a row before the check says so and offers to try again; until then it backs off. */@@ -222,10 +222,10 @@ export function ForwardingCheck({return (<div className="fc">{canCheck && (- <Field+ <FormFieldid={fieldId}label={t(word('onboarding.forwardingCheck.numberLabel'))}- tip={t(word('onboarding.forwardingCheck.numberTip'))}+ help={t(word('onboarding.forwardingCheck.numberTip'))}><PhoneInputid={fieldId}@@ -245,7 +245,7 @@ export function ForwardingCheck({if (businessNumber) void lookUp(businessNumber)}}/>- </Field>+ </FormField>)}{canCheck && policyProblem && <Note tone="danger">{policyProblem}</Note>}{line && (diff --git a/apps/web/src/onboarding/NotifyStep.tsx b/apps/web/src/onboarding/NotifyStep.tsxindex 7e98191c..893cdeaf 100644--- a/apps/web/src/onboarding/NotifyStep.tsx+++ b/apps/web/src/onboarding/NotifyStep.tsx@@ -11,7 +11,7 @@ import { useT } from '@linedesk/i18n/react'import { useState } from 'react'import { brandName } from '../brand.ts'import { useDefaultPhoneCountry } from '../phoneCountry.ts'-import { Field, TextArea } from '../settings/fields.tsx'+import { TextArea } from '../settings/fields.tsx'import { useAssistantOf, useRows, useRun } from '../store.tsx'import { useMember } from '../team/members.ts'import { RadioCard } from '../ui/controls.tsx'@@ -32,6 +32,7 @@ import {} from './flow.ts'import { useOutboundCountries, withUnfinishedNumber } from './outbound-number.ts'import { useSetupKeys } from './setup-keys.ts'+import { FormField } from '../ui/form.tsx'type Props = {/** The member's user id: their name is how the assistant names them to callers. */@@ -141,10 +142,10 @@ function NotifyForm({ assistant, actorId, emailConfirmed, onBack, onNext }: Prop</div>{draft.urgent === 'transfer' && (<div className="ob-urgent">- <Field+ <FormFieldid="ob-mobile"label={t(word('onboarding.notify.mobile.label'))}- tip={t('onboarding.notify.mobile.tip')}+ help={t('onboarding.notify.mobile.tip')}error={mobileError}><PhoneInput@@ -155,11 +156,11 @@ function NotifyForm({ assistant, actorId, emailConfirmed, onBack, onNext }: ProponChange={mobile => set({ mobile })}onBlur={() => draft.mobile.trim() && setShown(true)}/>- </Field>- <Field+ </FormField>+ <FormFieldid="ob-urgent-means"label={t('onboarding.notify.urgentMeans')}- help={EMERGENCY_NOTE(name, workspaceCountry?.country)}+ description={EMERGENCY_NOTE(name, workspaceCountry?.country)}error={conditionError}><TextArea@@ -168,7 +169,7 @@ function NotifyForm({ assistant, actorId, emailConfirmed, onBack, onNext }: ProponChange={v => set({ condition: v })}invalid={!!conditionError}/>- </Field>+ </FormField></div>)}{otherMessage && <Note tone="danger">{otherMessage}</Note>}diff --git a/apps/web/src/onboarding/PhoneStep.tsx b/apps/web/src/onboarding/PhoneStep.tsxindex 6c1836ea..7440850a 100644--- a/apps/web/src/onboarding/PhoneStep.tsx+++ b/apps/web/src/onboarding/PhoneStep.tsx@@ -9,7 +9,6 @@ import type { PhoneSetupStatus } from '../auth.ts'import { useDefaultPhoneCountry } from '../phoneCountry.ts'import { AreaCodeInput } from '../settings/AreaCodeInput.tsx'import { CarrierNumberInput } from '../settings/CarrierNumberInput.tsx'-import { Field } from '../settings/fields.tsx'import { NearbyAreaCodes } from '../settings/NearbyAreaCodes.tsx'import { useWorkspaceSettings, useWriteAction } from '../settings/settings-api.ts'import { useAssistant, useAssistantName, useRows, useRun } from '../store.tsx'@@ -48,6 +47,7 @@ import {URGENT_CONTACT_ID,} from './flow.ts'import { useSetupKeys } from './setup-keys.ts'+import { FormField } from '../ui/form.tsx'type Props = {status: PhoneSetupStatus@@ -272,7 +272,7 @@ function Choose({{dev && option === 'existing' && <p className="ob2-note">{t('onboarding.phone.choose.dev')}</p>}{nothingToConnect ? null : option === 'existing' ? (<>- <Field+ <FormFieldid="ob-number"label={carrier ? t('onboarding.phone.choose.numberIn', { carrier }) : t('onboarding.phone.choose.number')}>@@ -286,7 +286,7 @@ function Choose({}}defaultCountry={phoneCountry}/>- </Field>+ </FormField>{buyable && (<buttontype="button"@@ -301,7 +301,7 @@ function Choose({) : (<>{!noAreaCode && (- <Field+ <FormFieldid="ob-area"label={option === 'forward'@@ -320,7 +320,7 @@ function Choose({clearError()}}/>- </Field>+ </FormField>)}{!partnerManaged && (<p className="ob2-note">diff --git a/apps/web/src/onboarding/PickupStep.tsx b/apps/web/src/onboarding/PickupStep.tsxindex 13231c26..26b18bb4 100644--- a/apps/web/src/onboarding/PickupStep.tsx+++ b/apps/web/src/onboarding/PickupStep.tsx@@ -8,7 +8,6 @@ import { useT } from '@linedesk/i18n/react'import { useState } from 'react'import { HoursGrid, TimeZoneSelect } from '../settings/BusinessHours.tsx'import { type DayHours, hoursProblem, spansOf } from '../settings/businessHoursModel.ts'-import { Field } from '../settings/fields.tsx'import { patchWorkspaceSettings, useWorkspaceSettings, useWriteAction } from '../settings/settings-api.ts'import { browserTimeZone } from '../settings/timeZones.ts'import { useAssistantName, useRows, useRun } from '../store.tsx'@@ -27,6 +26,7 @@ import {pickupSettings,} from './flow.ts'import { useSetupKeys } from './setup-keys.ts'+import { FormField } from '../ui/form.tsx'type StepProps = {onBack: () => void@@ -130,9 +130,9 @@ function PickupForm({ saved, onBack, onNext, memory, onMemory }: StepProps & { s</div>{needsHours && (<>- <Field id="ob-tz" label={t('onboarding.pickup.timeZone')}>+ <FormField id="ob-tz" label={t('onboarding.pickup.timeZone')}><TimeZoneSelect id="ob-tz" value={timeZone} onChange={setTimeZone} />- </Field>+ </FormField><span className="ob-label">{t('onboarding.pickup.businessHours')}</span><HoursGrid days={days} set={set} canEdit /></>diff --git a/apps/web/src/settings/AppointmentTypeDialog.tsx b/apps/web/src/settings/AppointmentTypeDialog.tsxindex 7452e11d..de74f31d 100644--- a/apps/web/src/settings/AppointmentTypeDialog.tsx+++ b/apps/web/src/settings/AppointmentTypeDialog.tsx@@ -6,7 +6,7 @@ import { useT } from '@linedesk/i18n/react'import { type FormEvent, useState } from 'react'import { useRun } from '../store.tsx'import { Checkbox, Select, type SelectOption } from '../ui/controls.tsx'-import { Dialog, Input } from '../ui/form.tsx'+import { Dialog, Input, FormField } from '../ui/form.tsx'import { Button } from '../ui/kit.tsx'import { DeleteButton } from '../ui/list.tsx'import { EditBusinessHours } from './BusinessHoursDialog.tsx'@@ -23,7 +23,6 @@ import {fieldLabel,typeFields,} from './calendarModel.ts'-import { Field } from './fields.tsx'/** A new type (no `type`) or a change to one. Saving applies at once (appointmentType.upsert), like the rest of the page. */export function AppointmentTypeDialog({@@ -71,7 +70,9 @@ export function AppointmentTypeDialog({onSubmit={save}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Buttontype="submit"variant="primary"@@ -85,15 +86,15 @@ export function AppointmentTypeDialog({><div className="cal-type-form"><div className="k-fields-2">- <Field id="cal-type-name" label={t('settings.calendar.type.name')}>+ <FormField id="cal-type-name" label={t('settings.calendar.type.name')}><Inputid="cal-type-name"value={name}placeholder={t('settings.calendar.type.nameExample')}onChange={e => setName(e.target.value)}/>- </Field>- <Field id="cal-type-duration" label={t('settings.calendar.type.length')}>+ </FormField>+ <FormField id="cal-type-duration" label={t('settings.calendar.type.length')}><Selectid="cal-type-duration"label={t('settings.calendar.type.length')}@@ -101,12 +102,12 @@ export function AppointmentTypeDialog({options={durationOptions}onChange={setDuration}/>- </Field>+ </FormField></div>- <Field+ <FormFieldid="cal-type-when"label={t('settings.calendar.condition.type')}- tip={t('settings.calendar.type.conditionTip')}+ help={t('settings.calendar.type.conditionTip')}><Inputid="cal-type-when"@@ -115,12 +116,12 @@ export function AppointmentTypeDialog({maxLength={CONDITION_MAX}onChange={e => setCondition(e.target.value)}/>- </Field>+ </FormField><div className="cal-type-rules">- <Field+ <FormFieldid="cal-type-before"label={t('settings.calendar.type.bufferBefore')}- tip={t('settings.calendar.type.bufferBeforeTip')}+ help={t('settings.calendar.type.bufferBeforeTip')}><Selectid="cal-type-before"@@ -129,11 +130,11 @@ export function AppointmentTypeDialog({options={bufferOptions}onChange={setBefore}/>- </Field>- <Field+ </FormField>+ <FormFieldid="cal-type-after"label={t('settings.calendar.type.bufferAfter')}- tip={t('settings.calendar.type.bufferAfterTip')}+ help={t('settings.calendar.type.bufferAfterTip')}><Selectid="cal-type-after"@@ -142,8 +143,8 @@ export function AppointmentTypeDialog({options={bufferOptions}onChange={setAfter}/>- </Field>- <Field id="cal-type-hours" label={t('settings.calendar.type.canBeBooked')}>+ </FormField>+ <FormField id="cal-type-hours" label={t('settings.calendar.type.canBeBooked')}><span className="bh-with"><Selectid="cal-type-hours"@@ -154,9 +155,9 @@ export function AppointmentTypeDialog({/>{when !== 'any_time' && <EditBusinessHours canEdit />}</span>- </Field>+ </FormField></div>- <Field label={t('settings.calendar.type.askFor')} tip={t('settings.calendar.type.askForTip')}>+ <FormField label={t('settings.calendar.type.askFor')} help={t('settings.calendar.type.askForTip')}><span className="cal-type-fields">{BOOKING_FIELDS.map(f => (<Checkbox@@ -168,7 +169,7 @@ export function AppointmentTypeDialog({</Checkbox>))}</span>- </Field>+ </FormField>{type && (<div className="cal-type-delete"><span>{t('settings.calendar.type.deleteNote')}</span>diff --git a/apps/web/src/settings/AssistantSettings.tsx b/apps/web/src/settings/AssistantSettings.tsxindex 9ca42039..91cbb149 100644--- a/apps/web/src/settings/AssistantSettings.tsx+++ b/apps/web/src/settings/AssistantSettings.tsx@@ -48,7 +48,7 @@ import { openGroupCount } from '../review/reviewModel.ts'import { useAssistants, useRows, useRun } from '../store.tsx'import { appLink } from '../ui/AppLink.tsx'import { RadioCard, Select, Switch } from '../ui/controls.tsx'-import { FormMessage, Input, onSaveKey, SaveBar, Textarea } from '../ui/form.tsx'+import { FormMessage, Input, onSaveKey, SaveBar, Textarea, FormField } from '../ui/form.tsx'import { Button, Icon, Note } from '../ui/kit.tsx'import { Loading, LoadProblem, Skeleton, useLoading, useLoadState } from '../ui/LoadStates.tsx'import { type SearchOption, SearchSelect } from '../ui/SearchSelect.tsx'@@ -101,7 +101,6 @@ import { CallQualitySettings, levelSavedNote } from './CallQuality.tsx'import { CONNECT_RETURN_KEY, needsCalendar } from './calendarModel.ts'import {countryDefaultOptions,- Field,FollowsLine,ReadOnlyNote,Section,@@ -279,7 +278,7 @@ function AssistantNameSection({ draft, set }: SectionProps) {const problem = nameProblem(draft.name)return (<Section id="as-name-section">- <Field id="as-name" label={t('settings.assistant.name.label')} error={problem}>+ <FormField id="as-name" label={t('settings.assistant.name.label')} error={problem}><TextInputid="as-name"value={draft.name}@@ -287,7 +286,7 @@ function AssistantNameSection({ draft, set }: SectionProps) {invalid={!!problem}placeholder="Maya"/>- </Field>+ </FormField></Section>)}@@ -315,7 +314,7 @@ function Greeting({const canAddOutside = hoursOn && !outsideGreeting.shownreturn (<Section id="as-greeting">- <Field+ <FormFieldid="as-greet"label={t(outsideShown ? 'settings.assistant.greeting.labelDuringHours' : 'settings.assistant.greeting.label')}aside={draft.greeting.trim() ? spokenLength(draft.greeting) : undefined}@@ -342,9 +341,9 @@ function Greeting({</Button></span>)}- </Field>+ </FormField>{outsideShown && (- <Field+ <FormFieldid="as-greet-out"label={t('settings.assistant.greeting.outside')}labelAfter={<EditBusinessHours canEdit={canEdit} />}@@ -374,7 +373,7 @@ function Greeting({draft={draft}/><CallerDetailsHint greeting={draft.greeting_outside} />- </Field>+ </FormField>)}{canAddOutside && (<div className="as-greet-add">@@ -685,7 +684,7 @@ export function Languages({}}><div className="as-languages-main">- <Field id="as-languages-main" label={t('settings.assistant.languages.main')}>+ <FormField id="as-languages-main" label={t('settings.assistant.languages.main')}>{/* Searchable: the list has every language a voice provider speaks, too long to scroll. */}<SearchSelectid="as-languages-main"@@ -705,7 +704,7 @@ export function Languages({onReset={onCountryLanguage}/>)}- </Field>+ </FormField></div><fieldset className="as-languages-switch"><legend className="as-languages-q">{t('settings.assistant.languages.switch.label')}</legend>diff --git a/apps/web/src/settings/Billing.tsx b/apps/web/src/settings/Billing.tsxindex f080a6f7..5352d531 100644--- a/apps/web/src/settings/Billing.tsx+++ b/apps/web/src/settings/Billing.tsx@@ -775,7 +775,7 @@ export function IntervalDialog({<Button variant="ghost" onClick={onClose} disabled={busy}>{t('common.action.cancel')}</Button>- <Button variant="primary" type="submit" busy={busy} shortcut={['⏎']}>+ <Button variant="primary" type="submit" busy={busy}>{title}</Button></>diff --git a/apps/web/src/settings/BusinessHoursDialog.tsx b/apps/web/src/settings/BusinessHoursDialog.tsxindex 547217ce..7df29998 100644--- a/apps/web/src/settings/BusinessHoursDialog.tsx+++ b/apps/web/src/settings/BusinessHoursDialog.tsx@@ -93,7 +93,6 @@ function BusinessHoursDialog({ canEdit, onClose }: { canEdit: boolean; onClose:<Buttonvariant="primary"disabled={!dirty}- shortcut={['⌘', 'S']}title={t('common.action.saveWithKey', { key: '⌘S' })}onClick={save}>diff --git a/apps/web/src/settings/Calendar.tsx b/apps/web/src/settings/Calendar.tsxindex ab926093..e92abc91 100644--- a/apps/web/src/settings/Calendar.tsx+++ b/apps/web/src/settings/Calendar.tsx@@ -13,14 +13,13 @@ import type { AppointmentType, Assistant, AssistantCalendar, CalendarConnectionimport { T, useFormat, useT } from '@linedesk/i18n/react'import { type FormEvent, type ReactNode, useEffect, useRef, useState } from 'react'import { useQuery } from '../cachedQuery.ts'-import { intlLocale } from '../i18n/format.ts'import { i18n } from '../i18n/index.tsx'import { refreshOnReturn } from '../refreshOnReturn.ts'import { useRows, useRun } from '../store.tsx'import { LinkButton } from '../ui/AppLink.tsx'import { SignInMark } from '../ui/brand-logos.tsx'import { Checkbox, RadioCard, Switch } from '../ui/controls.tsx'-import { Card, Dialog, Input } from '../ui/form.tsx'+import { Card, Dialog, Input, FormField } from '../ui/form.tsx'import { Badge, Button, cx, Icon } from '../ui/kit.tsx'import { Loading, SkeletonList, useLoadState } from '../ui/LoadStates.tsx'import { EditButton, List, ListEmpty, ListRow, MenuButton } from '../ui/list.tsx'@@ -47,7 +46,6 @@ import {rulesLabel,toolTypeRows,} from './calendarModel.ts'-import { Field } from './fields.tsx'import { KeyConnectDialog } from './KeyConnect.tsx'import { MissingProviderNote } from './MissingProviderNote.tsx'import { kindLabel } from './businessKind.ts'@@ -342,17 +340,19 @@ function WhenDialog({onSubmit={save}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Button type="submit" variant="primary" title={t('common.action.saveWithKey', { key: '⌘S' })}>{t('common.action.save')}</Button></>}>- <Field+ <FormFieldid="cal-when-input"label={kind === 'type' ? t('settings.calendar.condition.type') : t('settings.calendar.condition.calendar')}- tip={t('settings.calendar.type.conditionTip')}+ help={t('settings.calendar.type.conditionTip')}><Inputid="cal-when-input"@@ -367,7 +367,7 @@ function WhenDialog({}onChange={e => setText(e.target.value)}/>- </Field>+ </FormField>{offerDefault && (<Checkbox checked={makeDefault} disabled={calendar.is_default} onChange={setMakeDefault}>{t('settings.calendar.whenDialog.default')}@@ -466,7 +466,7 @@ function EventTypeRow({title={<><span className="k-row-text">{name}</span>- {added?.is_default && <Badge tone="outline">{t('settings.calendar.default')}</Badge>}+ {added?.is_default && <Badge>{t('settings.calendar.default')}</Badge>}{connection && (<span className="cal-source" title={toolTypeSource(connection, listed?.group)}>{listed?.group ? `${provider} · ${listed.group}` : provider}@@ -696,7 +696,7 @@ function CalendarRow({title={<><span className="k-row-text">{calendar.name}</span>- {calendar.is_default && <Badge tone="outline">{t('settings.calendar.default')}</Badge>}+ {calendar.is_default && <Badge>{t('settings.calendar.default')}</Badge>}</>}actions={@@ -867,7 +867,9 @@ function CalendarPicker({size="sm"footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Buttontype="submit"variant="primary"@@ -1196,7 +1198,9 @@ function SwitchModeDialog({onSubmit={confirm}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Buttontype="submit"variant="primary"diff --git a/apps/web/src/settings/Carrier.tsx b/apps/web/src/settings/Carrier.tsxindex a3dbb42e..f4fd04d3 100644--- a/apps/web/src/settings/Carrier.tsx+++ b/apps/web/src/settings/Carrier.tsx@@ -5,10 +5,10 @@import type { CarrierStatusData, CarrierTestData, WorkspaceCarrier } from '@linedesk/actions'import { carrierFields } from '@linedesk/actions'import { T, useT } from '@linedesk/i18n/react'-import { appLink } from '../ui/AppLink.tsx'+import { appLink, LinkButton } from '../ui/AppLink.tsx'import { type FormEvent, useState } from 'react'import { RadioCard } from '../ui/controls.tsx'-import { Dialog, SecretInput } from '../ui/form.tsx'+import { Dialog, SecretInput, FormField } from '../ui/form.tsx'import { Button, Note } from '../ui/kit.tsx'import { Loading, Skeleton } from '../ui/LoadStates.tsx'import {@@ -24,7 +24,7 @@ import {isChanged,visibleFields,} from './carrierModel.ts'-import { Field, TextInput } from './fields.tsx'+import { TextInput } from './fields.tsx'import { callAction } from './settings-api.ts'import { useQuery, setQueryData } from '../cachedQuery.ts'import { brandName } from '../brand.ts'@@ -73,14 +73,9 @@ export function CarrierLine({ serverProvider = null }: { serverProvider?: stringk="settings.carrier.line.value"values={{ value: <span className="pn-carrier-value">{carrierSummary(status)}</span> }}/>- <button- type="button"- className="pn-carrier-change"- onClick={() => setOpen(true)}- title={t('settings.carrier.line.changeTip')}- >+ <LinkButton onClick={() => setOpen(true)} title={t('settings.carrier.line.changeTip')}>{t('common.action.change')}- </button>+ </LinkButton></p>{open && (<CarrierDialog@@ -240,7 +235,7 @@ function CarrierDialog({const id = `carrier-${field}`const saved = stored(field)return (- <Field+ <FormFieldkey={field}id={id}label={spec.label}@@ -265,7 +260,7 @@ function CarrierDialog({invalid={!!errors[field]}/>)}- </Field>+ </FormField>)})}{result && <Note tone={result.ok ? 'success' : 'danger'}>{result.message}</Note>}diff --git a/apps/web/src/settings/ExportCalls.tsx b/apps/web/src/settings/ExportCalls.tsxindex 3b593f29..d06e1081 100644--- a/apps/web/src/settings/ExportCalls.tsx+++ b/apps/web/src/settings/ExportCalls.tsx@@ -3,11 +3,9 @@import type { CallExportData } from '@linedesk/actions'import { useT } from '@linedesk/i18n/react'import { useState } from 'react'-import { DateInput } from '../ui/form.tsx'+import { DateInput, FormField } from '../ui/form.tsx'import { Button } from '../ui/kit.tsx'-import { Field } from './fields.tsx'import { callAction } from './settings-api.ts'-import './webhooks.css'type Props = { toast: (text: string) => void }@@ -46,13 +44,13 @@ export function ExportCalls({ toast }: Props) {}}return (- <div className="cf-export">- <Field id="ex-from" label={t('settings.export.from')}>+ <div className="k-fields-row">+ <FormField id="ex-from" label={t('settings.export.from')}><DateInput id="ex-from" value={from} max={to} onChange={setFrom} />- </Field>- <Field id="ex-to" label={t('settings.export.to')}>+ </FormField>+ <FormField id="ex-to" label={t('settings.export.to')}><DateInput id="ex-to" value={to} min={from} onChange={setTo} />- </Field>+ </FormField><Button busy={busy} disabled={busy || !from || !to} onClick={run}>{busy ? t('settings.export.exporting') : t('settings.export.button')}</Button>diff --git a/apps/web/src/settings/Holidays.tsx b/apps/web/src/settings/Holidays.tsxindex 856375a4..65ec9f84 100644--- a/apps/web/src/settings/Holidays.tsx+++ b/apps/web/src/settings/Holidays.tsx@@ -11,7 +11,7 @@ import { useT } from '@linedesk/i18n/react'import { type FormEvent, useEffect, useState } from 'react'import { useRun } from '../store.tsx'import { Checkbox, Select, Switch } from '../ui/controls.tsx'-import { DateInput, Dialog, Input } from '../ui/form.tsx'+import { DateInput, Dialog, Input, FormField } from '../ui/form.tsx'import { Button } from '../ui/kit.tsx'import { Loading, SkeletonList } from '../ui/LoadStates.tsx'import { List, ListEmpty, ListRow, MenuButton, type MenuItem } from '../ui/list.tsx'@@ -33,7 +33,7 @@ import {withChange,withDays,} from './closedDaysModel.ts'-import { Field, Section, TextArea } from './fields.tsx'+import { Section, TextArea } from './fields.tsx'import {callAction,patchWorkspaceSettings,@@ -546,7 +546,7 @@ function CalendarDialog({ calendar, today, onClose, onSave }: CalendarDialogProp>{data && (<div className="hd-place">- <Field id="hd-country" label={t('settings.holidays.calendar.country')}>+ <FormField id="hd-country" label={t('settings.holidays.calendar.country')}><Selectid="hd-country"label={t('settings.holidays.calendar.country')}@@ -554,9 +554,9 @@ function CalendarDialog({ calendar, today, onClose, onSave }: CalendarDialogPropoptions={data.countries.map(c => ({ value: c.code, label: c.name }))}onChange={country => setPlace({ country })}/>- </Field>+ </FormField>{data.states.length > 0 && (- <Field id="hd-state" label={t('settings.holidays.calendar.state')}>+ <FormField id="hd-state" label={t('settings.holidays.calendar.state')}><Selectid="hd-state"label={t('settings.holidays.calendar.state')}@@ -567,7 +567,7 @@ function CalendarDialog({ calendar, today, onClose, onSave }: CalendarDialogProp]}onChange={state => setPlace({ country: data.country, state: state || undefined })}/>- </Field>+ </FormField>)}</div>)}@@ -657,14 +657,14 @@ export function VacationMode({ canEdit, toast }: Props) {{draft ? (<form className="hd-vac" onSubmit={save}><div className="hd-range">- <Field id="hd-from" label={t('settings.holidays.vacation.from')}>+ <FormField id="hd-from" label={t('settings.holidays.vacation.from')}><DateInput id="hd-from" value={draft.from} min={today} onChange={from => setDraft({ ...draft, from })} />- </Field>- <Field id="hd-until" label={t('settings.holidays.vacation.until')}>+ </FormField>+ <FormField id="hd-until" label={t('settings.holidays.vacation.until')}><DateInput id="hd-until" value={draft.until} min={draft.from || today} onChange={setUntil} />- </Field>+ </FormField></div>- <Field+ <FormFieldid="hd-greeting"label={t('settings.holidays.vacation.greeting')}aside={t('settings.holidays.vacation.optional')}@@ -675,7 +675,7 @@ export function VacationMode({ canEdit, toast }: Props) {onChange={greeting => setDraft({ ...draft, greeting })}placeholder={t('settings.holidays.vacation.greetingPlaceholder')}/>- </Field>+ </FormField><div className="hd-actions"><Button size="sm" variant="ghost" onClick={() => setDraft(null)}>{t('common.action.cancel')}diff --git a/apps/web/src/settings/KeyConnect.tsx b/apps/web/src/settings/KeyConnect.tsxindex c350e40a..b4de8ec5 100644--- a/apps/web/src/settings/KeyConnect.tsx+++ b/apps/web/src/settings/KeyConnect.tsx@@ -6,11 +6,10 @@ import type { ConnectWithPasswordData } from '@linedesk/actions'import { useT } from '@linedesk/i18n/react'import { type KeyboardEvent, useState } from 'react'import { Select, type SelectOption } from '../ui/controls.tsx'-import { Dialog, Input, SecretInput } from '../ui/form.tsx'+import { Dialog, Input, SecretInput, FormField } from '../ui/form.tsx'import { NO_PASSWORD_MANAGER } from '../ui/passwordManager.ts'import { Button } from '../ui/kit.tsx'import { CALDAV_SERVICES, type CalDavService, KEY_FORM, type KeyGuide, type KeyProviderId } from './calendarModel.ts'-import { Field } from './fields.tsx'import { useWriteAction } from './settings-api.ts'/** Enter in a field connects, and never submits the page around the dialog. */@@ -129,7 +128,7 @@ function TokenConnectDialog({size="sm"footer={<Footer onClose={onClose} saving={saving} disabled={!key.trim()} submit={submit} />}>- <Field id="key-connect-key" label={t(form.keyLabel)} help={t(form.help)} error={error}>+ <FormField id="key-connect-key" label={t(form.keyLabel)} description={t(form.help)} error={error}>{/* A key, not a password: never saved as this site's login (SecretInput). */}<SecretInputid="key-connect-key"@@ -139,7 +138,7 @@ function TokenConnectDialog({onChange={setKey}onKeyDown={onEnter}/>- </Field>+ </FormField><WhereToGetIt guide={form.guide} /></Dialog>)@@ -172,7 +171,7 @@ function CalDavConnectDialog({ onClose, onConnected }: Props) {size="sm"footer={<Footer onClose={onClose} saving={saving} disabled={!complete} submit={submit} />}>- <Field id="caldav-service" label={t('settings.keyConnect.caldav.calendar')}>+ <FormField id="caldav-service" label={t('settings.keyConnect.caldav.calendar')}><div><Selectid="caldav-service"@@ -182,9 +181,9 @@ function CalDavConnectDialog({ onClose, onConnected }: Props) {onChange={setService}/></div>- </Field>+ </FormField>{service === 'other' && (- <Field id="caldav-server" label={t('settings.keyConnect.caldav.server')}>+ <FormField id="caldav-server" label={t('settings.keyConnect.caldav.server')}><Inputid="caldav-server"inputMode="url"@@ -194,11 +193,11 @@ function CalDavConnectDialog({ onClose, onConnected }: Props) {onChange={e => setServerUrl(e.target.value)}onKeyDown={onEnter}/>- </Field>+ </FormField>)}{/* The calendar service's sign-in, not this site's: password managers stay out, so it is not saved as theLinedesk login and the password field gets no generated password. */}- <Field id="caldav-user" label={t(preset.username)}>+ <FormField id="caldav-user" label={t(preset.username)}><Inputid="caldav-user"{...NO_PASSWORD_MANAGER}@@ -208,8 +207,13 @@ function CalDavConnectDialog({ onClose, onConnected }: Props) {onChange={e => setUsername(e.target.value)}onKeyDown={onEnter}/>- </Field>- <Field id="caldav-password" label={t('settings.keyConnect.caldav.password')} help={t(preset.help)} error={error}>+ </FormField>+ <FormField+ id="caldav-password"+ label={t('settings.keyConnect.caldav.password')}+ description={t(preset.help)}+ error={error}+ ><SecretInputid="caldav-password"value={password}@@ -217,7 +221,7 @@ function CalDavConnectDialog({ onClose, onConnected }: Props) {onChange={setPassword}onKeyDown={onEnter}/>- </Field>+ </FormField><WhereToGetIt guide={preset.guide} /></Dialog>)diff --git a/apps/web/src/settings/Knowledge.tsx b/apps/web/src/settings/Knowledge.tsxindex 4e6885fa..5c7648f0 100644--- a/apps/web/src/settings/Knowledge.tsx+++ b/apps/web/src/settings/Knowledge.tsx@@ -7,7 +7,7 @@ import type { Assistant } from '@linedesk/db/types'import { useT } from '@linedesk/i18n/react'import { useEffect, useMemo, useRef, useState } from 'react'import { fmt } from '../i18n/format.ts'-import { Input, Textarea } from '../ui/form.tsx'+import { Input, Textarea, FormField } from '../ui/form.tsx'import { Badge, Button, cx, Icon } from '../ui/kit.tsx'import {type AboutIssue,@@ -25,7 +25,7 @@ import {written,} from './aboutModel.ts'import type { Draft } from './assistantDraft.ts'-import { Field, Section, TextArea } from './fields.tsx'+import { Section, TextArea } from './fields.tsx'import { hasKnowledge } from './knowledgeModel.ts'import { callAction } from './settings-api.ts'import { WriteWithHelp } from './WriteWithHelp.tsx'@@ -121,7 +121,7 @@ function BusinessText(props: { parts: AboutParts; update: (p: AboutParts) => voiconst t = useT()const [text, setText] = useTyped(parts.profile, 'text')return (- <Field id="as-instr" label={t('settings.knowledge.label', { name })}>+ <FormField id="as-instr" label={t('settings.knowledge.label', { name })}><TextAreaid="as-instr"tall@@ -132,7 +132,7 @@ function BusinessText(props: { parts: AboutParts; update: (p: AboutParts) => voi}}placeholder={t('settings.knowledge.placeholder')}/>- </Field>+ </FormField>)}diff --git a/apps/web/src/settings/NumberMode.tsx b/apps/web/src/settings/NumberMode.tsxindex 3eb7d6b6..1d4a4c68 100644--- a/apps/web/src/settings/NumberMode.tsx+++ b/apps/web/src/settings/NumberMode.tsx@@ -9,7 +9,7 @@ import { brandName } from '../brand.ts'import { numberModeLabel } from '../onboarding/flow.ts'import { Select } from '../ui/controls.tsx'import { HelpTip } from '../ui/HelpTip.tsx'-import { Field } from './fields.tsx'+import { FormField } from '../ui/form.tsx'type PhoneNumberMode = PhoneNumber['mode']@@ -67,10 +67,10 @@ export function NumberModeField({ mode, name, disabled, onChange }: Props) {const hint = useNumberModeHint()const label = t('settings.phone.manage.callsReach', { name })return (- <Field+ <FormFieldid="pn-mode"label={label}- help={hint(mode, name)}+ description={hint(mode, name)}labelAfter={<HelpTip label={t('settings.phone.manage.modeHelpLabel', { name })} text={<NumberModeHelp name={name} />} />}@@ -85,6 +85,6 @@ export function NumberModeField({ mode, name, disabled, onChange }: Props) {onChange={onChange}/></div>- </Field>+ </FormField>)}diff --git a/apps/web/src/settings/OwnPhoneSystem.tsx b/apps/web/src/settings/OwnPhoneSystem.tsxindex dae9ddc9..e1c3c03a 100644--- a/apps/web/src/settings/OwnPhoneSystem.tsx+++ b/apps/web/src/settings/OwnPhoneSystem.tsx@@ -12,12 +12,13 @@ import { CopyButton } from '../onboarding/Frame.tsx'import { useDefaultPhoneCountry } from '../phoneCountry.ts'import { useAssistants, useRows } from '../store.tsx'import { Select } from '../ui/controls.tsx'-import { Dialog, SecretInput } from '../ui/form.tsx'+import { Dialog, SecretInput, FormField } from '../ui/form.tsx'import { Button, Note } from '../ui/kit.tsx'import { Loading, SkeletonList } from '../ui/LoadStates.tsx'import { PhoneInput } from '../ui/PhoneInput.tsx'-import { Field, TextInput } from './fields.tsx'+import { TextInput } from './fields.tsx'import { callAction, useWriteAction } from './settings-api.ts'+import { LinkButton } from '../ui/AppLink.tsx'const SIP_TRUNK = 'workspace.sipTrunk'const loadSipTrunk = () => callAction<SipTrunkData>('sipTrunk.get')@@ -36,14 +37,9 @@ export function OwnPhoneSystemLine() {<><p className="pn-carrier">{t('settings.sip.line.value', { count })}- <button- type="button"- className="pn-carrier-change"- onClick={() => setOpen(true)}- title={t('settings.sip.line.tip')}- >+ <LinkButton onClick={() => setOpen(true)} title={t('settings.sip.line.tip')}>{count ? t('settings.sip.line.details') : t('settings.sip.line.connect')}- </button>+ </LinkButton></p>{open && <OwnPhoneSystemDialog onClose={() => setOpen(false)} />}</>@@ -185,10 +181,10 @@ function OwnPhoneSystemDialog({ onClose }: { onClose: () => void }) {{numbers.length > 0 && <Arrivals numbers={numbers.map(n => n.e164)} />}{numbers.length > 0 && <PutThrough outbound={trunk.outbound} guide={guide} />}<form onSubmit={e => void connect(e)} className="pn-sip-add">- <Field+ <FormFieldid="sip-number"label={numbers.length ? t('settings.sip.add.another') : t('settings.sip.add.label')}- tip={t('settings.sip.add.tip')}+ help={t('settings.sip.add.tip')}error={problem ?? undefined}><PhoneInput@@ -199,9 +195,9 @@ function OwnPhoneSystemDialog({ onClose }: { onClose: () => void }) {invalid={!!problem}autoComplete="off"/>- </Field>+ </FormField>{assistants.length > 1 && (- <Field id="sip-who" label={t('settings.phone.manage.assistant')}>+ <FormField id="sip-who" label={t('settings.phone.manage.assistant')}><div><Selectid="sip-who"@@ -211,7 +207,7 @@ function OwnPhoneSystemDialog({ onClose }: { onClose: () => void }) {onChange={setAssistantId}/></div>- </Field>+ </FormField>)}<div><Button type="submit" busy={busy === 'connect'} disabled={!!busy || !typed}>@@ -304,10 +300,10 @@ function PutThrough({ outbound, guide }: { outbound: SipOutboundData | null; gui? t('settings.sip.guide.threecx.transfer', { brand: brandName() }): t('settings.sip.transfer.help')}</Note>- <Field id="sip-out-host" label={t('settings.sip.transfer.host')} tip={t('settings.sip.transfer.hostTip')}>+ <FormField id="sip-out-host" label={t('settings.sip.transfer.host')} help={t('settings.sip.transfer.hostTip')}><TextInput id="sip-out-host" value={host} onChange={setHost} />- </Field>- <Field id="sip-out-transport" label={t('settings.sip.transfer.transport')}>+ </FormField>+ <FormField id="sip-out-transport" label={t('settings.sip.transfer.transport')}><div><Selectid="sip-out-transport"@@ -317,18 +313,18 @@ function PutThrough({ outbound, guide }: { outbound: SipOutboundData | null; guionChange={setTransport}/></div>- </Field>- <Field id="sip-out-user" label={t('settings.sip.values.username')}>+ </FormField>+ <FormField id="sip-out-user" label={t('settings.sip.values.username')}><TextInput id="sip-out-user" value={username} onChange={setUsername} />- </Field>- <Field+ </FormField>+ <FormFieldid="sip-out-password"label={t('settings.sip.values.password')}aside={outbound ? t('settings.sip.transfer.passwordAgain') : undefined}error={problem ?? undefined}><SecretInput id="sip-out-password" value={password} onChange={setPassword} invalid={!!problem} />- </Field>+ </FormField><div className="pn-sip-actions"><Button type="submit" variant="primary" busy={busy} disabled={busy}>{t('common.action.save')}@@ -402,7 +398,7 @@ function SetupGuide({]return (<div className="pn-sip-guide">- <Field id="sip-guide" label={t('settings.sip.guide.label')}>+ <FormField id="sip-guide" label={t('settings.sip.guide.label')}><div><Selectid="sip-guide"@@ -413,7 +409,7 @@ function SetupGuide({onChange={onGuide}/></div>- </Field>+ </FormField><ol className="pn-sip-steps">{steps.map(step => (<li key={step}>{step}</li>@@ -485,9 +481,9 @@ function TestCall() {)return (<form onSubmit={e => void call(e)} className="pn-sip-add pn-sip-transfer">- <Field id="sip-test-to" label={t('settings.sip.test.to')} tip={t('settings.sip.test.toTip')}>+ <FormField id="sip-test-to" label={t('settings.sip.test.to')} help={t('settings.sip.test.toTip')}><PhoneInput id="sip-test-to" value={to} onChange={setTo} defaultCountry={country} autoComplete="tel" />- </Field>+ </FormField>{busy && <Note tone="info">{t('settings.sip.test.ringing')}</Note>}{result && <Note tone={result.ok ? 'success' : 'danger'}>{result.text}</Note>}<div className="pn-sip-actions">diff --git a/apps/web/src/settings/PhoneNumbers.tsx b/apps/web/src/settings/PhoneNumbers.tsxindex 270186ee..5b61cf6f 100644--- a/apps/web/src/settings/PhoneNumbers.tsx+++ b/apps/web/src/settings/PhoneNumbers.tsx@@ -55,7 +55,7 @@ import { notAnsweringWhy } from '../inbox/goLive.ts'import { type Presence, usePresence } from '../shell/presence.ts'import { useAssistantName, useAssistants, useClaimedRejection, useRows, useRun } from '../store.tsx'import { RadioCard, Select } from '../ui/controls.tsx'-import { Dialog } from '../ui/form.tsx'+import { Dialog, FormField } from '../ui/form.tsx'import { AppLink } from '../ui/AppLink.tsx'import { Badge, Button, Note } from '../ui/kit.tsx'import { StatusMark } from '../ui/StatusMark.tsx'@@ -68,7 +68,7 @@ import { OwnPhoneSystemLine } from './OwnPhoneSystem.tsx'import { AreaCodeInput } from './AreaCodeInput.tsx'import { NearbyAreaCodes } from './NearbyAreaCodes.tsx'import { CarrierNumberInput } from './CarrierNumberInput.tsx'-import { Field, Section } from './fields.tsx'+import { Section } from './fields.tsx'import { NumberModeField } from './NumberMode.tsx'import { useWorkspaceSettings } from './settings-api.ts'import { useWorkspaceCountry } from '../workspaceLocale.ts'@@ -189,7 +189,7 @@ export function PhoneNumbers({ canEdit, status: serverStatus, isInstanceAdmin, e</Badge></button>) : (- <AnsweringBadge+ <AnsweringMarkpresence={presence}waiting={statusWaiting}reserved={statusView.phase === 'reserve'}@@ -260,10 +260,10 @@ export function PhoneNumbers({ canEdit, status: serverStatus, isInstanceAdmin, e/*** Whether the assistant answers a number's calls (one answer for every number: usePresence). Only a known "not- * answering" says so: while the answer is on its way a skeleton holds the badge's place (the list is aria-busy), and+ * answering" says so: while the answer is on its way a skeleton holds the mark's place (the list is aria-busy), and* offline a neutral "Offline" (the app-wide offline bar says why), never a false "Not answering" (LIN-771).*/-function AnsweringBadge({ presence, waiting, reserved }: { presence: Presence; waiting: boolean; reserved: boolean }) {+function AnsweringMark({ presence, waiting, reserved }: { presence: Presence; waiting: boolean; reserved: boolean }) {const t = useT()if (waiting)return (@@ -273,18 +273,18 @@ function AnsweringBadge({ presence, waiting, reserved }: { presence: Presence; w)if (presence.kind === 'answering')return (- <Badge tone="ok">+ <span className="pn-answering"><StatusMark state="works" label={t('settings.phone.row.answering')} />{t('settings.phone.row.answering')}- </Badge>+ </span>)if (presence.kind === 'offline')return <Badge title={t('inbox.presence.offlineTitle')}>{t('settings.phone.row.offline')}</Badge>return (- <Badge>+ <span className="pn-answering"><StatusMark state="off" label={t('settings.phone.row.notAnswering')} />{t('settings.phone.row.notAnswering')}- </Badge>+ </span>)}@@ -408,10 +408,10 @@ export function ManageNumber({ number, assistants, canEdit, release = false, onC) : (<>{assistants.length > 1 && (- <Field+ <FormFieldid="pn-who"label={t('settings.phone.manage.assistant')}- tip={t('settings.phone.manage.assistantTip')}+ help={t('settings.phone.manage.assistantTip')}><div><Select@@ -431,7 +431,7 @@ export function ManageNumber({ number, assistants, canEdit, release = false, onC}/></div>- </Field>+ </FormField>)}{ownSystem && assistants.length <= 1 && <Note tone="info">{t('settings.sip.manageNote')}</Note>}{!ownSystem && (@@ -454,10 +454,10 @@ export function ManageNumber({ number, assistants, canEdit, release = false, onConCarrier={pick.setGuide}pickedByOwner={pick.pickedByOwner}>- <Field+ <FormFieldid="pn-codes"label={t('settings.phone.manage.forwarding')}- tip={+ help={number.mode === 'forward_all'? t('settings.phone.manage.forwardingAllTip'): t('settings.phone.manage.forwardingConditionalTip')@@ -468,7 +468,7 @@ export function ManageNumber({ number, assistants, canEdit, release = false, onCe164={number.e164}mode={number.mode === 'forward_all' ? 'forward_all' : 'forward_conditional'}/>- </Field>+ </FormField></CheckWhenEditing>)}</>@@ -576,7 +576,7 @@ function ReleaseNumber({ number, onCancel }: { number: PhoneNumber; onCancel: (): []),].join(' ')}</span>- <Field id={`rel-in-${number.id}`} label={t('settings.phone.release.confirmLabel')}>+ <FormField id={`rel-in-${number.id}`} label={t('settings.phone.release.confirmLabel')}><PhoneInputid={`rel-in-${number.id}`}value={typed}@@ -588,7 +588,7 @@ function ReleaseNumber({ number, onCancel }: { number: PhoneNumber; onCancel: ()}}placeholder={phoneFromValue(number.e164, phoneCountry).display}/>- </Field>+ </FormField>{problem && <Note tone="danger">{problem}</Note>}<div className="st-connect-foot"><Button size="sm" variant="ghost" onClick={onCancel} disabled={sent}>@@ -826,7 +826,7 @@ export function ConnectNumber({)}{nothingToConnect ? null : !buying ? (<>- <Field+ <FormFieldid="st-pn-number"label={carrier ? t('settings.phone.connect.numberIn', { carrier }) : t('settings.phone.connect.number')}>@@ -839,7 +839,7 @@ export function ConnectNumber({}}defaultCountry={phoneCountry}/>- </Field>+ </FormField>{dev && <p className="help">{t('settings.phone.connect.dev')}</p>}{buyable && (<div>@@ -852,7 +852,11 @@ export function ConnectNumber({) : (<>{!noAreaCode && (- <Field id="st-pn-area" label={t('settings.phone.connect.areaCode')} help={monthly ? undefined : price}>+ <FormField+ id="st-pn-area"+ label={t('settings.phone.connect.areaCode')}+ description={monthly ? undefined : price}+ ><AreaCodeInputid="st-pn-area"openOnFocus={false}@@ -865,7 +869,7 @@ export function ConnectNumber({setProblem(null)}}/>- </Field>+ </FormField>)}{/* While the question shows, it says the cost itself: the line would say it twice. */}{!confirming && (billedLine || (noAreaCode && price && <p className="help">{price}</p>))}@@ -1003,17 +1007,17 @@ function ForwardStep({</div>{answer === 'forward' && (<CheckWhenEditing number={number} canEdit onCarrier={pick.setGuide} pickedByOwner={pick.pickedByOwner}>- <Field+ <FormFieldid="pn-codes"label={t('settings.phone.manage.forwarding')}- tip={+ help={mode === 'forward_all'? t('settings.phone.manage.forwardingAllTip'): t('settings.phone.manage.forwardingConditionalTip')}><Forwarding pick={pick} e164={number.e164} mode={mode} />- </Field>+ </FormField></CheckWhenEditing>)}<div className="st-connect-foot">diff --git a/apps/web/src/settings/Recordings.tsx b/apps/web/src/settings/Recordings.tsxindex c5169ca0..6abc469a 100644--- a/apps/web/src/settings/Recordings.tsx+++ b/apps/web/src/settings/Recordings.tsx@@ -12,9 +12,9 @@ import { Select, type SelectOption } from '../ui/controls.tsx'import type { LineState } from '../ui/FeatureLine.tsx'import { Note } from '../ui/kit.tsx'import { Loading, Skeleton } from '../ui/LoadStates.tsx'-import { Field } from './fields.tsx'import { useReadOnlyNote } from './readOnly.ts'import { patchWorkspaceSettings, useWorkspaceSettings } from './settings-api.ts'+import { FormField } from '../ui/form.tsx'type Days = (typeof recordingRetentionChoices)[number]type Choice = `${Days}` | 'forever'@@ -104,16 +104,16 @@ export function Recordings({ canEdit, toast }: { canEdit: boolean; toast: (text:error={error}onRetry={() => void settings.reload()}skeleton={- <Field label={t('settings.recordings.keepFor')}>+ <FormField label={t('settings.recordings.keepFor')}><Skeleton shape="field" width={260} />- </Field>+ </FormField>}>{days !== undefined && (- <Field+ <FormFieldid="st-retention"label={t('settings.recordings.keepFor')}- help={canEdit || !recordingOn ? lawHints.join(' ') || undefined : readOnly}+ description={canEdit || !recordingOn ? lawHints.join(' ') || undefined : readOnly}><div><Select@@ -125,7 +125,7 @@ export function Recordings({ canEdit, toast }: { canEdit: boolean; toast: (text:disabled={!editable}/></div>- </Field>+ </FormField>)}</Loading></>@@ -142,7 +142,11 @@ export function useRecordingState(): LineState {if (!data) return nullif (!data.recordingOn) return { text: t('settings.recordings.state.off'), on: false, warning: true }const days = data.recordingRetentionDays- if (days === RECORDINGS_NOT_KEPT) return { text: t('settings.recordings.state.notKept'), on: false }- if (days === null) return { text: t('settings.recordings.state.forever'), on: false }- return { text: days === 365 ? t('settings.recordings.oneYear') : t('settings.recordings.days', { days }), on: false }+ if (days === RECORDINGS_NOT_KEPT) return { text: t('settings.recordings.state.notKept'), on: false, value: true }+ if (days === null) return { text: t('settings.recordings.state.forever'), on: false, value: true }+ return {+ text: days === 365 ? t('settings.recordings.oneYear') : t('settings.recordings.days', { days }),+ on: false,+ value: true,+ }}diff --git a/apps/web/src/settings/TestCall.tsx b/apps/web/src/settings/TestCall.tsxindex beef802d..5aecc167 100644--- a/apps/web/src/settings/TestCall.tsx+++ b/apps/web/src/settings/TestCall.tsx@@ -10,7 +10,7 @@ import { useAssistantName, useRows } from '../store.tsx'import { useSupportAccess } from '../supportAccess.ts'import { workspaceHeaders } from '../tabWorkspace.ts'import { Button } from '../ui/kit.tsx'-import '../ui/settings-layout.css'+import './test-call-panel.css'import { loadLiveKit, preloadNow } from '../call/livekit.ts'import { microphoneAllowed } from '../call/microphone.ts'import { useLiveLines } from '../call/useLiveLines.ts'diff --git a/apps/web/src/settings/TransferContacts.tsx b/apps/web/src/settings/TransferContacts.tsxindex eefded26..2a0607f8 100644--- a/apps/web/src/settings/TransferContacts.tsx+++ b/apps/web/src/settings/TransferContacts.tsx@@ -9,7 +9,7 @@ import { type MessageKey, msg } from '@linedesk/i18n'import { useT } from '@linedesk/i18n/react'import { useRef, useState } from 'react'import { Checkbox, Select, type SelectOption, Switch } from '../ui/controls.tsx'-import { Input, Textarea } from '../ui/form.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'@@ -35,7 +35,7 @@ import {transferRows,} from './assistantDraft.ts'import { EditBusinessHours } from './BusinessHoursDialog.tsx'-import { Field, Section } from './fields.tsx'+import { Section } from './fields.tsx'import { brandName } from '../brand.ts'import { i18n } from '../i18n/index.tsx'import { fmt, intlLocale } from '../i18n/format.ts'@@ -464,7 +464,7 @@ export function ContactRow(props: RowProps) {{open && (<div className="tc-edit"><div className="tc-grid tc-grid-who">- <Field id={id('name')} label={t('settings.transfer.name')} error={error('name')}>+ <FormField id={id('name')} label={t('settings.transfer.name')} error={error('name')}><Inputid={id('name')}{...NO_PASSWORD_MANAGER}@@ -474,8 +474,8 @@ export function ContactRow(props: RowProps) {placeholder={t('settings.transfer.namePlaceholder')}invalid={!!error('name')}/>- </Field>- <Field id={id('number')} label={t('settings.transfer.number')} error={error('number')} tip={numberTip}>+ </FormField>+ <FormField id={id('number')} label={t('settings.transfer.number')} error={error('number')} help={numberTip}><PhoneInputid={id('number')}value={c.number}@@ -488,7 +488,7 @@ export function ContactRow(props: RowProps) {{noNumber && !error('number') && (<p className="k-field-desc tc-note">{t('settings.transfer.noNumberNote')}</p>)}- </Field>+ </FormField></div><div className="tc-briefing"><span className="bh-with">@@ -503,7 +503,7 @@ export function ContactRow(props: RowProps) {{t(c.briefing ? 'settings.transfer.consent' : 'settings.transfer.briefingOff')}</p></div>- <Field id={id('condition')} label={t('settings.transfer.condition')} error={error('condition')}>+ <FormField id={id('condition')} label={t('settings.transfer.condition')} error={error('condition')}><Textareaid={id('condition')}ref={el => {@@ -539,9 +539,9 @@ export function ContactRow(props: RowProps) {))}</span>)}- </Field>+ </FormField><div className="tc-grid tc-grid-then">- <Field id={`tc-${index}-ring`} label={t('settings.transfer.ringFor')}>+ <FormField id={`tc-${index}-ring`} label={t('settings.transfer.ringFor')}><Selectid={`tc-${index}-ring`}label={t('settings.transfer.ringFor')}@@ -549,8 +549,8 @@ export function ContactRow(props: RowProps) {options={ringOptions}onChange={v => onChange({ ring_seconds: Number(v) })}/>- </Field>- <Field id={`tc-${index}-fallback`} label={t('settings.transfer.ifNobody')}>+ </FormField>+ <FormField id={`tc-${index}-fallback`} label={t('settings.transfer.ifNobody')}><Selectid={`tc-${index}-fallback`}label={t('settings.transfer.ifNobody')}@@ -558,7 +558,7 @@ export function ContactRow(props: RowProps) {options={fallbackOptions}onChange={v => onChange({ if_no_answer: v })}/>- </Field>+ </FormField></div><div className="tc-foot">{/* The icon is inside the page's fieldset: disabled with it for members who cannot edit. */}diff --git a/apps/web/src/settings/VoiceSettings.tsx b/apps/web/src/settings/VoiceSettings.tsxindex a4a21ffa..5d4b0b3c 100644--- a/apps/web/src/settings/VoiceSettings.tsx+++ b/apps/web/src/settings/VoiceSettings.tsx@@ -26,11 +26,11 @@ import { type ReactNode, useEffect, useMemo, useRef, useState } from 'react'import { fetchQuery, refreshQuery, useQuery } from '../cachedQuery.ts'import { workspaceHeaders } from '../tabWorkspace.ts'import { Checkbox, Select } from '../ui/controls.tsx'-import { FormMessage } from '../ui/form.tsx'+import { FormMessage, FormField } from '../ui/form.tsx'import { HelpTip } from '../ui/HelpTip.tsx'import { Button, cx, Icon } from '../ui/kit.tsx'import { Loading, Skeleton, SkeletonList } from '../ui/LoadStates.tsx'-import { Field, Section, TextInput } from './fields.tsx'+import { Section, TextInput } from './fields.tsx'import { MissingProviderNote } from './MissingProviderNote.tsx'import { readAction, useWriteAction } from './settings-api.ts'import {@@ -623,21 +623,21 @@ function CloneVoice({}return (<FoldOut className="vc-clone" summary={t('settings.voice.clone.title')}>- <Field id="vc-clone-name" label={t('settings.voice.clone.name')}>+ <FormField id="vc-clone-name" label={t('settings.voice.clone.name')}><TextInputid="vc-clone-name"value={name}onChange={setName}placeholder={t('settings.voice.clone.namePlaceholder')}/>- </Field>- <Field+ </FormField>+ <FormFieldid="vc-clone-file"label={t('settings.voice.clone.recording')}- help={t('settings.voice.clone.recordingHelp')}+ description={t('settings.voice.clone.recordingHelp')}><input id="vc-clone-file" type="file" accept="audio/*" onChange={e => setFile(e.target.files?.[0] ?? null)} />- </Field>+ </FormField><Checkbox checked={consent} onChange={setConsent}>{CLONE_CONSENT_TEXT}</Checkbox>diff --git a/apps/web/src/settings/WebhookLookups.tsx b/apps/web/src/settings/WebhookLookups.tsxindex 9e78b2a9..1436e844 100644--- a/apps/web/src/settings/WebhookLookups.tsx+++ b/apps/web/src/settings/WebhookLookups.tsx@@ -17,10 +17,9 @@ import { type FormEvent, useState } from 'react'import { i18n } from '../i18n/index.tsx'import { useRun } from '../store.tsx'import { Checkbox, Select } from '../ui/controls.tsx'-import { Dialog, Input, Textarea } from '../ui/form.tsx'+import { Dialog, Input, Textarea, FormField } from '../ui/form.tsx'import { Button, Note } from '../ui/kit.tsx'import { DeleteButton, EditButton, List, ListEmpty, ListRow } from '../ui/list.tsx'-import { Field } from './fields.tsx'import { callAction } from './settings-api.ts'const TYPES = [@@ -180,17 +179,19 @@ function LookupDialog({onSubmit={submit}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Button type="submit" variant="primary" disabled={!draft.name.trim() || !draft.when.trim()}>{t('common.action.save')}</Button></>}>- <Field+ <FormFieldid="lk-name"label={t('settings.lookups.dialog.name')}- help={t('settings.lookups.dialog.nameHelp', { example: NAME_EXAMPLE })}+ description={t('settings.lookups.dialog.nameHelp', { example: NAME_EXAMPLE })}><Inputid="lk-name"@@ -199,8 +200,8 @@ function LookupDialog({value={draft.name}onChange={e => setDraft(d => ({ ...d, name: e.target.value }))}/>- </Field>- <Field id="lk-when" label={t('settings.lookups.dialog.when')}>+ </FormField>+ <FormField id="lk-when" label={t('settings.lookups.dialog.when')}><Textareaid="lk-when"rows={2}@@ -209,8 +210,8 @@ function LookupDialog({value={draft.when}onChange={e => setDraft(d => ({ ...d, when: e.target.value }))}/>- </Field>- <Field label={t('settings.lookups.dialog.fields')} tip={t('settings.lookups.dialog.fieldsTip')}>+ </FormField>+ <FormField label={t('settings.lookups.dialog.fields')} help={t('settings.lookups.dialog.fieldsTip')}><div className="wh-fields">{draft.fields.map((field, index) => (// biome-ignore lint/suspicious/noArrayIndexKey: fields have no id; their name is what is being edited@@ -259,7 +260,7 @@ function LookupDialog({{t('settings.lookups.field.add')}</Button></div>- </Field>+ </FormField>{error && <Note tone="danger">{error}</Note>}</Dialog>)diff --git a/apps/web/src/settings/Webhooks.tsx b/apps/web/src/settings/Webhooks.tsxindex eae0ebad..dce4ea33 100644--- a/apps/web/src/settings/Webhooks.tsx+++ b/apps/web/src/settings/Webhooks.tsx@@ -21,13 +21,13 @@ import { useRows, useRun } from '../store.tsx'import { useSupportAccess } from '../supportAccess.ts'import { Checkbox, Switch } from '../ui/controls.tsx'import { DangerConfirmDialog } from '../ui/DangerConfirmDialog.tsx'-import { Dialog, Input } from '../ui/form.tsx'+import { Dialog, Input, FormField } from '../ui/form.tsx'import type { HelpContent } from '../ui/HelpTip.tsx'import { Badge, Button } from '../ui/kit.tsx'import { Loading, SkeletonList, SkeletonRows, useLoadState } from '../ui/LoadStates.tsx'import { List, ListEmpty, ListRow, MenuButton } from '../ui/list.tsx'import { StatusMark } from '../ui/StatusMark.tsx'-import { Field, Section } from './fields.tsx'+import { Section } from './fields.tsx'import { callAction, readAction, useWriteAction } from './settings-api.ts'import { lookupTestText, WebhookLookups } from './WebhookLookups.tsx'import './webhooks.css'@@ -478,7 +478,9 @@ function EndpointDialog({onSubmit={submit}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><Button busy={saving} type="submit" variant="primary" disabled={saving || !url.trim()}>{endpoint? t('common.action.save')@@ -489,7 +491,7 @@ function EndpointDialog({</>}>- <Field id="wh-url" label={t('settings.webhooks.dialog.url')} error={error}>+ <FormField id="wh-url" label={t('settings.webhooks.dialog.url')} error={error}><Inputid="wh-url"type="url"@@ -499,9 +501,9 @@ function EndpointDialog({invalid={Boolean(error)}onChange={e => setUrl(e.target.value)}/>- </Field>+ </FormField>{!endpoint && (- <Field label={t('settings.webhooks.dialog.send')}>+ <FormField label={t('settings.webhooks.dialog.send')}><div className="wh-hook-picks">{webhookHooks.map(hook => (<Checkbox@@ -513,7 +515,7 @@ function EndpointDialog({</Checkbox>))}</div>- </Field>+ </FormField>)}</Dialog>)diff --git a/apps/web/src/settings/WorkspaceGeneral.tsx b/apps/web/src/settings/WorkspaceGeneral.tsxindex ed7b5d2f..a656cabe 100644--- a/apps/web/src/settings/WorkspaceGeneral.tsx+++ b/apps/web/src/settings/WorkspaceGeneral.tsx@@ -22,8 +22,7 @@ import { tabWorkspace } from '../tabWorkspace.ts'import { LinkButton } from '../ui/AppLink.tsx'import { Select } from '../ui/controls.tsx'import { FeatureLine, LineGroup, useOpenLines } from '../ui/FeatureLine.tsx'-import { Input } from '../ui/form.tsx'-import { Button } from '../ui/kit.tsx'+import { Input, FormField } from '../ui/form.tsx'import { Loading, Skeleton } from '../ui/LoadStates.tsx'import { sectionParts } from '../ui/SettingsLayout.tsx'import { AppointmentValue } from './AppointmentValue.tsx'@@ -32,7 +31,7 @@ import { TimeZoneSelect } from './BusinessHours.tsx'import { kindLabel, kindOptions } from './businessKind.ts'import { CountrySelect } from './CountrySelect.tsx'import { ExportCalls } from './ExportCalls.tsx'-import { Field, FollowsLine, ReadOnlyNote } from './fields.tsx'+import { FollowsLine, ReadOnlyNote } from './fields.tsx'import { Recordings, useRecordingState } from './Recordings.tsx'import {callAction,@@ -46,6 +45,7 @@ import { clockIn, timeZoneLabel, zoneCity } from './timeZones.ts'import { WorkspaceIconField } from './WorkspaceIconField.tsx'import { renameCheck, saveRename } from './workspaceGeneral.ts'import { AUTOMATIC, explicitCountryPatch } from './workspaceLocaleModel.ts'+import { IdentityCard } from '../ui/IdentityCard.tsx'/** Where an automatic country comes from ("from your assistant's number"); null when there is nothing to name. */const countrySourceLabel = (source: WorkspaceCountrySource): string | null =>@@ -153,33 +153,20 @@ export function WorkspaceGeneral({ canEdit, name, onRenamed, toast }: Props) {}, [line])return (<div className="ws-general">- <section className="k-card ws-identity" aria-label={t('settings.workspace.nav.general.label')}>- <div className="ws-identity-head">- <WorkspaceMark name={name} iconUrl={workspaceIconOf(useWorkspaces(), tabWorkspace() ?? '')} size="lg" />- <div className="ws-identity-text">- <h2>{name}</h2>- <IdentityLine />- </div>- <Button- size="sm"- variant={editing ? 'ghost' : 'secondary'}- aria-expanded={editing}- aria-controls="ws-general-fields"- onClick={() => setEditing(open => !open)}- >- {editing- ? t('settings.general.done')- : canEdit- ? t('settings.general.edit')- : t('settings.general.details')}- </Button>- </div>- {editing && (- <div id="ws-general-fields" className="k-feature-body">- <GeneralFields canEdit={canEdit} name={name} onRenamed={onRenamed} toast={toast} />- </div>- )}- </section>+ <IdentityCard+ label={t('settings.workspace.nav.general.label')}+ mark={<WorkspaceMark name={name} iconUrl={workspaceIconOf(useWorkspaces(), tabWorkspace() ?? '')} size="lg" />}+ name={name}+ line={<IdentityLine />}+ editLabel={canEdit ? t('settings.general.edit') : t('settings.general.details')}+ doneLabel={t('settings.general.done')}+ open={editing}+ onToggle={() => setEditing(open => !open)}+ bodyId="ws-general-fields"+ cardsInside+ >+ <GeneralFields canEdit={canEdit} name={name} onRenamed={onRenamed} toast={toast} />+ </IdentityCard><LineGroup>{t('settings.general.calls')}</LineGroup><FeatureLinetitle={t('settings.recordings.title')}@@ -282,7 +269,12 @@ function BusinessName({ canEdit, name, onRenamed, toast }: Props) {}return (- <Field id="ws-name" label={t('settings.general.name.label')} tip={t('settings.general.name.tip')} error={problem}>+ <FormField+ id="ws-name"+ label={t('settings.general.name.label')}+ help={t('settings.general.name.tip')}+ error={problem}+ ><Inputid="ws-name"value={draft}@@ -293,7 +285,7 @@ function BusinessName({ canEdit, name, onRenamed, toast }: Props) {onKeyDown={onKeyDown}onBlur={save}/>- </Field>+ </FormField>)}@@ -330,7 +322,7 @@ function Country({ canEdit }: { canEdit: boolean }) {void saveCountry({ country })}return (- <Field id="ws-country" label={t('settings.general.country.label')} tip={t('settings.general.country.tip')}>+ <FormField id="ws-country" label={t('settings.general.country.label')} help={t('settings.general.country.tip')}><Loadingwhat={t('settings.general.country.what')}loading={!data}@@ -359,7 +351,7 @@ function Country({ canEdit }: { canEdit: boolean }) {/>)}</Loading>- </Field>+ </FormField>)}@@ -397,7 +389,7 @@ function Kind({ canEdit }: { canEdit: boolean }) {})}return (- <Field id="ws-kind" label={t('settings.general.kind.label')} tip={t('settings.general.kind.tip')}>+ <FormField id="ws-kind" label={t('settings.general.kind.label')} help={t('settings.general.kind.tip')}><Loadingwhat={t('settings.general.kind.what')}loading={!data}@@ -436,7 +428,7 @@ function Kind({ canEdit }: { canEdit: boolean }) {/>)}</Loading>- </Field>+ </FormField>)}/** "Choose…" while no kind was ever picked (a workspace from before kinds). */@@ -466,7 +458,7 @@ function TimeZone({ canEdit }: { canEdit: boolean }) {void saveFollow({ timeZone: null })}return (- <Field id="ws-time-zone" label={t('settings.general.timeZone.label')} tip={t('settings.general.timeZone.tip')}>+ <FormField id="ws-time-zone" label={t('settings.general.timeZone.label')} help={t('settings.general.timeZone.tip')}><Loadingwhat={t('settings.general.timeZone.what')}loading={!zone}@@ -503,7 +495,7 @@ function TimeZone({ canEdit }: { canEdit: boolean }) {/>)}</Loading>- </Field>+ </FormField>)}@@ -513,7 +505,11 @@ function Value({ canEdit, toast }: { canEdit: boolean; toast: (text: string) =>const query = useWorkspaceSettings()const settings = query.datareturn (- <Field id="ws-appointment-value" label={t('settings.general.value.label')} tip={t('settings.general.value.tip')}>+ <FormField+ id="ws-appointment-value"+ label={t('settings.general.value.label')}+ help={t('settings.general.value.tip')}+ ><Loadingwhat={t('settings.general.value.what')}loading={!settings}@@ -555,6 +551,6 @@ function Value({ canEdit, toast }: { canEdit: boolean; toast: (text: string) =>/>)}</Loading>- </Field>+ </FormField>)}diff --git a/apps/web/src/settings/WorkspaceIconField.tsx b/apps/web/src/settings/WorkspaceIconField.tsxindex 95a16668..9572cf2f 100644--- a/apps/web/src/settings/WorkspaceIconField.tsx+++ b/apps/web/src/settings/WorkspaceIconField.tsx@@ -13,8 +13,8 @@ import { tabWorkspace } from '../tabWorkspace.ts'import { ImageCrop } from '../ui/ImageCrop.tsx'import { IMAGE_ACCEPT } from '../ui/imageAsPng.ts'import { Button } from '../ui/kit.tsx'-import { Field } from './fields.tsx'import { callAction } from './settings-api.ts'+import { FormField } from '../ui/form.tsx'type Props = {canEdit: boolean@@ -67,11 +67,11 @@ export function WorkspaceIconField({ canEdit, name, readOnlyNote, toast }: Props}return (- <Field+ <FormFieldid="ws-icon"label={t('settings.icon.label')}- help={canEdit ? t('settings.icon.help') : readOnlyNote}- tip={t('settings.icon.tip')}+ description={canEdit ? t('settings.icon.help') : readOnlyNote}+ help={t('settings.icon.tip')}error={problem}><div className="st-ws-icon">@@ -126,6 +126,6 @@ export function WorkspaceIconField({ canEdit, name, readOnlyNote, toast }: Props</>)}</div>- </Field>+ </FormField>)}diff --git a/apps/web/src/settings/WriteWithHelp.tsx b/apps/web/src/settings/WriteWithHelp.tsxindex e55d2bbc..453a93ab 100644--- a/apps/web/src/settings/WriteWithHelp.tsx+++ b/apps/web/src/settings/WriteWithHelp.tsx@@ -8,10 +8,10 @@ import { type MessageKey, msg } from '@linedesk/i18n'import { useT } from '@linedesk/i18n/react'import { useState } from 'react'import { createPortal } from 'react-dom'-import { Dialog, Input } from '../ui/form.tsx'+import { Dialog, Input, FormField } from '../ui/form.tsx'import { Button, cx } from '../ui/kit.tsx'import type { Draft } from './assistantDraft.ts'-import { Field, TextArea } from './fields.tsx'+import { TextArea } from './fields.tsx'import {applyImport,defaultPicks,@@ -174,10 +174,10 @@ export function WriteWithHelp({ assistant, draft, replace, toast, onClose }: Pro>{step === 'website' && (<div className="ww-step">- <Field+ <FormFieldid="ww-url"label={t('settings.writeHelp.website')}- tip={t('settings.writeHelp.websiteTip', { brand: brandName() })}+ help={t('settings.writeHelp.websiteTip', { brand: brandName() })}><Inputid="ww-url"@@ -195,16 +195,16 @@ export function WriteWithHelp({ assistant, draft, replace, toast, onClose }: Pro}}}/>- </Field>+ </FormField>{busy && <p className="help">{t('settings.writeHelp.readingWebsite')}</p>}</div>)}{step === 'business' && (<div className="ww-step">- <Field+ <FormFieldid="ww-business"label={t('settings.writeHelp.business')}- help={site ? t('settings.writeHelp.businessFromSite') : t('settings.writeHelp.businessHelp')}+ description={site ? t('settings.writeHelp.businessFromSite') : t('settings.writeHelp.businessHelp')}><TextAreaid="ww-business"@@ -212,7 +212,7 @@ export function WriteWithHelp({ assistant, draft, replace, toast, onClose }: ProonChange={v => setBusiness(v.slice(0, BUSINESS_TEXT_MAX))}placeholder={t('settings.writeHelp.businessPlaceholder')}/>- </Field>+ </FormField></div>)}{step === 'goals' && (@@ -237,14 +237,14 @@ export function WriteWithHelp({ assistant, draft, replace, toast, onClose }: Pro</label>))}</fieldset>- <Field id="ww-note" label={t('settings.writeHelp.note')} aside={t('settings.writeHelp.optional')}>+ <FormField id="ww-note" label={t('settings.writeHelp.note')} aside={t('settings.writeHelp.optional')}><TextAreaid="ww-note"value={goalsNote}onChange={setGoalsNote}placeholder={t('settings.writeHelp.notePlaceholder')}/>- </Field>+ </FormField>{busy && (<p className="help">{url.trim() && !sitediff --git a/apps/web/src/settings/ZapierGuide.tsx b/apps/web/src/settings/ZapierGuide.tsxindex b1b214c2..fa3879df 100644--- a/apps/web/src/settings/ZapierGuide.tsx+++ b/apps/web/src/settings/ZapierGuide.tsx@@ -67,7 +67,7 @@ export function ZapierGuide({ appUrl, connected, createKey, toast }: Props) {</span>{key && (<>- <div className="dev-secret">+ <div className="k-secret-row"><InputreadOnlyvalue={key}@@ -108,7 +108,7 @@ export function ZapierGuide({ appUrl, connected, createKey, toast }: Props) {</li><li>{t('settings.developers.zapier.connect')}- <div className="dev-secret">+ <div className="k-secret-row"><InputreadOnlyvalue={address}diff --git a/apps/web/src/settings/account/AvatarField.tsx b/apps/web/src/settings/account/AvatarField.tsxindex 511e7070..5fc0d911 100644--- a/apps/web/src/settings/account/AvatarField.tsx+++ b/apps/web/src/settings/account/AvatarField.tsx@@ -11,10 +11,10 @@ import { refreshTeam } from '../../team/team-api.ts'import { ImageCrop } from '../../ui/ImageCrop.tsx'import { IMAGE_ACCEPT } from '../../ui/imageAsPng.ts'import { Avatar, Button } from '../../ui/kit.tsx'-import { Field } from '../fields.tsx'import { useWriteAction } from '../settings-api.ts'import { ACCOUNT, type Account } from './account-api.ts'import { useT } from '@linedesk/i18n/react'+import { FormField } from '../../ui/form.tsx'/** Your own picture, changed by you: the profile no longer says someone else changed it last. */const showAvatar = (avatarUrl: string | null) =>@@ -89,10 +89,10 @@ export function AvatarField({}return (- <Field+ <FormFieldid="ac-avatar"label={t('account.picture.label')}- tip={member ? t('account.picture.tipMember') : t('account.picture.tip')}+ help={member ? t('account.picture.tipMember') : t('account.picture.tip')}error={problem}><div className="ac-avatar">@@ -148,6 +148,6 @@ export function AvatarField({</span>)}</div>- </Field>+ </FormField>)}diff --git a/apps/web/src/settings/account/KeyStepUp.tsx b/apps/web/src/settings/account/KeyStepUp.tsxindex 73b3f095..8652e623 100644--- a/apps/web/src/settings/account/KeyStepUp.tsx+++ b/apps/web/src/settings/account/KeyStepUp.tsx@@ -10,9 +10,8 @@ import { checkAuthenticator } from '../../authenticator-api.ts'import { brandName } from '../../brand.ts'import { signInAgain } from '../../localData.ts'import { AuthError } from '../../ui/AuthError.tsx'-import { Input } from '../../ui/form.tsx'+import { Input, FormField } from '../../ui/form.tsx'import { Button } from '../../ui/kit.tsx'-import { Field } from '../fields.tsx'import { confirmWithPasskey } from './account-api.ts'import { authenticatorErrorText } from './authenticator.tsx'@@ -100,7 +99,7 @@ export function StepUpFields({ stepUp, texts, id }: { stepUp: KeyStepUp; texts:</p>{!passkeySupported() && <AuthError message={t('admin.stepUp.httpsNeeded', { brand: brandName() })} />}{confirm.authenticator && (- <Field id={id} label={t('account.authenticator.code')}>+ <FormField id={id} label={t('account.authenticator.code')}><Inputid={id}placeholder={t('account.authenticator.codePlaceholder')}@@ -111,7 +110,7 @@ export function StepUpFields({ stepUp, texts, id }: { stepUp: KeyStepUp; texts:maxLength={7}disabled={saving}/>- </Field>+ </FormField>)}</>)diff --git a/apps/web/src/settings/account/PersonalKeys.tsx b/apps/web/src/settings/account/PersonalKeys.tsxindex e75deb35..e6ab207d 100644--- a/apps/web/src/settings/account/PersonalKeys.tsx+++ b/apps/web/src/settings/account/PersonalKeys.tsx@@ -8,14 +8,13 @@ import { useT } from '@linedesk/i18n/react'import { type FormEvent, useState } from 'react'import { setQueryData, useQuery } from '../../cachedQuery.ts'import { fmt } from '../../i18n/format.ts'-import { Dialog, Input } from '../../ui/form.tsx'+import { Dialog, Input, FormField } from '../../ui/form.tsx'import { Badge, Button } from '../../ui/kit.tsx'import { List, ListEmpty, ListRow } from '../../ui/list.tsx'import { Loading, SkeletonList } from '../../ui/LoadStates.tsx'-import { Field, Section } from '../fields.tsx'+import { Section } from '../fields.tsx'import { callAction, readAction } from '../settings-api.ts'import { StepUpFields, StepUpSubmit, useKeyStepUp } from './KeyStepUp.tsx'-import '../../integrations/developers.css'const KEYS = 'personalKey.list'const loadKeys = () => readAction<PersonalKeyListData>(KEYS)@@ -100,7 +99,7 @@ function KeyRow({ personalKey, onDone }: { personalKey: PersonalKeySummary; onDo{t('account.apiKeys.connectedWith', { name: personalKey.name })} ·{' '}</span>)}- <code className="dev-prefix">{personalKey.prefix}…</code> ·{' '}+ <code className="k-key-prefix">{personalKey.prefix}…</code> ·{' '}{personalKey.last_used_at? t('settings.developers.usedOn', {created: day(personalKey.created_at),@@ -173,7 +172,7 @@ function CreateKey({ onClose }: { onClose: () => void }) {</Button>}>- <div className="dev-secret">+ <div className="k-secret-row"><InputreadOnlyvalue={created}@@ -207,7 +206,9 @@ function CreateKey({ onClose }: { onClose: () => void }) {onSubmit={submit}footer={<>- <Button onClick={onClose}>{t('common.action.cancel')}</Button>+ <Button variant="ghost" onClick={onClose}>+ {t('common.action.cancel')}+ </Button><StepUpSubmitstepUp={stepUp}label={t('settings.developers.dialog.create')}@@ -217,7 +218,7 @@ function CreateKey({ onClose }: { onClose: () => void }) {</>}>- <Field+ <FormFieldid="ac-key-name"label={t('settings.developers.dialog.name')}error={stepUp.signInFirst ? t('account.apiKeys.signInFirst') : stepUp.error}@@ -230,7 +231,7 @@ function CreateKey({ onClose }: { onClose: () => void }) {invalid={Boolean(stepUp.error)}onChange={e => setName(e.target.value)}/>- </Field>+ </FormField><StepUpFieldsstepUp={stepUp}id="ac-key-code"diff --git a/apps/web/src/settings/account/Preferences.tsx b/apps/web/src/settings/account/Preferences.tsxindex 9f5f8bba..551a2639 100644--- a/apps/web/src/settings/account/Preferences.tsx+++ b/apps/web/src/settings/account/Preferences.tsx@@ -125,7 +125,7 @@ export function Preferences({title={t('common.language.label')}summary={t('account.language.summary', { brand: brandName() })}help={t('account.language.help', { brand: brandName() })}- state={{ text: shown, on: false }}+ state={{ text: shown, on: false, value: true }}open={open}onToggle={() => setOpen(o => !o)}>diff --git a/apps/web/src/settings/account/index.tsx b/apps/web/src/settings/account/index.tsxindex 29686d3a..a8c570f6 100644--- a/apps/web/src/settings/account/index.tsx+++ b/apps/web/src/settings/account/index.tsx@@ -17,12 +17,12 @@ import { refreshTeam } from '../../team/team-api.ts'import { changedByLabel } from '../../team/team-model.ts'import { dateTimeLabel } from '../../time.ts'import { DangerConfirmDialog } from '../../ui/DangerConfirmDialog.tsx'-import { CardInline, Input, onSaveKey, SaveBar } from '../../ui/form.tsx'+import { Input, onSaveKey, SaveBar, FormField } from '../../ui/form.tsx'import { Avatar, Badge, Button, Note } from '../../ui/kit.tsx'-import { Loading, Skeleton, SkeletonText } from '../../ui/LoadStates.tsx'+import { Loading, SkeletonText } from '../../ui/LoadStates.tsx'import { SettingRow, SkeletonSettingRow, SkeletonSettingRows } from '../../ui/SettingRow.tsx'import { type PageSection, SettingsLayout, sectionParts, useSection } from '../../ui/SettingsLayout.tsx'-import { Field, Section, TextInput } from '../fields.tsx'+import { Section, TextInput } from '../fields.tsx'import { AvatarField } from './AvatarField.tsx'import {ACCOUNT,@@ -49,6 +49,7 @@ import { useAddPasskey } from './add-passkey.ts'import { AUTHENTICATOR_HOURS, AuthenticatorQr, useAuthenticatorSetup } from './authenticator.tsx'import { PersonalKeys } from './PersonalKeys.tsx'import { Preferences } from './Preferences.tsx'+import { IdentityCard, SkeletonIdentityCard, IDENTITY_MARK } from '../../ui/IdentityCard.tsx'type SectionProps = { account: Account; reload: () => Promise<void> }@@ -224,31 +225,19 @@ function ProfilePage({ account, reload, hasWorkspace }: SectionProps & { hasWorkwhy={t('account.profile.confirmEmail', { email: account.user.email })}/>)}- <section className="k-card ws-identity" aria-label={t('account.nav.profile.label')}>- <div className="ws-identity-head">- <Avatar name={account.user.name || '?'} src={account.avatarUrl ?? null} size={56} />- <div className="ws-identity-text">- <h2>{account.user.name}</h2>- <span className="help">{account.user.email}</span>- </div>- <Button- size="sm"- variant={editing ? 'ghost' : 'secondary'}- aria-expanded={editing}- aria-controls="ac-profile-fields"- onClick={() => setEditing(open => !open)}- >- {editing ? t('settings.general.done') : t('settings.general.edit')}- </Button>- </div>- {editing && (- <div id="ac-profile-fields" className="k-feature-body">- <CardInline.Provider value={true}>- <Profile account={account} reload={reload} hasWorkspace={hasWorkspace} />- </CardInline.Provider>- </div>- )}- </section>+ <IdentityCard+ label={t('account.nav.profile.label')}+ mark={<Avatar name={account.user.name || '?'} src={account.avatarUrl ?? null} size={IDENTITY_MARK} />}+ name={account.user.name}+ line={<span className="help">{account.user.email}</span>}+ editLabel={t('settings.general.edit')}+ doneLabel={t('settings.general.done')}+ open={editing}+ onToggle={() => setEditing(open => !open)}+ bodyId="ac-profile-fields"+ >+ <Profile account={account} reload={reload} hasWorkspace={hasWorkspace} />+ </IdentityCard><Preferenceslocale={account.user.locale}saved={() => void reload()}@@ -283,7 +272,11 @@ function Profile({ account, reload, hasWorkspace }: SectionProps & { hasWorkspac<Section id="ac-profile" title={t('account.nav.profile.label')}>{/* The picture is shown to the people you work with; without a workspace there is nobody to show it to. */}{hasWorkspace && <AvatarField name={account.user.name} avatarUrl={account.avatarUrl ?? null} />}- <Field id="ac-name" label={t('account.profile.name')} error={trimmed ? null : t('account.profile.enterName')}>+ <FormField+ id="ac-name"+ label={t('account.profile.name')}+ error={trimmed ? null : t('account.profile.enterName')}+ ><TextInputid="ac-name"value={name}@@ -291,10 +284,10 @@ function Profile({ account, reload, hasWorkspace }: SectionProps & { hasWorkspacplaceholder={t('account.profile.namePlaceholder')}invalid={!trimmed}/>- </Field>- <Field+ </FormField>+ <FormFieldlabel={t('account.profile.email')}- tip={canChangeEmail ? t('account.profile.emailTipChange') : t('account.profile.emailTip')}+ help={canChangeEmail ? t('account.profile.emailTipChange') : t('account.profile.emailTip')}><div className="ac-inline"><span className="ac-value">{account.user.email}</span>@@ -316,7 +309,7 @@ function Profile({ account, reload, hasWorkspace }: SectionProps & { hasWorkspac{emailChanged}</span>)}- </Field>+ </FormField>{/* Inside the name's form, so a group of its own: Enter and its buttons never save the name. */}{changingEmail && (<ChangeEmail@@ -406,16 +399,16 @@ function ChangeEmail({return (<div className="ac-form ac-divided" role="group" aria-label={t('account.email.change')} onKeyDown={onEnter}>{target ? (- <Field+ <FormFieldkey={step}id="ac-email-code"label={t('account.email.code')}- help={+ description={step === 'current'? t('account.email.codeCurrent', { digits: CODE_LENGTH, email: current }): t('account.email.codeNew', { digits: CODE_LENGTH, email: target })}- tip={step === 'current' ? t('account.email.codeCurrentTip') : undefined}+ help={step === 'current' ? t('account.email.codeCurrentTip') : undefined}><div className="ac-inline"><span className="k-input">@@ -441,13 +434,13 @@ function ChangeEmail({{waitS > 0 ? t('account.email.resendIn', { seconds: waitS }) : t('account.email.resend')}</Button></div>- </Field>+ </FormField>) : (- <Field+ <FormFieldid="ac-new-email"label={t('account.email.newAddress')}- help={t('account.email.newAddressHelp')}- tip={t('account.email.newAddressTip')}+ description={t('account.email.newAddressHelp')}+ help={t('account.email.newAddressTip')}><span className="k-input"><input@@ -461,7 +454,7 @@ function ChangeEmail({autoFocus/></span>- </Field>+ </FormField>)}<FormStatus request={request} /><div className="ac-actions">@@ -555,7 +548,7 @@ function PasswordForm({ account, reload }: SectionProps) {<input type="email" name="username" autoComplete="username" value={account.user.email} readOnly hidden /><div className="row2">{exists && (- <Field id="ac-pw-current" label={t('account.password.current')}>+ <FormField id="ac-pw-current" label={t('account.password.current')}><PasswordInputid="ac-pw-current"value={form.current}@@ -563,9 +556,9 @@ function PasswordForm({ account, reload }: SectionProps) {autoComplete="current-password"autoFocus/>- </Field>+ </FormField>)}- <Field id="ac-pw-new" label={t('account.password.new')}>+ <FormField id="ac-pw-new" label={t('account.password.new')}><PasswordInputid="ac-pw-new"value={form.next}@@ -573,15 +566,15 @@ function PasswordForm({ account, reload }: SectionProps) {autoComplete="new-password"autoFocus={!exists}/>- </Field>- <Field id="ac-pw-repeat" label={t('account.password.repeat')}>+ </FormField>+ <FormField id="ac-pw-repeat" label={t('account.password.repeat')}><PasswordInputid="ac-pw-repeat"value={form.repeat}onChange={set('repeat')}autoComplete="new-password"/>- </Field>+ </FormField></div><FormStatus request={request} /><div className="ac-actions" hidden={Boolean(request.confirmPasskey)}>@@ -716,14 +709,14 @@ function Passkeys() {/>)}{needsCode && (- <Field label={t('account.passkeys.enrolmentCode')} tip={t('account.passkeys.enrolmentTip')}>+ <FormField label={t('account.passkeys.enrolmentCode')} help={t('account.passkeys.enrolmentTip')}><TextInputlabel={t('account.passkeys.enrolmentCode')}placeholder={t('account.passkeys.enrolmentPlaceholder')}value={enrolmentCode}onChange={setEnrolmentCode}/>- </Field>+ </FormField>)}<FormStatus request={request} /></div>@@ -829,7 +822,7 @@ function Authenticator() {}}><AuthenticatorQr data={setup.started} />- <Field label={t('account.authenticator.code')}>+ <FormField label={t('account.authenticator.code')}><Inputaria-label={t('account.authenticator.code')}placeholder={t('account.authenticator.codePlaceholder')}@@ -840,7 +833,7 @@ function Authenticator() {maxLength={7}autoFocus/>- </Field>+ </FormField>{setup.error && <Note tone="danger">{setup.error}</Note>}<div className="ac-actions"><Button variant="ghost" title={t('account.authenticator.cancel')} onClick={setup.cancel}>@@ -894,22 +887,13 @@ function AccountSkeleton({ current, error, retry }: { current: SectionId; error:if (!skeleton)return (<div className="ws-general">- <section className="k-card ws-identity">+ <section className="k-card k-identity"><Loadingwhat={t('account.yourAccount')}loadingerror={error}onRetry={retry}- skeleton={- <div className="ws-identity-head">- <Skeleton width={56} height={56} className="sk-round" />- <div className="ws-identity-text">- <Skeleton shape="text" width={160} />- <Skeleton shape="text" width={200} />- </div>- <Skeleton width={52} height={28} />- </div>- }+ skeleton={<SkeletonIdentityCard round />}/></section></div>diff --git a/apps/web/src/settings/fields.tsx b/apps/web/src/settings/fields.tsxindex de595a83..8210ec25 100644--- a/apps/web/src/settings/fields.tsx+++ b/apps/web/src/settings/fields.tsx@@ -4,7 +4,7 @@ import { useT } from '@linedesk/i18n/react'import { type ReactNode, useCallback, useState } from 'react'import { LinkButton } from '../ui/AppLink.tsx'import type { SelectOption } from '../ui/controls.tsx'-import { Card, FormField, Input, Textarea } from '../ui/form.tsx'+import { Card, Input, Textarea } from '../ui/form.tsx'import type { HelpContent } from '../ui/HelpTip.tsx'import { Note } from '../ui/kit.tsx'import { Skeleton, SkeletonFields } from '../ui/LoadStates.tsx'@@ -38,29 +38,6 @@ export function ReadOnlyNote() {return <Note tone="info">{useReadOnlySection()}</Note>}-type FieldProps = {- id?: string- label: string- /** Muted line under the label, only when the label is not enough. */- help?: ReactNode- error?: string | null- /** Next to the label, e.g. "Optional". */- aside?: ReactNode- /** Detail behind a (?) next to the label. */- tip?: HelpContent- /** Right after the label, outside it (e.g. the edit-business-hours icon). */- labelAfter?: ReactNode- children: ReactNode-}--export function Field({ id, label, help, error, aside, tip, labelAfter, children }: FieldProps) {- return (- <FormField id={id} label={label} description={help} error={error} aside={aside} help={tip} labelAfter={labelAfter}>- {children}- </FormField>- )-}-type TextProps = {id?: stringvalue: string@@ -112,7 +89,7 @@ export function TextArea({ id, value, onChange, placeholder, label, tall, invali/*** A settings card whose title is not known yet (a whole section waits for data): the card itself, a short- * grey title and `fields` labelled controls, each as tall as a Field with its input.+ * grey title and `fields` labelled controls, each as tall as a FormField with its input.*/export function SkeletonSection({ fields = 2 }: { fields?: number }) {return (diff --git a/apps/web/src/settings/test-call-panel.css b/apps/web/src/settings/test-call-panel.cssindex deaf406d..fd9247f7 100644--- a/apps/web/src/settings/test-call-panel.css+++ b/apps/web/src/settings/test-call-panel.css@@ -105,3 +105,12 @@padding-right: 408px;}}++/* Test call: the button in the page header (the call itself is in TestCallPanel). */+.tc-btn-wrap {+ display: inline-flex;+}+/* A disabled button gets no hover: the wrapper shows the reason in its tooltip. */+.tc-btn-wrap .k-btn:disabled {+ pointer-events: none;+}diff --git a/apps/web/src/settings/webhooks.css b/apps/web/src/settings/webhooks.cssindex fb3abc88..77113758 100644--- a/apps/web/src/settings/webhooks.css+++ b/apps/web/src/settings/webhooks.css@@ -49,15 +49,6 @@}/* Settings > Export calls: the date range and button on one line. */-.cf-export {- display: flex;- flex-wrap: wrap;- align-items: flex-end;- gap: 12px;-}-.cf-export .k-field {- margin: 0;-}/* The during-call lookups: a sub-list under its switch, indented like a nested setting row (.k-setrow.is-nested);a lookup's fields in its dialog, one row each. */diff --git a/apps/web/src/shell/NewWorkspace.tsx b/apps/web/src/shell/NewWorkspace.tsxindex 61f07dff..2e1f339f 100644--- a/apps/web/src/shell/NewWorkspace.tsx+++ b/apps/web/src/shell/NewWorkspace.tsx@@ -157,7 +157,7 @@ export function NewWorkspaceDialog({ onClose, ownerChoice = true, onCreatedForOwonClose()}}footer={- <Button type="submit" variant="primary" shortcut={['⏎']}>+ <Button type="submit" variant="primary">{t('shell.newWorkspace.done')}</Button>}@@ -185,12 +185,12 @@ export function NewWorkspaceDialog({ onClose, ownerChoice = true, onCreatedForOw{t('common.action.cancel')}</Button>{passkeyFirst ? (- <Button type="submit" variant="primary" shortcut={['⏎']} title={t('shell.newWorkspace.passkey.openCheck')}>+ <Button type="submit" variant="primary" title={t('shell.newWorkspace.passkey.openCheck')}>{/* i18n-dynamic: shell.newWorkspace.passkey.button.* */}{t(`shell.newWorkspace.passkey.button.${passkeyFirst}`)}</Button>) : (- <Button type="submit" variant="primary" busy={busy} shortcut={['⏎']}>+ <Button type="submit" variant="primary" busy={busy}>{phase === 'opening'? t('shell.newWorkspace.opening'): busydiff --git a/apps/web/src/styles.css b/apps/web/src/styles.cssindex 077d6976..e3dd96ba 100644--- a/apps/web/src/styles.css+++ b/apps/web/src/styles.css@@ -115,6 +115,7 @@ body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: v.k-avatar-24 { width: 24px; height: 24px; font-size: 10px; }.k-avatar-32 { width: 32px; height: 32px; font-size: 12px; }.k-avatar-40 { width: 40px; height: 40px; font-size: 14px; }+.k-avatar-48 { width: 48px; height: 48px; font-size: 16px; }.k-avatar-56 { width: 56px; height: 56px; font-size: 18px; }/* A profile picture: any image, cropped to the circle (object-fit), never stretched. */.k-avatar-pic { overflow: hidden; background: var(--surface); }diff --git a/apps/web/src/team/MemberEdit.tsx b/apps/web/src/team/MemberEdit.tsxindex 1834de4e..5080d364 100644--- a/apps/web/src/team/MemberEdit.tsx+++ b/apps/web/src/team/MemberEdit.tsx@@ -5,11 +5,11 @@// them last. The API checks who may edit whom (apps/api/src/team-member-edit.ts).import type { MemberEditData } from '@linedesk/actions'import { type FormEvent, useCallback, useEffect, useState } from 'react'-import { Field, Section, TextInput } from '../settings/fields.tsx'+import { Section, TextInput } from '../settings/fields.tsx'import { type NotificationChange, NotificationSwitches, WhoHearsLine, withChange } from '../settings/Notifications.tsx'import { AvatarField } from '../settings/account/AvatarField.tsx'import { useWriteAction } from '../settings/settings-api.ts'-import { Dialog } from '../ui/form.tsx'+import { Dialog, FormField } from '../ui/form.tsx'import { Avatar, Button } from '../ui/kit.tsx'import { Loading, SkeletonFields } from '../ui/LoadStates.tsx'import { refreshTeam, teamApi } from './team-api.ts'@@ -138,14 +138,14 @@ function MemberEditForm({}}/><form className="team-edit-name" onSubmit={e => void saveName(e)}>- <Field+ <FormFieldid="team-edit-name"label={t('account.profile.name')}- tip={nameHelp}+ help={nameHelp}error={trimmed ? problem : t('team.edit.enterName')}><TextInput id="team-edit-name" value={name} onChange={setName} invalid={!trimmed} />- </Field>+ </FormField><Buttontype="submit"size="sm"@@ -160,18 +160,18 @@ function MemberEditForm({</>) : (<>- <Field label={t('account.picture.label')}>+ <FormField label={t('account.picture.label')}><Avatar name={member.name || member.email} src={member.avatarUrl ?? null} size={56} />- </Field>- <Field label={t('account.profile.name')}>+ </FormField>+ <FormField label={t('account.profile.name')}><span className="ac-value">{member.name}</span>- </Field>+ </FormField><p className="help">{t('team.edit.otherWorkspace')}</p></>)}- <Field label={t('account.profile.email')} tip={t('team.edit.emailTip')}>+ <FormField label={t('account.profile.email')} help={t('team.edit.emailTip')}><span className="ac-value">{member.email}</span>- </Field>+ </FormField></Section><Sectionid="team-edit-notify"diff --git a/apps/web/src/ui/FeatureLine.tsx b/apps/web/src/ui/FeatureLine.tsxindex c3ed5f60..46234c26 100644--- a/apps/web/src/ui/FeatureLine.tsx+++ b/apps/web/src/ui/FeatureLine.tsx@@ -12,9 +12,10 @@ import { SettingRow } 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),- * `warning` for one that needs a look soon (bills owing money).+ * `warning` for one that needs a look soon (bills owing money). `value`: not a status but a value (a language, a number+ * of days, an amount), shown as grey text instead of a badge (badges are only for status).*/-export type LineState = { text: string; on: boolean; danger?: boolean; warning?: boolean } | null+export type LineState = { text: string; on: boolean; danger?: boolean; warning?: boolean; value?: boolean } | nullconst stateTone = (state: NonNullable<LineState>) =>state.danger ? 'danger' : state.warning ? 'warning' : state.on ? 'ok' : 'neutral'@@ -37,7 +38,9 @@ function LineHead({ title, summary, help, state, action }: HeadProps) {help={help}control={<>- {state ? (+ {state?.value ? (+ <span className="k-setrow-value">{state.text}</span>+ ) : state ? (<Badge tone={stateTone(state)}>{state.text}</Badge>) : (state === null && <Skeleton width={72} height={20} className="sk-round" />diff --git a/apps/web/src/ui/HelpTip.test.tsx b/apps/web/src/ui/HelpTip.test.tsxindex 884e9196..ef093e56 100644--- a/apps/web/src/ui/HelpTip.test.tsx+++ b/apps/web/src/ui/HelpTip.test.tsx@@ -1,8 +1,7 @@import { readFileSync } from 'node:fs'import { renderToStaticMarkup } from 'react-dom/server'import { describe, expect, test } from 'vitest'-import { Field } from '../settings/fields.tsx'-import { Card } from './form.tsx'+import { Card, FormField } from './form.tsx'import {copyText,HelpBody,@@ -120,9 +119,9 @@ describe('markup', () => {describe('in forms', () => {test('a field’s help is a "?" next to its label, not a line on the page; the line stays for what everyone needs', () => {const html = renderToStaticMarkup(- <Field id="f" label="Time zone" help="Read only." tip="Where the business is.">+ <FormField id="f" label="Time zone" description="Read only." help="Where the business is."><input id="f" />- </Field>,+ </FormField>,)expect(html).toContain('class="k-help-btn"')expect(html).not.toContain('Where the business is.')diff --git a/apps/web/src/ui/IdentityCard.tsx b/apps/web/src/ui/IdentityCard.tsxnew file mode 100644index 00000000..f369e48d--- /dev/null+++ b/apps/web/src/ui/IdentityCard.tsx@@ -0,0 +1,86 @@+// The one identity card on top of Workspace settings › General and User settings › Profile (LIN-837): the mark (the+// workspace's square or the person's round picture, both 48px), the name large, one grey line, and Edit at the right,+// which opens the fields under a hairline. Styles in identity-card.css.+import type { ReactNode } from 'react'+import { CardInline } from './form.tsx'+import { Button } from './kit.tsx'+import { Skeleton } from './LoadStates.tsx'+import './identity-card.css'++/** The marks' one size: a workspace's square and a person's picture are as large as each other. */+export const IDENTITY_MARK = 48 as const++type Props = {+ /** What the card is, for screen readers ("General", "Profile"). */+ label: string+ /** The 48px mark (WorkspaceMark size "lg", Avatar size IDENTITY_MARK). */+ mark: ReactNode+ name: ReactNode+ /** One grey line under the name. */+ line: ReactNode+ /** The button's words while the fields are closed (Edit, Details) and open (Done). */+ editLabel: string+ doneLabel: string+ open: boolean+ onToggle: () => void+ /** The id of the fields' area (the button's aria-controls). */+ bodyId: string+ /** The fields, shown under a hairline while open; their cards show without their own title (CardInline). */+ children: ReactNode+ /** The fields are their own cards (CardInline off). */+ cardsInside?: boolean+}++export function IdentityCard({+ label,+ mark,+ name,+ line,+ editLabel,+ doneLabel,+ open,+ onToggle,+ bodyId,+ children,+ cardsInside,+}: Props) {+ return (+ <section className="k-card k-identity" aria-label={label}>+ <div className="k-identity-head">+ {mark}+ <div className="k-identity-text">+ <h2>{name}</h2>+ {line}+ </div>+ <Button+ size="sm"+ variant={open ? 'ghost' : 'secondary'}+ aria-expanded={open}+ aria-controls={bodyId}+ onClick={onToggle}+ >+ {open ? doneLabel : editLabel}+ </Button>+ </div>+ {open && (+ <div id={bodyId} className="k-feature-body">+ {cardsInside ? children : <CardInline.Provider value={true}>{children}</CardInline.Provider>}+ </div>+ )}+ </section>+ )+}++/** The card while its name is not known yet: the mark, the name and line as grey bars, the button's shape. */+export function SkeletonIdentityCard({ round }: { round?: boolean }) {+ return (+ <div className="k-identity-head">+ <Skeleton width={IDENTITY_MARK} height={IDENTITY_MARK} className={round ? 'sk-round' : undefined} />+ <div className="k-identity-text">+ <Skeleton shape="text" width={160} />+ <Skeleton shape="text" width={200} />+ </div>+ <Skeleton width={52} height={28} />+ </div>+ )+}diff --git a/apps/web/src/ui/form.css b/apps/web/src/ui/form.cssindex 371739e1..c1b29997 100644--- a/apps/web/src/ui/form.css+++ b/apps/web/src/ui/form.css@@ -721,3 +721,28 @@line-height: 18px;color: var(--ink-muted);}++/* A key's prefix in a line ("ld_live_ab12…"), and a new key shown once with its Copy button (API keys, personal keys,+ Zapier). */+.k-key-prefix {+ font-family: var(--font-mono);+}+.k-secret-row {+ display: flex;+ gap: 8px;+}+.k-secret-row .k-input {+ flex: 1;+}+.k-secret-row input {+ font-family: var(--font-mono);+ font-size: 12.5px;+}++/* Fields side by side with their button, all on the fields' bottom line, wrapping on a phone (Export calls). */+.k-fields-row {+ display: flex;+ flex-wrap: wrap;+ align-items: flex-end;+ gap: 12px;+}diff --git a/apps/web/src/ui/identity-card.css b/apps/web/src/ui/identity-card.cssnew file mode 100644index 00000000..91593334--- /dev/null+++ b/apps/web/src/ui/identity-card.css@@ -0,0 +1,22 @@+/* IdentityCard (IdentityCard.tsx): mark, name and one line, Edit at the right; the fields under a hairline. */+.k-identity-head {+ display: flex;+ align-items: center;+ gap: 14px;+ min-width: 0;+}+.k-identity-text {+ display: grid;+ gap: 2px;+ flex: 1;+ min-width: 0;+}+.k-identity-text h2 {+ margin: 0;+ font-size: 17px;+ line-height: 22px;+ overflow-wrap: anywhere;+}+.k-identity .k-feature-body {+ margin-top: 14px;+}diff --git a/apps/web/src/ui/kit.tsx b/apps/web/src/ui/kit.tsxindex 123ce34c..6c8970b1 100644--- a/apps/web/src/ui/kit.tsx+++ b/apps/web/src/ui/kit.tsx@@ -164,7 +164,7 @@ const initials = (name: string) =>type AvatarProps = {name: string- size?: 20 | 24 | 32 | 40 | 56+ size?: 20 | 24 | 32 | 40 | 48 | 56/** The person's profile picture (avatarUrlOf); without one, or while it cannot load, their initials show. */src?: string | null}diff --git a/apps/web/src/ui/setting-row.css b/apps/web/src/ui/setting-row.cssindex 30bd8020..10a28e7d 100644--- a/apps/web/src/ui/setting-row.css+++ b/apps/web/src/ui/setting-row.css@@ -40,6 +40,12 @@align-items: center;gap: 8px;}+/* A value at the right end (a language, a number of days): grey text, not a badge. */+.k-setrow-value {+ font-size: 12.5px;+ color: var(--ink-muted);+ white-space: nowrap;+}.k-setrow.is-dimmed .k-setrow-title,.k-setrow.is-dimmed .help {color: var(--ink-disabled);diff --git a/apps/web/src/ui/settings-layout.css b/apps/web/src/ui/settings-layout.cssindex 57e608d5..f1986ea2 100644--- a/apps/web/src/ui/settings-layout.css+++ b/apps/web/src/ui/settings-layout.css@@ -147,12 +147,3 @@width: var(--control-h-sm);flex: none;}--/* Test call: the button in the page header (the call itself is in TestCallPanel). */-.tc-btn-wrap {- display: inline-flex;-}-/* A disabled button gets no hover: the wrapper shows the reason in its tooltip. */-.tc-btn-wrap .k-btn:disabled {- pointer-events: none;-}diff --git a/docs/design-principles.md b/docs/design-principles.mdindex 37118b7a..8b41e850 100644--- a/docs/design-principles.md+++ b/docs/design-principles.md@@ -33,18 +33,29 @@ Linedesk should feel like a calm, native tool, not a dashboard. These rules come12. **Copy is short and human.** "Nothing needs you. Maya has it." beats "No items found". Use the terms Assistant (not Receptionist) and Remind (not Snooze).13. **Show the result of an action immediately; never require a reload.** What the user just did (connected a calendar, created a key, cloned a voice, set up a number) is on screen in the next frame, also after a redirect away and back. While it cannot be known yet, show a placeholder for under a second, never the state from before. How: CLAUDE.md, core rule 3.14. **A walkthrough never sends you out of itself.** Setup and onboarding steps don't link or jump to other pages in the same tab. What belongs elsewhere is a hint naming the place ("later, in Server admin › Providers"); where a step truly needs another screen, it opens in place and returns to the same step (as Server admin does from onboarding).-15. **Loading looks the same everywhere, and stays quiet.** The page's own chrome (title, headings, labels, buttons that don't need the data) renders at once; only the area that waits for data shows a skeleton, in the shape of what comes (same rows, heights and widths), so nothing jumps when it arrives. One look for every skeleton: neutral grey (`--skeleton`), one soft pulse of 1.4 s, all in step; static grey with reduced motion. A load done within 180 ms shows no skeleton at all (the space is only reserved); a skeleton that did show stays at least 320 ms; content that came after a wait fades in over 140 ms. Spinners only in buttons and actions the user started (`Button busy`), never for page data, and no "Loading…" text: screen readers get `aria-busy` on the area and one visually hidden line. A load that fails, or is still not there after 12 s, replaces the skeleton with the load-problem look and Try again; never an endless skeleton. How: `ui/LoadStates.tsx` (`Loading`, `useLoading`, `Skeleton`, `SkeletonFields`, `SkeletonList`, `SkeletonRows`; `SkeletonSection` and `SkeletonSwitchRows` in `settings/fields.tsx`), timing in `ui/loadingGate.ts`. The boot screen before the session is known is the one exception, and so is its small sibling on the cards before setup (sign-in, sign-up, an invitation): one wait line with a spinner (`WaitLine`, `shell/SignedInAuthPage.tsx`) while the server's first answer comes. Checklist for every screen, card and dialog that reads data:+15. **Loading looks the same everywhere, and stays quiet.** The page's own chrome (title, headings, labels, buttons that don't need the data) renders at once; only the area that waits for data shows a skeleton, in the shape of what comes (same rows, heights and widths), so nothing jumps when it arrives. One look for every skeleton: neutral grey (`--skeleton`), one soft pulse of 1.4 s, all in step; static grey with reduced motion. A load done within 180 ms shows no skeleton at all (the space is only reserved); a skeleton that did show stays at least 320 ms; content that came after a wait fades in over 140 ms. Spinners only in buttons and actions the user started (`Button busy`), never for page data, and no "Loading…" text: screen readers get `aria-busy` on the area and one visually hidden line. A load that fails, or is still not there after 12 s, replaces the skeleton with the load-problem look and Try again; never an endless skeleton. How: `ui/LoadStates.tsx` (`Loading`, `useLoading`, `Skeleton`, `SkeletonFields`, `SkeletonList`, `SkeletonRows`; `SkeletonSettingRows` in `ui/SettingRow.tsx`, `SkeletonSection` in `settings/fields.tsx`), timing in `ui/loadingGate.ts`. The boot screen before the session is known is the one exception, and so is its small sibling on the cards before setup (sign-in, sign-up, an invitation): one wait line with a spinner (`WaitLine`, `shell/SignedInAuthPage.tsx`) while the server's first answer comes. Checklist for every screen, card and dialog that reads data:- **Every element that is always shown gets a skeleton of its shape** while its data loads: titles and ledes whose words depend on the data, buttons, dropdowns, switches, checklists, list rows. Never empty space that the element pops into, never a default value that flips when the data comes (a switch shown off, a dropdown on its first option).- Only what may not be there at all (a warning for some installs, a card only some calls have) may wait without a skeleton.- Use the shared helpers above with the real list's or row's classes, so heights and gaps match; add an option to them rather than one-off markup.- One `aria-busy` area and one hidden "Loading …" line per area (`Loading` does both; for parts spread over a page, `useLoading` once and `SkeletonPart` for each part).- A failed or endless load shows `LoadProblem` with Try again.- Check it with the network throttled (DevTools › Network › Slow 4G). `apps/web/src/ui/loadingStandard.test.ts` fails on "Loading…" text, on a spinner outside a pressed button, and on a component that reads data (`useQuery`, `useLoadState`) without the loading states unless it is listed there with the reason it needs none.-16. **Help on demand.** A screen shows only what most people need. Explanations that only some people need go behind a "?" next to the field or heading: short (1–3 sentences), with copyable commands where useful. Keep visible: things everyone must read to avoid a mistake (warnings, consequences of destructive actions, required formats that cause errors). Don't hide primary instructions behind "?". How: `HelpTip` (`ui/HelpTip.tsx`), or the `help` prop of `Card`/`FormField` (`tip` on the settings `Field`, `help` on `Section` and `SelectRow`): one look and place everywhere, after the heading or label, or at the right end inside a field (`inField`). It opens on hover, click, tap and keyboard focus, closes on Esc, a click outside or focus leaving, and floats in the top layer.+16. **Help on demand.** A screen shows only what most people need. Explanations that only some people need go behind a "?" next to the field or heading: short (1–3 sentences), with copyable commands where useful. Keep visible: things everyone must read to avoid a mistake (warnings, consequences of destructive actions, required formats that cause errors). Don't hide primary instructions behind "?". How: `HelpTip` (`ui/HelpTip.tsx`), or the `help` prop of `Card`, `FormField`, `SettingRow` and `Section`: one look and place everywhere, after the heading or label, or at the right end inside a field (`inField`). It opens on hover, click, tap and keyboard focus, closes on Esc, a click outside or focus leaving, and floats in the top layer.17. **A key is never something to go and find.** Where a provider offers a connect flow the member only clicks and approves (OAuth, with an app that hosted and self-hosted installs can both register), use it. Where a key, token or app password is unavoidable, its field has a button to the exact page where it is made (a new tab) and the steps folded away below it ("Step by step"), with what to name it and what it costs. How: `WhereToGetIt` in `settings/KeyConnect.tsx`; on Server admin › Providers the registry's `guide`.18. **Links in text: every pointer to another place in the app is a link, one look everywhere.** When a help line, hint, note, banner, empty state or error names a place ("change that under Account › Preferences", "set Answered by under Advanced"), that name is a link to it: underlined, in the text's own ink, with the focus ring, never coloured or bold. It is a plain hash link, so it opens the place the way the menu does and ⌘-click opens a new tab. A place in Server admin is a link only for instance admins; everyone else reads the same words without a link. Walkthrough steps keep rule 14 (a hint, or a new tab). An action inside text ("Try again", "Change") looks the same but is a button. How: `AppLink` and `LinkButton` from `ui/AppLink.tsx`; in a message the place is a tag (`"change that under <link>Account › Preferences</link>"`) rendered with `<T values={{ link: appLink('#account/preferences') }} />` or `adminLink('#admin/providers/…')`, never a sentence split into pieces. `apps/web/src/ui/linkStandard.test.ts` fails on the link class written by hand and on an `<a>` built inside a message tag. Tooltips (`title`) stay plain words: they can't hold a link.19. **Notice boxes: icon, text and actions vertically centered.** In every box of an icon, text and optional buttons or links (a `Note`, the setup line, a check result), the icon, the text block and the actions share one centre line (`align-items: center`), never the icon pinned to the first text line or a `margin-top`/`padding-top` nudge. When the actions wrap below the text on a narrow screen, the icon still centres with the text block. How: `Note` from `ui/kit.tsx`; a box built by hand gets the same `align-items: center`. `apps/web/src/ui/noticeStandard.test.ts` fails on a `.k-note` that goes back to top alignment.+## Settings building blocks++Server 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).+- `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.+## Control heightsText fields, selects and buttons take their height from three tokens (styles.css), never their own: sm (28px): compact rows where every control is small (card headers, list rows, toolbars); default (32px): everything else; lg (36px): onboarding and sign-in. Controls in one row share one size.