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
One contact panel in Contacts and the call view (PR 1936)
Janike5855d7c92da
diff --git a/apps/web/src/Workspace.tsx b/apps/web/src/Workspace.tsxindex 423e500e..32e28380 100644--- a/apps/web/src/Workspace.tsx+++ b/apps/web/src/Workspace.tsx@@ -727,6 +727,7 @@ export function Workspace({ me, onSignedOut, onSessionStale, notice = null, onReonOpen={open}toast={toaster.show}onToggleBlock={callHandlers.toggleBlock}+ onChange={change => actions.runUndoable(change.steps, change.inverse, change.label, change.key)}/>}/>diff --git a/apps/web/src/app.css b/apps/web/src/app.cssindex f5ed2082..5b4988fa 100644--- a/apps/web/src/app.css+++ b/apps/web/src/app.css@@ -1188,13 +1188,6 @@ h1.ib-title {.cv-col {max-width: var(--w-read);}-/* Contact panel actions: Call, Block, and the Blocked badge on one line. */-.side-acts {- display: flex;- align-items: center;- gap: 6px;- flex-wrap: wrap;-}/* A link drawn as a button (Call) reads as a button. */a.k-btn {text-decoration: none;diff --git a/apps/web/src/call/ContactSide.tsx b/apps/web/src/call/ContactSide.tsxindex 726e2446..0a159238 100644--- a/apps/web/src/call/ContactSide.tsx+++ b/apps/web/src/call/ContactSide.tsx@@ -1,294 +1,79 @@-import type { Call, Contact } from '@linedesk/db/types'-import { callTitle, formatPhone, isTestCall, testCallLabel } from '../inbox-model.ts'-import { useContact, useRows, useRun } from '../store.tsx'-import { parseTs, callDuration, timeLabel } from '../time.ts'-import { Avatar, Badge, Button, Icon } from '../ui/kit.tsx'-import { EditableFact } from './EditableFact.tsx'+import type { Call } from '@linedesk/db/types'+import { useT } from '@linedesk/i18n/react'+import { isTestCall, testCallLabel } from '../inbox-model.ts'+import type { Change } from '../inbox/changes.ts'+import { ContactPanel, type MenuItem, type PanelSuggestions } from '../contacts/ContactPanel.tsx'+import { useContact, useRows } from '../store.tsx'+import { parseTs } from '../time.ts'+import { Badge } from '../ui/kit.tsx'import { EmailedAfterCall } from './EmailedAfterCall.tsx'-import { msg } from '@linedesk/i18n'-import { T, useT } from '@linedesk/i18n/react'-import { LinkButton } from '../ui/AppLink.tsx'-import { i18n } from '../i18n/index.tsx'-import { fmt, intlLocale } from '../i18n/format.ts'-import { type ReactNode, useState } from 'react'-import { factSuggestions, foldedFields } from './factSuggestions.ts'+import { factSuggestions } from './factSuggestions.ts'type Props = {call: CallonOpen: (call: Call) => voidtoast: (text: string) => voidonToggleBlock?: (call: Call) => void-}-type Editable = 'name' | 'company' | 'email' | 'address' | 'note'--function copy(text: string, toast: (text: string) => void) {- navigator.clipboard.writeText(text).then(- () => toast(i18n().t('call.contact.copied', { text })),- () => toast(i18n().t('call.contact.copyFailed')),- )-}--/** Whether the contact's name is only what a caller said (contacts.name_source): it checks nobody on the phone. */-export const nameFromCaller = (contact: Contact) => !!contact.name?.trim() && contact.name_source !== 'member'--/**- * "Name from caller · Confirm": a member confirms the name (contact.update saves it as the team's), so the- * assistant may talk about earlier calls once a caller says it. Also used on the Contacts page.- */-export function ConfirmCallerName({ contact }: { contact: Contact }) {- const t = useT()- const run = useRun()- return (- <T- k="call.contact.nameFromCaller"- values={{- confirm: chunks => (- <LinkButton- title={t('call.contact.confirmTitle')}- onClick={() => void run('contact.update', { contactId: contact.id, name: contact.name })}- >- {chunks}- </LinkButton>- ),- }}- />- )-}--/**- * "From this call · Keep" (or "From the call on Nov 19 · Keep" with `date`) under a field that shows a key fact of a- * call: Keep saves it to the contact. Both contact views use it.- */-export function KeepFromCall({ onKeep, date }: { onKeep: () => void; date?: string }) {- const t = useT()- const keep = (chunks: ReactNode) => (- <LinkButton title={t('call.contact.keepTitle')} onClick={onKeep}>- {chunks}- </LinkButton>- )- return date ? (- <T k="call.contact.fromCallOn" values={{ date, keep }} />- ) : (- <T k="call.contact.fromThisCall" values={{ keep }} />- )-}--/** The fields that fold into one "+ Company, email, note" button while empty, in the order they show. */-const FOLDABLE = ['company', 'email', 'address', 'note'] as const-const FOLD_NAME = {- company: msg('call.contact.fold.company'),- email: msg('call.contact.fold.email'),- address: msg('call.contact.fold.address'),- note: msg('call.contact.fold.note'),-}-type Foldable = (typeof FOLDABLE)[number]--/**- * "+ Company, email": the empty fields folded into one quiet button; a click shows them and focuses the first- * (found with the selector `inputOf` gives for it). Both contact views use it.- */-export function FoldedFields({- folded,- inputOf,- onUnfold,-}: {- folded: readonly Foldable[]- inputOf: (field: Foldable) => string- onUnfold: () => void-}) {- const t = useT()- if (!folded.length) return null- const label = fmt().list(- folded.map(field => t(FOLD_NAME[field])),- { type: 'unit' },- )- return (- <button- type="button"- className="side-more"- title={t('call.contact.showFieldsTitle')}- onClick={() => {- const first = folded[0]- onUnfold()- setTimeout(() => document.querySelector<HTMLElement>(inputOf(first!))?.focus(), 0)- }}- >- <Icon name="plus" size={12} />- <span>{label.charAt(0).toLocaleUpperCase(intlLocale()) + label.slice(1)}</span>- </button>- )+ /** Marks a call in the list read/unread or done, with undo. */+ onChange: (change: Change) => void}/**- * The caller's contact next to the call, edited in place through contact.update. A field the contact has empty shows- * the call's key fact for it as a suggestion (Keep saves it); the other empty fields fold into one quiet button.+ * The caller next to the call: the contact panel of Contacts (contacts/ContactPanel.tsx) with this call's key facts as+ * suggestions ("From this call · Keep") and every call of the caller, this one included and marked.*/-export function Facts({ contact, call, toast }: { contact: Contact; call: Call; toast: (text: string) => void }) {+export function ContactSide({ call, onOpen, toast, onToggleBlock, onChange }: Props) {const t = useT()- const run = useRun()- const [unfolded, setUnfolded] = useState(false)- const save = (field: Editable) => (value: string | null) =>- void run('contact.update', { contactId: contact.id, [field]: value })- const phone = formatPhone(contact.phone)- const suggested = factSuggestions(call.fields, contact)- const folded = unfolded ? [] : foldedFields(FOLDABLE, contact, suggested)- const shows = (field: Foldable) => !folded.includes(field)- const fact = (field: 'company' | 'email' | 'address', label: string, placeholder: string) => {- const suggestion = suggested[field]- return (- <>- <EditableFact- field={field}- label={label}- value={contact[field] ?? suggestion ?? null}- placeholder={placeholder}- onSave={save(field)}- />- {suggestion && !contact[field]?.trim() && (- <dd className="fact-hint">- <KeepFromCall onKeep={() => save(field)(suggestion)} />- </dd>- )}- </>- )- }- return (- <>- <dl className="facts side-facts">- <EditableFact- field="name"- label={t('call.contact.name')}- value={contact.name}- placeholder={t('call.contact.addName')}- onSave={save('name')}- />- {nameFromCaller(contact) && (- <dd className="fact-hint">- <ConfirmCallerName contact={contact} />- </dd>- )}- {shows('company') && fact('company', t('call.contact.company'), t('call.contact.addCompany'))}- <dt>{t('call.contact.phone')}</dt>- <dd>- <button type="button" className="fact-copy" title={t('call.contact.copy')} onClick={() => copy(phone, toast)}>- {phone}- </button>- </dd>- {shows('email') && fact('email', t('call.contact.email'), t('call.contact.addEmail'))}- {shows('address') && fact('address', t('call.contact.address'), t('call.contact.addAddress'))}- {shows('note') && (- <EditableFact- field="note"- label={t('call.contact.note')}- value={contact.note}- placeholder={t('call.contact.addNote')}- onSave={save('note')}- multiline- />- )}- </dl>- <FoldedFields- folded={folded}- inputOf={field => `.side-facts [data-field=${field}]`}- onUnfold={() => setUnfolded(true)}- />- </>- )-}--/** Call the number from this device (a phone, or a computer that hands tel: links to one). */-export function CallLink({ number }: { number: string }) {- const t = useT()- return (- <a className="k-btn k-btn-secondary k-btn-sm" href={`tel:${number}`} title={t('call.contact.callFromPhone')}>- <Icon name="phone-out" size={14} />- <span>{t('call.contact.call')}</span>- </a>- )-}--/** A compact list of calls that open the call view. Also used on the Contacts page. */-export function SideCalls({ calls, onOpen }: { calls: Call[]; onOpen: (call: Call) => void }) {- const t = useT()- return calls.map(c => (- <button key={c.id} type="button" className="side-call" onClick={() => onOpen(c)}>- <span className="sc-top">- <b>{callTitle(c)}</b>- <span className="mono">{timeLabel(parseTs(c.started_at))}</span>- </span>- <span className="sc-sub">- {t('call.contact.sideCall', {- direction: c.direction === 'out' ? t('call.contact.outbound') : t('call.contact.inbound'),- length: c.status === 'live' ? t('call.contact.live') : c.duration_sec ? callDuration(c.duration_sec) : '—',- })}- </span>- </button>- ))-}--function PastCalls({ call, onOpen }: Pick<Props, 'call' | 'onOpen'>) {- const t = useT()- const others = useRows('calls')+ const linked = useContact(call.contact_id)+ const contact = linked?.deleted_at ? undefined : linked // a deleted contact reads as an unknown caller+ const calls = useRows('calls').filter(c =>- c.id !== call.id &&!c.deleted_at &&- (call.contact_id ? c.contact_id === call.contact_id : c.from_number === call.from_number),+ (c.id === call.id || (call.contact_id ? c.contact_id === call.contact_id : c.from_number === call.from_number)),)- .filter(c => parseTs(c.started_at) < parseTs(call.started_at)) // earlier calls only.sort((a, b) => parseTs(b.started_at).getTime() - parseTs(a.started_at).getTime())- return (- <div className="side-sec">- <h2>{t('call.contact.previousCalls')}</h2>- <SideCalls calls={others} onOpen={onOpen} />- {!others.length && <span className="help">{t('call.contact.noEarlierCalls')}</span>}- </div>+ const suggested: PanelSuggestions = {}+ if (contact)+ for (const [field, value] of Object.entries(factSuggestions(call.fields, contact)))+ suggested[field as keyof PanelSuggestions] = { value }+ const menu: MenuItem[] =+ contact && onToggleBlock+ ? [+ {+ label: contact.blocked_at ? t('call.contact.unblockNumber') : t('call.contact.blockNumber'),+ icon: 'ban',+ kbd: '⇧B',+ onSelect: () => onToggleBlock(call),+ },+ ]+ : []+ const badges = (+ <>+ {contact?.blocked_at && <Badge>{t('call.contact.blocked')}</Badge>}+ {call.spam_likely && <Badge title={t('call.contact.spamLikelyTitle')}>{t('call.contact.spamLikely')}</Badge>}+ {call.caller_attestation && call.caller_attestation !== 'A' && (+ <Badge title={t('call.contact.notVerifiedTitle')}>{t('call.contact.notVerified')}</Badge>+ )}+ </>)-}--/** The caller next to the call: who they are (editable) and what they called about before. */-export function ContactSide({ call, onOpen, toast, onToggleBlock }: Props) {- const t = useT()- const linked = useContact(call.contact_id)- const contact = linked?.deleted_at ? undefined : linked // a deleted contact reads as an unknown caller- const name = isTestCall(call) ? testCallLabel() : contact?.namereturn (<aside className="cv-side" aria-label={t('call.contact.label')}>- <div className="side-who">- <Avatar name={name ?? '?'} />- <div>- <b>{name ?? t('call.contact.unknownCaller')}</b>- <span>{contact?.company ?? formatPhone(call.from_number)}</span>- </div>- </div>- <div className="side-acts">- {call.from_number.startsWith('+') && <CallLink number={call.from_number} />}- {contact && onToggleBlock && (- <Button- size="sm"- variant="ghost"- title={t('common.withKey', {- label: contact.blocked_at ? t('call.contact.unblockNumber') : t('call.contact.blockNumber'),- key: '⇧B',- })}- onClick={() => onToggleBlock(call)}- >- {contact.blocked_at ? t('call.contact.unblock') : t('call.contact.block')}- </Button>- )}- {contact?.blocked_at && <Badge>{t('call.contact.blocked')}</Badge>}- {call.spam_likely && <Badge title={t('call.contact.spamLikelyTitle')}>{t('call.contact.spamLikely')}</Badge>}- {call.caller_attestation && call.caller_attestation !== 'A' && (- <Badge title={t('call.contact.notVerifiedTitle')}>{t('call.contact.notVerified')}</Badge>- )}- </div>- {contact ? (- <Facts key={contact.id} contact={contact} call={call} toast={toast} />- ) : (- <span className="help">{t('call.contact.notLinked')}</span>- )}- <EmailedAfterCall call={call} />- <PastCalls call={call} onOpen={onOpen} />+ <ContactPanel+ contact={contact}+ name={isTestCall(call) ? testCallLabel() : undefined}+ number={call.from_number}+ badges={badges}+ menu={menu}+ suggested={suggested}+ calls={calls}+ currentCallId={call.id}+ onOpenCall={onOpen}+ onChangeCall={onChange}+ toast={toast}+ >+ <EmailedAfterCall call={call} />+ </ContactPanel></aside>)}diff --git a/apps/web/src/call/EditableFact.tsx b/apps/web/src/call/EditableFact.tsxindex f1400433..f9b97405 100644--- a/apps/web/src/call/EditableFact.tsx+++ b/apps/web/src/call/EditableFact.tsx@@ -1,4 +1,4 @@-import { type KeyboardEvent, useEffect, useRef, useState } from 'react'+import { type KeyboardEvent, type ReactNode, useEffect, useRef, useState } from 'react'type Edit = { value: string | null; onSave: (value: string | null) => void; multiline?: boolean }@@ -40,15 +40,18 @@ export function useInlineEdit({ value, onSave, multiline }: Edit) {}/** `field`: names the input for code (`[data-field=name]`), whatever the label's language. */-type Props = Edit & { label: string; placeholder: string; field?: string }+type Props = Edit & { label: string; placeholder: string; field?: string; help?: ReactNode }-/** A fact that reads as plain text and edits in place (the call view's contact panel). */-export function EditableFact({ label, value, placeholder, onSave, multiline, field }: Props) {+/** A fact that reads as plain text and edits in place (the contact panel); `help`: a "?" after the label. */+export function EditableFact({ label, value, placeholder, onSave, multiline, field, help }: Props) {const edit = useInlineEdit({ value, onSave, multiline })const props = { className: 'fact-input', placeholder, 'aria-label': label, 'data-field': field, ...edit }return (<>- <dt>{label}</dt>+ <dt>+ {label}+ {help}+ </dt><dd>{multiline ? <textarea rows={2} {...props} /> : <input autoComplete="off" {...props} />}</dd></>)diff --git a/apps/web/src/contacts/ContactCalls.tsx b/apps/web/src/contacts/ContactCalls.tsxindex 5eedd209..97b9ec9e 100644--- a/apps/web/src/contacts/ContactCalls.tsx+++ b/apps/web/src/contacts/ContactCalls.tsx@@ -17,21 +17,27 @@ const COLLAPSED_ROWS = 5type Props = {calls: Call[]+ /** The call open beside the list (the call view's panel): highlighted, "This call" instead of its date. */+ currentId?: stringonOpen: (call: Call) => voidonChange: (change: Change) => void}-export function ContactCalls({ calls, onOpen, onChange }: Props) {+export function ContactCalls({ calls, currentId, onOpen, onChange }: Props) {const t = useT()const [expanded, setExpanded] = useState(false)if (!calls.length) return <p className="ct-calls-empty">{t('contacts.calls.empty')}</p>const collapsible = calls.length > COLLAPSED_ROWS + 1 // never hide a single row behind a button- const shown = collapsible && !expanded ? calls.slice(0, COLLAPSED_ROWS) : calls+ const collapsed = calls.slice(0, COLLAPSED_ROWS)+ const current = calls.find(c => c.id === currentId)+ // The open call always shows, also when it is older than the first few.+ const shown =+ collapsible && !expanded ? (current && !collapsed.includes(current) ? [...collapsed, current] : collapsed) : callsreturn (<div className="ct-calls"><div role="list" aria-label={t('contacts.column.calls')}>{shown.map(call => (- <CallItem key={call.id} call={call} onOpen={onOpen} onChange={onChange} />+ <CallItem key={call.id} call={call} current={call.id === currentId} onOpen={onOpen} onChange={onChange} />))}</div>{collapsible && (@@ -43,16 +49,29 @@ export function ContactCalls({ calls, onOpen, onChange }: Props) {)}-function CallItem({ call, onOpen, onChange }: { call: Call; onOpen: Props['onOpen']; onChange: Props['onChange'] }) {+function CallItem({+ call,+ current,+ onOpen,+ onChange,+}: {+ call: Call+ current: boolean+ onOpen: Props['onOpen']+ onChange: Props['onChange']+}) {const t = useT()const done = call.inbox_state === 'done'const live = call.status === 'live'const title = callTitle(call)+ const open = () => {+ if (!current) onOpen(call) // the open call is already open+ }const toggleUnread = () => onChange(unreadChange(call))const toggleDone = () => onChange(done ? notDoneChange(call) : doneChange(call))const onKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {if (e.target !== e.currentTarget || e.metaKey || e.ctrlKey || e.altKey) return- const run = rowKeys(e, { open: () => onOpen(call), toggleUnread, toggleDone })+ const run = rowKeys(e, { open, toggleUnread, toggleDone })if (!run) returne.preventDefault()e.stopPropagation() // the page's own keys (j/k, Enter on the contact list) stay out of it@@ -64,15 +83,19 @@ function CallItem({ call, onOpen, onChange }: { call: Call; onOpen: Props['onOpe// biome-ignore lint/a11y/noNoninteractiveTabindex: the row is the list's item and opens the call (Enter, Space, click), as in the inboxtabIndex={0}aria-label={[title, call.unread && t('inbox.row.unread'), done && t('inbox.row.done')].filter(Boolean).join(', ')}- className={cx('ct-call', call.unread && 'is-unread', done && 'is-done')}- onClick={() => onOpen(call)}+ aria-current={current || undefined}+ className={cx('ct-call', call.unread && 'is-unread', done && 'is-done', current && 'is-current')}+ onClick={open}onKeyDown={onKeyDown}><spanclassName="ct-call-dot"role="button"tabIndex={-1}- title={t('common.withKey', { label: call.unread ? t('inbox.row.markRead') : t('inbox.row.markUnread'), key: 'U' })}+ title={t('common.withKey', {+ label: call.unread ? t('inbox.row.markRead') : t('inbox.row.markUnread'),+ key: 'U',+ })}aria-label={call.unread ? t('inbox.row.unreadMarkRead') : t('inbox.row.readMarkUnread')}onClick={e => {e.stopPropagation()@@ -82,7 +105,7 @@ function CallItem({ call, onOpen, onChange }: { call: Call; onOpen: Props['onOpe<span className="ct-call-title" title={title}>{title}</span>- <span className="ct-call-when">{timeLabel(parseTs(call.started_at))}</span>+ <span className="ct-call-when">{current ? t('call.contact.thisCall') : timeLabel(parseTs(call.started_at))}</span><span className="ct-call-line"><span className="ct-call-status"><Status call={call} tab={tabOf(call)} markDone={done} segments={[]} />diff --git a/apps/web/src/contacts/ContactDetail.tsx b/apps/web/src/contacts/ContactDetail.tsxindex 70e9015e..6297f240 100644--- a/apps/web/src/contacts/ContactDetail.tsx+++ b/apps/web/src/contacts/ContactDetail.tsx@@ -1,20 +1,13 @@-// The contact's record beside the list (full width below 1100 px): a header with who it is and the-// actions, the details as a form whose fields save themselves (contact.update), and their calls.-import type { Call, Contact } from '@linedesk/db/types'-import { type KeyboardEvent, type ReactNode, useEffect, useRef, useState } from 'react'-import { CallLink, ConfirmCallerName, FoldedFields, KeepFromCall, nameFromCaller } from '../call/ContactSide.tsx'-import { callsFactSuggestions, foldedFields } from '../call/factSuggestions.ts'-import { useInlineEdit } from '../call/EditableFact.tsx'-import { formatPhone } from '../inbox-model.ts'-import { monthDay, parseTs } from '../time.ts'-import type { Step } from '../inbox/changes.ts'-import { useAssistants, useRun } from '../store.tsx'-import { Card, FormField, Input, Textarea } from '../ui/form.tsx'-import { NO_PASSWORD_MANAGER } from '../ui/passwordManager.ts'-import { Avatar, Button, Icon } from '../ui/kit.tsx'-import { ContactCalls } from './ContactCalls.tsx'-import { CONTACT_DETAIL_FIELDS, type ContactDetailField, contactLabel, type ContactRow, noteHint } from './model.ts'+// The contact's record beside the list (full width below 1100 px): the contact panel the call view shows too+// (ContactPanel.tsx), with the record's own actions (back, merge, block, delete) and the key facts of all their calls.+import type { Call } from '@linedesk/db/types'import { useT } from '@linedesk/i18n/react'+import { callsFactSuggestions } from '../call/factSuggestions.ts'+import type { Step } from '../inbox/changes.ts'+import { monthDay, parseTs } from '../time.ts'+import { Badge } from '../ui/kit.tsx'+import { ContactPanel, type PanelSuggestions } from './ContactPanel.tsx'+import { contactLabel, type ContactRow } from './model.ts'type Props = {row: ContactRow@@ -28,262 +21,46 @@ type Props = {type RunUndoable = (steps: Step[], inverse: Step[], label: string, key: string) => void-type Editable = 'name' | ContactDetailField--/** The fields that fold into "+ Company, email" while empty and no call suggests a value; the note always shows. */-const FOLDABLE = ['company', 'email', 'address'] as const--type FieldProps = {- id: string- label: string- placeholder: string- multiline?: boolean- /** Lines of the note box (3 unless given). */- rows?: number- /** A line under the field on what the value is used for. */- hint?: ReactNode- autoFocus?: boolean- maxLength?: number- value: string- onChange: (e: { target: { value: string } }) => void- onKeyDown?: (e: KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void- onFocus?: () => void- onBlur?: () => void-}--/** One field of a contact, as the contact page and New contact show it: a line, or a box for the note. */-export function ContactField({ id, label, multiline, rows = 3, hint, ...control }: FieldProps) {- const hintId = hint ? `${id}-hint` : undefined- return (- <FormField id={id} label={label} className={multiline ? 'ct-wide' : undefined}>- {multiline ? (- <Textarea id={id} rows={rows} aria-describedby={hintId} {...control} />- ) : (- <Input id={id} {...NO_PASSWORD_MANAGER} aria-describedby={hintId} {...control} />- )}- {hint && (- <p id={hintId} className="k-field-desc">- {hint}- </p>- )}- </FormField>- )-}--/** A field of the contact page: saves itself (contact.update) on Enter or when left. */-function DetailField({- contact,- field,- suggestion,- ...rest-}: {- contact: Contact- field: Editable- label: string- placeholder: string- multiline?: boolean- rows?: number- hint?: ReactNode- /** A value from one of the contact's calls, shown while the contact has none (the hint then offers Keep). */- suggestion?: string-}) {- const run = useRun()- const edit = useInlineEdit({- value: contact[field] ?? suggestion ?? null,- onSave: value => void run('contact.update', { contactId: contact.id, [field]: value }),- multiline: rest.multiline,- })- return <ContactField id={`ct-${field}`} {...rest} {...edit} />-}--/** ⋯ with Delete contact, which asks once in place; the toast then offers Undo. */-function MoreMenu({ label, onDelete, onMerge }: { label: string; onDelete: () => void; onMerge: () => void }) {- const t = useT()- const [open, setOpen] = useState(false)- const [confirming, setConfirming] = useState(false)- const root = useRef<HTMLDivElement>(null)- useEffect(() => {- if (!open) return setConfirming(false)- root.current?.querySelector<HTMLElement>('[role="menuitem"]')?.focus()- const outside = (e: MouseEvent) => {- if (!root.current?.contains(e.target as Node)) setOpen(false)- }- document.addEventListener('mousedown', outside)- return () => document.removeEventListener('mousedown', outside)- }, [open])- useEffect(() => {- if (confirming) root.current?.querySelector<HTMLElement>('.ct-menu-confirm .k-btn-danger')?.focus()- }, [confirming])- function onKeyDown(e: KeyboardEvent) {- if (e.key !== 'Escape' || !open) return // closed: Esc closes the contact, as anywhere on the page- e.stopPropagation()- setOpen(false)- root.current?.querySelector<HTMLElement>('.ct-more')?.focus()- }- return (- // biome-ignore lint/a11y/noStaticElementInteractions: Esc closes the menu from the button or any item in it- <div className="ct-menu-wrap" ref={root} onKeyDown={onKeyDown}>- <Button- size="sm"- variant="ghost"- icon="more"- className="ct-more"- aria-haspopup="menu"- aria-expanded={open}- aria-label={t('contacts.detail.more')}- title={t('contacts.detail.more')}- onClick={() => setOpen(o => !o)}- />- {open && (- <div className="ct-menu" role="menu" aria-label={t('call.contact.label')}>- {confirming ? (- <div className="ct-menu-confirm">- <span>{t('contacts.detail.deleteConfirm', { name: label })}</span>- <span className="ct-menu-acts">- <Button size="sm" variant="ghost" onClick={() => setConfirming(false)}>- {t('common.action.cancel')}- </Button>- <Button size="sm" variant="danger" onClick={onDelete}>- {t('common.action.delete')}- </Button>- </span>- </div>- ) : (- <>- <button- type="button"- role="menuitem"- className="nav-item"- onClick={() => {- setOpen(false)- onMerge()- }}- >- <Icon name="users" size={15} />- <span className="lbl">{t('contacts.detail.mergeWith')}</span>- </button>- <button- type="button"- role="menuitem"- className="nav-item ct-menu-danger"- onClick={() => setConfirming(true)}- >- <Icon name="trash" size={15} />- <span className="lbl">{t('contacts.detail.delete')}</span>- <kbd className="k-kbd">#</kbd>- </button>- </>- )}- </div>- )}- </div>- )-}--/**- * Name, phone, the fields with a value and the note; a field the contact has empty shows the newest of their calls'- * key facts for it with "From the call on <date> · Keep"; the other empty fields fold into "+ Company, email". The- * same rules as the call view's side panel (call/factSuggestions.ts).- */-function DetailFields({ contact, calls }: { contact: Contact; calls: Call[] }) {- const t = useT()- const run = useRun()- const assistantNames = useAssistants().map(a => a.name)- const [unfolded, setUnfolded] = useState(false)- const suggested = callsFactSuggestions(calls, contact)- const folded = unfolded ? [] : foldedFields(FOLDABLE, contact, suggested)- const phone = formatPhone(contact.phone)- const field = (f: (typeof CONTACT_DETAIL_FIELDS)[number]) => {- if (f.field !== 'note' && folded.includes(f.field)) return null- const suggestion = f.field !== 'note' && !contact[f.field]?.trim() ? suggested[f.field] : undefined- const keep = suggestion && (- <KeepFromCall- date={monthDay(parseTs(suggestion.call.started_at))}- onKeep={() => void run('contact.update', { contactId: contact.id, [f.field]: suggestion.value })}- />- )- return (- <DetailField- key={f.field}- contact={contact}- field={f.field}- label={t(f.label)}- placeholder={t(f.placeholder)}- multiline={'multiline' in f}- rows={'multiline' in f ? 2 : undefined}- suggestion={suggestion?.value}- hint={f.field === 'note' ? noteHint(assistantNames) : keep || undefined}- />- )- }- const [company, email, address, note] = CONTACT_DETAIL_FIELDS- return (- <div className="ct-grid">- <DetailField- contact={contact}- field="name"- label={t('contacts.field.name')}- placeholder={t('contacts.field.namePlaceholder')}- hint={nameFromCaller(contact) ? <ConfirmCallerName contact={contact} /> : undefined}- />- {field(company)}- <FormField id="ct-phone" label={t('contacts.field.phone')}>- <Input id="ct-phone" value={phone} readOnly className="ct-readonly" />- </FormField>- {field(email)}- {field(address)}- {folded.length > 0 && (- <div className="ct-wide ct-fold">- <FoldedFields folded={folded} inputOf={f => `#ct-${f}`} onUnfold={() => setUnfolded(true)} />- </div>- )}- {field(note)}- </div>- )-}--export function ContactDetail({ row, onOpenCall, onClose, onDelete, onMerge, runUndoable }: Props) {+export function ContactDetail({ row, toast, onOpenCall, onClose, onDelete, onMerge, runUndoable }: Props) {const t = useT()const { contact, calls } = row- const label = contactLabel(contact)- const phone = formatPhone(contact.phone)+ const suggested: PanelSuggestions = {}+ for (const [field, s] of Object.entries(callsFactSuggestions(calls, contact)))+ suggested[field as keyof PanelSuggestions] = { value: s.value, date: monthDay(parseTs(s.call.started_at)) }+ const id = { contactId: contact.id }+ const toggleBlock = () =>+ contact.blocked_at+ ? runUndoable([['contact.unblock', id]], [['contact.block', id]], t('inbox.change.unblocked'), '')+ : runUndoable([['contact.block', id]], [['contact.unblock', id]], t('inbox.change.blocked'), '')return (<aside className="cv-side cust-side ct-detail" aria-label={t('call.contact.label')} data-esc-closes><div className="ct-detail-in">- <header className="ct-head">- <Button- size="sm"- variant="ghost"- icon="left"- className="ct-back"- aria-label={t('call.contact.close')}- title={t('common.action.closeWithKey', { key: 'esc' })}- onClick={onClose}- />- <Avatar name={contact.name ?? '?'} size={40} />- <div className="ct-who">- <b>{label}</b>- <span>{contact.name ? phone : (contact.company ?? t('contacts.detail.noName'))}</span>- </div>- <div className="ct-acts">- {contact.phone.startsWith('+') && <CallLink number={contact.phone} />}- <MoreMenu label={label} onDelete={() => onDelete(contact.id)} onMerge={onMerge} />- </div>- </header>- <Card title={t('contacts.detail.details')} className="ct-card">- <DetailFields key={contact.id} contact={contact} calls={calls} />- </Card>- <Card- title={calls.length ? t('contacts.detail.callsCount', { count: calls.length }) : t('contacts.column.calls')}- className="ct-card"- >- <ContactCalls- key={contact.id}- calls={calls}- onOpen={onOpenCall}- onChange={change => runUndoable(change.steps, change.inverse, change.label, change.key)}- />- </Card>+ <ContactPanel+ contact={contact}+ number={contact.phone}+ badges={contact.blocked_at && <Badge>{t('call.contact.blocked')}</Badge>}+ menu={[+ { label: t('contacts.detail.mergeWith'), icon: 'users', onSelect: onMerge },+ {+ label: contact.blocked_at ? t('call.contact.unblockNumber') : t('call.contact.blockNumber'),+ icon: 'ban',+ onSelect: toggleBlock,+ },+ {+ label: t('contacts.detail.delete'),+ icon: 'trash',+ kbd: '#',+ confirm: t('contacts.detail.deleteConfirm', { name: contactLabel(contact) }),+ onSelect: () => onDelete(contact.id),+ },+ ]}+ onBack={onClose}+ suggested={suggested}+ calls={calls}+ onOpenCall={onOpenCall}+ onChangeCall={change => runUndoable(change.steps, change.inverse, change.label, change.key)}+ toast={toast}+ /></div></aside>)diff --git a/apps/web/src/contacts/ContactPanel.tsx b/apps/web/src/contacts/ContactPanel.tsxnew file mode 100644index 00000000..9bf49495--- /dev/null+++ b/apps/web/src/contacts/ContactPanel.tsx@@ -0,0 +1,395 @@+// One contact panel, the same on the Contacts page and next to a call (LIN-854): a header with who it is (avatar,+// name, number, status badges) and the actions (Call, ⋯), the facts as a quiet label-left list that edits in place+// (contact.update), then the contact's calls. The call view adds the open call's own bits (Keep from this call, the+// emailed line, "This call" in the list) through its props.+import type { Call, Contact } from '@linedesk/db/types'+import { msg } from '@linedesk/i18n'+import { T, useT } from '@linedesk/i18n/react'+import { type KeyboardEvent, type ReactNode, useEffect, useRef, useState } from 'react'+import { EditableFact } from '../call/EditableFact.tsx'+import { foldedFields, type SuggestedField } from '../call/factSuggestions.ts'+import { fmt, intlLocale } from '../i18n/format.ts'+import { i18n } from '../i18n/index.tsx'+import { formatPhone } from '../inbox-model.ts'+import type { Change } from '../inbox/changes.ts'+import { useAssistants, useRun } from '../store.tsx'+import { LinkButton } from '../ui/AppLink.tsx'+import { HelpTip } from '../ui/HelpTip.tsx'+import type { IconName } from '../ui/icons.ts'+import { Avatar, Button, Icon } from '../ui/kit.tsx'+import { ContactCalls } from './ContactCalls.tsx'+import { noteHint } from './model.ts'+import './contacts.css'++/** Whether the contact's name is only what a caller said (contacts.name_source): it checks nobody on the phone. */+export const nameFromCaller = (contact: Contact) => !!contact.name?.trim() && contact.name_source !== 'member'++/**+ * "Name from caller · Confirm": a member confirms the name (contact.update saves it as the team's), so the+ * assistant may talk about earlier calls once a caller says it.+ */+export function ConfirmCallerName({ contact }: { contact: Contact }) {+ const t = useT()+ const run = useRun()+ return (+ <T+ k="call.contact.nameFromCaller"+ values={{+ confirm: chunks => (+ <LinkButton+ title={t('call.contact.confirmTitle')}+ onClick={() => void run('contact.update', { contactId: contact.id, name: contact.name })}+ >+ {chunks}+ </LinkButton>+ ),+ }}+ />+ )+}++/**+ * "From this call · Keep" (or "From the call on Nov 19 · Keep" with `date`) under a field that shows a key fact of a+ * call: Keep saves it to the contact.+ */+function KeepFromCall({ onKeep, date }: { onKeep: () => void; date?: string }) {+ const t = useT()+ const keep = (chunks: ReactNode) => (+ <LinkButton title={t('call.contact.keepTitle')} onClick={onKeep}>+ {chunks}+ </LinkButton>+ )+ return date ? (+ <T k="call.contact.fromCallOn" values={{ date, keep }} />+ ) : (+ <T k="call.contact.fromThisCall" values={{ keep }} />+ )+}++/** The fields that fold into one "+ Company, email, address, note" button while empty, in the order they show. */+const FOLDABLE = ['company', 'email', 'address', 'note'] as const+type Foldable = (typeof FOLDABLE)[number]+const FOLD_NAME = {+ company: msg('call.contact.fold.company'),+ email: msg('call.contact.fold.email'),+ address: msg('call.contact.fold.address'),+ note: msg('call.contact.fold.note'),+}++/** "+ Company, email": the empty fields folded into one quiet button; a click shows them and focuses the first. */+function FoldedFields({ folded, onUnfold }: { folded: readonly Foldable[]; onUnfold: () => void }) {+ const t = useT()+ const root = useRef<HTMLButtonElement>(null)+ if (!folded.length) return null+ const label = fmt().list(+ folded.map(field => t(FOLD_NAME[field])),+ { type: 'unit' },+ )+ return (+ <button+ ref={root}+ type="button"+ className="side-more"+ title={t('call.contact.showFieldsTitle')}+ onClick={() => {+ const panel = root.current?.closest('.cp')+ onUnfold()+ setTimeout(() => panel?.querySelector<HTMLElement>(`[data-field=${folded[0]}]`)?.focus(), 0)+ }}+ >+ <Icon name="plus" size={12} />+ <span>{label.charAt(0).toLocaleUpperCase(intlLocale()) + label.slice(1)}</span>+ </button>+ )+}++/** A value from a call for a field the contact has empty; `date` names the call when it is not the open one. */+export type FactSuggestion = { value: string; date?: string }+export type PanelSuggestions = Partial<Record<SuggestedField, FactSuggestion>>++function copy(text: string, toast: (text: string) => void) {+ navigator.clipboard.writeText(text).then(+ () => toast(i18n().t('call.contact.copied', { text })),+ () => toast(i18n().t('call.contact.copyFailed')),+ )+}++/**+ * The contact's facts: Name and Phone, then the fields with a value; a field the contact has empty shows a call's key+ * fact for it with Keep; the other empty fields fold into one quiet button. Every field saves itself.+ */+function Facts({+ contact,+ suggested,+ toast,+}: {+ contact: Contact+ suggested: PanelSuggestions+ toast: (text: string) => void+}) {+ const t = useT()+ const run = useRun()+ const assistantNames = useAssistants().map(a => a.name)+ const [unfolded, setUnfolded] = useState(false)+ const save = (field: 'name' | Foldable) => (value: string | null) =>+ void run('contact.update', { contactId: contact.id, [field]: value })+ const phone = formatPhone(contact.phone)+ const folded = unfolded ? [] : foldedFields(FOLDABLE, contact, suggested)+ const shows = (field: Foldable) => !folded.includes(field)+ const fact = (field: SuggestedField, label: string, placeholder: string) => {+ const suggestion = contact[field]?.trim() ? undefined : suggested[field]+ return (+ <>+ <EditableFact+ // A new field when it turns from the contact's own value into a suggestion (cleared) or back (kept), so the+ // shown text follows even when both are the same words.+ key={suggestion ? 'suggested' : 'own'}+ field={field}+ label={label}+ value={contact[field] ?? suggestion?.value ?? null}+ placeholder={placeholder}+ onSave={save(field)}+ />+ {suggestion && (+ <dd className="fact-hint">+ <KeepFromCall date={suggestion.date} onKeep={() => save(field)(suggestion.value)} />+ </dd>+ )}+ </>+ )+ }+ return (+ <div className="cp-facts">+ <dl className="facts side-facts">+ <EditableFact+ field="name"+ label={t('call.contact.name')}+ value={contact.name}+ placeholder={t('call.contact.addName')}+ onSave={save('name')}+ />+ {nameFromCaller(contact) && (+ <dd className="fact-hint">+ <ConfirmCallerName contact={contact} />+ </dd>+ )}+ <dt>{t('call.contact.phone')}</dt>+ <dd>+ {contact.phone.startsWith('+') ? (+ <button+ type="button"+ className="fact-copy"+ title={t('call.contact.copy')}+ onClick={() => copy(phone, toast)}+ >+ {phone}+ </button>+ ) : (+ <span className="fact-copy">{phone}</span>+ )}+ </dd>+ {shows('company') && fact('company', t('call.contact.company'), t('call.contact.addCompany'))}+ {shows('email') && fact('email', t('call.contact.email'), t('call.contact.addEmail'))}+ {shows('address') && fact('address', t('call.contact.address'), t('call.contact.addAddress'))}+ {shows('note') && (+ <EditableFact+ field="note"+ label={t('call.contact.note')}+ help={<HelpTip text={noteHint(assistantNames)} label={t('call.contact.noteHelp')} />}+ value={contact.note}+ placeholder={t('call.contact.addNote')}+ onSave={save('note')}+ multiline+ />+ )}+ </dl>+ <FoldedFields folded={folded} onUnfold={() => setUnfolded(true)} />+ </div>+ )+}++/** Call the number from this device (a phone, or a computer that hands tel: links to one). */+function CallLink({ number }: { number: string }) {+ const t = useT()+ return (+ <a className="k-btn k-btn-secondary k-btn-sm" href={`tel:${number}`} title={t('call.contact.callFromPhone')}>+ <Icon name="phone-out" size={14} />+ <span>{t('call.contact.call')}</span>+ </a>+ )+}++export type MenuItem = {+ label: string+ icon: IconName+ onSelect: () => void+ /** Its shortcut, shown at the right end. */+ kbd?: string+ /** Red, and asks once in place with this sentence before it acts (the toast then offers Undo). */+ confirm?: string+}++/** ⋯ with the contact's actions; one that deletes asks once in place. */+function MoreMenu({ items }: { items: readonly MenuItem[] }) {+ const t = useT()+ const [open, setOpen] = useState(false)+ const [confirming, setConfirming] = useState<MenuItem | null>(null)+ const root = useRef<HTMLDivElement>(null)+ useEffect(() => {+ if (!open) return setConfirming(null)+ root.current?.querySelector<HTMLElement>('[role="menuitem"]')?.focus()+ const outside = (e: MouseEvent) => {+ if (!root.current?.contains(e.target as Node)) setOpen(false)+ }+ document.addEventListener('mousedown', outside)+ return () => document.removeEventListener('mousedown', outside)+ }, [open])+ useEffect(() => {+ if (confirming) root.current?.querySelector<HTMLElement>('.ct-menu-confirm .k-btn-danger')?.focus()+ }, [confirming])+ function onKeyDown(e: KeyboardEvent) {+ if (e.key !== 'Escape' || !open) return // closed: Esc closes the contact or the call, as anywhere on the page+ e.stopPropagation()+ setOpen(false)+ root.current?.querySelector<HTMLElement>('.ct-more')?.focus()+ }+ const choose = (item: MenuItem) => {+ if (item.confirm) return setConfirming(item)+ setOpen(false)+ item.onSelect()+ }+ return (+ // biome-ignore lint/a11y/noStaticElementInteractions: Esc closes the menu from the button or any item in it+ <div className="ct-menu-wrap" ref={root} onKeyDown={onKeyDown}>+ <Button+ size="sm"+ variant="ghost"+ icon="more"+ className="ct-more"+ aria-haspopup="menu"+ aria-expanded={open}+ aria-label={t('contacts.detail.more')}+ title={t('contacts.detail.more')}+ onClick={() => setOpen(o => !o)}+ />+ {open && (+ <div className="ct-menu" role="menu" aria-label={t('call.contact.label')}>+ {confirming ? (+ <div className="ct-menu-confirm">+ <span>{confirming.confirm}</span>+ <span className="ct-menu-acts">+ <Button size="sm" variant="ghost" onClick={() => setConfirming(null)}>+ {t('common.action.cancel')}+ </Button>+ <Button+ size="sm"+ variant="danger"+ onClick={() => {+ setOpen(false)+ confirming.onSelect()+ }}+ >+ {t('common.action.delete')}+ </Button>+ </span>+ </div>+ ) : (+ items.map(item => (+ <button+ key={item.label}+ type="button"+ role="menuitem"+ className={item.confirm ? 'nav-item ct-menu-danger' : 'nav-item'}+ onClick={() => choose(item)}+ >+ <Icon name={item.icon} size={15} />+ <span className="lbl">{item.label}</span>+ {item.kbd && <kbd className="k-kbd">{item.kbd}</kbd>}+ </button>+ ))+ )}+ </div>+ )}+ </div>+ )+}++type PanelProps = {+ /** The contact; none for a caller whose number is not linked to one. */+ contact: Contact | undefined+ /** The header's name when it is not the contact's own (a test call, an unknown caller). */+ name?: string+ /** The number to show and call when there is no contact. */+ number: string+ /** Status badges after the name (Blocked, Spam likely, Not verified). */+ badges?: ReactNode+ menu: readonly MenuItem[]+ /** The contact page's back button (Esc). */+ onBack?: () => void+ suggested: PanelSuggestions+ /** The contact's calls, newest first. */+ calls: Call[]+ /** The open call, marked "This call" in the list. */+ currentCallId?: string+ onOpenCall: (call: Call) => void+ onChangeCall: (change: Change) => void+ toast: (text: string) => void+ /** Lines between the facts and the calls (the call view's "Emailed after the call"). */+ children?: ReactNode+}++export function ContactPanel(p: PanelProps) {+ const t = useT()+ const { contact } = p+ const phone = formatPhone(contact?.phone ?? p.number)+ const name = p.name ?? (contact?.name || (contact ? phone : t('call.contact.unknownCaller')))+ const sub = contact && !p.name && !contact.name ? (contact.company ?? t('contacts.detail.noName')) : phone+ const number = contact?.phone ?? p.number+ return (+ <div className="cp">+ <header className="cp-head">+ {p.onBack && (+ <Button+ size="sm"+ variant="ghost"+ icon="left"+ className="ct-back"+ aria-label={t('call.contact.close')}+ title={t('common.action.closeWithKey', { key: 'esc' })}+ onClick={p.onBack}+ />+ )}+ <Avatar name={contact?.name ?? p.name ?? '?'} size={40} />+ <div className="cp-who">+ <span className="cp-name">+ <b title={name}>{name}</b>+ {p.badges}+ </span>+ <span className="cp-sub">{sub}</span>+ </div>+ <div className="cp-acts">+ {number.startsWith('+') && <CallLink number={number} />}+ {p.menu.length > 0 && <MoreMenu items={p.menu} />}+ </div>+ </header>+ {contact ? (+ <Facts key={contact.id} contact={contact} suggested={p.suggested} toast={p.toast} />+ ) : (+ <span className="help">{t('call.contact.notLinked')}</span>+ )}+ {p.children}+ <section className="cp-calls">+ <h2>+ {p.calls.length ? t('contacts.detail.callsCount', { count: p.calls.length }) : t('contacts.column.calls')}+ </h2>+ <ContactCalls+ key={contact?.id ?? p.number}+ calls={p.calls}+ currentId={p.currentCallId}+ onOpen={p.onOpenCall}+ onChange={p.onChangeCall}+ />+ </section>+ </div>+ )+}diff --git a/apps/web/src/contacts/NewContact.tsx b/apps/web/src/contacts/NewContact.tsxindex c5f6aeed..4bf6b3a9 100644--- a/apps/web/src/contacts/NewContact.tsx+++ b/apps/web/src/contacts/NewContact.tsx@@ -1,12 +1,12 @@// Add a contact by hand, in the panel beside the list, with every detail a contact has: name and phone first,// then the rest as on the contact page. Enter saves (Shift+Enter is a new line in the note), Esc closes.-import { type FormEvent, type KeyboardEvent, useRef, useState } from 'react'+import { type FormEvent, type KeyboardEvent, type ReactNode, useRef, useState } from 'react'import { useAssistants, useRun } from '../store.tsx'import { useDefaultPhoneCountry } from '../phoneCountry.ts'-import { Card, FormField } from '../ui/form.tsx'+import { Card, FormField, Input, Textarea } from '../ui/form.tsx'+import { NO_PASSWORD_MANAGER } from '../ui/passwordManager.ts'import { Button } from '../ui/kit.tsx'import { PhoneInput } from '../ui/PhoneInput.tsx'-import { ContactField } from './ContactDetail.tsx'import {CONTACT_DETAIL_FIELDS,EMPTY_NEW_CONTACT,@@ -24,6 +24,39 @@ type Props = {onClose: () => void}+type FieldProps = {+ id: string+ label: string+ placeholder: string+ multiline?: boolean+ /** A line under the field on what the value is used for. */+ hint?: ReactNode+ autoFocus?: boolean+ maxLength?: number+ value: string+ onChange: (e: { target: { value: string } }) => void+ onKeyDown?: (e: KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void+}++/** One field of New contact: a line, or a box for the note. */+function ContactField({ id, label, multiline, hint, ...control }: FieldProps) {+ const hintId = hint ? `${id}-hint` : undefined+ return (+ <FormField id={id} label={label} className={multiline ? 'ct-wide' : undefined}>+ {multiline ? (+ <Textarea id={id} rows={3} aria-describedby={hintId} {...control} />+ ) : (+ <Input id={id} {...NO_PASSWORD_MANAGER} aria-describedby={hintId} {...control} />+ )}+ {hint && (+ <p id={hintId} className="k-field-desc">+ {hint}+ </p>+ )}+ </FormField>+ )+}+/** Enter in the note saves the contact like in every other field; Shift+Enter starts a new line. */function submitOnEnter(e: KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) {if (e.key !== 'Enter' || e.shiftKey || e.nativeEvent.isComposing) return@@ -54,7 +87,7 @@ export function NewContact({ existing, onAdded, onClose }: Props) {}return (- <aside className="cv-side cust-side ct-detail" aria-label={t('contacts.new.label')} data-esc-closes>+ <aside className="cv-side cust-side ct-detail ct-new" aria-label={t('contacts.new.label')} data-esc-closes><form className="ct-detail-in" onSubmit={submit} noValidate><header className="ct-head"><div className="ct-who">diff --git a/apps/web/src/contacts/contacts.css b/apps/web/src/contacts/contacts.cssindex 66b0f5c2..1a8efb28 100644--- a/apps/web/src/contacts/contacts.css+++ b/apps/web/src/contacts/contacts.css@@ -90,12 +90,10 @@justify-content: flex-end;gap: 6px;}-/* The contact's record: header, Details and Calls cards on the page colour. Beside the list on wide- windows, full width (at reading width) below 1100 px. */+/* The contact's record beside the list on wide windows, full width (at reading width) below 1100 px. */.cv-side.ct-detail {width: 400px;padding: 0;- background: var(--bg);}.ct-detail-in {box-sizing: border-box;@@ -107,6 +105,10 @@align-content: start;gap: 12px;}+/* New contact keeps its cards on the page colour: it is a form, not a record. */+.cv-side.ct-detail.ct-new {+ background: var(--bg);+}.ct-head {display: flex;align-items: center;@@ -125,21 +127,111 @@font-size: 15px;line-height: 20px;font-weight: 600;+}++/* The contact panel (ContactPanel.tsx), the same in Contacts and next to a call: header, facts, a hairline, calls.+ Flat: no cards, the facts a quiet label-left list. */+.cp {+ display: grid;+ align-content: start;+ gap: 16px;+ min-width: 0;+}+.cp-head {+ display: flex;+ align-items: center;+ gap: 8px;+ min-width: 0;+}+.cp-who {+ flex: 1;+ display: grid;+ min-width: 0;+}+.cp-name {+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ gap: 2px 6px;+ min-width: 0;+}+.cp-name b {+ min-width: 0;+ max-width: 100%;+ font-size: 15px;+ line-height: 20px;+ font-weight: 600;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}-.ct-who span {+.cp-name .k-badge {+ height: 18px;+ font-size: 11px;+}+.cp-sub {font-size: 12.5px;+ line-height: 18px;color: var(--ink-muted);font-variant-numeric: tabular-nums;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;}-.ct-acts {+.cp-acts {display: flex;align-items: center;gap: 4px;flex: none;}+.cp-facts {+ display: grid;+ justify-items: start;+ gap: 10px;+}+.cp .facts.side-facts {+ width: 100%;+ grid-template-columns: 64px minmax(0, 1fr);+ gap: 6px 12px;+ font-size: 13px;+ line-height: 18px;+}+.cp .side-facts dt {+ white-space: nowrap;+}+.cp .side-more {+ margin: 0 0 0 -4px;+}+/* The note is as tall as its text (two lines where the browser can't size a field to its content). */+.cp textarea.fact-input {+ field-sizing: content;+ min-height: 1lh;+}+/* Touch screens type into 16px fields (app.css, so an iPhone does not zoom): labels and values follow, so the list+ stays one size. */+@media (hover: none) and (pointer: coarse) {+ .cp .facts.side-facts {+ grid-template-columns: 80px minmax(0, 1fr);+ font-size: 16px;+ line-height: 22px;+ }+ .cp .side-facts .fact-copy {+ font-size: 14px;+ }+}+/* The calls under a hairline, with a quiet label as their heading. */+.cp-calls {+ display: grid;+ gap: 6px;+ padding-top: 14px;+ border-top: 1px solid var(--line);+}+.cp-calls h2 {+ margin: 0;+ font-size: 11px;+ font-weight: 500;+ color: var(--ink-muted);+}.ct-grid {display: grid;grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));@@ -152,15 +244,11 @@.ct-grid > .k-field {align-content: start;}-.k-input.ct-readonly input {- color: var(--ink-muted);- font-variant-numeric: tabular-nums;-}-/* A contact's calls (ContactCalls.tsx): the inbox's language in the card. The list runs to the card's- edges so hover fills the width; rows keep the card's 16px inset, so titles line up with "Calls". The+/* A contact's calls (ContactCalls.tsx): the inbox's language in the panel. The list runs to the panel's+ edges so hover fills the width; rows keep its 16px inset, so titles line up with "Calls". Theunread dot sits in that inset, as the inbox's dot sits in its gutter. */.ct-calls {- margin: -4px -16px 0;+ margin: 0 -16px;}.ct-calls-empty {margin: 0;@@ -179,6 +267,14 @@.ct-call:hover {background: var(--surface-hover);}+/* The call open beside the panel: marked, and already open. */+.ct-call.is-current {+ background: var(--surface-hover);+ cursor: default;+}+.ct-call.is-current .ct-call-when {+ color: var(--ink-muted);+}.ct-call:focus-visible {outline: 2px solid var(--focus);outline-offset: -2px;@@ -416,15 +512,7 @@white-space: nowrap;max-width: 160px;}-/* "+ Company, email" between the fields and the note: the empty fields, folded (call/ContactSide.tsx). */-.ct-fold {- display: flex;- margin-top: -4px;-}-.ct-fold .side-more {- margin: 0 0 0 -4px;-}-/* The note on the contact page: two lines by default (it grows with its handle), so the calls stay in view. */+/* The note in New contact: as tall as its rows, not the kit's minimum. */.ct-grid .ta {min-height: 0;}diff --git a/apps/web/src/shell/useToast.ts b/apps/web/src/shell/useToast.tsindex 63989d4c..ed39770e 100644--- a/apps/web/src/shell/useToast.ts+++ b/apps/web/src/shell/useToast.ts@@ -43,8 +43,10 @@ export function useToast() {}}, [])+ // `key` '': a change without a shortcut (Block on the contact page) gets no tip.const withTip = useCallback(- (label: string, key: string) => (source.current === 'mouse' && !touchOnly() ? shortcutTip(label, key) : label),+ (label: string, key: string) =>+ key && source.current === 'mouse' && !touchOnly() ? shortcutTip(label, key) : label,[],)diff --git a/apps/web/src/styles.css b/apps/web/src/styles.cssindex d004fdc4..4fd5d24b 100644--- a/apps/web/src/styles.css+++ b/apps/web/src/styles.css@@ -728,23 +728,10 @@ body { font-size: 13px; }.cv-center { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }.cv-side { flex: none; width: 272px; overflow: auto; border-left: 1px solid var(--line); background: var(--surface); padding: 16px 14px 20px; display: flex; flex-direction: column; gap: 14px; }.cv-side > .k-badge, .cv-side > .k-btn { align-self: flex-start; }-.side-who { display: flex; align-items: center; gap: 10px; }-.side-who div { display: grid; min-width: 0; line-height: 17px; }-.side-who b { font-size: 13.5px; font-weight: 600; }-.side-who span { font-size: 11.5px; color: var(--ink-muted); }.side-facts { font-size: 12px; line-height: 16px; grid-template-columns: 60px minmax(0, 1fr); gap: 5px 10px; }.side-facts dd.mono { font-size: 11px; }.side-sec { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }.side-sec h2 { font-size: 11px; font-weight: 500; color: var(--ink-muted); margin: 0 0 4px; }-.side-call { display: grid; gap: 1px; width: 100%; margin: 0; padding: 5px 6px; box-sizing: border-box; border: 0; border-radius: var(--radius-sm); background: transparent; color: inherit; text-align: left; cursor: pointer; }-.side-call:hover { background: var(--surface-hover); }-.side-call:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }-.side-call.is-old { cursor: default; }-.side-call.is-old:hover { background: transparent; }-.sc-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; line-height: 17px; min-width: 0; }-.sc-top b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }-.sc-top .mono { font-size: 10.5px; flex: none; }-.sc-sub { font-size: 11px; color: var(--ink-muted); }@container main (max-width: 1099px) { .cv-side { display: none; } }@@ -786,7 +773,6 @@ body { font-size: 13px; }.vn-wave i.caller.p { opacity: .9; }.vn-knob { box-shadow: 0 0 0 3px var(--surface); }.k-msg-them .k-bubble.k-tone-signal, .k-bubble.k-tone-signal { background: var(--bubble-caller); color: var(--ink); }-.cv-side .side-call:hover { background: #ebe9e3; }.k-btn-primary { background: var(--action); color: var(--on-action); }.k-btn-secondary { background: var(--surface); }.k-btn-ghost:hover { background: #efede8; }@@ -1007,9 +993,8 @@ body { font-size: 13px; }.k-avatar-ai { background: var(--signal-soft); }/* ---- Interaction states: one hover, one selected, everywhere ---- */-.row:hover, .nav-item:hover, .side-call:hover, .cv-side .side-call:hover,+.row:hover, .nav-item:hover,.k-btn-ghost:hover, .k-btn-secondary:hover, .ib-tab:hover { background: var(--surface-hover); }-.side-call.is-old:hover { background: transparent; }.row.is-cursor, .ob-row.is-cursor { background: var(--highlight); box-shadow: inset 2px 0 0 var(--action); }.nav-item[aria-current="page"], .ib-tab[aria-selected="true"], .k-cmd-item[aria-selected="true"] { background: var(--highlight); color: var(--highlight-ink); }.k-cmd-item[aria-selected="true"] .k-icon { color: var(--highlight-ink); }@@ -1022,9 +1007,6 @@ body { font-size: 13px; }.k-btn-secondary { background: var(--surface); border-color: var(--line-control); box-shadow: 0 1px 2px rgb(var(--ink-rgb) / 0.05); }.k-btn-secondary:disabled, .k-btn:disabled { box-shadow: none; }.k-btn-sm { font-size: 12px; }-.side-who { width: 100%; }-.side-who > div { flex: 1; }-.side-open { margin-left: auto; align-self: center; color: var(--ink-muted); }@@ -1042,14 +1024,14 @@ body { font-size: 13px; }/* ---- Type scale ---- *//* 11: captions, section labels, mono numbers */.ib-cols, .sum-label, .side-sec h2, .help-group h3, .k-cmd-group, .k-summary-label { font-size: 11px; font-weight: 500; color: var(--ink-muted); }-.r-dur, .r-time, .cv-pos, .sc-top .mono, .side-facts dd.mono,+.r-dur, .r-time, .cv-pos, .side-facts dd.mono,span.mono, .facts dd.mono, .ib-tab .n, .ib-mode .n, .nav-n, .cv-who .sub, .k-meta, .cv .k-meta, .k-event-in time { font-size: 11px; }-.sum-h small, .tr-h span, .compose small, .cv .k-event, .r-quiet, .sc-sub, .ib-search-n { font-size: 11px; }+.sum-h small, .tr-h span, .compose small, .cv .k-event, .r-quiet, .ib-search-n { font-size: 11px; }/* 12: secondary text */-.help, .page-head p, .sec > p, .opt span, .side-who span, .ob-choice span, .ws-me small,-.k-cmd-foot, .help-foot, .side-facts, .sc-top, .ob-newnum span { font-size: 12px; }+.help, .page-head p, .sec > p, .opt span, .ob-choice span, .ws-me small,+.k-cmd-foot, .help-foot, .side-facts, .ob-newnum span { font-size: 12px; }/* 13: body / UI */-.row, .facts, .field label, .opt b, .help-row, .ib-mode, .side-who b, .ob-choice b,+.row, .facts, .field label, .opt b, .help-row, .ib-mode, .ob-choice b,.ob-foot .k-btn, .empty, .ws-me b, .cv .k-bubble, .ob-row, .ob-open-h { font-size: 13px; }.sum-h > b, .tr-h b { font-size: 13px; font-weight: 600; }/* 14: titles */@@ -1084,7 +1066,6 @@ span.mono, .facts dd.mono, .ib-tab .n, .ib-mode .n, .nav-n, .cv-who .sub, .k-met.cust-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.cust-row .c-mono { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }.cust-main .ib-list { flex: 1 1 auto; }-.side-acts { display: flex; flex-wrap: wrap; gap: 8px; }@container main (max-width: 1099px) {.cust-main.has-rec .cv-center { display: none; }.cv-side.cust-side { display: flex; flex: 1; width: auto; box-shadow: none; }@@ -1209,8 +1190,6 @@ mark { background: rgb(250 204 21 / 0.38); color: inherit; border-radius: 2px; p.bk-close .k-icon { transform: rotate(180deg); }.bk-side-ic { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: var(--radius-full); background: var(--surface-strong); color: var(--ink-muted); }.bk-note { font-size: 13px; line-height: 18px; }-.bk-side .side-call .sc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }-.bk-side .side-call .k-icon { color: var(--ink-muted); }/* phone: single-day agenda */.bk-agenda { display: flex; flex-direction: column; min-height: 100%; }diff --git a/packages/i18n/locales/de/call.json b/packages/i18n/locales/de/call.jsonindex 12637835..e4a42e3f 100644--- a/packages/i18n/locales/de/call.json+++ b/packages/i18n/locales/de/call.json@@ -41,7 +41,6 @@"contact.addName": "Namen hinzufügen","contact.addNote": "Notiz hinzufügen","contact.address": "Adresse",- "contact.block": "Sperren","contact.blockNumber": "Nummer sperren","contact.blocked": "Gesperrt","contact.call": "Anrufen",@@ -59,25 +58,18 @@"contact.fold.note": "Notiz","contact.fromCallOn": "Aus dem Anruf vom {date} · <keep>Behalten</keep>","contact.fromThisCall": "Aus diesem Anruf · <keep>Behalten</keep>",- "contact.inbound": "Eingehend","contact.keepTitle": "Im Kontakt speichern","contact.label": "Kontakt",- "contact.live": "live","contact.name": "Name","contact.nameFromCaller": "Name vom Anrufer · <confirm>Bestätigen</confirm>",- "contact.noEarlierCalls": "Keine früheren Anrufe.","contact.notLinked": "Diese Nummer ist mit keinem Kontakt verknüpft.","contact.notVerified": "Nummer nicht verifiziert","contact.notVerifiedTitle": "Der Telefonanbieter des Anrufers hat diese Nummer nicht verifiziert, sie kann also gefälscht sein. Der Assistent hat den Anrufer als unbekannt behandelt, sofern diese Prüfung unter Einstellungen › Assistent nicht ausgeschaltet ist.","contact.note": "Notiz",- "contact.outbound": "Ausgehend","contact.phone": "Telefon",- "contact.previousCalls": "Frühere Anrufe","contact.showFieldsTitle": "Leere Felder anzeigen",- "contact.sideCall": "{direction} · {length}","contact.spamLikely": "Wahrscheinlich Spam","contact.spamLikelyTitle": "Die Spam-Prüfung des Telefonanbieters hat diese Nummer markiert",- "contact.unblock": "Entsperren","contact.unblockNumber": "Nummer entsperren","contact.unknownCaller": "Unbekannter Anrufer","emailed.about": "zu {topics}",diff --git a/packages/i18n/locales/en/call.json b/packages/i18n/locales/en/call.jsonindex 10aafd11..ecb43e9f 100644--- a/packages/i18n/locales/en/call.json+++ b/packages/i18n/locales/en/call.json@@ -41,7 +41,6 @@"contact.addName": "Add name","contact.addNote": "Add a note","contact.address": "Address",- "contact.block": "Block","contact.blockNumber": "Block number","contact.blocked": "Blocked","contact.call": "Call",@@ -59,25 +58,20 @@"contact.fold.note": "note","contact.fromCallOn": "From the call on {date} · <keep>Keep</keep>","contact.fromThisCall": "From this call · <keep>Keep</keep>",- "contact.inbound": "Inbound","contact.keepTitle": "Save it to the contact","contact.label": "Contact",- "contact.live": "live","contact.name": "Name","contact.nameFromCaller": "Name from caller · <confirm>Confirm</confirm>",- "contact.noEarlierCalls": "No earlier calls.","contact.notLinked": "This number is not linked to a contact.","contact.notVerified": "Number not verified","contact.notVerifiedTitle": "The caller's carrier did not verify this number, so it may be faked. The assistant treated the caller as unknown unless that check is off in Settings › Assistant.","contact.note": "Note",- "contact.outbound": "Outbound",+ "contact.noteHelp": "About the note","contact.phone": "Phone",- "contact.previousCalls": "Previous calls","contact.showFieldsTitle": "Show the empty fields",- "contact.sideCall": "{direction} · {length}","contact.spamLikely": "Spam likely","contact.spamLikelyTitle": "The phone carrier's spam check flagged this number",- "contact.unblock": "Unblock",+ "contact.thisCall": "This call","contact.unblockNumber": "Unblock number","contact.unknownCaller": "Unknown caller","emailed.about": "about {topics}",diff --git a/packages/i18n/locales/es/call.json b/packages/i18n/locales/es/call.jsonindex 2ff9b061..170fd7a8 100644--- a/packages/i18n/locales/es/call.json+++ b/packages/i18n/locales/es/call.json@@ -41,7 +41,6 @@"contact.addName": "Agregar nombre","contact.addNote": "Agregar una nota","contact.address": "Dirección",- "contact.block": "Bloquear","contact.blockNumber": "Bloquear número","contact.blocked": "Bloqueado","contact.call": "Llamar",@@ -59,25 +58,18 @@"contact.fold.note": "nota","contact.fromCallOn": "De la llamada del {date} · <keep>Conservar</keep>","contact.fromThisCall": "De esta llamada · <keep>Conservar</keep>",- "contact.inbound": "Entrante","contact.keepTitle": "Guardarlo en el contacto","contact.label": "Contacto",- "contact.live": "en vivo","contact.name": "Nombre","contact.nameFromCaller": "Nombre dado por quien llama · <confirm>Confirmar</confirm>",- "contact.noEarlierCalls": "No hay llamadas anteriores.","contact.notLinked": "Este número no está vinculado a un contacto.","contact.notVerified": "Número no verificado","contact.notVerifiedTitle": "El operador de quien llama no verificó este número, así que podría ser falso. El asistente trató a quien llama como desconocido, salvo que esa comprobación esté desactivada en Configuración › Asistente.","contact.note": "Nota",- "contact.outbound": "Saliente","contact.phone": "Teléfono",- "contact.previousCalls": "Llamadas anteriores","contact.showFieldsTitle": "Mostrar los campos vacíos",- "contact.sideCall": "{direction} · {length}","contact.spamLikely": "Posible spam","contact.spamLikelyTitle": "La comprobación de spam del operador telefónico marcó este número",- "contact.unblock": "Desbloquear","contact.unblockNumber": "Desbloquear número","contact.unknownCaller": "Persona desconocida","emailed.about": "sobre {topics}",diff --git a/packages/i18n/locales/fr/call.json b/packages/i18n/locales/fr/call.jsonindex def51466..5afc6b29 100644--- a/packages/i18n/locales/fr/call.json+++ b/packages/i18n/locales/fr/call.json@@ -41,7 +41,6 @@"contact.addName": "Ajouter un nom","contact.addNote": "Ajouter une note","contact.address": "Adresse",- "contact.block": "Bloquer","contact.blockNumber": "Bloquer le numéro","contact.blocked": "Bloqué","contact.call": "Appeler",@@ -59,25 +58,18 @@"contact.fold.note": "note","contact.fromCallOn": "Issu de l'appel du {date} · <keep>Conserver</keep>","contact.fromThisCall": "Issu de cet appel · <keep>Conserver</keep>",- "contact.inbound": "Entrant","contact.keepTitle": "L'enregistrer dans le contact","contact.label": "Contact",- "contact.live": "en direct","contact.name": "Nom","contact.nameFromCaller": "Nom donné par l'appelant · <confirm>Confirmer</confirm>",- "contact.noEarlierCalls": "Aucun appel précédent.","contact.notLinked": "Ce numéro n'est lié à aucun contact.","contact.notVerified": "Numéro non vérifié","contact.notVerifiedTitle": "L'opérateur de l'appelant n'a pas vérifié ce numéro : il peut être falsifié. L'assistant a traité l'appelant comme inconnu, sauf si cette vérification est désactivée dans Réglages › Assistant.","contact.note": "Note",- "contact.outbound": "Sortant","contact.phone": "Téléphone",- "contact.previousCalls": "Appels précédents","contact.showFieldsTitle": "Afficher les champs vides",- "contact.sideCall": "{direction} · {length}","contact.spamLikely": "Spam probable","contact.spamLikelyTitle": "Le contrôle anti-spam de l'opérateur téléphonique a signalé ce numéro",- "contact.unblock": "Débloquer","contact.unblockNumber": "Débloquer le numéro","contact.unknownCaller": "Appelant inconnu","emailed.about": "au sujet de {topics}",diff --git a/packages/i18n/locales/ja/call.json b/packages/i18n/locales/ja/call.jsonindex f8b2081a..4ada245e 100644--- a/packages/i18n/locales/ja/call.json+++ b/packages/i18n/locales/ja/call.json@@ -41,7 +41,6 @@"contact.addName": "名前を追加","contact.addNote": "メモを追加","contact.address": "住所",- "contact.block": "ブロック","contact.blockNumber": "番号をブロック","contact.blocked": "ブロック中","contact.call": "電話をかける",@@ -59,25 +58,18 @@"contact.fold.note": "メモ","contact.fromCallOn": "{date}の通話から · <keep>保存</keep>","contact.fromThisCall": "この通話から · <keep>保存</keep>",- "contact.inbound": "着信","contact.keepTitle": "連絡先に保存","contact.label": "連絡先",- "contact.live": "ライブ","contact.name": "名前","contact.nameFromCaller": "発信者が名乗った名前 · <confirm>確認</confirm>",- "contact.noEarlierCalls": "以前の通話はありません。","contact.notLinked": "この番号は連絡先に登録されていません。","contact.notVerified": "番号未確認","contact.notVerifiedTitle": "発信者の通信事業者がこの番号を確認していないため、偽装されている可能性があります。設定 › アシスタントでこの確認をオフにしていない限り、アシスタントは不明な発信者として扱いました。","contact.note": "メモ",- "contact.outbound": "発信","contact.phone": "電話番号",- "contact.previousCalls": "以前の通話","contact.showFieldsTitle": "空の項目を表示",- "contact.sideCall": "{direction} · {length}","contact.spamLikely": "迷惑電話の可能性","contact.spamLikelyTitle": "通信事業者の迷惑電話チェックでこの番号が検出されました",- "contact.unblock": "ブロック解除","contact.unblockNumber": "番号のブロックを解除","contact.unknownCaller": "不明な発信者","emailed.about": "内容:{topics}",diff --git a/packages/i18n/locales/pt-BR/call.json b/packages/i18n/locales/pt-BR/call.jsonindex 6381584b..75d305cd 100644--- a/packages/i18n/locales/pt-BR/call.json+++ b/packages/i18n/locales/pt-BR/call.json@@ -41,7 +41,6 @@"contact.addName": "Adicionar nome","contact.addNote": "Adicionar uma nota","contact.address": "Endereço",- "contact.block": "Bloquear","contact.blockNumber": "Bloquear número","contact.blocked": "Bloqueado","contact.call": "Ligar",@@ -59,25 +58,18 @@"contact.fold.note": "nota","contact.fromCallOn": "Da chamada de {date} · <keep>Manter</keep>","contact.fromThisCall": "Desta chamada · <keep>Manter</keep>",- "contact.inbound": "Recebida","contact.keepTitle": "Salvar no contato","contact.label": "Contato",- "contact.live": "ao vivo","contact.name": "Nome","contact.nameFromCaller": "Nome dado por quem ligou · <confirm>Confirmar</confirm>",- "contact.noEarlierCalls": "Nenhuma chamada anterior.","contact.notLinked": "Este número não está vinculado a um contato.","contact.notVerified": "Número não verificado","contact.notVerifiedTitle": "A operadora de quem ligou não verificou este número, então ele pode ser falso. O assistente tratou quem ligou como desconhecido, a menos que essa verificação esteja desativada em Configurações › Assistente.","contact.note": "Nota",- "contact.outbound": "Realizada","contact.phone": "Telefone",- "contact.previousCalls": "Chamadas anteriores","contact.showFieldsTitle": "Mostrar os campos vazios",- "contact.sideCall": "{direction} · {length}","contact.spamLikely": "Provável spam","contact.spamLikelyTitle": "A verificação de spam da operadora sinalizou este número",- "contact.unblock": "Desbloquear","contact.unblockNumber": "Desbloquear número","contact.unknownCaller": "Desconhecido","emailed.about": "sobre {topics}",