The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.
TypeScript ai-receptionistanswering-serviceappointment-bookinglivekitlocal-firstmcpopen-sourceself-hostedsiptelephonytypescriptvoice-agentvoice-ai
Phone: no menu button at the top; the tab bar's Menu tab opens the menu (PR 2065)
Tim Gutberlet54bae93370a5
diff --git a/apps/web/src/Workspace.tsx b/apps/web/src/Workspace.tsxindex e3ee43ae..4d287f6b 100644--- a/apps/web/src/Workspace.tsx+++ b/apps/web/src/Workspace.tsx@@ -869,6 +869,9 @@ export function Workspace({ me, onSignedOut, onSessionStale, notice = null, onRedocument.querySelector('.ib-list')?.scrollTo({ top: 0, behavior: 'smooth' })else view.setTab('you')}}+ menuOpen={navOpen}+ onMenu={() => setNavOpen(true)}+ menuBadge={invites.invitations.length > 0}/>)}{asksNameIn(me) && <AskName impersonating={!!me.impersonation} />}diff --git a/apps/web/src/mobile.css b/apps/web/src/mobile.cssindex 195b64d1..adf6fee5 100644--- a/apps/web/src/mobile.css+++ b/apps/web/src/mobile.css@@ -59,14 +59,33 @@padding-top: max(12px, env(safe-area-inset-top, 0px));}- /* ---- Menu (☰): bigger, the way into the places the tab bar does not have ---- */- .menu-btn.k-btn {- width: 44px;- height: 44px;+ /* ---- Menu: opened only by the tab bar's last tab (bottom right), never by a ☰ at the top ---- */+ .menu-btn,+ .menu-btn-wrap {+ display: none !important;+ }+ /* It comes in from the right, next to the tab that opens it, and leaves out what the tab bar already has. */+ .nav {+ left: auto;+ right: 0;+ padding-left: 10px;+ padding-right: max(10px, env(safe-area-inset-right, 0px));+ transform: translateX(105%);+ }+ .nav .nav-close svg {+ transform: scaleX(-1);}- .menu-btn.k-btn svg {- width: 24px;- height: 24px;+ .nav .nav-tabbed,+ .nav .nav-keys {+ display: none;+ }+ /* Without the Inbox above them, its views are places of their own, not indented. */+ .nav .nav-sub {+ padding-left: 8px;+ }+ .nav .nav-sub .k-icon {+ width: 15px;+ height: 15px;}.nav .nav-item {min-height: 44px;@@ -126,6 +145,24 @@line-height: 14px;text-align: center;}+ .tabbar-dot {+ position: absolute;+ top: -2px;+ right: -4px;+ width: 10px;+ height: 10px;+ box-sizing: border-box;+ border: 2px solid var(--surface);+ border-radius: var(--radius-full);+ background: #16a34a;+ }+ button.tabbar-tab {+ border: 0;+ padding: 0;+ background: none;+ font: inherit;+ cursor: pointer;+ }.app.has-tabbar .toast {bottom: calc(var(--phone-bar) + 12px + env(safe-area-inset-bottom, 0px));}diff --git a/apps/web/src/shell/Nav.tsx b/apps/web/src/shell/Nav.tsxindex 35072dd0..e47cbc6d 100644--- a/apps/web/src/shell/Nav.tsx+++ b/apps/web/src/shell/Nav.tsx@@ -64,12 +64,12 @@ const inPlace = (run: () => void) => (e: ReactMouseEvent) => {}/** A page of the app: a real link (`href`), so the address shows where it leads and it opens in a new tab too. */-function NavItem({ label, icon, keys, current, sub, muted, badge, count, title, href, onClick }: { label: string; icon: IconName; keys?: string[]; current?: boolean; sub?: boolean; muted?: boolean; badge?: ReactNode; count?: number | null; title?: string; href: string; onClick: () => void }) {+function NavItem({ label, icon, keys, current, sub, muted, tabbed, badge, count, title, href, onClick }: { label: string; icon: IconName; keys?: string[]; current?: boolean; sub?: boolean; muted?: boolean; /** In the phone's tab bar too: the phone's menu leaves it out. */ tabbed?: boolean; badge?: ReactNode; count?: number | null; title?: string; href: string; onClick: () => void }) {// Folded to icons the label is gone: the tooltip names the page, its number and its keys.const named = title && !title.startsWith(label) ? `${label} · ${title}` : (title ?? label)const tip = [named, count ? String(count) : null, keys ? keys.join(' ') : null].filter(Boolean).join(' · ')return (- <a className={cx('nav-item', sub && 'nav-sub', muted && 'is-admin')} href={href} aria-current={current ? 'page' : undefined} title={tip} onClick={inPlace(onClick)}+ <a className={cx('nav-item', sub && 'nav-sub', muted && 'is-admin', tabbed && 'nav-tabbed')} href={href} aria-current={current ? 'page' : undefined} title={tip} onClick={inPlace(onClick)}// Space opens it, as it did while this was a button.onKeyDown={e => { if (e.key === ' ') { e.preventDefault(); onClick() } }}><Icon name={icon} size={15} /><span className="lbl">{label}</span>{badge}{keys && <Kbd keys={keys} />}@@ -119,10 +119,10 @@ export function Nav({ open, docked = false, collapsed = false, onToggleCollapsedtitle={collapsed ? t('shell.nav.expand', { key: 'M' }) : t('shell.nav.collapse', { key: 'M' })} onClick={onToggleCollapsed} />)) : (- <Button size="sm" variant="ghost" icon="left" aria-label={t('shell.nav.closeMenu')} title={t('common.action.closeWithKey', { key: 'esc' })} onClick={onClose} />+ <Button size="sm" variant="ghost" icon="left" className="nav-close" aria-label={t('shell.nav.closeMenu')} title={t('common.action.closeWithKey', { key: 'esc' })} onClick={onClose} />)}</div>- <NavItem label={t('shell.nav.inbox')} icon="phone" keys={['G', 'I']} current={onCalls && tab !== 'reminders' && tab !== 'done' && !assigneeTabs.includes(tab)} href={listHash({ tab: 'you', search: null })} onClick={go(() => on.onInbox('you'))}+ <NavItem tabbed label={t('shell.nav.inbox')} icon="phone" keys={['G', 'I']} current={onCalls && tab !== 'reminders' && tab !== 'done' && !assigneeTabs.includes(tab)} href={listHash({ tab: 'you', search: null })} onClick={go(() => on.onInbox('you'))}title={unreadCount ? t('shell.nav.inboxUnreadTip', { count: unreadCount }) : undefined}badge={unreadCount ? <UnreadDot label={t('shell.nav.inboxUnreadTip', { count: unreadCount })} /> : null} /><NavItem sub label={t('shell.nav.reminders')} icon="clock" keys={['G', 'H']} current={onCalls && tab === 'reminders'} href={listHash({ tab: 'reminders', search: null })} onClick={go(() => on.onInbox('reminders'))}@@ -139,8 +139,8 @@ export function Nav({ open, docked = false, collapsed = false, onToggleCollapsed{outboundCalls && (<NavItem label={pages.outbound.title} icon="phone-out" current={route === 'outbound'} href="#outbound" onClick={go(() => on.onPage('outbound'))} />)}- <NavItem label={pages.contacts.title} icon="contact" keys={['G', 'C']} current={route === 'contacts'} href="#contacts" onClick={go(() => on.onPage('contacts'))} />- <NavItem label={pages.insights.title} icon="chart" keys={['G', 'N']} current={route === 'insights'} href="#insights" onClick={go(() => on.onPage('insights'))} />+ <NavItem tabbed label={pages.contacts.title} icon="contact" keys={['G', 'C']} current={route === 'contacts'} href="#contacts" onClick={go(() => on.onPage('contacts'))} />+ <NavItem tabbed label={pages.insights.title} icon="chart" keys={['G', 'N']} current={route === 'insights'} href="#insights" onClick={go(() => on.onPage('insights'))} /><NavItem label={pages.integrations.title} icon="plug" keys={['G', 'O']} current={route === 'integrations'} href="#integrations" onClick={go(() => on.onPage('integrations'))} /><hr className="nav-sep" /><NavItem label={pages.settings.title} icon="gear" keys={['G', 'S']} current={isSettingsRoute(route)} href="#settings" onClick={go(() => on.onPage('settings'))}diff --git a/apps/web/src/shell/TabBar.tsx b/apps/web/src/shell/TabBar.tsxindex 311e590f..69dcaeff 100644--- a/apps/web/src/shell/TabBar.tsx+++ b/apps/web/src/shell/TabBar.tsx@@ -1,10 +1,11 @@// The phone's tab bar (LIN-874): the four places used most, at the bottom where the thumb is, as in every iPhone app.-// Only below 720px (CSS `.tabbar` in mobile.css); wider windows keep the navigation on the left. The rest (Reminders,-// Done, Integrations, Server admin, the account) stays in the menu (☰).+// Only below 720px (CSS `.tabbar` in mobile.css); wider windows keep the navigation on the left. The last tab, Menu,+// opens the menu with everything else (Reminders, Done, Integrations, Settings, Server admin, the account); the phone+// has no other menu button.import { useFormat, useT } from '@linedesk/i18n/react'import type { IconName } from '../ui/icons.ts'import { cx, Icon } from '../ui/kit.tsx'-import { isSettingsRoute, pages, type Route } from './pages.tsx'+import { pages, type Route } from './pages.tsx'type Tab = { id: string; href: string; label: string; icon: IconName; current: boolean; badge?: number }@@ -13,6 +14,9 @@ export function TabBar({onInbox,unreadCount,onInboxTab,+ menuOpen,+ onMenu,+ menuBadge,}: {route: Route/** The inbox's own views (Needs you, Handled, Spam) are the Inbox tab; Done, Reminders and others are not. */@@ -20,6 +24,10 @@ export function TabBar({unreadCount: number/** Inbox again while on it: back to Needs you, at the top. */onInboxTab: () => void+ menuOpen: boolean+ onMenu: () => void+ /** Something waits in the menu (an invitation): a dot, as the old menu button had. */+ menuBadge: boolean}) {const t = useT()const format = useFormat()@@ -27,8 +35,9 @@ export function TabBar({{ id: 'inbox', href: '#calls', label: t('shell.nav.inbox'), icon: 'phone', current: onInbox, badge: unreadCount },{ id: 'contacts', href: '#contacts', label: pages.contacts.title, icon: 'contact', current: route === 'contacts' },{ id: 'insights', href: '#insights', label: pages.insights.title, icon: 'chart', current: route === 'insights' },- { id: 'settings', href: '#settings', label: pages.settings.title, icon: 'gear', current: isSettingsRoute(route) },]+ // Menu is current on every page the other tabs do not show (Settings, Reminders, Done, Integrations, ...).+ const menuCurrent = !tabs.some(tab => tab.current)return (<nav className="tabbar" aria-label={t('shell.tabbar.label')}>{tabs.map(tab => (@@ -58,6 +67,19 @@ export function TabBar({<span className="tabbar-label">{tab.label}</span></a>))}+ <button+ type="button"+ className={cx('tabbar-tab', menuCurrent && 'is-current')}+ aria-expanded={menuOpen}+ aria-label={menuBadge ? t('shell.nav.openMenuInvitation') : undefined}+ onClick={onMenu}+ >+ <span className="tabbar-icon">+ <Icon name="menu" size={24} />+ {menuBadge && <span className="tabbar-dot" aria-hidden="true" />}+ </span>+ <span className="tabbar-label">{t('shell.tabbar.menu')}</span>+ </button></nav>)}diff --git a/packages/i18n/locales/en/shell.json b/packages/i18n/locales/en/shell.jsonindex 94aa8bf8..80c4216a 100644--- a/packages/i18n/locales/en/shell.json+++ b/packages/i18n/locales/en/shell.json@@ -316,6 +316,7 @@"tabNotice.switched.text": "Another account signed in on this browser in another tab. Changes made here were not sent as them.","tabNotice.switched.title": "Someone else signed in","tabbar.label": "Main sections",+ "tabbar.menu": "Menu","termsUpdate.accept": "Accept","termsUpdate.changed": "The terms changed again while this was open. Read them again, then accept.","termsUpdate.later": "Later",