Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
style(ui): undo bubble tabs (#7602)
Seamus11941197c983
diff --git a/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx b/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsxindex b7ee753916..21f16c5727 100644--- a/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx+++ b/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx@@ -32,7 +32,6 @@ import {ChannelTabProvider,useChannelTab,} from '@channel/Channel/ChannelTabContext';-import { ChannelTabLayout, ChannelTabs } from '@channel/Channel/ChannelTabs';import { ChannelTopBarLiveIndicators } from '@channel/Channel/ChannelTopBarLiveIndicators';import { CHANNEL_TAB_ICONS } from '@channel/Channel/channel-tab-icons';import {@@ -72,7 +71,6 @@ import {import { useUserId } from '@core/context/user';import { TOKENS } from '@core/hotkey/tokens';import { isMobile } from '@core/mobile/isMobile';-import { isTouchDevice } from '@core/mobile/isTouchDevice';import { createMethodRegistration } from '@core/orchestrator';import { blockHotkeyScopeSignal } from '@core/signal/blockElement';import { blockHandleSignal } from '@core/signal/load';@@ -201,6 +199,9 @@ function NewTop(props: { channelId: string }) {channelType={channelType()!}participants={participants() ?? []}channelName={channelName() ?? 'New Channel'}+ tabs={tabs()}+ activeTab={activeTab()}+ onTabChange={setActiveTab}/><SplitTitleFileMenu><BlockSplitFileMenu@@ -528,53 +529,48 @@ export function NewChannelBlockAdapter(props: BlockChannelProps) {pendingJoinCall={pendingJoinCall}onHandled={() => setPendingJoinCall(false)}/>- <ChannelTabLayout+ <divclass={cn(- 'h-full px-2 touch:px-0',+ 'h-full flex flex-col px-2 touch:px-0',// The channel block is full-frame on mobile (messages scroll// behind the chrome); the other tabs still need to start below// the status bar + floating header.activeTab() !== 'messages' &&'touch:pt-(--mobile-content-inset-top)')}- tabs={- <Show when={!isTouchDevice()}>- <Suspense>- <ChannelTabs channelId={channelId} />- </Suspense>- </Show>- }>- <Switch>- <Match when={activeTab() === 'messages'}>- <ChannelMessages- autofocus={canAutofocusSplitContent && !navigatedFromJK()}- />- </Match>- <Match when={activeTab() === 'attachments'}>- <ChannelAttachmentsTab channelId={channelId} />- </Match>- <Match when={activeTab() === 'calls' && ENABLE_CALLS}>- <ChannelCallsTab channelId={channelId} />- </Match>- <Match when={activeTab() === 'participants'}>- <ChannelParticipantsTab- channelId={channelId}- botManagementEnabled={botManagement.enabled()}- onCreateBot={botManagement.openCreateBot}- inviteBotFocusRequest={botManagement.inviteFocusRequest()}- onOpenBot={botManagement.openBot}- />- </Match>- <Match when={activeTab() === 'call' && canUseInlineCallTab()}>- <ChannelCallTab- channelId={channelId}- pendingJoin={pendingJoinCall}- />- </Match>- </Switch>+ <div class="flex min-h-0 flex-1 flex-col" data-channel-tab-content>+ <Switch>+ <Match when={activeTab() === 'messages'}>+ <ChannelMessages+ autofocus={canAutofocusSplitContent && !navigatedFromJK()}+ />+ </Match>+ <Match when={activeTab() === 'attachments'}>+ <ChannelAttachmentsTab channelId={channelId} />+ </Match>+ <Match when={activeTab() === 'calls' && ENABLE_CALLS}>+ <ChannelCallsTab channelId={channelId} />+ </Match>+ <Match when={activeTab() === 'participants'}>+ <ChannelParticipantsTab+ channelId={channelId}+ botManagementEnabled={botManagement.enabled()}+ onCreateBot={botManagement.openCreateBot}+ inviteBotFocusRequest={botManagement.inviteFocusRequest()}+ onOpenBot={botManagement.openBot}+ />+ </Match>+ <Match when={activeTab() === 'call' && canUseInlineCallTab()}>+ <ChannelCallTab+ channelId={channelId}+ pendingJoin={pendingJoinCall}+ />+ </Match>+ </Switch>+ </div><NewTop channelId={channelId} />- </ChannelTabLayout>+ </div></ChannelTabProvider></ChannelSurface>);diff --git a/apps/web/src/features/block-channel/component/Top.tsx b/apps/web/src/features/block-channel/component/Top.tsxindex ebe99af8e6..d55e5caa38 100644--- a/apps/web/src/features/block-channel/component/Top.tsx+++ b/apps/web/src/features/block-channel/component/Top.tsx@@ -1,12 +1,19 @@+import { toIconTabItems } from '@channel/Channel/channel-tab-icons';+import type { ChannelTabId } from '@channel/Channel/channel-tabs';import { ChannelTopIcon } from '@channel/components/ChannelTopIcon';+import { CollapsibleHeaderItem } from '@components/app/split-layout/components/CollapsibleItem';import { HeaderIsland } from '@components/app/split-layout/components/HeaderIsland';import { SplitHeaderLeft } from '@components/app/split-layout/components/SplitHeader';import { SplitLabel } from '@components/app/split-layout/components/SplitLabel';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { useBlockId } from '@core/block';+import type { TabItem } from '@core/component/Tabs';+import { TabsInset } from '@core/component/TabsInset';import { useChannelName } from '@core/context/channels';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import type { ChannelParticipant } from '@queries/channel/types';import type { ChannelType } from '@service-storage/generated/schemas/channelType';+import { Show } from 'solid-js';type TopProps = {channelType: ChannelType;@@ -17,6 +24,9 @@ type TopProps = {type ChannelTopLeftProps = TopProps & {lockRename?: boolean;+ tabs?: readonly TabItem[];+ activeTab?: ChannelTabId;+ onTabChange?: (value: ChannelTabId) => void;};export function ChannelTopLeft(props: ChannelTopLeftProps) {@@ -27,6 +37,11 @@ export function ChannelTopLeft(props: ChannelTopLeftProps) {props.channelName ?? 'New Channel');+ const iconTabList = () =>+ toIconTabItems(props.tabs ?? [], 'size-4 touch:size-6');++ const hasTabsMenu = () => !!(props.tabs?.length && props.onTabChange);+return (<SplitHeaderLeft><HeaderIsland class="shrink">@@ -48,6 +63,21 @@ export function ChannelTopLeft(props: ChannelTopLeftProps) {/></div></HeaderIsland>+ <Show when={!isTouchDevice() && hasTabsMenu() && props.activeTab}>+ <CollapsibleHeaderItem+ id="channel-tabs"+ priority={1}+ containerClass="ph-no-capture min-w-0 shrink-0 h-full mx-2"+ >+ {(isCollapsed) => (+ <TabsInset+ list={isCollapsed() ? iconTabList() : [...(props.tabs ?? [])]}+ value={props.activeTab}+ onChange={(value) => props.onTabChange?.(value as ChannelTabId)}+ />+ )}+ </CollapsibleHeaderItem>+ </Show></SplitHeaderLeft>);}diff --git a/apps/web/src/features/block-code/component/Block.tsx b/apps/web/src/features/block-code/component/Block.tsxindex eef213d447..7f663d6ed4 100644--- a/apps/web/src/features/block-code/component/Block.tsx+++ b/apps/web/src/features/block-code/component/Block.tsx@@ -2,7 +2,6 @@ import { useBlockEntityCommands } from '@app/features/next-soup/actions';import { FileSidePanelSections, SidePanel } from '@components/app/side-panel';import { useBlockId, useIsNestedBlock } from '@core/block';import { DocumentBlockContainer } from '@core/component/DocumentBlockContainer';-import { isMobile } from '@core/mobile/isMobile';import {blockMetadataSignal,blockTextSignal,@@ -23,7 +22,6 @@ import { saveCodeDocument } from '../queries/code-document';import { isHtmlFileType } from '../util/fileMode';import { type CodeBlockMode, CodeContent } from './CodeContent';import { CodeMarkdown } from './CodeMarkdown';-import { CodeModeControl } from './CodeModeControl';import { TopBar } from './TopBar';const UploadedWorkbook = lazy(@@ -62,10 +60,11 @@ export default function BlockCode() {<SidePanel.Layout defaultOpen={false} floating><FileSidePanelSections /><div class="flex size-full min-w-0 flex-col items-end overflow-hidden">- <TopBar />- <Show when={isHtmlFile() && !isMobile()}>- <CodeModeControl mode={mode()} onModeChange={setMode} />- </Show>+ <TopBar+ isHtmlFile={isHtmlFile()}+ mode={mode()}+ onModeChange={setMode}+ /><div class="relative min-h-0 min-w-0 w-full flex-1 overflow-hidden"><Showwhen={spreadsheet()}diff --git a/apps/web/src/features/block-code/component/CodeModeControl.tsx b/apps/web/src/features/block-code/component/CodeModeControl.tsxindex 68122e4c91..0340f2363f 100644--- a/apps/web/src/features/block-code/component/CodeModeControl.tsx+++ b/apps/web/src/features/block-code/component/CodeModeControl.tsx@@ -1,4 +1,4 @@-import { Tabs } from '@ui/components/Tabs';+import { TabsInset } from '@core/component/TabsInset';import type { CodeBlockMode } from './CodeContent';export function CodeModeControl(props: {@@ -6,17 +6,15 @@ export function CodeModeControl(props: {onModeChange: (mode: CodeBlockMode) => void;}) {return (- <div class="w-full min-w-0 shrink-0 overflow-x-auto scrollbar-hidden px-4 py-2">- <Tabs- aria-label="HTML views"- class="w-max whitespace-nowrap"- list={[- { value: 'render', label: 'Render' },- { value: 'code', label: 'Code' },- ]}- value={props.mode}- onChange={(value) => props.onModeChange(value as CodeBlockMode)}- />- </div>+ <TabsInset+ aria-label="HTML views"+ class="shrink-0 whitespace-nowrap"+ list={[+ { value: 'render', label: 'Render' },+ { value: 'code', label: 'Code' },+ ]}+ value={props.mode}+ onChange={(value) => props.onModeChange(value as CodeBlockMode)}+ />);}diff --git a/apps/web/src/features/block-code/component/TopBar.tsx b/apps/web/src/features/block-code/component/TopBar.tsxindex dd4947aeb8..59c1a7fee6 100644--- a/apps/web/src/features/block-code/component/TopBar.tsx+++ b/apps/web/src/features/block-code/component/TopBar.tsx@@ -18,6 +18,7 @@ import {ShareTrigger,} from '@core/component/TopBar/ShareButton';import { useShareModal } from '@core/component/TopBar/shareModal';+import { isMobile } from '@core/mobile/isMobile';import { blockMetadataSignal, blockTextSignal } from '@core/signal/load';import { useGetPermissions } from '@core/signal/permissions';import {@@ -28,9 +29,17 @@ import { downloadFile } from '@filesystem/download';import IconShared from '@icon/share.svg';import Download from '@phosphor/download-simple.svg';import { createCallback } from '@solid-primitives/rootless';+import type { Component } from 'solid-js';+import { Show } from 'solid-js';+import type { CodeBlockMode } from './CodeContent';import { CodeFileTypeChip } from './CodeFileTypeChip';+import { CodeModeControl } from './CodeModeControl';-export function TopBar() {+export const TopBar: Component<{+ isHtmlFile: boolean;+ mode: CodeBlockMode;+ onModeChange: (mode: CodeBlockMode) => void;+}> = (props) => {const analytics = useAnalytics();const blockId = useBlockId();@@ -100,6 +109,14 @@ export function TopBar() {<><SplitHeaderLeft><BlockItemSplitLabel badges={<CodeFileTypeChip />} />+ <Show when={props.isHtmlFile && !isMobile()}>+ <div class="ph-no-capture mx-2 h-full min-w-0 shrink-0">+ <CodeModeControl+ mode={props.mode}+ onModeChange={props.onModeChange}+ />+ </div>+ </Show></SplitHeaderLeft><ResponsivePermissionsBadge />@@ -113,4 +130,4 @@ export function TopBar() {/></>);-}+};diff --git a/apps/web/src/features/block-company/component/CompanyBlockAdapter.tsx b/apps/web/src/features/block-company/component/CompanyBlockAdapter.tsxindex dd7e70d9e2..ed2f125de6 100644--- a/apps/web/src/features/block-company/component/CompanyBlockAdapter.tsx+++ b/apps/web/src/features/block-company/component/CompanyBlockAdapter.tsx@@ -4,8 +4,12 @@ import {CompanyTabs,} from '@app/features/crm/crm-company';import { CrmCopyLinkButton } from '@app/features/crm/crm-link';+import { CollapsibleHeaderItem } from '@components/app/split-layout/components/CollapsibleItem';import { HeaderIsland } from '@components/app/split-layout/components/HeaderIsland';-import { SplitHeaderRight } from '@components/app/split-layout/components/SplitHeader';+import {+ SplitHeaderLeft,+ SplitHeaderRight,+} from '@components/app/split-layout/components/SplitHeader';import { useBlockId } from '@core/block';import {createParamsState,@@ -29,17 +33,36 @@ export function CompanyBlockAdapter() {});return (<>+ <SplitHeaderLeft>+ <CollapsibleHeaderItem+ id="company-tabs"+ priority={1}+ containerClass="ph-no-capture min-w-0 h-full mx-2"+ >+ {(isCollapsed) => (+ <div+ class={+ isCollapsed()+ ? 'min-w-0 overflow-x-auto scrollbar-hidden'+ : 'shrink-0'+ }+ >+ <CompanyTabs+ value={section()}+ onChange={setSection}+ compact={isCollapsed()}+ />+ </div>+ )}+ </CollapsibleHeaderItem>+ </SplitHeaderLeft><SplitHeaderRight><HeaderIsland><CrmCopyLinkButton type="company" id={companyId} /></HeaderIsland></SplitHeaderRight><ParamsProvider state={params}>- <Company- companyId={companyId}- section={section()}- navigation={<CompanyTabs value={section()} onChange={setSection} />}- />+ <Company companyId={companyId} section={section()} /></ParamsProvider></>);diff --git a/apps/web/src/features/block-contact/component/ContactBlockAdapter.tsx b/apps/web/src/features/block-contact/component/ContactBlockAdapter.tsxindex b4d4d8fff5..38026de91d 100644--- a/apps/web/src/features/block-contact/component/ContactBlockAdapter.tsx+++ b/apps/web/src/features/block-contact/component/ContactBlockAdapter.tsx@@ -4,8 +4,12 @@ import {ContactTabs,} from '@app/features/crm/crm-contact';import { CrmCopyLinkButton } from '@app/features/crm/crm-link';+import { CollapsibleHeaderItem } from '@components/app/split-layout/components/CollapsibleItem';import { HeaderIsland } from '@components/app/split-layout/components/HeaderIsland';-import { SplitHeaderRight } from '@components/app/split-layout/components/SplitHeader';+import {+ SplitHeaderLeft,+ SplitHeaderRight,+} from '@components/app/split-layout/components/SplitHeader';import { useBlockId } from '@core/block';import {createParamsState,@@ -29,17 +33,36 @@ export function ContactBlockAdapter() {});return (<>+ <SplitHeaderLeft>+ <CollapsibleHeaderItem+ id="contact-tabs"+ priority={1}+ containerClass="ph-no-capture min-w-0 h-full mx-2"+ >+ {(isCollapsed) => (+ <div+ class={+ isCollapsed()+ ? 'min-w-0 overflow-x-auto scrollbar-hidden'+ : 'shrink-0'+ }+ >+ <ContactTabs+ value={section()}+ onChange={setSection}+ compact={isCollapsed()}+ />+ </div>+ )}+ </CollapsibleHeaderItem>+ </SplitHeaderLeft><SplitHeaderRight><HeaderIsland><CrmCopyLinkButton type="contact" id={contactId} /></HeaderIsland></SplitHeaderRight><ParamsProvider state={params}>- <Contact- contactId={contactId}- section={section()}- navigation={<ContactTabs value={section()} onChange={setSection} />}- />+ <Contact contactId={contactId} section={section()} /></ParamsProvider></>);diff --git a/apps/web/src/features/channel/Channel/ChannelDetail.tsx b/apps/web/src/features/channel/Channel/ChannelDetail.tsxindex c68089ea2a..cf709048f1 100644--- a/apps/web/src/features/channel/Channel/ChannelDetail.tsx+++ b/apps/web/src/features/channel/Channel/ChannelDetail.tsx@@ -16,9 +16,16 @@ import { DebugSuspense } from '@channel/DebugSuspense';import { ChannelParticipantsTab } from '@channel/Participants/ChannelParticipantsTab';import { useGlobalBlockOrchestrator } from '@components/app/GlobalAppState';import {+ createPriorityCollapseController,+ PriorityCollapseOverflowSensor,+} from '@components/app/split-layout/components/PriorityCollapseOverflowSensor';+import {+ useRegisterPriorityCollapseItem,useSplitDisplayName,useSplitPanelOrThrow,} from '@components/app/split-layout/layoutUtils';+import type { PriorityCollapser } from '@components/app/split-layout/utils/createPriorityCollapser';+import { TabsInset } from '@core/component/TabsInset';import { ENABLE_CALLS } from '@core/constant/featureFlags';import { useChannelName, useChannelType } from '@core/context/channels';import { createMethodRegistration } from '@core/orchestrator';@@ -40,9 +47,9 @@ import {ChannelSurface,type ChannelTargetRequest,} from './ChannelSurface';-import { ChannelTabProvider } from './ChannelTabContext';-import { ChannelTabLayout, ChannelTabs } from './ChannelTabs';+import { ChannelTabProvider, useChannelTab } from './ChannelTabContext';import { ChannelLiveIndicators } from './ChannelTopBarLiveIndicators';+import { toIconTabItems } from './channel-tab-icons';import { type ChannelTabId, DEFAULT_CHANNEL_TAB } from './channel-tabs';import {isJoinCallRequested,@@ -53,6 +60,7 @@ import {import {canUseInlineCallTab,normalizeChannelTab,+ useChannelTabItems,} from './use-channel-tab-items';export type ChannelDetailContext = {@@ -105,6 +113,34 @@ export function ChannelDetailTitle(props: ChannelDetailHeaderProps) {);}+/**+ * The channel's tab strip. Given the top bar's `collapser`, the strip+ * registers as its first item to give up space, dropping text labels for+ * icons when the bar overflows and taking them back as room returns.+ */+export function ChannelDetailTabs(props: {+ channelId: string;+ collapser?: PriorityCollapser;+}) {+ const { activeTab, setActiveTab } = useChannelTab();+ const tabs = useChannelTabItems(props.channelId);+ const isCollapsed = props.collapser+ ? useRegisterPriorityCollapseItem(props.collapser, {+ id: 'channel-tabs',+ priority: 1,+ })+ : () => false;++ return (+ <TabsInset+ class="shrink-0"+ list={isCollapsed() ? toIconTabItems(tabs()) : tabs()}+ value={activeTab()}+ onChange={(value) => setActiveTab(value as ChannelTabId)}+ />+ );+}+export function ChannelDetailActions(props: ChannelDetailHeaderProps) {const channelName = useChannelName(props.channelId, props.fallbackName);const channelType = useChannelType(props.channelId);@@ -150,13 +186,24 @@ export function ChannelDetailActions(props: ChannelDetailHeaderProps) {);}-/** Channel identity and actions; content navigation lives below this bar. */+/**+ * Channel top bar: leading content and tabs share one priority-collapse row+ * so a narrow pane shrinks the tabs to icons before the title truncates.+ * `leading` replaces the default title (a host's breadcrumbs, say).+ */export function ChannelDetailTopBar(props: ChannelDetailHeaderProps & { leading?: JSX.Element }) {+ const collapse = createPriorityCollapseController();+return (- <ViewShell.TopBar class="gap-3">- <div class="flex min-w-0 shrink items-center gap-3 overflow-hidden">+ <ViewShell.TopBar ref={collapse.setRow} class="gap-3 py-0">+ <PriorityCollapseOverflowSensor+ controller={collapse}+ truncateAsLastResort+ class="relative h-full min-w-0 shrink overflow-hidden"+ contentClass="flex h-full items-center gap-3"+ ><DebugSuspense name="ChannelDetail.title"><Showwhen={props.leading}@@ -170,7 +217,13 @@ export function ChannelDetailTopBar({props.leading}</Show></DebugSuspense>- </div>+ <DebugSuspense name="ChannelDetail.tab-strip">+ <ChannelDetailTabs+ channelId={props.channelId}+ collapser={collapse.collapser}+ />+ </DebugSuspense>+ </PriorityCollapseOverflowSensor><DebugSuspense name="ChannelDetail.actions"><ChannelDetailActionschannelId={props.channelId}@@ -313,13 +366,9 @@ function ChannelDetailContent(props: ChannelDetailProps) {}}/></DebugSuspense>- <ChannelTabLayout- class="flex-1 px-2"- tabs={- <DebugSuspense name="ChannelDetail.tabs">- <ChannelTabs channelId={channelId} />- </DebugSuspense>- }+ <div+ class="flex min-h-0 flex-1 flex-col px-2"+ data-channel-tab-content><Switch><Match when={activeTab() === 'messages'}>@@ -357,7 +406,7 @@ function ChannelDetailContent(props: ChannelDetailProps) {</DebugSuspense></Match></Switch>- </ChannelTabLayout>+ </div></div></ChannelTabProvider></ChannelSurface>diff --git a/apps/web/src/features/channel/Channel/ChannelTabs.tsx b/apps/web/src/features/channel/Channel/ChannelTabs.tsxdeleted file mode 100644index 2c4b14b64a..0000000000--- a/apps/web/src/features/channel/Channel/ChannelTabs.tsx+++ /dev/null@@ -1,48 +0,0 @@-import { cn } from '@ui';-import { Tabs } from '@ui/components/Tabs';-import type { JSX, ParentProps } from 'solid-js';-import { useChannelTab } from './ChannelTabContext';-import type { ChannelTabId } from './channel-tabs';-import { useChannelTabItems } from './use-channel-tab-items';--type ChannelTabLayoutProps = ParentProps<{- class?: string;- tabs: JSX.Element;-}>;--/**- * Gives channel chrome its intrinsic height and measures the active tab pane- * against the space left over. Keep every host on this layout boundary: a- * pane with `h-full` must fill the remainder, not the pre-chrome container.- */-export function ChannelTabLayout(props: ChannelTabLayoutProps) {- return (- <div class={cn('flex min-h-0 flex-col', props.class)}>- {props.tabs}- <div class="flex min-h-0 flex-1 flex-col" data-channel-tab-content>- {props.children}- </div>- </div>- );-}--/** Shared content navigation for split and inline channel surfaces. */-export function ChannelTabs(props: { channelId: string }) {- const { activeTab, setActiveTab } = useChannelTab();- const tabs = useChannelTabItems(props.channelId);-- return (- <div class="min-w-0 shrink-0 overflow-x-auto scrollbar-hidden px-2 py-2">- <Tabs- aria-label="Channel views"- class="w-max whitespace-nowrap"- list={tabs().map((tab) => ({- value: tab.value,- label: () => tab.label,- }))}- value={activeTab()}- onChange={(value) => setActiveTab(value as ChannelTabId)}- />- </div>- );-}diff --git a/apps/web/src/features/channel/Channel/channel-tab-icons.tsx b/apps/web/src/features/channel/Channel/channel-tab-icons.tsxindex 295d9d593a..94b904e8f7 100644--- a/apps/web/src/features/channel/Channel/channel-tab-icons.tsx+++ b/apps/web/src/features/channel/Channel/channel-tab-icons.tsx@@ -1,3 +1,4 @@+import type { TabItem } from '@core/component/Tabs';import ChatTextIcon from '@phosphor/chat-text.svg';import PaperclipIcon from '@phosphor/paperclip.svg';import PhoneIcon from '@phosphor/phone.svg';@@ -16,3 +17,28 @@ export const CHANNEL_TAB_ICONS: Record<participants: UsersIcon,call: PhoneCallIcon,};++/**+ * The same tabs with their text labels swapped for icons, for a header that+ * has run out of room. A tab without an icon keeps its label.+ */+export function toIconTabItems(+ tabs: readonly TabItem[],+ iconClass = 'size-4'+): TabItem[] {+ return tabs.map((tab) => {+ const Icon = CHANNEL_TAB_ICONS[tab.value as ChannelTabId];+ if (!Icon) return { ...tab };+ return {+ value: tab.value,+ label: (+ <span+ class="flex items-center"+ title={typeof tab.label === 'string' ? tab.label : undefined}+ >+ <Icon class={iconClass} />+ </span>+ ),+ };+ });+}diff --git a/apps/web/src/features/crm/components/record-tabs.tsx b/apps/web/src/features/crm/components/record-tabs.tsxindex 8f630a3385..bd5dfe51e8 100644--- a/apps/web/src/features/crm/components/record-tabs.tsx+++ b/apps/web/src/features/crm/components/record-tabs.tsx@@ -1,27 +1,59 @@-import { Tabs } from '@ui/components/Tabs';+import { TabsInset } from '@core/component/TabsInset';+import CheckSquareIcon from '@phosphor/check-square.svg';+import EnvelopeIcon from '@phosphor/envelope.svg';+import FilesIcon from '@phosphor/files.svg';+import PhoneIcon from '@phosphor/phone.svg';+import SquaresFourIcon from '@phosphor/squares-four.svg';+import UsersIcon from '@phosphor/users.svg';+import type { Component, JSX } from 'solid-js';import {CRM_RECORD_SECTION_LABELS,type CrmRecordSection,} from '../core/record';-/** Content navigation below the company or contact header. */+const SECTION_ICONS: Record<+ CrmRecordSection,+ Component<JSX.SvgSVGAttributes<SVGSVGElement>>+> = {+ overview: SquaresFourIcon,+ team: UsersIcon,+ emails: EnvelopeIcon,+ files: FilesIcon,+ tasks: CheckSquareIcon,+ calls: PhoneIcon,+};++/**+ * A CRM record's section tabs for its top bar, like a project's Overview /+ * Tasks tabs. `compact` swaps labels for icons when the bar runs out of room.+ */export function RecordTabs<S extends CrmRecordSection>(props: {sections: readonly S[];value: S;onChange: (section: S) => void;+ compact?: boolean;}) {+ const list = () =>+ props.sections.map((section) => {+ const label = CRM_RECORD_SECTION_LABELS[section];+ if (!props.compact) return { value: section, label };+ const Icon = SECTION_ICONS[section];+ return {+ value: section,+ label: (+ <span class="flex items-center" title={label}>+ <Icon class="size-4" />+ </span>+ ),+ };+ });return (- <div class="min-w-0 shrink-0 overflow-x-auto scrollbar-hidden px-4 py-2">- <Tabs- list={props.sections.map((section) => ({- value: section,- label: CRM_RECORD_SECTION_LABELS[section],- }))}- value={props.value}- onChange={(value) => props.onChange(value as S)}- aria-label="Record sections"- class="w-max whitespace-nowrap"- />- </div>+ <TabsInset+ list={list()}+ value={props.value}+ onChange={(value) => props.onChange(value as S)}+ aria-label="Record sections"+ class="shrink-0 whitespace-nowrap"+ />);}diff --git a/apps/web/src/features/crm/crm-company.tsx b/apps/web/src/features/crm/crm-company.tsxindex 8e064189ce..b3e69fb65a 100644--- a/apps/web/src/features/crm/crm-company.tsx+++ b/apps/web/src/features/crm/crm-company.tsx@@ -15,10 +15,11 @@ export function Company(props: ComponentProps<typeof View>) {);}-/** The company's section tabs, below a host's header. */+/** The company's section tabs, for a host's top bar. */export function CompanyTabs(props: {value: CompanySection;onChange: (section: CompanySection) => void;+ compact?: boolean;}) {return <RecordTabs sections={COMPANY_SECTIONS} {...props} />;}diff --git a/apps/web/src/features/crm/crm-contact.tsx b/apps/web/src/features/crm/crm-contact.tsxindex 475e86105a..81ba69a1a5 100644--- a/apps/web/src/features/crm/crm-contact.tsx+++ b/apps/web/src/features/crm/crm-contact.tsx@@ -15,10 +15,11 @@ export function Contact(props: ComponentProps<typeof View>) {);}-/** The contact's section tabs, below a host's header. */+/** The contact's section tabs, for a host's top bar. */export function ContactTabs(props: {value: ContactSection;onChange: (section: ContactSection) => void;+ compact?: boolean;}) {return <RecordTabs sections={CONTACT_SECTIONS} {...props} />;}diff --git a/apps/web/src/features/crm/views/company-detail.tsx b/apps/web/src/features/crm/views/company-detail.tsxindex 3a1bda13ea..0ad6fbed72 100644--- a/apps/web/src/features/crm/views/company-detail.tsx+++ b/apps/web/src/features/crm/views/company-detail.tsx@@ -1,7 +1,7 @@import { SidePanel } from '@components/app/side-panel';import PlusIcon from '@phosphor/plus.svg';import { Button } from '@ui';-import { createMemo, type JSX, Match, Show, Suspense, Switch } from 'solid-js';+import { createMemo, Match, Show, Suspense, Switch } from 'solid-js';import { RecordSection } from '../components/record-section';import { useCrmContext } from '../context/crm-context';import type { CrmContact as CompanyContact } from '../core/contact';@@ -30,7 +30,6 @@ export function Company(props: {companyId: string;section?: CompanySection;headerToggle?: boolean;- navigation?: JSX.Element;onHidden?: () => void;onOpenContact?: (contact: CompanyContact) => void;}) {@@ -60,7 +59,6 @@ export function Company(props: {defaultOpen={false}><div class="flex size-full min-h-0 min-w-0 flex-col">- {props.navigation}<div class="min-h-0 min-w-0 flex-1"><Switch><Match when={section() === 'overview'}>diff --git a/apps/web/src/features/crm/views/contact-detail.tsx b/apps/web/src/features/crm/views/contact-detail.tsxindex ad75732cda..3cd029384d 100644--- a/apps/web/src/features/crm/views/contact-detail.tsx+++ b/apps/web/src/features/crm/views/contact-detail.tsx@@ -1,5 +1,5 @@import { SidePanel } from '@components/app/side-panel';-import { createMemo, type JSX, Match, Show, Suspense, Switch } from 'solid-js';+import { createMemo, Match, Show, Suspense, Switch } from 'solid-js';import { useCrmContext } from '../context/crm-context';import {type ContactSection,@@ -23,7 +23,6 @@ export function Contact(props: {contactId: string;section?: ContactSection;headerToggle?: boolean;- navigation?: JSX.Element;onOpenCompany?: (companyId: string) => boolean;}) {const context = useCrmContext();@@ -53,7 +52,6 @@ export function Contact(props: {defaultOpen={false}><div class="flex size-full min-h-0 min-w-0 flex-col">- {props.navigation}<div class="min-h-0 min-w-0 flex-1"><Switch><Match when={section() === 'overview'}>diff --git a/apps/web/src/features/crm/views/record-detail.tsx b/apps/web/src/features/crm/views/record-detail.tsxindex f69cf44ca0..109f420975 100644--- a/apps/web/src/features/crm/views/record-detail.tsx+++ b/apps/web/src/features/crm/views/record-detail.tsx@@ -129,12 +129,30 @@ export function CrmCompanyDetail(props: {tabindex={-1}class="flex size-full min-h-0 min-w-0 flex-col overflow-hidden outline-none">- <div class="flex h-12 min-w-0 shrink-0 items-center gap-3 px-4">+ <div class="flex h-12 min-w-0 shrink-0 items-center gap-3 border-b border-edge-muted px-4">{props.navigation}<ViewBreadcrumbs.Outletaria-label="CRM record location"class="min-w-0 shrink"/>+ <div class="min-w-0 overflow-x-auto">+ <Show+ when={selectedContact()}+ fallback={+ <RecordTabs+ sections={COMPANY_SECTIONS}+ value={companySection()}+ onChange={setCompanySection}+ />+ }+ >+ <RecordTabs+ sections={CONTACT_SECTIONS}+ value={contactSection()}+ onChange={setContactSection}+ />+ </Show>+ </div><div class="ml-auto flex shrink-0 items-center gap-1"><CrmCopyLinkButtontype={selectedContact() ? 'contact' : 'company'}@@ -189,13 +207,6 @@ export function CrmCompanyDetail(props: {<CompanycompanyId={props.company.id}section={companySection()}- navigation={- <RecordTabs- sections={COMPANY_SECTIONS}- value={companySection()}- onChange={setCompanySection}- />- }headerToggle={false}onHidden={props.onClose}onOpenContact={openContact}@@ -206,13 +217,6 @@ export function CrmCompanyDetail(props: {<ContactcontactId={contact.id}section={contactSection()}- navigation={- <RecordTabs- sections={CONTACT_SECTIONS}- value={contactSection()}- onChange={setContactSection}- />- }headerToggle={false}onOpenCompany={(companyId) => {if (companyId !== props.company.id) return false;diff --git a/apps/web/src/features/drive-view/views/CodeDetail.tsx b/apps/web/src/features/drive-view/views/CodeDetail.tsxindex 7022f4e5c9..9b42de729e 100644--- a/apps/web/src/features/drive-view/views/CodeDetail.tsx+++ b/apps/web/src/features/drive-view/views/CodeDetail.tsx@@ -5,6 +5,7 @@ import {} from '@block-code/component/CodeContent';import { CodeModeControl } from '@block-code/component/CodeModeControl';import { isHtmlFileType } from '@block-code/util/fileMode';+import { SidePanel } from '@components/app/side-panel';import { downloadFile } from '@filesystem/download';import { Rerun } from '@solid-primitives/keyed';import {@@ -45,7 +46,9 @@ function CodeDetailContent(props: {return (<div class="flex size-full min-h-0 min-w-0 flex-col overflow-hidden"><Show when={isHtmlFile}>- <CodeModeControl mode={mode()} onModeChange={setMode} />+ <SidePanel.HeaderActions>+ <CodeModeControl mode={mode()} onModeChange={setMode} />+ </SidePanel.HeaderActions></Show><div class="relative min-h-0 min-w-0 flex-1 overflow-hidden"><CodeContentdiff --git a/apps/web/src/features/projects/components/project-skeletons.tsx b/apps/web/src/features/projects/components/project-skeletons.tsxindex 1cef4f9b5c..4e9615c3da 100644--- a/apps/web/src/features/projects/components/project-skeletons.tsx+++ b/apps/web/src/features/projects/components/project-skeletons.tsx@@ -1,5 +1,5 @@import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';-import { For, type JSX, Show } from 'solid-js';+import { For, Show } from 'solid-js';import type { ProjectSection } from '../core/project';export function ProjectDescriptionSkeleton() {@@ -30,15 +30,12 @@ export function ProjectsSidebarSkeleton() {}/** Matches the overview's content width, insets, and wrapping property pills. */-export function ProjectContentSkeleton(props: {- section: ProjectSection;- navigation?: JSX.Element;-}) {+export function ProjectContentSkeleton(props: { section: ProjectSection }) {return (<ListSkeleton.Root label="Loading project" class="h-full overflow-y-auto"><Showwhen={props.section === 'overview'}- fallback={<ProjectTasksSkeleton navigation={props.navigation} />}+ fallback={<ProjectTasksSkeleton />}><div class="px-6 pb-8 pt-12 touch:pt-6"><div class="mx-auto max-w-3xl">@@ -72,11 +69,10 @@ export function ProjectContentSkeleton(props: {);}-function ProjectTasksSkeleton(props: { navigation?: JSX.Element }) {+function ProjectTasksSkeleton() {return (<div class="space-y-6 px-4 py-2"><div class="flex h-8 items-center gap-3 overflow-x-auto scrollbar-hidden">- {props.navigation}<ListSkeleton.Bar class="size-8 shrink-0 rounded-full" /><div class="ml-auto flex shrink-0 gap-2"><ListSkeleton.Bar class="h-8 w-32" />diff --git a/apps/web/src/features/projects/project-detail.tsx b/apps/web/src/features/projects/project-detail.tsxindex 88e704195e..31b7d66b75 100644--- a/apps/web/src/features/projects/project-detail.tsx+++ b/apps/web/src/features/projects/project-detail.tsx@@ -12,10 +12,11 @@ import {useSplitDisplayName,useSplitPanelOrThrow,} from '@components/app/split-layout/layoutUtils';+import { TabsInset } from '@core/component/TabsInset';import { ShareTrigger } from '@core/component/TopBar/ShareButton';import { isTouchDevice } from '@core/mobile/isTouchDevice';import StackIcon from '@phosphor/stack.svg';-import { Button, Tabs } from '@ui';+import { Button } from '@ui';import { Match, Show, Suspense, Switch } from 'solid-js';import { ProjectContentSkeleton } from './components/project-skeletons';import {@@ -126,50 +127,38 @@ function ProjectDetailHost(props: ProjectDetailProps) {},});};- const navigation = () => (- <Tabs- list={[- { value: 'overview', label: 'Overview' },- { value: 'tasks', label: 'Tasks' },- ]}- value={props.route.section}- onChange={(value) => section(value as ProjectSection)}- aria-label="Project sections"- class="w-max shrink-0 whitespace-nowrap"- />- );- const loading = () => (- <>- <Show when={props.route.section === 'overview'}>- <div class="min-w-0 shrink-0 overflow-x-auto scrollbar-hidden px-4 py-2">- {navigation()}- </div>- </Show>- <div class="min-h-0 flex-1">- <ProjectContentSkeleton- section={props.route.section}- navigation={navigation()}- />- </div>- </>- );return (<><Show when={props.breadcrumb}>{(breadcrumb) => <ProjectBreadcrumbContent {...breadcrumb()} />}</Show>- <EntityDetailTopBar>+ <EntityDetailTopBar+ navigation={+ <TabsInset+ list={[+ { value: 'overview', label: 'Overview' },+ { value: 'tasks', label: 'Tasks' },+ ]}+ value={props.route.section}+ onChange={(value) => section(value as ProjectSection)}+ aria-label="Project sections"+ class="shrink-0 whitespace-nowrap"+ />+ }+ ><Show when={source.project()}>{(project) => (<ProjectShareTrigger project={project()} commands={commands} />)}</Show></EntityDetailTopBar>- <div class="relative flex min-h-0 min-w-0 flex-1 flex-col">- <Suspense fallback={loading()}>+ <div class="relative min-h-0 min-w-0 flex-1">+ <Suspense+ fallback={<ProjectContentSkeleton section={props.route.section} />}+ ><Switch><Match when={source.loading() && !source.project()}>- {loading()}+ <ProjectContentSkeleton section={props.route.section} /></Match><Match when={source.project()}>{(project) => (@@ -178,7 +167,6 @@ function ProjectDetailHost(props: ProjectDetailProps) {source={source}commands={commands}section={props.route.section}- navigation={navigation()}onDelete={props.onDelete ??(() => navigate({ route: tasksSplitRoute, params: {} }))@@ -228,7 +216,6 @@ function ProjectDetailHost(props: ProjectDetailProps) {)}</Match><Match when={true}>- <div class="px-4 py-2">{navigation()}</div><div role="alert" class="p-6"><p>Project unavailable. It may have been deleted, or you may nodiff --git a/apps/web/src/features/projects/views/project-tasks-list.tsx b/apps/web/src/features/projects/views/project-tasks-list.tsxindex c6e4cb1b7e..ae5ea269ce 100644--- a/apps/web/src/features/projects/views/project-tasks-list.tsx+++ b/apps/web/src/features/projects/views/project-tasks-list.tsx@@ -24,7 +24,6 @@ export type ProjectTasksListProps = Omit<projectName: string;onCreateTask?: () => void;addTasksAction?: JSX.Element;- navigation?: JSX.Element;};/** Embeds the actual Tasks list, including its controllers, menus and row editors. */@@ -71,7 +70,6 @@ function ProjectTasksListBody(props: ProjectTasksListProps) {return (<div class="flex size-full min-h-0 flex-col"><div class="flex h-12 min-w-0 shrink-0 items-center gap-3 overflow-x-auto scrollbar-hidden px-4 py-2">- {props.navigation}<ProjectTaskSearchprojectName={props.projectName}value={state.search}diff --git a/apps/web/src/features/projects/views/project-workspace.tsx b/apps/web/src/features/projects/views/project-workspace.tsxindex 988f04c230..649e1334f6 100644--- a/apps/web/src/features/projects/views/project-workspace.tsx+++ b/apps/web/src/features/projects/views/project-workspace.tsx@@ -37,7 +37,6 @@ export function ProjectWorkspace(props: {source: ProjectSource;commands: ReturnType<ProjectsContext['createCommands']>;section: ProjectSection;- navigation: JSX.Element;onDelete(): void;onOpenTask: ProjectTasksListProps['onOpenTask'];onCreateTask(): void;@@ -107,11 +106,6 @@ export function ProjectWorkspace(props: {</SidePanel.HeaderActions></Show><div class="flex size-full min-h-0 min-w-0 flex-col overflow-hidden">- <Show when={props.section === 'overview'}>- <div class="min-w-0 shrink-0 overflow-x-auto scrollbar-hidden px-4 py-2">- {props.navigation}- </div>- </Show><Show when={error()}>{(message) => (<p role="alert" class="px-6 py-2 text-sm text-failure">@@ -183,7 +177,6 @@ export function ProjectWorkspace(props: {</Match><Match when={props.section === 'tasks'}><ProjectTasksList- navigation={props.navigation}projectId={props.project.id}projectName={props.project.name}onOpenTask={props.onOpenTask}diff --git a/docs/AGENT_GUIDE/channels.md b/docs/AGENT_GUIDE/channels.mdindex 40b5d86bd7..ffe01c6e3c 100644--- a/docs/AGENT_GUIDE/channels.md+++ b/docs/AGENT_GUIDE/channels.md@@ -898,14 +898,13 @@ This action does not enable team auto-join. Check opening and reopening,switching options, keyboard recipient selection, external email chips,cancellation, and focus restoration before sending invites.-Bubble tabs sit in their own row below the channel header:+Inset tabs sit in the channel header:`Messages` / `Attachments` / `Calls` / `Participants`.`Ask Macro`, `Invite`, and `Call` actions remain in the header. On narrow desktop-panes, the tab row scrolls horizontally and keeps its text labels. Standalone-mobile channels keep view selection in the title menu. The tab row consumes-space above the active pane: in both a single channel and an adjacent channel-split, the message composer stays fully visible at the bottom instead of being-pushed down by the row. The `Calls` tab lists+panes, the tabs collapse from text labels to icons. Standalone mobile channels+keep view selection in the title menu. In both a single channel and an adjacent+channel split, the message composer stays fully visible at the bottom. The+`Calls` tab listsrecordings for that channel(same rows as the Calls soup view, filtered to this channel). The live `Call` tabappears while a call is in progress. `Ask Macro` opens a new chat pane with the channel@@ -916,9 +915,8 @@ instead.In the Chat workspace — and wherever a channel opens inline inside anotherview's detail stack (a channel mention followed from the email view, say) — theconversation renders an inline detail whose top bar holds the channel avatar-and name, live viewer avatars, and the `Call` and-`Ask Macro` buttons, with the same bubble tab row below the top bar. In Chat an-ellipsis follows the name and opens the same+and name, the same inset tab strip, live viewer avatars, and the `Call` and+`Ask Macro` buttons. In Chat an ellipsis follows the name and opens the sameentity actions as right-clicking the conversation's rail row — `Open in newsplit`, `Rename`, `Favorite`/`Unfavorite`, `Snooze notifications…`, `Mutenotifications`, `Remind me`, `Copy Link`, `Copy ID` — so a channel can bediff --git a/docs/AGENT_GUIDE/documents.md b/docs/AGENT_GUIDE/documents.mdindex 777dac15f9..d147dd548c 100644--- a/docs/AGENT_GUIDE/documents.md+++ b/docs/AGENT_GUIDE/documents.md@@ -2068,10 +2068,10 @@ still follow normal CRDT collaboration semantics when they reconnect.## HTML preview tabs-HTML documents show `Render` and `Code` bubble tabs in a left-aligned row above-the content, below the header, in both standalone desktop blocks and Drive-detail views. Switch to Code to inspect or edit the source, then back to Render-to see the current preview. Other code file types do not show this row.+HTML documents show `Render` and `Code` inset tabs in the top bar in both+standalone desktop blocks and Drive detail views. Switch to Code to inspect or+edit the source, then back to Render to see the current preview. Other code file+types do not show these tabs.## Large-document undo checksdiff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.mdindex 3da011481e..3b6bed4a63 100644--- a/docs/AGENT_GUIDE/surfaces.md+++ b/docs/AGENT_GUIDE/surfaces.md@@ -13,7 +13,7 @@ Low-emphasis right-aligned split-header actions (including Calendar's touch/prevNew event and Channel's idle Call and Ask Macro) are borderless with a rounded-xlbackground on hover. Emphasized variants retain their treatment, including anactive call's green ink and outline frame. Channel, company, contact, and project-content tabs use bubble tabs in a separate row below the header. Button sizes do not change variant colors or framing; individual+content tabs use inset controls in the top bar. Button sizes do not change variant colors or framing; individualframed controls default to glass on touch and flat on desktop. Use `glass={true}`to enable glass on all devices, or `glass={false}` to disable it everywhere.Embedded and low-emphasis actions use `ghost`; inline calendar-invitation text@@ -1699,9 +1699,9 @@ the toggle to dismiss it; the open state is not restored on a later visit.It copies the record's direct URL and shows a confirmation toast; this is alsoavailable in the embedded company and contact breadcrumb header.-A company is laid out like a project. Below its split header or embedded-breadcrumb header, a separate bubble-tab row shows `Overview`, `Team`, `Emails`,-`Files`, `Tasks`, and `Calls`. Narrow rows scroll horizontally with text labels. Overview shows the name, pills+A company is laid out like a project. Its split header or embedded breadcrumb+header shows inset `Overview`, `Team`, `Emails`, `Files`, `Tasks`, and `Calls`+tabs, collapsing to icons when narrow. Overview shows the name, pillsfor each domain and `Last interacted`, the generated description and theDiscussion. Team lists the contacts with `Add contact`. Emails keeps the`Signal`/`All` and `Team`/`Me` toggles. Files lists non-task documents whosediff --git a/docs/AGENT_GUIDE/tasks.md b/docs/AGENT_GUIDE/tasks.mdindex ce54db3ab8..8da875f51e 100644--- a/docs/AGENT_GUIDE/tasks.md+++ b/docs/AGENT_GUIDE/tasks.md@@ -244,12 +244,12 @@ Closing the popover without submitting keeps the underlying view open.Opening a project keeps the Tasks workspace and its navigation. The top barshows the Projects return breadcrumb and the project name, with the same Share-and side-panel controls as task detail. Choose Overview or Tasks in the-bubble-tab row below that top bar. In Tasks, an outlined circular search button-to the right of the tabs expands into a focused `Search in <project name>` field. Close or Escape-clears the query and restores focus to the button. The row stays the same height-and scrolls horizontally in narrow splits, keeping list controls, Add existing-tasks, and New task accessible. Opening an associated task extends the breadcrumb trail; choose+and side-panel controls as task detail. Choose Overview or Tasks using the inset+tabs in that top bar. In Tasks, an outlined circular search button expands into+a focused `Search in <project name>` field. Close or Escape clears the query and+restores focus to the button. The task toolbar stays the same height and scrolls+horizontally in narrow splits, keeping list controls, Add existing tasks, and New+task accessible. Opening an associated task extends the breadcrumb trail; choosethe project breadcrumb to return, or Projects to restore the collection and itsfilters, groups, and scroll position. Project URLs retain identity and section:`/app/component/initiative-view~<project-id>~overview` (or `tasks`).