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(app): move in split tabs to second row, unify more top bar styles (#7522)
Seamus41681a42c28f
diff --git a/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx b/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsxindex 02f263b879..bba68b9a9b 100644--- a/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx+++ b/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx@@ -32,6 +32,7 @@ import {ChannelTabProvider,useChannelTab,} from '@channel/Channel/ChannelTabContext';+import { ChannelTabs } from '@channel/Channel/ChannelTabs';import { ChannelTopBarLiveIndicators } from '@channel/Channel/ChannelTopBarLiveIndicators';import { CHANNEL_TAB_ICONS } from '@channel/Channel/channel-tab-icons';import {@@ -71,6 +72,7 @@ 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';@@ -199,9 +201,6 @@ function NewTop(props: { channelId: string }) {channelType={channelType()!}participants={participants() ?? []}channelName={channelName() ?? 'New Channel'}- tabs={tabs()}- activeTab={activeTab()}- onTabChange={setActiveTab}/><SplitTitleFileMenu><BlockSplitFileMenu@@ -539,6 +538,11 @@ export function NewChannelBlockAdapter(props: BlockChannelProps) {'touch:pt-(--mobile-content-inset-top)')}>+ <Show when={!isTouchDevice()}>+ <Suspense>+ <ChannelTabs channelId={channelId} />+ </Suspense>+ </Show><Switch><Match when={activeTab() === 'messages'}><ChannelMessagesdiff --git a/apps/web/src/features/block-channel/component/Top.tsx b/apps/web/src/features/block-channel/component/Top.tsxindex 6d48aec0e6..ebe99af8e6 100644--- a/apps/web/src/features/block-channel/component/Top.tsx+++ b/apps/web/src/features/block-channel/component/Top.tsx@@ -1,19 +1,12 @@-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;@@ -24,9 +17,6 @@ type TopProps = {type ChannelTopLeftProps = TopProps & {lockRename?: boolean;- tabs?: readonly TabItem[];- activeTab?: ChannelTabId;- onTabChange?: (value: ChannelTabId) => void;};export function ChannelTopLeft(props: ChannelTopLeftProps) {@@ -37,11 +27,6 @@ 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">@@ -63,23 +48,6 @@ export function ChannelTopLeft(props: ChannelTopLeftProps) {/></div></HeaderIsland>- {/* Mobile has no room for inline tabs; the title file menu carries the- tab links there instead (see NewChannelBlockAdapter). */}- <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 7eb50d0967..eef213d447 100644--- a/apps/web/src/features/block-code/component/Block.tsx+++ b/apps/web/src/features/block-code/component/Block.tsx@@ -2,6 +2,7 @@ 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,@@ -22,6 +23,7 @@ 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(@@ -60,28 +62,29 @@ 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- isHtmlFile={isHtmlFile()}- mode={mode()}- onModeChange={setMode}- />- <Show- when={spreadsheet()}- fallback={- <CodeContent- text={blockText() ?? ''}- fileType={blockMetadata()?.fileType}- readOnly={readOnly()}- mode={mode()}- onTextChange={setBlockText}- onSave={(text) => saveCodeDocument(documentId, text)}- />- }- >- <Suspense fallback={<SpreadsheetSkeleton />}>- <UploadedWorkbook />- </Suspense>+ <TopBar />+ <Show when={isHtmlFile() && !isMobile()}>+ <CodeModeControl mode={mode()} onModeChange={setMode} /></Show>+ <div class="relative min-h-0 min-w-0 w-full flex-1 overflow-hidden">+ <Show+ when={spreadsheet()}+ fallback={+ <CodeContent+ text={blockText() ?? ''}+ fileType={blockMetadata()?.fileType}+ readOnly={readOnly()}+ mode={mode()}+ onTextChange={setBlockText}+ onSave={(text) => saveCodeDocument(documentId, text)}+ />+ }+ >+ <Suspense fallback={<SpreadsheetSkeleton />}>+ <UploadedWorkbook />+ </Suspense>+ </Show>+ </div></div></SidePanel.Layout></div>diff --git a/apps/web/src/features/block-code/component/CodeModeControl.tsx b/apps/web/src/features/block-code/component/CodeModeControl.tsxindex 07936b5500..68122e4c91 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 { TabbedControl } from '@ui';+import { Tabs } from '@ui/components/Tabs';import type { CodeBlockMode } from './CodeContent';export function CodeModeControl(props: {@@ -6,13 +6,17 @@ export function CodeModeControl(props: {onModeChange: (mode: CodeBlockMode) => void;}) {return (- <TabbedControl- list={[- { value: 'render', label: 'Render' },- { value: 'code', label: 'Code' },- ]}- value={props.mode}- onChange={(value) => props.onModeChange(value as CodeBlockMode)}- />+ <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>);}diff --git a/apps/web/src/features/block-code/component/TopBar.tsx b/apps/web/src/features/block-code/component/TopBar.tsxindex ab5cc62cee..dd4947aeb8 100644--- a/apps/web/src/features/block-code/component/TopBar.tsx+++ b/apps/web/src/features/block-code/component/TopBar.tsx@@ -12,14 +12,12 @@ import {import type { FileOperation } from '@components/app/split-layout/components/SplitFileMenu';import { SplitHeaderLeft } from '@components/app/split-layout/components/SplitHeader';import { BlockItemSplitLabel } from '@components/app/split-layout/components/SplitLabel';-import { SplitToolbarRight } from '@components/app/split-layout/components/SplitToolbar';import { useBlockAliasedName, useBlockId } from '@core/block';import {getShareDrawerRecipientInput,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 {@@ -30,17 +28,9 @@ 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 const TopBar: Component<{- isHtmlFile: boolean;- mode: CodeBlockMode;- onModeChange: (mode: CodeBlockMode) => void;-}> = (props) => {+export function TopBar() {const analytics = useAnalytics();const blockId = useBlockId();@@ -114,15 +104,6 @@ export const TopBar: Component<{<ResponsivePermissionsBadge />- <Show when={props.isHtmlFile && !isMobile()}>- <SplitToolbarRight order={-1}>- <CodeModeControl- mode={props.mode}- onModeChange={props.onModeChange}- />- </SplitToolbarRight>- </Show>-<ResponsiveBlockToolbartools={tools}ops={ops}@@ -132,4 +113,4 @@ export const TopBar: Component<{/></>);-};+}diff --git a/apps/web/src/features/block-company/component/CompanyBlockAdapter.tsx b/apps/web/src/features/block-company/component/CompanyBlockAdapter.tsxindex 9dccf49e8d..dd7e70d9e2 100644--- a/apps/web/src/features/block-company/component/CompanyBlockAdapter.tsx+++ b/apps/web/src/features/block-company/component/CompanyBlockAdapter.tsx@@ -4,12 +4,8 @@ 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 {- SplitHeaderLeft,- SplitHeaderRight,-} from '@components/app/split-layout/components/SplitHeader';+import { SplitHeaderRight } from '@components/app/split-layout/components/SplitHeader';import { useBlockId } from '@core/block';import {createParamsState,@@ -33,38 +29,17 @@ export function CompanyBlockAdapter() {});return (<>- <SplitHeaderLeft>- <CollapsibleHeaderItem- id="company-tabs"- priority={1}- containerClass="ph-no-capture min-w-0 h-full mx-2"- >- {(isCollapsed) => (- // Labels keep their width so the header collapses them to- // icons; the icons scroll once even they no longer fit.- <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()} />+ <Company+ companyId={companyId}+ section={section()}+ navigation={<CompanyTabs value={section()} onChange={setSection} />}+ /></ParamsProvider></>);diff --git a/apps/web/src/features/block-contact/component/ContactBlockAdapter.tsx b/apps/web/src/features/block-contact/component/ContactBlockAdapter.tsxindex b4eb455974..b4d4d8fff5 100644--- a/apps/web/src/features/block-contact/component/ContactBlockAdapter.tsx+++ b/apps/web/src/features/block-contact/component/ContactBlockAdapter.tsx@@ -4,12 +4,8 @@ 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 {- SplitHeaderLeft,- SplitHeaderRight,-} from '@components/app/split-layout/components/SplitHeader';+import { SplitHeaderRight } from '@components/app/split-layout/components/SplitHeader';import { useBlockId } from '@core/block';import {createParamsState,@@ -33,38 +29,17 @@ export function ContactBlockAdapter() {});return (<>- <SplitHeaderLeft>- <CollapsibleHeaderItem- id="contact-tabs"- priority={1}- containerClass="ph-no-capture min-w-0 h-full mx-2"- >- {(isCollapsed) => (- // Labels keep their width so the header collapses them to- // icons; the icons scroll once even they no longer fit.- <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()} />+ <Contact+ contactId={contactId}+ section={section()}+ navigation={<ContactTabs value={section()} onChange={setSection} />}+ /></ParamsProvider></>);diff --git a/apps/web/src/features/channel/Attachments/AttachmentEntityList.tsx b/apps/web/src/features/channel/Attachments/AttachmentEntityList.tsxindex f16ae12fa7..d12a6f82c5 100644--- a/apps/web/src/features/channel/Attachments/AttachmentEntityList.tsx+++ b/apps/web/src/features/channel/Attachments/AttachmentEntityList.tsx@@ -20,10 +20,13 @@ export function AttachmentEntityList(props: {const hasDocuments = () => props.rows.length > 0;return (- <AttachmentSection label="Documents">+ <AttachmentSection+ label="Documents"+ class={hasDocuments() ? 'flex-1' : undefined}+ ><div class="grid grid-cols-1"><Show when={!hasDocuments()}>- <div class="py-3 text-sm text-ink-subtle">+ <div class="px-6 py-3 text-sm text-ink-subtle">No documents in this channel yet.</div></Show>diff --git a/apps/web/src/features/channel/Attachments/ChannelAttachmentsTab.tsx b/apps/web/src/features/channel/Attachments/ChannelAttachmentsTab.tsxindex b84fb1a3f0..4fab1417c2 100644--- a/apps/web/src/features/channel/Attachments/ChannelAttachmentsTab.tsx+++ b/apps/web/src/features/channel/Attachments/ChannelAttachmentsTab.tsx@@ -5,16 +5,7 @@ import { ChannelAttachmentMediaSection } from './ChannelAttachmentMediaSection';export function ChannelAttachmentsTab(props: { channelId: string }) {return (<div class="relative flex-1 min-h-0 h-full overflow-hidden flex justify-center p-2">- <div- class="macro-message-width size-full"- style={{- 'grid-template-rows': 'minmax(0, 1fr) minmax(0, 1fr)',- 'grid-template-columns': '1fr',- overflow: 'hidden',- display: 'grid',- gap: '8px',- }}- >+ <div class="macro-message-width size-full flex flex-col gap-2 overflow-hidden"><Suspense><ChannelAttachmentMediaSection channelId={props.channelId} /></Suspense>diff --git a/apps/web/src/features/channel/Attachments/MediaGallery.tsx b/apps/web/src/features/channel/Attachments/MediaGallery.tsxindex 846782b99e..82af38c835 100644--- a/apps/web/src/features/channel/Attachments/MediaGallery.tsx+++ b/apps/web/src/features/channel/Attachments/MediaGallery.tsx@@ -57,7 +57,11 @@ export function MediaGallery(props: {};return (- <AttachmentSection label="Photos and Videos" fillBody>+ <AttachmentSection+ label="Photos and Videos"+ class={hasMedia() ? 'flex-1' : undefined}+ fillBody+ ><Showwhen={hasMedia()}fallback={diff --git a/apps/web/src/features/channel/Attachments/SectionHeader.tsx b/apps/web/src/features/channel/Attachments/SectionHeader.tsxindex d5c525184b..331c419f31 100644--- a/apps/web/src/features/channel/Attachments/SectionHeader.tsx+++ b/apps/web/src/features/channel/Attachments/SectionHeader.tsx@@ -13,7 +13,7 @@ export function AttachmentSection(props: {fillBody?: boolean;}) {return (- <Panel depth={2} class={cn('h-auto', props.class)}>+ <Panel depth={2} class={cn('h-auto shrink-0', props.class)}><Panel.Header class="justify-between px-6"><h3 class="text-sm font-medium text-ink">{props.label}</h3><div class="shrink-0">{props.action}</div>diff --git a/apps/web/src/features/channel/Bots/BotInviteSelect.tsx b/apps/web/src/features/channel/Bots/BotInviteSelect.tsxindex 267c404e0a..999360e52b 100644--- a/apps/web/src/features/channel/Bots/BotInviteSelect.tsx+++ b/apps/web/src/features/channel/Bots/BotInviteSelect.tsx@@ -3,11 +3,10 @@ import {Combobox,type ComboboxRootItemComponentProps,} from '@kobalte/core/combobox';-import CaretDownIcon from '@phosphor/caret-down.svg';import { useBotsQuery } from '@queries/bots/bots';import { useAddBotToChannelMutation } from '@queries/channel/channel-bots';import type { Bot } from '@service-storage/generated/schemas/bot';-import { Surface } from '@ui';+import { Button, inputClasses, Surface } from '@ui';import {type Component,createEffect,@@ -98,8 +97,8 @@ export function BotInviteSelect(props: {};return (- <div class="flex flex-col gap-2 md:flex-row md:items-center">- <div class="min-w-0 flex-1">+ <div class="flex flex-wrap items-center gap-2">+ <div class="min-w-0 flex-1 basis-60"><Combobox<Bot>multiple={false}options={availableBots()}@@ -111,7 +110,9 @@ export function BotInviteSelect(props: {}onChange={(bot) => setSelectedBot(bot ?? undefined)}placeholder={- botsQuery.isLoading ? 'Loading bots…' : 'Search existing bots…'+ botsQuery.isLoading+ ? 'Loading bots…'+ : 'Search bots by name or handle'}itemComponent={BotInviteItem}placement="bottom-start"@@ -119,15 +120,14 @@ export function BotInviteSelect(props: {disabled={botsQuery.isLoading || addBotMutation.isPending}><Combobox.Control<Bot> class="block w-full">- <div class="flex w-full items-center rounded-lg border border-edge-muted bg-surface px-3 py-2 text-sm text-ink outline-none focus-within:border-accent">- <Combobox.Input- ref={inputRef}- class="min-h-7 min-w-0 flex-1 bg-transparent p-1 outline-none placeholder:text-ink-placeholder"- />- <Combobox.Trigger class="ml-2 rounded p-0.5 text-ink-extra-muted outline-none hover:bg-hover hover:text-ink">- <CaretDownIcon class="size-3.5" />- </Combobox.Trigger>- </div>+ <Combobox.Input+ ref={inputRef}+ aria-label="Search existing bots"+ class={inputClasses({+ size: 'lg',+ class: 'rounded-full px-4',+ })}+ /></Combobox.Control><Combobox.Portal><Combobox.Content@@ -135,28 +135,23 @@ export function BotInviteSelect(props: {depth={3}class="z-action-menu mt-1 w-[var(--kb-popper-anchor-width)] min-w-72 rounded-xl p-1.5 glass bg-menu-glass">- <Show- when={availableBots().length > 0}- fallback={- <div class="px-3 py-5 text-center text-xs text-ink-muted">- No bots available to invite- </div>- }- >- <Combobox.Listbox class="max-h-64 overflow-y-auto" />- </Show>+ <Combobox.Listbox class="peer max-h-64 overflow-y-auto empty:hidden" />+ <div class="hidden px-3 py-5 text-center text-xs text-ink-muted peer-empty:block">+ {availableBots().length > 0+ ? 'No matching bots'+ : 'No bots available to invite'}+ </div></Combobox.Content></Combobox.Portal></Combobox></div>- <button- type="button"- class="w-full shrink-0 rounded-xs bg-accent px-3 py-1.5 text-sm font-medium text-surface transition-colors hover:bg-accent/90 disabled:opacity-50 md:w-[127px]"+ <Button+ variant="outline"disabled={!selectedBot() || addBotMutation.isPending}onClick={() => void inviteBot()}>{addBotMutation.isPending ? 'Inviting…' : 'Invite bot'}- </button>+ </Button></div>);}diff --git a/apps/web/src/features/channel/Channel/ChannelDetail.tsx b/apps/web/src/features/channel/Channel/ChannelDetail.tsxindex 10285e1f66..8c647f661c 100644--- a/apps/web/src/features/channel/Channel/ChannelDetail.tsx+++ b/apps/web/src/features/channel/Channel/ChannelDetail.tsx@@ -16,16 +16,9 @@ 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';@@ -47,9 +40,9 @@ import {ChannelSurface,type ChannelTargetRequest,} from './ChannelSurface';-import { ChannelTabProvider, useChannelTab } from './ChannelTabContext';+import { ChannelTabProvider } from './ChannelTabContext';+import { ChannelTabs } from './ChannelTabs';import { ChannelLiveIndicators } from './ChannelTopBarLiveIndicators';-import { toIconTabItems } from './channel-tab-icons';import { type ChannelTabId, DEFAULT_CHANNEL_TAB } from './channel-tabs';import {isJoinCallRequested,@@ -60,7 +53,6 @@ import {import {canUseInlineCallTab,normalizeChannelTab,- useChannelTabItems,} from './use-channel-tab-items';export type ChannelDetailContext = {@@ -113,35 +105,6 @@ 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);- // Read once by design: a registration lives for the component's lifetime.- 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);@@ -187,26 +150,13 @@ export function ChannelDetailActions(props: ChannelDetailHeaderProps) {);}-/**- * 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).- */+/** Channel identity and actions; content navigation lives below this bar. */export function ChannelDetailTopBar(props: ChannelDetailHeaderProps & { leading?: JSX.Element }) {- const collapse = createPriorityCollapseController();-return (- // py-0 gives the clipping sensor the bar's full height; the tab track is- // taller than the padded content box and would be cut off.- <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"- >+ <ViewShell.TopBar class="gap-3">+ <div class="flex min-w-0 shrink items-center gap-3 overflow-hidden"><DebugSuspense name="ChannelDetail.title"><Showwhen={props.leading}@@ -220,13 +170,7 @@ export function ChannelDetailTopBar({props.leading}</Show></DebugSuspense>- <DebugSuspense name="ChannelDetail.tab-strip">- <ChannelDetailTabs- channelId={props.channelId}- collapser={collapse.collapser}- />- </DebugSuspense>- </PriorityCollapseOverflowSensor>+ </div><DebugSuspense name="ChannelDetail.actions"><ChannelDetailActionschannelId={props.channelId}@@ -370,6 +314,9 @@ function ChannelDetailContent(props: ChannelDetailProps) {/></DebugSuspense><div class="flex min-h-0 flex-1 flex-col px-2">+ <DebugSuspense name="ChannelDetail.tabs">+ <ChannelTabs channelId={channelId} />+ </DebugSuspense><Switch><Match when={activeTab() === 'messages'}><DebugSuspense name="ChannelDetail.messages">diff --git a/apps/web/src/features/channel/Channel/ChannelTabs.tsx b/apps/web/src/features/channel/Channel/ChannelTabs.tsxnew file mode 100644index 0000000000..d94bfbd6c2--- /dev/null+++ b/apps/web/src/features/channel/Channel/ChannelTabs.tsx@@ -0,0 +1,25 @@+import { Tabs } from '@ui/components/Tabs';+import { useChannelTab } from './ChannelTabContext';+import type { ChannelTabId } from './channel-tabs';+import { useChannelTabItems } from './use-channel-tab-items';++/** 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 94b904e8f7..295d9d593a 100644--- a/apps/web/src/features/channel/Channel/channel-tab-icons.tsx+++ b/apps/web/src/features/channel/Channel/channel-tab-icons.tsx@@ -1,4 +1,3 @@-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';@@ -17,28 +16,3 @@ 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/channel/Channel/tests/channel-detail-navigation.test.tsx b/apps/web/src/features/channel/Channel/tests/channel-detail-navigation.test.tsxindex c541a5df5f..7361b3e159 100644--- a/apps/web/src/features/channel/Channel/tests/channel-detail-navigation.test.tsx+++ b/apps/web/src/features/channel/Channel/tests/channel-detail-navigation.test.tsx@@ -72,22 +72,11 @@ vi.mock('@channel/Participants/ChannelParticipantsTab', () => ({vi.mock('@components/app/GlobalAppState', () => ({useGlobalBlockOrchestrator: () => orchestrator,}));-vi.mock(- '@components/app/split-layout/components/PriorityCollapseOverflowSensor',- () => ({- createPriorityCollapseController: () => ({- setRow: vi.fn(),- collapser: undefined,- }),- PriorityCollapseOverflowSensor: mocks.pass,- })-);vi.mock('@components/app/split-layout/layoutUtils', () => ({- useRegisterPriorityCollapseItem: () => () => false,useSplitDisplayName: () => {},useSplitPanelOrThrow: () => ({ splitHotkeyScope: 'test-scope' }),}));-vi.mock('@core/component/TabsInset', () => ({ TabsInset: () => null }));+vi.mock('@ui/components/Tabs', () => ({ Tabs: () => null }));vi.mock('@core/context/channels', () => ({useChannelName: () => () => 'channel-name',useChannelType: () => () => 'private',diff --git a/apps/web/src/features/channel/Participants/ChannelBotRow.test.tsx b/apps/web/src/features/channel/Participants/ChannelBotRow.test.tsxnew file mode 100644index 0000000000..b7d03cba00--- /dev/null+++ b/apps/web/src/features/channel/Participants/ChannelBotRow.test.tsx@@ -0,0 +1,57 @@+/** @vitest-environment jsdom */++import type { Bot } from '@service-storage/generated/schemas/bot';+import { fireEvent, render, screen } from '@solidjs/testing-library';+import { expect, it, vi } from 'vitest';+import { ChannelBotRow } from './ChannelBotRow';++vi.mock('@ui', async () => ({+ ...(await import('@ui/components/Avatar')),+ ...(await import('@ui/components/Badge')),+ ...(await import('@ui/components/Button')),+ ...(await import('@ui/components/Item')),+}));++const bot: Bot = {+ id: 'bot-1',+ name: 'Helper',+ handle: 'helper',+ description: 'Helps the team',+ kind: 'owned',+ has_agent: false,+ created_at: '2026-10-05T00:00:00Z',+ updated_at: '2026-10-05T00:00:00Z',+};++it('opens from the row and keyboard, while keeping copy and remove separate', () => {+ const onOpen = vi.fn();+ const onCopyWebhook = vi.fn();+ const onRemove = vi.fn();+ render(() => (+ <ChannelBotRow+ bot={bot}+ editable+ removing={false}+ onOpen={onOpen}+ onCopyWebhook={onCopyWebhook}+ onRemove={onRemove}+ />+ ));++ const link = screen.getByRole('link', { name: 'Open Helper' });+ const secondary = screen.getByText('@helper · Helps the team');+ expect(link.contains(secondary)).toBe(true);+ fireEvent.click(secondary);+ fireEvent.keyDown(link, { key: 'Enter' });+ expect(onOpen).toHaveBeenCalledTimes(2);++ const copy = screen.getByRole('button', { name: 'Copy webhook URL' });+ const remove = screen.getByRole('button', { name: 'Remove Helper' });+ expect(link.contains(copy)).toBe(false);+ expect(link.contains(remove)).toBe(false);+ fireEvent.click(copy);+ fireEvent.click(remove);+ expect(onCopyWebhook).toHaveBeenCalledOnce();+ expect(onRemove).toHaveBeenCalledOnce();+ expect(onOpen).toHaveBeenCalledTimes(2);+});diff --git a/apps/web/src/features/channel/Participants/ChannelBotRow.tsx b/apps/web/src/features/channel/Participants/ChannelBotRow.tsxindex 2aee137372..6763d65dac 100644--- a/apps/web/src/features/channel/Participants/ChannelBotRow.tsx+++ b/apps/web/src/features/channel/Participants/ChannelBotRow.tsx@@ -1,8 +1,9 @@import { BotAvatar } from '@channel/Bots/BotAvatar';+import { useSplitNavigationHandler } from '@core/util/useSplitNavigationHandler';import CopyIcon from '@phosphor/copy.svg';import XIcon from '@phosphor/x.svg';import type { Bot } from '@service-storage/generated/schemas/bot';-import { Button } from '@ui';+import { Badge, Button, Item } from '@ui';import { Show } from 'solid-js';export function ChannelBotRow(props: {@@ -13,55 +14,66 @@ export function ChannelBotRow(props: {onCopyWebhook: () => void;onRemove: () => void;}) {+ const description = () =>+ [`@${props.bot.handle}`, props.bot.description].filter(Boolean).join(' · ');+ const navigationHandlers = useSplitNavigationHandler<HTMLAnchorElement>(+ (event) => {+ event.preventDefault();+ event.stopPropagation();+ props.onOpen();+ }+ );+return (- <div class="group relative flex items-center gap-3 border-b border-edge-muted px-6 py-2.5 last:border-b-0 hover:bg-hover focus-within:bg-hover">- <button- type="button"- class="absolute inset-0 z-0 rounded-md outline-none"+ <div class="relative">+ <a+ {...navigationHandlers}+ role="link"+ tabIndex={0}aria-label={`Open ${props.bot.name}`}- onClick={props.onOpen}- />- <div class="pointer-events-none relative z-1">- <BotAvatar bot={props.bot} size="lg" />- </div>- <div class="pointer-events-none relative z-1 min-w-0 flex-1">- <div class="flex min-w-0 items-baseline gap-1.5">- <span class="truncate text-sm font-medium">{props.bot.name}</span>- <span class="truncate text-xs text-ink-extra-muted">- @{props.bot.handle}- </span>- </div>- <Show when={props.bot.description}>- {(description) => (- <div class="mt-0.5 truncate text-xs text-ink-muted">+ class="block rounded-xl hover:bg-hover focus-visible:outline-2 focus-visible:outline-edge"+ onKeyDown={(event) => {+ if (event.key !== 'Enter') return;+ event.preventDefault();+ event.currentTarget.click();+ }}+ >+ <Item class={props.editable ? 'pr-20' : 'pr-12'}>+ <BotAvatar bot={props.bot} size="lg" />+ <Item.Content>+ <Item.Title class="truncate">{props.bot.name}</Item.Title>+ <Item.Description class="truncate">{description()}- </div>- )}- </Show>+ </Item.Description>+ </Item.Content>+ <Item.Actions>+ <Badge variant="outline" size="sm">+ Bot+ </Badge>+ </Item.Actions>+ </Item>+ </a>+ <div class="absolute right-3 top-1/2 -translate-y-1/2">+ <Item.Actions>+ <Button+ size="icon-sm"+ label="Copy webhook URL"+ onClick={props.onCopyWebhook}+ >+ <CopyIcon />+ </Button>+ <Show when={props.editable}>+ <Button+ size="icon-sm"+ label={`Remove ${props.bot.name}`}+ disabled={props.removing}+ onClick={props.onRemove}+ >+ <XIcon />+ </Button>+ </Show>+ </Item.Actions></div>- <Button- class="relative z-1"- variant="outline"- size="sm"- label="Copy webhook URL"- onClick={props.onCopyWebhook}- >- <CopyIcon />- Webhook URL- </Button>- <Show when={props.editable}>- <Button- class="relative z-1"- variant="ghost"- size="icon-sm"- label={`Remove ${props.bot.name}`}- aria-label={`Remove ${props.bot.name}`}- disabled={props.removing}- onClick={props.onRemove}- >- <XIcon />- </Button>- </Show></div>);}diff --git a/apps/web/src/features/channel/Participants/ChannelBotsPanel.tsx b/apps/web/src/features/channel/Participants/ChannelBotsPanel.tsxindex 78e83801b4..2c7d664a6e 100644--- a/apps/web/src/features/channel/Participants/ChannelBotsPanel.tsx+++ b/apps/web/src/features/channel/Participants/ChannelBotsPanel.tsx@@ -7,7 +7,7 @@ import {useChannelBotsQuery,useRemoveBotFromChannelMutation,} from '@queries/channel/channel-bots';-import { Button, Panel } from '@ui';+import { Button, Card, Item, Scroll } from '@ui';import { For, Show } from 'solid-js';import { BotInviteSelect } from '../Bots/BotInviteSelect';import { ChannelBotRow } from './ChannelBotRow';@@ -43,77 +43,71 @@ export function ChannelBotsPanel(props: {};return (- <Panel- depth={2}- class="h-[min(42%,22rem)] min-h-52 shrink-0 overflow-hidden text-ink"- >- <Panel.Header class="h-auto min-h-10 justify-between gap-3 px-6 py-2">- <div>- <div class="text-sm font-semibold">Bots</div>- <div class="text-xs font-normal text-ink-muted">- Webhook-powered channel participants- </div>+ <Card class="min-h-0 max-h-[40%] shrink-0">+ <Card.Header class="shrink-0">+ <div class="flex flex-wrap items-center justify-between gap-2">+ <Card.Title>Bots</Card.Title>+ <Show when={props.editable}>+ <Button variant="outline" onClick={props.onCreateBot}>+ <PlusIcon />+ New bot+ </Button>+ </Show></div>+ <Card.Description>+ Webhook-powered channel participants+ </Card.Description>+ </Card.Header>+ <Card.Body class="flex min-h-0 flex-col gap-3"><Show when={props.editable}>- <Button variant="cta" size="sm" onClick={props.onCreateBot}>- <PlusIcon />- New bot- </Button>+ <div class="shrink-0">+ <BotInviteSelect+ channelId={props.channelId}+ channelBotIds={bots().map((bot) => bot.id)}+ focusRequest={props.inviteFocusRequest}+ />+ </div></Show>- </Panel.Header>- <Panel.Body>- <div class="flex h-full flex-col">- <Show when={props.editable}>- <div class="shrink-0 border-b border-edge-muted px-6 py-3">- <BotInviteSelect- channelId={props.channelId}- channelBotIds={bots().map((bot) => bot.id)}- focusRequest={props.inviteFocusRequest}- />- </div>- </Show>- <Show- when={!botsQuery.isLoading}- fallback={- <div class="flex min-h-0 flex-1 items-center justify-center">- <LoadingSpinner class="size-9 p-2" />- </div>- }- >- <Show- when={bots().length > 0}- fallback={- <div class="flex min-h-0 flex-1 flex-col items-center justify-center px-6 text-center">- <div class="flex size-9 items-center justify-center rounded-lg bg-accent-bg text-accent">- <RobotIcon class="size-5" />- </div>- <div class="mt-2 text-sm font-medium">- No bots in this channel- </div>- <div class="mt-0.5 text-xs text-ink-muted">- Select an existing bot above or create a new one.- </div>+ <div class="min-h-0 flex-1">+ <Scroll aria-label="Bots list">+ <Show when={!botsQuery.isLoading} fallback={<LoadingSpinner />}>+ <Show+ when={bots().length > 0}+ fallback={+ <Item role="status">+ <Item.Media>+ <RobotIcon />+ </Item.Media>+ <Item.Content>+ <Item.Title>No bots in this channel</Item.Title>+ <Show when={props.editable}>+ <Item.Description>+ Select an existing bot above or create a new one.+ </Item.Description>+ </Show>+ </Item.Content>+ </Item>+ }+ >+ <div>+ <For each={bots()}>+ {(bot) => (+ <ChannelBotRow+ bot={bot}+ editable={props.editable}+ removing={removeBotMutation.isPending}+ onOpen={() => props.onOpenBot(bot.id)}+ onCopyWebhook={() => void copyWebhook()}+ onRemove={() => removeBot(bot.id, bot.name)}+ />+ )}+ </For></div>- }- >- <div class="min-h-0 flex-1 overflow-y-auto">- <For each={bots()}>- {(bot) => (- <ChannelBotRow- bot={bot}- editable={props.editable}- removing={removeBotMutation.isPending}- onOpen={() => props.onOpenBot(bot.id)}- onCopyWebhook={() => void copyWebhook()}- onRemove={() => removeBot(bot.id, bot.name)}- />- )}- </For>- </div>+ </Show></Show>- </Show>+ </Scroll></div>- </Panel.Body>- </Panel>+ </Card.Body>+ </Card>);}diff --git a/apps/web/src/features/channel/Participants/ChannelJoinLinkButton.tsx b/apps/web/src/features/channel/Participants/ChannelJoinLinkButton.tsxindex e9b6fff3f7..7ea40bb569 100644--- a/apps/web/src/features/channel/Participants/ChannelJoinLinkButton.tsx+++ b/apps/web/src/features/channel/Participants/ChannelJoinLinkButton.tsx@@ -72,7 +72,6 @@ export function ChannelJoinLinkButton(props: { channelId: string }) {return (<Buttonvariant="outline"- size="sm"disabled={getJoinLinkMutation.isPending}onClick={() => void copyJoinLink()}>diff --git a/apps/web/src/features/channel/Participants/ChannelParticipantsTab.tsx b/apps/web/src/features/channel/Participants/ChannelParticipantsTab.tsxindex 9e187d428b..5475df67ab 100644--- a/apps/web/src/features/channel/Participants/ChannelParticipantsTab.tsx+++ b/apps/web/src/features/channel/Participants/ChannelParticipantsTab.tsx@@ -1,7 +1,7 @@import { useSplitLayout } from '@components/app/split-layout/layout';import { useChannel, useChannelType } from '@core/context/channels';import { useUserId } from '@core/context/user';-import { idToEmail } from '@core/user';+import { getDisplayName, idToEmail, tryMacroId } from '@core/user';import { useChannelParticipantsQuery } from '@queries/channel/channel-participants';import { usePatchChannelMutation } from '@queries/channel/channels';@@ -13,7 +13,7 @@ import {import { useCurrentTeamQuery } from '@queries/team/teams';import { ChannelType } from '@service-storage/generated/schemas/channelType';import { ParticipantRole } from '@service-storage/generated/schemas/participantRole';-import { Panel } from '@ui';+import { Card } from '@ui';import { createSignal, Show } from 'solid-js';import { ChannelBotsPanel } from './ChannelBotsPanel';import { ChannelJoinLinkButton } from './ChannelJoinLinkButton';@@ -83,6 +83,9 @@ export function ChannelParticipantsTab(props: {const email = idToEmail(participant.user_id).toLowerCase();return (participant.user_id.toLowerCase().includes(query) ||+ getDisplayName(tryMacroId(participant.user_id))+ .toLowerCase()+ .includes(query) ||email.includes(query) ||participant.role.toLowerCase().includes(query));@@ -141,59 +144,56 @@ export function ChannelParticipantsTab(props: {);};- // The mobile bottom chrome (dock + accessory regions) floats over the- // layout, so the panel stack has to end above it for the participants list- // to scroll clear of it.return (- <div class="h-full overflow-hidden flex justify-center p-2 touch:pb-[calc(var(--mobile-content-inset-bottom,0px)+0.5rem)]">- <div class="max-w-200 size-full flex flex-col gap-2">- <Panel depth={2} class="min-h-0 flex-1 overflow-hidden text-ink">- <Panel.Header class="justify-between gap-2 px-6">- <div class="text-sm font-semibold">Participants</div>- <Show when={channelType() === ChannelType.private}>- <ChannelJoinLinkButton channelId={props.channelId} />- </Show>- </Panel.Header>- <Panel.Toolbar class="h-15.25 px-2">- <ParticipantsSearchInput- value={searchQuery()}- onInput={setSearchQuery}- />- </Panel.Toolbar>- <Panel.Body>- <div class="flex h-full flex-col">- <Show when={canManageChannel() && supportsTeamSettings()}>- <ChannelTeamSettingsPanel- isTeamChannel={isTeamChannel()}- autoJoinTeam={autoJoinTeam()}- canConvertToTeam={canConvertToTeam()}- conversionUnavailableReason={conversionUnavailableReason()}- disabled={patchChannelMutation.isPending}- onConvertToTeam={convertToTeamChannel}- onAutoJoinTeamChange={updateAutoJoinTeam}- />+ <div class="min-h-0 flex-1 overflow-hidden">+ <div class="mx-auto flex h-full w-full max-w-3xl flex-col gap-4 p-4 touch:pb-[calc(var(--mobile-content-inset-bottom,0px)+1rem)]">+ <Card class="min-h-0 flex-1">+ <Card.Header class="shrink-0">+ <div class="flex flex-wrap items-center justify-between gap-2">+ <Card.Title>Participants</Card.Title>+ <Show when={channelType() === ChannelType.private}>+ <ChannelJoinLinkButton channelId={props.channelId} /></Show>+ </div>+ </Card.Header>+ <Card.Body class="flex min-h-0 flex-1 flex-col gap-3">+ <div class="flex shrink-0 flex-col gap-3">+ <ParticipantsSearchInput+ value={searchQuery()}+ onInput={setSearchQuery}+ /><Show when={isEditable()}>- <div class="px-6 py-3 border-b border-edge-muted shrink-0">+ <div class="-mx-3 border-y border-edge-muted px-3 py-4"><ParticipantsAddPanelparticipants={participants}onAddParticipants={addParticipants}/></div></Show>- <div class="relative min-h-0 flex-1">- <ParticipantsList- participants={filteredParticipants}- searchQuery={searchQuery}- currentUserId={userId() ?? undefined}- editable={isEditable()}- onParticipantClick={openDirectMessage}- onRemoveParticipant={removeParticipant}- />- </div></div>- </Panel.Body>- </Panel>+ <div class="min-h-0 flex-1">+ <ParticipantsList+ participants={filteredParticipants}+ searchQuery={searchQuery}+ currentUserId={userId() ?? undefined}+ editable={isEditable()}+ onParticipantClick={openDirectMessage}+ onRemoveParticipant={removeParticipant}+ />+ </div>+ </Card.Body>+ </Card>+ <Show when={canManageChannel() && supportsTeamSettings()}>+ <ChannelTeamSettingsPanel+ isTeamChannel={isTeamChannel()}+ autoJoinTeam={autoJoinTeam()}+ canConvertToTeam={canConvertToTeam()}+ conversionUnavailableReason={conversionUnavailableReason()}+ disabled={patchChannelMutation.isPending}+ onConvertToTeam={convertToTeamChannel}+ onAutoJoinTeamChange={updateAutoJoinTeam}+ />+ </Show><Show when={props.botManagementEnabled}><ChannelBotsPanelchannelId={props.channelId}diff --git a/apps/web/src/features/channel/Participants/ChannelTeamSettingsPanel.tsx b/apps/web/src/features/channel/Participants/ChannelTeamSettingsPanel.tsxindex 25342bef5d..c186ba2764 100644--- a/apps/web/src/features/channel/Participants/ChannelTeamSettingsPanel.tsx+++ b/apps/web/src/features/channel/Participants/ChannelTeamSettingsPanel.tsx@@ -1,4 +1,4 @@-import { ToggleSwitch } from '@ui';+import { Card, ToggleSwitch } from '@ui';import { Show } from 'solid-js';export function ChannelTeamSettingsPanel(props: {@@ -11,53 +11,48 @@ export function ChannelTeamSettingsPanel(props: {onAutoJoinTeamChange: (enabled: boolean) => void;}) {return (- <section class="shrink-0 border-b border-edge-muted text-ink">- <div class="flex min-h-10 items-center border-b border-edge-muted px-6 text-sm font-semibold">- Team access- </div>- <div class="divide-y divide-edge-muted px-6">- <div class="flex items-center justify-between gap-4 py-3">- <div class="min-w-0">- <div class="text-sm font-medium">Team channel</div>- <p class="text-xs text-ink-muted">- {props.isTeamChannel- ? 'This channel belongs to your team.'- : (props.conversionUnavailableReason ??- 'Convert this channel into a team channel. This cannot be undone.')}- </p>- </div>- <ToggleSwitch- size="md"- checked={props.isTeamChannel}- disabled={- props.disabled || props.isTeamChannel || !props.canConvertToTeam- }- onChange={(checked) => checked && props.onConvertToTeam()}- label="Team channel"- labelClass="sr-only"- />- </div>-- <Show when={props.isTeamChannel}>- <div class="flex items-center justify-between gap-4 py-3">- <div class="min-w-0">- <div class="text-sm font-medium">Team auto-join</div>- <p class="text-xs text-ink-muted">- Add current and future team members to this channel- automatically.- </p>+ <section>+ <Card>+ <Card.Header>+ <Card.Title>Team access</Card.Title>+ </Card.Header>+ <Card.Body>+ <div class="flex flex-col gap-4">+ <div>+ <ToggleSwitch+ checked={props.isTeamChannel}+ disabled={+ props.disabled ||+ props.isTeamChannel ||+ !props.canConvertToTeam+ }+ onChange={(checked) => checked && props.onConvertToTeam()}+ label="Team channel"+ />+ <Card.Description>+ {props.isTeamChannel+ ? 'This channel belongs to your team.'+ : (props.conversionUnavailableReason ??+ 'Convert this channel into a team channel. This cannot be undone.')}+ </Card.Description></div>- <ToggleSwitch- size="md"- checked={props.autoJoinTeam}- disabled={props.disabled}- onChange={props.onAutoJoinTeamChange}- label="Team auto-join"- labelClass="sr-only"- />+ <Show when={props.isTeamChannel}>+ <div>+ <ToggleSwitch+ checked={props.autoJoinTeam}+ disabled={props.disabled}+ onChange={props.onAutoJoinTeamChange}+ label="Team auto-join"+ />+ <Card.Description>+ Add current and future team members to this channel+ automatically.+ </Card.Description>+ </div>+ </Show></div>- </Show>- </div>+ </Card.Body>+ </Card></section>);}diff --git a/apps/web/src/features/channel/Participants/ParticipantsAddPanel.tsx b/apps/web/src/features/channel/Participants/ParticipantsAddPanel.tsxindex 487b58c8b5..0fc7089b0f 100644--- a/apps/web/src/features/channel/Participants/ParticipantsAddPanel.tsx+++ b/apps/web/src/features/channel/Participants/ParticipantsAddPanel.tsx@@ -6,6 +6,7 @@ import {} from '@core/user';import { getDestinationFromOptions } from '@core/util/destination';import type { ChannelParticipant } from '@queries/channel/types';+import { Button, inputClasses } from '@ui';import { type Accessor, createSignal } from 'solid-js';export function ParticipantsAddPanel(props: {@@ -36,25 +37,27 @@ export function ParticipantsAddPanel(props: {};return (- <div class="flex flex-col gap-2 md:flex-row md:items-center">- <div class="min-w-0 flex-1 rounded-lg border border-edge-muted bg-surface px-3 py-2 text-sm text-ink outline-none focus-within:border-accent">+ <div class="flex flex-wrap items-center gap-2">+ <div class="min-w-0 flex-1 basis-60"><RecipientSelector<'user'>setSelectedOptions={setSelectedUsers}selectedOptions={selectedUsers()}- placeholder="[email protected]"+ placeholder="Add participants by name or email"options={options}- hideBordernoPadding+ class={inputClasses({+ class:+ 'h-auto min-h-9 rounded-full py-0.5 focus-within:ring-2 focus-within:ring-edge-muted',+ })}/></div>- <button- type="button"+ <Button+ variant="outline"disabled={selectedUsers().length === 0}onClick={handleAddParticipants}- class="w-full shrink-0 rounded-xs bg-accent px-3 py-1.5 text-sm font-medium text-surface transition-colors hover:bg-accent/90 disabled:opacity-50 md:w-auto">{selectedUsers().length > 1 ? 'Add Participants' : 'Add Participant'}- </button>+ </Button></div>);}diff --git a/apps/web/src/features/channel/Participants/ParticipantsEmptyState.tsx b/apps/web/src/features/channel/Participants/ParticipantsEmptyState.tsxindex 9e1e309af6..abf100d966 100644--- a/apps/web/src/features/channel/Participants/ParticipantsEmptyState.tsx+++ b/apps/web/src/features/channel/Participants/ParticipantsEmptyState.tsx@@ -1,9 +1,15 @@+import { Item } from '@ui';+export function ParticipantsEmptyState(props: { searchQuery: string }) {return (- <div class="flex min-h-60 items-center justify-center border-b border-edge-muted px-4 text-center text-sm text-ink-muted">- {props.searchQuery.trim().length > 0- ? `No participants match "${props.searchQuery}".`- : 'No participants found.'}- </div>+ <Item role="status">+ <Item.Content>+ <Item.Description>+ {props.searchQuery.trim().length > 0+ ? `No participants match "${props.searchQuery}".`+ : 'No participants found.'}+ </Item.Description>+ </Item.Content>+ </Item>);}diff --git a/apps/web/src/features/channel/Participants/ParticipantsList.test.tsx b/apps/web/src/features/channel/Participants/ParticipantsList.test.tsxnew file mode 100644index 0000000000..8042ee5b73--- /dev/null+++ b/apps/web/src/features/channel/Participants/ParticipantsList.test.tsx@@ -0,0 +1,149 @@+/** @vitest-environment jsdom */++import type { ChannelParticipant } from '@queries/channel/types';+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import { createSignal } from 'solid-js';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { ParticipantsList } from './ParticipantsList';++vi.mock('@core/component/UserIcon', () => ({+ UserIcon: (props: { id: string }) => <span data-avatar={props.id} />,+}));+vi.mock('@core/user', () => ({+ getDisplayName: (id: string) => id,+ idToEmail: (id: string) => id,+ tryMacroId: (id: string) => id,+}));+vi.mock('@ui', async () => ({+ ...(await import('@ui/components/Badge')),+ ...(await import('@ui/components/Button')),+ ...(await import('@ui/components/Item')),+ ...(await import('@ui/components/Scroll')),+}));++// jsdom has no layout: provide measurements while using the real Scroll,+// Virtualizer, and participant rows, including their event handlers.+const observers = new Set<ResizeObserverStub>();+class ResizeObserverStub {+ targets = new Set<Element>();+ constructor(readonly callback: ResizeObserverCallback) {+ observers.add(this);+ }+ observe(target: Element) {+ this.targets.add(target);+ }+ unobserve(target: Element) {+ this.targets.delete(target);+ }+ disconnect() {+ observers.delete(this);+ }+}++async function measure(viewport: Element) {+ // Resizing the viewport mounts rows; subsequent passes measure those rows.+ for (let pass = 0; pass < 3; pass++) {+ await Promise.resolve();+ for (const observer of observers) {+ observer.callback(+ Array.from(observer.targets, (target) => ({+ target,+ contentRect: new DOMRect(0, 0, 500, target === viewport ? 280 : 70),+ borderBoxSize: [],+ contentBoxSize: [],+ devicePixelContentBoxSize: [],+ })),+ observer as unknown as ResizeObserver+ );+ }+ }+}++beforeEach(() => {+ vi.stubGlobal('ResizeObserver', ResizeObserverStub);+ vi.spyOn(HTMLElement.prototype, 'offsetParent', 'get').mockImplementation(+ function (this: HTMLElement) {+ return this.parentElement;+ }+ );+});+afterEach(() => {+ cleanup();+ observers.clear();+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});++it('virtualizes a large unfiltered list in the Scroll viewport and supports filtering', async () => {+ const all: ChannelParticipant[] = Array.from(+ { length: 5000 },+ (_, index) => ({+ channel_id: 'channel',+ user_id: `person-${index}@example.com`,+ joined_at: '2026-10-05T00:00:00Z',+ role: 'member',+ })+ );+ const [participants, setParticipants] = createSignal(all);+ const [search, setSearch] = createSignal('');+ const onParticipantClick = vi.fn();+ const onRemoveParticipant = vi.fn();+ const { container } = render(() => (+ <ParticipantsList+ participants={participants}+ searchQuery={search}+ editable+ onParticipantClick={onParticipantClick}+ onRemoveParticipant={onRemoveParticipant}+ />+ ));+ const viewport = container.querySelector<HTMLDivElement>(+ '[aria-label="Participants list"] > div'+ )!;+ await measure(viewport);+ const mountedRows = () => screen.getAllByRole('link');+ expect(mountedRows().length).toBeGreaterThan(0);+ expect(mountedRows().length).toBeLessThan(40);+ expect(container.querySelectorAll('[data-avatar]').length).toBeLessThan(40);+ expect(+ screen.getByRole('link', { name: `Message ${all[0].user_id}` })+ ).toBeTruthy();++ viewport.scrollTop = 35004;+ fireEvent.scroll(viewport);+ await measure(viewport);+ expect(+ screen.queryByRole('link', { name: `Message ${all[0].user_id}` })+ ).toBeNull();+ expect(mountedRows().length).toBeLessThan(40);+ const target = mountedRows()[0];+ const targetId = target.getAttribute('aria-label')!.replace('Message ', '');+ fireEvent.click(target);+ expect(onParticipantClick).toHaveBeenCalledWith(+ targetId,+ expect.any(MouseEvent)+ );+ fireEvent.click(+ screen.getAllByRole('button', { name: 'Remove participant' })[0]+ );+ expect(onRemoveParticipant).toHaveBeenCalledWith(targetId);+ expect(onParticipantClick).toHaveBeenCalledTimes(1);++ setSearch('person-4999');+ setParticipants([all[4999]]);+ await measure(viewport);+ expect(mountedRows()).toHaveLength(1);+ expect(+ screen.getByRole('link', { name: `Message ${all[4999].user_id}` })+ ).toBeTruthy();++ setSearch('no match');+ setParticipants([]);+ expect(screen.getByRole('status').textContent).toContain(+ 'No participants match "no match".'+ );+ setSearch('');+ setParticipants(all);+ await measure(viewport);+ expect(mountedRows().length).toBeLessThan(40);+});diff --git a/apps/web/src/features/channel/Participants/ParticipantsList.tsx b/apps/web/src/features/channel/Participants/ParticipantsList.tsxindex f2e97cd686..3e511c64a4 100644--- a/apps/web/src/features/channel/Participants/ParticipantsList.tsx+++ b/apps/web/src/features/channel/Participants/ParticipantsList.tsx@@ -1,7 +1,7 @@-import { CustomScrollbar } from '@core/component/CustomScrollbar';import type { ChannelParticipant } from '@queries/channel/types';+import { Scroll } from '@ui';import { type Accessor, createSignal, Show } from 'solid-js';-import { VList } from 'virtua/solid';+import { Virtualizer } from 'virtua/solid';import { ParticipantsEmptyState } from './ParticipantsEmptyState';import { ParticipantsListItem } from './ParticipantsListItem';@@ -16,49 +16,34 @@ export function ParticipantsList(props: {) => void | Promise<void>;onRemoveParticipant: (participantId: string) => void;}) {- const [listWrapperRef, setListWrapperRef] = createSignal<HTMLDivElement>();-- const scrollContainer = () => {- const el = listWrapperRef();- if (!el) return undefined;- return (- (el.querySelector(- '[data-participants-list-container]'- ) as HTMLElement | null) ?? undefined- );- };+ const [scrollRoot, setScrollRoot] = createSignal<HTMLDivElement>();return (- <Show- when={props.participants().length > 0}- fallback={<ParticipantsEmptyState searchQuery={props.searchQuery()} />}- >- <div ref={setListWrapperRef} class="relative h-full min-h-0">- <VList- data={props.participants()}- class="h-full scrollbar-hidden"- style={{- height: '100%',- width: '100%',- }}- bufferSize={500}- data-participants-list-container- >- {(participant, index) => (- <ParticipantsListItem- participant={participant}- currentUserId={props.currentUserId}- editable={props.editable}- isLast={index() === props.participants().length - 1}- onClick={(event) =>- props.onParticipantClick(participant.user_id, event)- }- onRemove={() => props.onRemoveParticipant(participant.user_id)}- />- )}- </VList>- <CustomScrollbar scrollContainer={scrollContainer} />- </div>- </Show>+ <Scroll aria-label="Participants list" scrollRef={setScrollRoot}>+ <Show+ when={props.participants().length > 0}+ fallback={<ParticipantsEmptyState searchQuery={props.searchQuery()} />}+ >+ <div class="py-1">+ <Virtualizer+ data={props.participants()}+ scrollRef={scrollRoot()}+ startMargin={4}+ >+ {(participant) => (+ <ParticipantsListItem+ participant={participant}+ currentUserId={props.currentUserId}+ editable={props.editable}+ onClick={(event) =>+ props.onParticipantClick(participant.user_id, event)+ }+ onRemove={() => props.onRemoveParticipant(participant.user_id)}+ />+ )}+ </Virtualizer>+ </div>+ </Show>+ </Scroll>);}diff --git a/apps/web/src/features/channel/Participants/ParticipantsListItem.test.tsx b/apps/web/src/features/channel/Participants/ParticipantsListItem.test.tsxnew file mode 100644index 0000000000..2bcfadbd3a--- /dev/null+++ b/apps/web/src/features/channel/Participants/ParticipantsListItem.test.tsx@@ -0,0 +1,80 @@+/** @vitest-environment jsdom */++import type { ChannelParticipant } from '@queries/channel/types';+import { fireEvent, render, screen } from '@solidjs/testing-library';+import { describe, expect, it, vi } from 'vitest';+import { ParticipantsListItem } from './ParticipantsListItem';++vi.mock('@core/component/UserIcon', () => ({+ UserIcon: () => <span>Avatar</span>,+}));++vi.mock('@core/user', () => ({+ getDisplayName: () => 'Alex Smith',+ idToEmail: () => '[email protected]',+ tryMacroId: (id: string) => id,+}));++vi.mock('@ui', async () => ({+ ...(await import('@ui/components/Badge')),+ ...(await import('@ui/components/Button')),+ ...(await import('@ui/components/Item')),+}));++const participant: ChannelParticipant = {+ channel_id: 'channel',+ user_id: 'macro|[email protected]',+ joined_at: '2026-10-05T00:00:00Z',+ role: 'member',+};++function setup(overrides: Partial<ChannelParticipant> = {}) {+ const onClick = vi.fn();+ const onRemove = vi.fn();+ render(() => (+ <ParticipantsListItem+ participant={{ ...participant, ...overrides }}+ currentUserId="macro|[email protected]"+ editable+ onClick={onClick}+ onRemove={onRemove}+ />+ ));+ return { onClick, onRemove };+}++describe('ParticipantsListItem', () => {+ it('links the avatar, name, email, and role to the DM', () => {+ const { onClick } = setup();+ const link = screen.getByRole('link', { name: 'Message Alex Smith' });+ for (const text of ['Avatar', 'Alex Smith', '[email protected]', 'Member']) {+ const target = screen.getByText(text);+ expect(link.contains(target)).toBe(true);+ fireEvent.click(target, { shiftKey: true });+ }+ expect(onClick).toHaveBeenCalledTimes(4);+ expect(onClick.mock.calls[0][0].shiftKey).toBe(true);+ fireEvent.keyDown(link, { key: 'Enter' });+ expect(onClick).toHaveBeenCalledTimes(5);+ });++ it('keeps removal outside the DM link', () => {+ const { onClick, onRemove } = setup();+ const remove = screen.getByRole('button', { name: 'Remove participant' });+ expect(screen.getByRole('link').contains(remove)).toBe(false);+ fireEvent.click(remove);+ expect(onRemove).toHaveBeenCalledOnce();+ expect(onClick).not.toHaveBeenCalled();+ });++ it('keeps owner removal disabled', () => {+ const { onClick, onRemove } = setup({ role: 'owner' });+ const remove = screen.getByRole('button', {+ name: 'Cannot remove participant',+ });+ expect(remove.hasAttribute('disabled')).toBe(true);+ fireEvent.click(remove);+ expect(onRemove).not.toHaveBeenCalled();+ expect(onClick).not.toHaveBeenCalled();+ });+});diff --git a/apps/web/src/features/channel/Participants/ParticipantsListItem.tsx b/apps/web/src/features/channel/Participants/ParticipantsListItem.tsxindex 78255508f2..759a6ddf09 100644--- a/apps/web/src/features/channel/Participants/ParticipantsListItem.tsx+++ b/apps/web/src/features/channel/Participants/ParticipantsListItem.tsx@@ -1,25 +1,29 @@import { UserIcon } from '@core/component/UserIcon';-import { idToEmail } from '@core/user';+import { getDisplayName, idToEmail, tryMacroId } from '@core/user';import { useSplitNavigationHandler } from '@core/util/useSplitNavigationHandler';import IconX from '@phosphor/x.svg';import type { ChannelParticipant } from '@queries/channel/types';-import { Button } from '@ui';+import { Badge, Button, Item } from '@ui';import { Show } from 'solid-js';export function ParticipantsListItem(props: {participant: ChannelParticipant;currentUserId?: string;editable: boolean;- isLast?: boolean;onClick: (event: MouseEvent) => void | Promise<void>;onRemove: () => void;}) {- const canRemove =+ const canRemove = () =>props.editable &&props.currentUserId !== props.participant.user_id &&props.participant.role !== 'owner';- const navigationHandlers = useSplitNavigationHandler<HTMLButtonElement>(+ const displayName = () =>+ getDisplayName(tryMacroId(props.participant.user_id), {+ emailFallback: 'local-part',+ }) || idToEmail(props.participant.user_id);++ const navigationHandlers = useSplitNavigationHandler<HTMLAnchorElement>(async (event) => {event.preventDefault();event.stopPropagation();@@ -28,45 +32,56 @@ export function ParticipantsListItem(props: {);return (- <div- class="flex items-center justify-between gap-2 py-2 px-6 text-sm w-full bg-surface hover:bg-hover"- classList={{ 'border-b': !props.isLast }}- style={{ 'border-color': 'var(--color-edge-muted)' }}- >- <button+ <div class="relative">+ <a{...navigationHandlers}- type="button"- class="flex min-w-0 flex-1 items-center gap-3 rounded-xs text-left focus:outline-none"+ role="link"+ tabIndex={0}+ aria-label={`Message ${displayName()}`}+ class="block rounded-xl hover:bg-hover focus-visible:outline-2 focus-visible:outline-edge"+ onKeyDown={(event) => {+ if (event.key !== 'Enter') return;+ event.preventDefault();+ event.currentTarget.click();+ }}>- <div class="shrink-0">+ <Item class={props.editable ? 'pr-12' : undefined}><UserIconid={props.participant.user_id}size="lg"isDeleted={false}+ suppressClick+ showTooltip={false}/>- </div>- <div class="min-w-0 flex-1">- <div class="ph-no-capture text-sm font-medium text-ink truncate">- {idToEmail(props.participant.user_id)}- </div>- <div class="text-xs text-ink-muted capitalize">- {props.participant.role}- </div>- </div>- </button>+ <Item.Content>+ <Item.Title class="truncate">{displayName()}</Item.Title>+ <Item.Description class="truncate">+ {idToEmail(props.participant.user_id)}+ </Item.Description>+ </Item.Content>+ <Item.Actions>+ <Badge variant="outline" size="sm">+ {+ { owner: 'Owner', admin: 'Admin', member: 'Member' }[+ props.participant.role+ ]+ }+ </Badge>+ </Item.Actions>+ </Item>+ </a><Show when={props.editable}>- <div class="shrink-0">+ <div class="absolute right-3 top-1/2 -translate-y-1/2"><Buttonlabel={- canRemove ? 'Remove participant' : 'Cannot remove participant'+ canRemove() ? 'Remove participant' : 'Cannot remove participant'}- variant="ghost"size="icon-sm"- disabled={!canRemove}+ disabled={!canRemove()}onClick={(event) => {event.preventDefault();event.stopPropagation();- if (!canRemove) return;+ if (!canRemove()) return;props.onRemove();}}>diff --git a/apps/web/src/features/channel/Participants/ParticipantsSearchInput.tsx b/apps/web/src/features/channel/Participants/ParticipantsSearchInput.tsxindex 3ff80658b3..f9c722628d 100644--- a/apps/web/src/features/channel/Participants/ParticipantsSearchInput.tsx+++ b/apps/web/src/features/channel/Participants/ParticipantsSearchInput.tsx@@ -1,19 +1,25 @@import MagnifyingGlassIcon from '@phosphor/magnifying-glass.svg';+import { InputGroup } from '@ui';export function ParticipantsSearchInput(props: {value: string;onInput: (value: string) => void;}) {return (- <div class="flex items-center gap-2 w-full border border-edge rounded-sm px-4 py-2">- <MagnifyingGlassIcon class="size-4 text-ink-muted shrink-0" />- <input- type="text"+ <InputGroup class="rounded-full">+ <InputGroup.Input+ type="search"+ aria-label="Search participants"value={props.value}onInput={(event) => props.onInput(event.currentTarget.value)}- placeholder="Search"- class="flex-1 min-w-0 text-sm bg-surface border-none outline-none text-ink placeholder:text-ink-placeholder"+ placeholder="Search participants"/>- </div>+ <InputGroup.Addon>+ <MagnifyingGlassIcon />+ </InputGroup.Addon>+ <InputGroup.Addon align="inline-end">+ <InputGroup.ClearButton />+ </InputGroup.Addon>+ </InputGroup>);}diff --git a/apps/web/src/features/crm/components/record-section.tsx b/apps/web/src/features/crm/components/record-section.tsxindex 9385eaf083..513ed77ded 100644--- a/apps/web/src/features/crm/components/record-section.tsx+++ b/apps/web/src/features/crm/components/record-section.tsx@@ -1,23 +1,22 @@import type { JSX, ParentProps } from 'solid-js';import { Show } from 'solid-js';-/** A full-height record tab: a title row with actions above scrolling content. */+/** A named record tab with optional actions above scrolling content. */export function RecordSection(props: ParentProps<{ title: string; actions?: JSX.Element }>) {return (- <div class="flex size-full min-h-0 flex-col">- <div class="flex min-w-0 flex-wrap items-center gap-3 px-4 py-3">- <h2 class="text-sm font-medium text-ink-muted">{props.title}</h2>- <Show when={props.actions}>+ <section aria-label={props.title} class="flex size-full min-h-0 flex-col">+ <Show when={props.actions}>+ <div class="flex min-w-0 shrink-0 flex-wrap items-center gap-3 px-4 py-3"><div class="ml-auto flex shrink-0 items-center gap-2.5">{props.actions}</div>- </Show>- </div>+ </div>+ </Show><div class="min-h-0 flex-1 overflow-y-auto px-2 pb-6">{props.children}</div>- </div>+ </section>);}diff --git a/apps/web/src/features/crm/components/record-tabs.tsx b/apps/web/src/features/crm/components/record-tabs.tsxindex bd5dfe51e8..8f630a3385 100644--- a/apps/web/src/features/crm/components/record-tabs.tsx+++ b/apps/web/src/features/crm/components/record-tabs.tsx@@ -1,59 +1,27 @@-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 { Tabs } from '@ui/components/Tabs';import {CRM_RECORD_SECTION_LABELS,type CrmRecordSection,} from '../core/record';-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.- */+/** Content navigation below the company or contact header. */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 (- <TabsInset- list={list()}- value={props.value}- onChange={(value) => props.onChange(value as S)}- aria-label="Record sections"- class="shrink-0 whitespace-nowrap"- />+ <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>);}diff --git a/apps/web/src/features/crm/context/crm-context.tsx b/apps/web/src/features/crm/context/crm-context.tsxindex 8ab8aad0a3..73278c7769 100644--- a/apps/web/src/features/crm/context/crm-context.tsx+++ b/apps/web/src/features/crm/context/crm-context.tsx@@ -38,7 +38,7 @@ export type CrmContext = {copyRecordLink(target: {type: 'company' | 'contact';id: string;- }): Promise<void>;+ }): Promise<boolean>;createNavigation(): {splitId: string | undefined;openWithSplit(diff --git a/apps/web/src/features/crm/crm-company.tsx b/apps/web/src/features/crm/crm-company.tsxindex b3e69fb65a..8e064189ce 100644--- a/apps/web/src/features/crm/crm-company.tsx+++ b/apps/web/src/features/crm/crm-company.tsx@@ -15,11 +15,10 @@ export function Company(props: ComponentProps<typeof View>) {);}-/** The company's section tabs, for a host's top bar. */+/** The company's section tabs, below a host's header. */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 81ba69a1a5..475e86105a 100644--- a/apps/web/src/features/crm/crm-contact.tsx+++ b/apps/web/src/features/crm/crm-contact.tsx@@ -15,11 +15,10 @@ export function Contact(props: ComponentProps<typeof View>) {);}-/** The contact's section tabs, for a host's top bar. */+/** The contact's section tabs, below a host's header. */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/navigation-adapter.ts b/apps/web/src/features/crm/navigation-adapter.tsindex 978bdb26b9..f84c6f7458 100644--- a/apps/web/src/features/crm/navigation-adapter.ts+++ b/apps/web/src/features/crm/navigation-adapter.ts@@ -29,8 +29,10 @@ export async function copyCrmRecordLink(target: {try {await navigator.clipboard.writeText(buildSimpleEntityUrl(target));toast.success('Link copied to clipboard');+ return true;} catch {toast.failure('Could not copy link. Please try again.');+ return false;}}export function createAppCrmNavigation(): ReturnType<diff --git a/apps/web/src/features/crm/views/company-detail.tsx b/apps/web/src/features/crm/views/company-detail.tsxindex b2c0f17b47..3a1bda13ea 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, Match, Show, Suspense, Switch } from 'solid-js';+import { createMemo, type JSX, 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';@@ -22,7 +22,7 @@ import { useCompanyQuery } from './use-crm';/*** Root of the company detail view, laid out like a project: the host's top- * bar picks the section, Overview shows the company with its description and+ * tab row picks the section, Overview shows the company with its description and* discussion, and the other sections list its team, emails, files, tasks and* calls. Properties and sharing open in the floating information panel.*/@@ -30,6 +30,7 @@ export function Company(props: {companyId: string;section?: CompanySection;headerToggle?: boolean;+ navigation?: JSX.Element;onHidden?: () => void;onOpenContact?: (contact: CompanyContact) => void;}) {@@ -58,75 +59,79 @@ export function Company(props: {floatingdefaultOpen={false}>- <div class="size-full min-h-0 min-w-0">- <Switch>- <Match when={section() === 'overview'}>- <div class="h-full overflow-y-auto px-6 pb-12 pt-12 scrollbar-hidden touch:pt-6">- <div class="mx-auto flex max-w-3xl min-w-0 flex-col gap-6">- <CompanyHeader company={company()} />- <CompanyDiscussionSection companyId={props.companyId} />- </div>- </div>- </Match>- <Match when={section() === 'team'}>- <RecordSection- title="Team"- actions={- <Button- variant="ghost"- size="sm"- // Contact emails are pinned to the company's primary- // domain; disabled until the company has loaded.- disabled={!company()?.domains[0]}- onClick={() => {- const domain = company()?.domains[0]?.domain;- if (domain) openCreateContactModal(props.companyId, domain);- }}- >- <PlusIcon class="size-3.5" />- Add contact- </Button>- }- >- <div class="px-2">- <CompanyContactsSection- company={company()}- contacts={contacts()}- onOpenContact={props.onOpenContact}- />+ <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'}>+ <div class="h-full overflow-y-auto px-6 pb-12 pt-12 scrollbar-hidden touch:pt-6">+ <div class="mx-auto flex max-w-3xl min-w-0 flex-col gap-6">+ <CompanyHeader company={company()} />+ <CompanyDiscussionSection companyId={props.companyId} />+ </div></div>- </RecordSection>- </Match>- <Match when={section() === 'emails'}>- <CompanyEmailsSection company={company()} />- </Match>- <Match when={section() === 'files'}>- <RecordFilesSection scope={scope()} />- </Match>- <Match when={section() === 'tasks'}>- <Suspense- fallback={- <div class="p-6 text-center text-sm text-ink-muted">- Loading…+ </Match>+ <Match when={section() === 'team'}>+ <RecordSection+ title="Team"+ actions={+ <Button+ variant="ghost"+ size="sm"+ // Contact emails are pinned to the company's primary+ // domain; disabled until the company has loaded.+ disabled={!company()?.domains[0]}+ onClick={() => {+ const domain = company()?.domains[0]?.domain;+ if (domain)+ openCreateContactModal(props.companyId, domain);+ }}+ >+ <PlusIcon class="size-3.5" />+ Add contact+ </Button>+ }+ >+ <div class="px-2">+ <CompanyContactsSection+ company={company()}+ contacts={contacts()}+ onOpenContact={props.onOpenContact}+ /></div>- }- >- <Show- when={scope()}+ </RecordSection>+ </Match>+ <Match when={section() === 'emails'}>+ <CompanyEmailsSection company={company()} />+ </Match>+ <Match when={section() === 'files'}>+ <RecordFilesSection scope={scope()} />+ </Match>+ <Match when={section() === 'tasks'}>+ <Suspensefallback={<div class="p-6 text-center text-sm text-ink-muted">Loading…</div>}>- {(current) => <context.RecordTasks scope={current()} />}- </Show>- </Suspense>- </Match>- <Match when={section() === 'calls'}>- <RecordCallsSection scope={scope()} />- </Match>- </Switch>+ <Show+ when={scope()}+ fallback={+ <div class="p-6 text-center text-sm text-ink-muted">+ Loading…+ </div>+ }+ >+ {(current) => <context.RecordTasks scope={current()} />}+ </Show>+ </Suspense>+ </Match>+ <Match when={section() === 'calls'}>+ <RecordCallsSection scope={scope()} />+ </Match>+ </Switch>+ </div></div><SidePanel.Sectiondiff --git a/apps/web/src/features/crm/views/contact-detail.tsx b/apps/web/src/features/crm/views/contact-detail.tsxindex a3d22f7eb8..ad75732cda 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, Match, Show, Suspense, Switch } from 'solid-js';+import { createMemo, type JSX, Match, Show, Suspense, Switch } from 'solid-js';import { useCrmContext } from '../context/crm-context';import {type ContactSection,@@ -23,6 +23,7 @@ export function Contact(props: {contactId: string;section?: ContactSection;headerToggle?: boolean;+ navigation?: JSX.Element;onOpenCompany?: (companyId: string) => boolean;}) {const context = useCrmContext();@@ -51,49 +52,52 @@ export function Contact(props: {floatingdefaultOpen={false}>- <div class="size-full min-h-0 min-w-0">- <Switch>- <Match when={section() === 'overview'}>- <div class="h-full overflow-y-auto px-6 pb-12 pt-12 scrollbar-hidden touch:pt-6">- <div class="mx-auto flex max-w-3xl min-w-0 flex-col gap-6">- <ContactHeader- contact={contact()}- onOpenCompany={props.onOpenCompany}- />- <ContactDiscussionSection contactId={props.contactId} />- </div>- </div>- </Match>- <Match when={section() === 'emails'}>- <ContactEmailsSection contact={contact()} />- </Match>- <Match when={section() === 'files'}>- <RecordFilesSection scope={scope()} />- </Match>- <Match when={section() === 'tasks'}>- <Suspense- fallback={- <div class="p-6 text-center text-sm text-ink-muted">- Loading…+ <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'}>+ <div class="h-full overflow-y-auto px-6 pb-12 pt-12 scrollbar-hidden touch:pt-6">+ <div class="mx-auto flex max-w-3xl min-w-0 flex-col gap-6">+ <ContactHeader+ contact={contact()}+ onOpenCompany={props.onOpenCompany}+ />+ <ContactDiscussionSection contactId={props.contactId} /></div>- }- >- <Show- when={scope()}+ </div>+ </Match>+ <Match when={section() === 'emails'}>+ <ContactEmailsSection contact={contact()} />+ </Match>+ <Match when={section() === 'files'}>+ <RecordFilesSection scope={scope()} />+ </Match>+ <Match when={section() === 'tasks'}>+ <Suspensefallback={<div class="p-6 text-center text-sm text-ink-muted">Loading…</div>}>- {(current) => <context.RecordTasks scope={current()} />}- </Show>- </Suspense>- </Match>- <Match when={section() === 'calls'}>- <RecordCallsSection scope={scope()} />- </Match>- </Switch>+ <Show+ when={scope()}+ fallback={+ <div class="p-6 text-center text-sm text-ink-muted">+ Loading…+ </div>+ }+ >+ {(current) => <context.RecordTasks scope={current()} />}+ </Show>+ </Suspense>+ </Match>+ <Match when={section() === 'calls'}>+ <RecordCallsSection scope={scope()} />+ </Match>+ </Switch>+ </div></div>{/* Sharing is admin-only; hide the whole section for non-adminsdiff --git a/apps/web/src/features/crm/views/copy-link-button.tsx b/apps/web/src/features/crm/views/copy-link-button.tsxindex 094550c90a..86b7cc40dc 100644--- a/apps/web/src/features/crm/views/copy-link-button.tsx+++ b/apps/web/src/features/crm/views/copy-link-button.tsx@@ -1,5 +1,5 @@import LinkIcon from '@phosphor/link.svg';-import { Button } from '@ui';+import { CopyButton } from '@ui';import { useCrmContext } from '../context/crm-context';export function CrmCopyLinkButton(props: {@@ -10,17 +10,14 @@ export function CrmCopyLinkButton(props: {const copyLink = () => copyRecordLink({ type: props.type, id: props.id });return (- <Button- variant="outline"- size="sm"- depth={2}- class="shrink-0 bg-surface"+ <CopyButton+ variant="ghost"+ size="icon-md"label={`Copy ${props.type} link`}tooltip={`Copy ${props.type} link`}- onClick={() => void copyLink()}+ onClick={copyLink}>- <LinkIcon class="size-3.5" />- Copy link- </Button>+ <LinkIcon class="size-3.5!" />+ </CopyButton>);}diff --git a/apps/web/src/features/crm/views/crm-workspace.tsx b/apps/web/src/features/crm/views/crm-workspace.tsxindex 732ecece59..62c5b25725 100644--- a/apps/web/src/features/crm/views/crm-workspace.tsx+++ b/apps/web/src/features/crm/views/crm-workspace.tsx@@ -314,7 +314,7 @@ export function CrmWorkspaceView(props: {</Show><Show when={!selectedCompany()}><Show when={!isTouchDevice()}>- <div class="flex h-12 shrink-0 items-center gap-3 border-b border-edge-muted px-4">+ <div class="flex h-12 shrink-0 items-center gap-3 px-4"><NavigationToggle onExpand={() => setCollapsed(false)}><Suspense>{sidebar()}</Suspense></NavigationToggle>@@ -328,10 +328,10 @@ export function CrmWorkspaceView(props: {<ViewShell.Header><div class="flex min-w-0 items-center justify-between gap-3"><CrmSearchBar />- <div class="ml-auto flex shrink-0 items-center gap-2 [&_button]:h-8 [&_button]:min-w-8 [&_button]:rounded-lg [&_button>svg]:size-4!">+ <div class="ml-auto flex shrink-0 items-center gap-2 [&_button]:h-8 [&_button]:min-w-8 [&_button>svg]:size-4!"><SoupViewContextSort />- <SoupViewContextGroup hideLabel />- <UnifiedFilterDropdown hideLabel />+ <SoupViewContextGroup hideLabel variant="ghost" />+ <UnifiedFilterDropdown hideLabel variant="ghost" /><CompanyDisplayMenu /><Suspense><CompanyViewsMenu hideLabel />diff --git a/apps/web/src/features/crm/views/record-detail.tsx b/apps/web/src/features/crm/views/record-detail.tsxindex 109f420975..f69cf44ca0 100644--- a/apps/web/src/features/crm/views/record-detail.tsx+++ b/apps/web/src/features/crm/views/record-detail.tsx@@ -129,30 +129,12 @@ 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 border-b border-edge-muted px-4">+ <div class="flex h-12 min-w-0 shrink-0 items-center gap-3 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'}@@ -207,6 +189,13 @@ 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}@@ -217,6 +206,13 @@ 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/crm/views/saved-views-menu.tsx b/apps/web/src/features/crm/views/saved-views-menu.tsxindex 164f9984a8..4c6eb55325 100644--- a/apps/web/src/features/crm/views/saved-views-menu.tsx+++ b/apps/web/src/features/crm/views/saved-views-menu.tsx@@ -184,8 +184,7 @@ export function CompanyViewsMenu(props: { hideLabel?: boolean } = {}) {return (<Dropdown open={open()} onOpenChange={handleOpenChange}><Dropdown.Trigger- depth={2}- class="bg-surface"+ variant="ghost"label={props.hideLabel ? 'Views' : undefined}aria-label={props.hideLabel ? 'Views' : undefined}>diff --git a/apps/web/src/features/drive-view/views/CodeDetail.tsx b/apps/web/src/features/drive-view/views/CodeDetail.tsxindex 478d9a5c67..7022f4e5c9 100644--- a/apps/web/src/features/drive-view/views/CodeDetail.tsx+++ b/apps/web/src/features/drive-view/views/CodeDetail.tsx@@ -45,9 +45,7 @@ function CodeDetailContent(props: {return (<div class="flex size-full min-h-0 min-w-0 flex-col overflow-hidden"><Show when={isHtmlFile}>- <div class="flex h-10 shrink-0 items-center justify-end border-edge border-b px-3">- <CodeModeControl mode={mode()} onModeChange={setMode} />- </div>+ <CodeModeControl mode={mode()} onModeChange={setMode} /></Show><div class="relative min-h-0 min-w-0 flex-1 overflow-hidden"><CodeContentdiff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/group-dropdown.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/group-dropdown.tsxindex 931a7344ae..d7a557fad0 100644--- a/apps/web/src/features/next-soup/soup-view/filters-bar/group-dropdown.tsx+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/group-dropdown.tsx@@ -3,7 +3,7 @@ import type {GroupOptionId,} from '@app/features/next-soup/soup-view/group-options';import StackSimpleIcon from '@phosphor/stack-simple.svg';-import { Dropdown, SingleSelectCheck, Tooltip } from '@ui';+import { type ButtonVariant, Dropdown, SingleSelectCheck, Tooltip } from '@ui';import { type Component, For, Show } from 'solid-js';interface GroupDropdownProps {@@ -13,6 +13,7 @@ interface GroupDropdownProps {open?: boolean;onOpenChange?: (open: boolean) => void;hideLabel?: boolean;+ variant?: ButtonVariant;}export const GroupDropdown: Component<GroupDropdownProps> = (props) => {@@ -24,8 +25,9 @@ export const GroupDropdown: Component<GroupDropdownProps> = (props) => {><Tooltip label="Group"><Dropdown.Trigger+ variant={props.variant ?? 'outline'}depth={2}- class="bg-surface"+ class={props.variant === 'ghost' ? undefined : 'bg-surface'}aria-label={props.hideLabel ? 'Group' : undefined}><StackSimpleIcon />diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/soup-view-context-group.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/soup-view-context-group.tsxindex 36ce2aefbd..0228fa2721 100644--- a/apps/web/src/features/next-soup/soup-view/filters-bar/soup-view-context-group.tsx+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/soup-view-context-group.tsx@@ -9,9 +9,13 @@ import { useSoupView } from '@app/features/next-soup/soup-view/soup-view-contextimport { useFeatureFlag } from '@app/lib/analytics/posthog';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { enableSoupGroupBy } from '@core/constant/featureFlags';+import type { ButtonVariant } from '@ui';import { createMemo, createSignal, Show } from 'solid-js';-export const SoupViewContextGroup = (props: { hideLabel?: boolean }) => {+export const SoupViewContextGroup = (props: {+ hideLabel?: boolean;+ variant?: ButtonVariant;+}) => {const panel = useSplitPanelOrThrow();const { soup, extensions } = useSoupView();const groupByEnabled = useFeatureFlag(enableSoupGroupBy);@@ -52,6 +56,7 @@ export const SoupViewContextGroup = (props: { hideLabel?: boolean }) => {open={groupOpen()}onOpenChange={setGroupOpen}hideLabel={props.hideLabel}+ variant={props.variant}/></Show>{/* The board is inherently grouped by stage columns, so grouping only@@ -64,6 +69,7 @@ export const SoupViewContextGroup = (props: { hideLabel?: boolean }) => {open={groupOpen()}onOpenChange={setGroupOpen}hideLabel={props.hideLabel}+ variant={props.variant}/></Show><Show when={component() === 'tag'}>@@ -74,6 +80,7 @@ export const SoupViewContextGroup = (props: { hideLabel?: boolean }) => {open={groupOpen()}onOpenChange={setGroupOpen}hideLabel={props.hideLabel}+ variant={props.variant}/></Show></Show>diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsxindex 2ecfe03773..f5c2899b28 100644--- a/apps/web/src/features/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx@@ -32,7 +32,7 @@ import { PropertyValueIcon } from '@property/component/propertyValue/PropertyValimport { PROPERTY_OPTION_IDS, SYSTEM_PROPERTY_IDS } from '@property/constants';import { useGithubLinkStatusQuery } from '@queries/auth';import { useContacts } from '@queries/contacts/contacts';-import { cn, Dropdown, Tooltip } from '@ui';+import { type ButtonVariant, cn, Dropdown, Tooltip } from '@ui';import {type Accessor,batch,@@ -395,6 +395,7 @@ interface UnifiedFilterDropdownProps {hideTrigger?: boolean;/** Hide the default trigger's text label while retaining its tooltip. */hideLabel?: boolean;+ variant?: ButtonVariant;}const READ_FILTER_OPTIONS: { id: ReadFilter; label: string }[] = [@@ -731,8 +732,9 @@ export const UnifiedFilterDropdown = (<Match when={true}><Tooltip label="Filter" hotkey={TOKENS.soup.filter}><Dropdown.Trigger+ variant={props.variant ?? 'outline'}depth={2}- class="bg-surface"+ class={props.variant === 'ghost' ? undefined : 'bg-surface'}aria-label={props.hideLabel ? 'Filter' : undefined}><FilterIcon />diff --git a/apps/web/src/features/projects/components/project-skeletons.tsx b/apps/web/src/features/projects/components/project-skeletons.tsxindex 43d75c388e..1cef4f9b5c 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, Show } from 'solid-js';+import { For, type JSX, Show } from 'solid-js';import type { ProjectSection } from '../core/project';export function ProjectDescriptionSkeleton() {@@ -30,12 +30,15 @@ export function ProjectsSidebarSkeleton() {}/** Matches the overview's content width, insets, and wrapping property pills. */-export function ProjectContentSkeleton(props: { section: ProjectSection }) {+export function ProjectContentSkeleton(props: {+ section: ProjectSection;+ navigation?: JSX.Element;+}) {return (<ListSkeleton.Root label="Loading project" class="h-full overflow-y-auto"><Showwhen={props.section === 'overview'}- fallback={<ProjectTasksSkeleton />}+ fallback={<ProjectTasksSkeleton navigation={props.navigation} />}><div class="px-6 pb-8 pt-12 touch:pt-6"><div class="mx-auto max-w-3xl">@@ -69,12 +72,13 @@ export function ProjectContentSkeleton(props: { section: ProjectSection }) {);}-function ProjectTasksSkeleton() {+function ProjectTasksSkeleton(props: { navigation?: JSX.Element }) {return (- <div class="space-y-6 p-3 touch:px-4">- <div class="flex flex-wrap items-center justify-between gap-3">- <ListSkeleton.Bar class="h-10 w-96 max-w-full" />- <div class="flex gap-2">+ <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" /><ListSkeleton.Bar class="h-8 w-24" /></div>diff --git a/apps/web/src/features/projects/components/project-task-search.test.tsx b/apps/web/src/features/projects/components/project-task-search.test.tsxnew file mode 100644index 0000000000..ea7e6c5e48--- /dev/null+++ b/apps/web/src/features/projects/components/project-task-search.test.tsx@@ -0,0 +1,59 @@+/** @vitest-environment jsdom */++import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';+import { createSignal } from 'solid-js';+import { expect, it, vi } from 'vitest';+import { ProjectTaskSearch } from './project-task-search';++vi.mock('@ui', async () => ({+ ...(await import('@ui/components/Button')),+ ...(await import('@ui/components/Surface')),+ ...(await import('@ui/utils/classname')),+ Hotkey: () => null,+}));++function setup(initialValue = '') {+ const [value, setValue] = createSignal(initialValue);+ render(() => (+ <ProjectTaskSearch+ projectName="Launch"+ value={value()}+ onValueChange={setValue}+ />+ ));+ return value;+}++it('starts collapsed and focuses search when expanded', async () => {+ const value = setup();+ expect(screen.queryByRole('searchbox')).toBeNull();+ fireEvent.click(screen.getByRole('button', { name: 'Search in Launch' }));+ const input = screen.getByRole('searchbox', { name: 'Search in Launch' });+ expect(input.getAttribute('placeholder')).toBe('Search in Launch');+ await waitFor(() => expect(document.activeElement).toBe(input));+ fireEvent.input(input, { target: { value: 'Release' } });+ expect(value()).toBe('Release');+});++it.each(['button', 'Escape'])(+ 'closes with %s and restores focus',+ async (via) => {+ const value = setup('Release');+ const input = screen.getByRole('searchbox', {+ name: 'Search in Launch',+ });+ await waitFor(() => expect(document.activeElement).toBe(input));+ if (via === 'button') {+ fireEvent.click(screen.getByRole('button', { name: 'Close search' }));+ } else {+ fireEvent.keyDown(input, { key: 'Escape' });+ }+ expect(value()).toBe('');+ expect(screen.queryByRole('searchbox')).toBeNull();+ await waitFor(() =>+ expect(document.activeElement).toBe(+ screen.getByRole('button', { name: 'Search in Launch' })+ )+ );+ }+);diff --git a/apps/web/src/features/projects/components/project-task-search.tsx b/apps/web/src/features/projects/components/project-task-search.tsxnew file mode 100644index 0000000000..20120c4680--- /dev/null+++ b/apps/web/src/features/projects/components/project-task-search.tsx@@ -0,0 +1,53 @@+import { SearchBar } from '@app/components/view-shell/SearchBar';+import MagnifyingGlassIcon from '@phosphor/magnifying-glass.svg';+import { Button } from '@ui';+import { createSignal, createUniqueId, Show } from 'solid-js';++export function ProjectTaskSearch(props: {+ projectName: string;+ value: string;+ onValueChange: (value: string) => void;+}) {+ const [expanded, setExpanded] = createSignal(Boolean(props.value));+ const inputId = createUniqueId();+ let trigger: HTMLButtonElement | undefined;+ const label = () => `Search in ${props.projectName}`;++ const close = () => {+ props.onValueChange('');+ setExpanded(false);+ queueMicrotask(() => trigger?.focus());+ };++ return (+ <Show+ when={expanded()}+ fallback={+ <Button+ ref={trigger}+ variant="outline"+ size="icon-md"+ noTouchResize+ label={label()}+ aria-expanded={false}+ aria-controls={inputId}+ onClick={() => setExpanded(true)}+ >+ <MagnifyingGlassIcon />+ </Button>+ }+ >+ <SearchBar+ id={inputId}+ ref={(input) => queueMicrotask(() => input.focus())}+ label={label()}+ placeholder={label()}+ class="h-8 w-56 shrink-0"+ value={props.value}+ onValueChange={props.onValueChange}+ onClose={close}+ onEscape={close}+ />+ </Show>+ );+}diff --git a/apps/web/src/features/projects/project-detail.tsx b/apps/web/src/features/projects/project-detail.tsxindex 31b7d66b75..88e704195e 100644--- a/apps/web/src/features/projects/project-detail.tsx+++ b/apps/web/src/features/projects/project-detail.tsx@@ -12,11 +12,10 @@ 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 } from '@ui';+import { Button, Tabs } from '@ui';import { Match, Show, Suspense, Switch } from 'solid-js';import { ProjectContentSkeleton } from './components/project-skeletons';import {@@ -127,38 +126,50 @@ 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- 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"- />- }- >+ <EntityDetailTopBar><Show when={source.project()}>{(project) => (<ProjectShareTrigger project={project()} commands={commands} />)}</Show></EntityDetailTopBar>- <div class="relative min-h-0 min-w-0 flex-1">- <Suspense- fallback={<ProjectContentSkeleton section={props.route.section} />}- >+ <div class="relative flex min-h-0 min-w-0 flex-1 flex-col">+ <Suspense fallback={loading()}><Switch><Match when={source.loading() && !source.project()}>- <ProjectContentSkeleton section={props.route.section} />+ {loading()}</Match><Match when={source.project()}>{(project) => (@@ -167,6 +178,7 @@ function ProjectDetailHost(props: ProjectDetailProps) {source={source}commands={commands}section={props.route.section}+ navigation={navigation()}onDelete={props.onDelete ??(() => navigate({ route: tasksSplitRoute, params: {} }))@@ -216,6 +228,7 @@ 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 762fd404f8..c6e4cb1b7e 100644--- a/apps/web/src/features/projects/views/project-tasks-list.tsx+++ b/apps/web/src/features/projects/views/project-tasks-list.tsx@@ -1,4 +1,3 @@-import { SearchBar } from '@app/components/view-shell';import { TasksControls } from '@app/features/tasks-view/components/TasksControls';import { TaskList } from '@app/features/tasks-view/components/task-list/TaskList';import {@@ -9,6 +8,7 @@ import {import PlusIcon from '@phosphor/plus.svg';import { Button } from '@ui';import { type JSX, type ParentProps, Show } from 'solid-js';+import { ProjectTaskSearch } from '../components/project-task-search';import { useProjectsContext } from '../context/projects-context';import { createProjectTasksDataSource } from '../queries/project-tasks';@@ -21,8 +21,10 @@ export type ProjectTasksListProps = Omit<ProjectTasksProviderProps,'children'> & {+ projectName: string;onCreateTask?: () => void;addTasksAction?: JSX.Element;+ navigation?: JSX.Element;};/** Embeds the actual Tasks list, including its controllers, menus and row editors. */@@ -66,19 +68,16 @@ export function ProjectTasksList(props: ProjectTasksListProps) {function ProjectTasksListBody(props: ProjectTasksListProps) {const { state, setState, source } = useTasksView();- let listElement: HTMLDivElement | undefined;return (<div class="flex size-full min-h-0 flex-col">- <div class="flex min-w-0 flex-wrap items-center gap-3 p-3">- <SearchBar- label="Search project tasks"- placeholder="Search tasks"- class="min-w-0 max-w-md flex-1"+ <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}+ <ProjectTaskSearch+ projectName={props.projectName}value={state.search}onValueChange={(search) => setState('search', search)}- onEscape={() => listElement?.focus()}/>- <div class="ml-auto flex shrink-0 items-center gap-3">+ <div class="ml-auto flex shrink-0 items-center gap-2"><TasksControls />{props.addTasksAction}<Show when={props.onCreateTask}>@@ -100,11 +99,7 @@ function ProjectTasksListBody(props: ProjectTasksListProps) {</Button></div></Show>- <TaskList- ref={(element) => {- listElement = element;- }}- />+ <TaskList /></div>);}diff --git a/apps/web/src/features/projects/views/project-workspace.tsx b/apps/web/src/features/projects/views/project-workspace.tsxindex deb4bf5ee8..988f04c230 100644--- a/apps/web/src/features/projects/views/project-workspace.tsx+++ b/apps/web/src/features/projects/views/project-workspace.tsx@@ -37,6 +37,7 @@ export function ProjectWorkspace(props: {source: ProjectSource;commands: ReturnType<ProjectsContext['createCommands']>;section: ProjectSection;+ navigation: JSX.Element;onDelete(): void;onOpenTask: ProjectTasksListProps['onOpenTask'];onCreateTask(): void;@@ -106,6 +107,11 @@ 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">@@ -177,7 +183,9 @@ 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}onCreateTask={canEdit() ? props.onCreateTask : undefined}addTasksAction={diff --git a/apps/web/src/features/projects/views/projects-collection.tsx b/apps/web/src/features/projects/views/projects-collection.tsxindex e920304ffe..f71987143f 100644--- a/apps/web/src/features/projects/views/projects-collection.tsx+++ b/apps/web/src/features/projects/views/projects-collection.tsx@@ -353,11 +353,9 @@ export function ProjectsCollection(props: {</div><Dropdown><Dropdown.Trigger- variant="outline"+ variant="ghost"size="md"square- depth={2}- class="rounded-lg bg-surface"label="Filter due date"><CalendarIcon />diff --git a/apps/web/src/lib/core/component/TopBar/Bar.tsx b/apps/web/src/lib/core/component/TopBar/Bar.tsxindex ef1cf6a7b3..9b8bf4b748 100644--- a/apps/web/src/lib/core/component/TopBar/Bar.tsx+++ b/apps/web/src/lib/core/component/TopBar/Bar.tsx@@ -293,7 +293,7 @@ function BarContent(props: BarProps) {setInitialized: context.setLeftInitialized,}}class={cn(- 'pl-2 flex items-center justify-self-start col-start-1 row-start-1 border-b border-edge',+ 'pl-2 flex items-center justify-self-start col-start-1 row-start-1',truncation().stage.popCenter && !context.suppressPop? 'w-full': 'w-fit'@@ -312,7 +312,7 @@ function BarContent(props: BarProps) {<Show when={centerComponent()}><divclass={cn(- 'flex justify-center items-center border-b border-edge',+ 'flex justify-center items-center',truncation().stage.popCenter && !context.suppressPop? 'col-start-1 col-end-4 bg-edge row-start-2 px-2 w-full': 'col-start-2 col-end-3 row-start-1! bg-[revert] px-0'@@ -336,7 +336,7 @@ function BarContent(props: BarProps) {setInitialized: context.setRightInitialized,}}class={cn(- 'justify-self-end flex justify-end items-center row-start-1 pr-2 border-b border-edge',+ 'justify-self-end flex justify-end items-center row-start-1 pr-2',truncation().stage.popCenter && !context.suppressPop? 'col-start-2 w-full': 'col-start-3 w-fit'diff --git a/docs/AGENT_GUIDE/channels.md b/docs/AGENT_GUIDE/channels.mdindex af2033a9b9..27ada2b200 100644--- a/docs/AGENT_GUIDE/channels.md+++ b/docs/AGENT_GUIDE/channels.md@@ -896,8 +896,12 @@ 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.-Radio group at the top of the channel pane: `Messages` / `Attachments` / `Calls` / `Participants`,-plus `Ask Macro` and `Call` buttons. The `Calls` tab lists recordings for that channel+Bubble tabs sit in their own row below 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 `Calls` tab lists+recordings 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 channelalready @mentioned as context (see ai-chat.md). On mobile it lives in the channel title's@@ -907,8 +911,9 @@ 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, the same tab strip, live viewer avatars, and the `Call` and-`Ask Macro` buttons. In Chat an ellipsis follows the name and opens the same+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 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 be@@ -927,14 +932,29 @@ Leaving from the channel's call controls switches to `Messages` immediately.Disconnect and server cleanup continue after that switch; slow or failed RTCteardown must not leave the channel showing the join screen.+`Participants` tab keeps people and bots within the available page height, with+separate scrolling lists and fixed search/invite controls. Team access appears+between them when available. Search uses the shared+input group; add, invite, and new-bot actions use neutral outline buttons.+The bots section stays compact with few or no bots. Search by display name,+email, or role and clear the search to restore the list; scrolling a long member+list must leave the bots section and participant controls visible.+`Participants` tab:- `Copy invite link`, participant search box.-- Add: combobox `[email protected]` + `Add Participant` button.-- Each row: `<name> Member|Owner` with a `Remove participant` button (owner shows- `Cannot remove participant`, disabled).+- Add: combobox `Add participants by name or email` + `Add Participant` button.+- Dividers frame the Add Participant controls, not the scrolling list. Each row shows the display name above the+ email, both on a single truncated line without text tooltips, and a+ title-cased role badge on the right. Click anywhere on the row or focus it and+ press Enter to open the DM; Shift-click opens it in a new split.+- The separate `Remove participant` button never opens the DM (owner and current+ user show `Cannot remove participant`, disabled).- Team access: `Team channel` switch (disabled until you belong to a team).-- Bots: `New bot`, `Search existing bots…` combobox, `Invite bot` — webhook-powered channel+- Bots: `New bot`, `Search bots by name or handle` combobox, `Invite bot` — webhook-powered channelparticipants.+- Bot rows match participant rows: name above a truncated handle/description,+ a `Bot` badge, and a row link that opens the bot. Copy webhook and Remove are+ separate actions that do not open the bot.## Incoming call ringingdiff --git a/docs/AGENT_GUIDE/documents.md b/docs/AGENT_GUIDE/documents.mdindex cf83ce61cc..cc7c455b44 100644--- a/docs/AGENT_GUIDE/documents.md+++ b/docs/AGENT_GUIDE/documents.md@@ -1981,6 +1981,13 @@ that is broadcast to connected collaborators. A stale revision is rejected:reread and reconsider the change instead of blindly retrying. Unsynced editsstill 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.+## Large-document undo checksIn a disposable Markdown document, change several paragraphs in one edit, thendiff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.mdindex 5cb1a66f51..ced27a3d2c 100644--- a/docs/AGENT_GUIDE/surfaces.md+++ b/docs/AGENT_GUIDE/surfaces.md@@ -12,8 +12,8 @@ keeps loaded items visible. Wait for real rows before navigating or selecting.Low-emphasis right-aligned split-header actions (including Calendar's touch/previewNew event and Channel's idle Call and Ask Macro) are borderless with a rounded-xlbackground on hover. Emphasized variants retain their treatment, including an-active call's green ink and outline frame. Channel header tabs use fully rounded tracks and-selected pills. Button sizes do not change variant colors or framing; individual+active 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; 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@@ -1692,9 +1692,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. Its top bar (the split header, or the-embedded breadcrumb header) has `Overview`, `Team`, `Emails`, `Files`, `Tasks`-and `Calls` tabs, collapsing to icons when narrow. Overview shows the name, pills+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, 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 c0e6116aa9..ce54db3ab8 100644--- a/docs/AGENT_GUIDE/tasks.md+++ b/docs/AGENT_GUIDE/tasks.md@@ -244,8 +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-that top bar. Opening an associated task extends the breadcrumb trail; choose+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; 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`).