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
feat(web): unify controls, headers, and surfaces into one design system (#8526)
teo2452ad7f73da
diff --git a/.agents/rules/web/design-system.md b/.agents/rules/web/design-system.mdnew file mode 100644index 0000000000..8c0e36dc8f--- /dev/null+++ b/.agents/rules/web/design-system.md@@ -0,0 +1,81 @@+---+description: "Controls come from one component per role, at one height per bar, with one selected state, styled only by their own props; overlays share two surfaces."+paths:+ - "apps/web/src/**/*.tsx"+globs: "apps/web/src/**/*.tsx"+alwaysApply: false+---++# Compose controls from the design system++The app looks inconsistent when a surface invents its own switcher, frames+tabs as actions, or resizes a control from the outside. Like Linear, every bar+uses the same few controls in the same places, so a new surface looks right by+construction. Browse them at `/app/component/ui` (Foundations → Controls).++| Role | Use | Never |+| --- | --- | --- |+| Switch a view, section, or one of a few values (`wrap` for preset chips in forms) | `Tabs` | Buttons, a ButtonGroup, or an island acting as tabs |+| Tabs that own panels or a dynamic collection (tables, form pages, rename, add) | `TabSelector` (`Root`, `List`, `Tab`, `Panel`, `AddMenu`) | `@kobalte/core/tabs` in a feature |+| Related header actions (filters, view options, sharing, navigation) | `HeaderActionGroup` | A hand-built bordered row |+| One on/off toggle, or an icon-only layout choice | `Button` with `aria-pressed` | A custom active tint |+| Many options, or header tabs that no longer fit | `Dropdown` / `Select`, or `Tabs iconOnly` first | Scrolling or wrapping a header tab row |+| Create, search in a collection header | `ViewCreateButton`, `ListHeaderSearch` | One-off New or search buttons |+| Text entry, search fields | `Input`, `InputGroup`, `SearchBar`, `settings-input` | A raw `<input>` with its own border, radius, or focus color |+| Menu, popover, floating toolbar or editor panel | `Dropdown`, `Toolbar`, or `menu-surface` on the overlay root | A hand-built fill, border, and shadow, or `bg-menu-glass` |+| Dialog or modal card | `Dialog`, or `elevated-surface` for a custom dialog root | `bg-dialog`/`bg-surface` with its own radius and shadow |+| Loading placeholder, view skeleton | `ListSkeleton` (`Root`, `Row`, `Bar`); `ViewSkeleton` with the view's tabs and `controls` | `animate-pulse` boxes with their own fill |++- **FE-60** Pick the component for the role from the table above, and import+ tabs only from `@ui`. Enforced by ast-grep `tsx-tabs-from-ui`, CI error; the+ Fig editor's panel tabs and the mobile share sheet's `UnderlineTabs` are the+ documented exceptions.+- **FE-61** Tabs are navigation and islands are actions: never put `Tabs` or+ `TabSelector` inside a `HeaderActionGroup` or `ButtonGroup`, and never render+ a tab as a `Button`. A split button (`ButtonGroup` with a menu trigger) is+ its own island; never nest it inside another, including through+ `SidePanel.HeaderActions`. Enforced by ast-grep `tsx-tabs-not-in-action-group`+ and `tsx-no-button-as-tab`, CI error.+- **FE-62** Lay out a desktop header as one row: title or breadcrumbs, then+ view tabs on the left; islands on the right in the order filters, view+ options, New, Search (detail views: entity actions, sharing, navigation,+ detail toggle). Every control in the row is 32px: `Tabs` `md`, `icon-md` for+ icon-only buttons (16px glyph), `md` for labelled ones (14px glyph), 8px+ between islands. Filter, sort, group, and download live in the header, never+ in a second toolbar row; only active filter chips sit below it.+- **FE-63** Style controls only through their props (`variant`, `size`,+ `fullWidth`, `iconOnly`); `class` on a control is for placement (margin,+ width, order, shrink). Never resize or recolor a control from a wrapper+ (`[&_button]:size-8`), and don't use `square` for new icon buttons. Enforced+ for wrappers by ast-grep `tsx-no-descendant-button-styles`, warning.+- **FE-64** Keep one selected state: a selected tab and a pressed button share+ the pressed fill, flat; unselected options keep the outline Button frame. No+ accent text, underlines, or bespoke tints for selection on desktop. The one+ exception is the agent composer's Chat/Code switch: `Tabs variant="track"`,+ a raised pill sliding along the composer tray's track.+- **FE-65** Components own their touch treatment. Never branch on+ `isTouchDevice()` to choose a tab component or variant; set `Tabs`' `touch`+ to the style that surface already uses on touch.+- **FE-66** Single-line inputs are pills at the control heights, like Buttons:+ build them from `Input`, `InputGroup`, or `SearchBar` (`settings-input` in+ settings rows). Filter chips use the same frame (pill, `edge-button` border,+ control fill) with `overlay-*` hovers, never raw `ink/5` tints.+- **FE-67** Overlays share two surfaces: menus, popovers, floating toolbars, and+ editor panels use `menu-surface`; dialogs use `Dialog` (`elevated-surface`).+ Never give overlay content its own fill, border, or shadow. On a `Surface` or+ `Panel`, pass `hideBorder` and keep `rounded-xl bg-surface` (core utilities+ outrank `@utility` classes). Enforced for Kobalte `.Content` and+ `bg-menu-glass` by ast-grep `tsx-overlay-canonical-surface`, CI error; the+ reply composer, mobile drawer, call controls, and fullscreen media viewers+ are the documented exceptions.+- **FE-68** Loading placeholders use the shared shimmer: `ListSkeleton.Bar`+ (a pill; pass size and radius) or `skeleton-shimmer bg-skeleton`. A view's+ skeleton is built from `ViewSkeleton` and mirrors its header (title, view+ tabs, and header controls as placeholders), so change the skeleton in the+ same change as the header. Enforced for pulsing boxes by ast-grep+ `tsx-skeleton-shimmer`, CI error.++Check: `just check` passes the ast-grep rules; the changed bar shows one height,+16px icon glyphs, tabs on the left, and islands only around actions, at desktop+width and narrowed until labels collapse; a changed overlay matches the other+menus (or dialogs) in light and dark mode.diff --git a/.agents/rules/web/ui-primitives.md b/.agents/rules/web/ui-primitives.mdindex 828e5038a7..be193ffe34 100644--- a/.agents/rules/web/ui-primitives.md+++ b/.agents/rules/web/ui-primitives.md@@ -20,6 +20,12 @@ Applies to `apps/web/src/components/ui`, including ports from shadcn-solid.call sites.- Add a co-located `*.docs.tsx` gallery page and focused `*.test.tsx` coveragefor every ported component.+- A primitive owns its look on desktop and touch. Expose role and size props+ (`variant`, `size`, `fullWidth`, `iconOnly`) and typed values, not class hooks+ into its parts (`itemClass`, `labelClass`); `class` places the root.+- Before adding a control, check the roles in+ [`design-system.md`](design-system.md); extend the component for that role+ instead of adding a second one.- Keep `Input` a thin native control. Use `InputGroup` for icons, clear actions,inline Buttons, and shared ButtonGroup framing instead of adding compositionprops to `Input`.diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.mdindex b0ec5e6039..f0a3df3393 100644--- a/apps/web/AGENTS.md+++ b/apps/web/AGENTS.md@@ -93,8 +93,9 @@ ownership. Cancel, logout, and the ten-minute timeout retire pending callbacks.### General- Email draft reads compare server generations before choosing cached delivery state over a restored working copy; only a definitive first-submission rejection permits local send recovery without server cancellation.- Compose settings pages with `features/settings/primitives.tsx` so section headings,- raised composer cards, row spacing, and control shapes stay consistent; keep- Integrations on the shared page width and side padding.+ raised composer cards (`SettingsSurface`), row spacing, and control shapes stay+ consistent; never hand-build a flat `bg-ink/*` card. Keep Integrations on the+ shared page width and side padding.- Keep personal accounts and agent tool connections together in Settings → Integrations;preserve `agent-connections` as an alias for existing links.- Keep bot setup focused on the token-and-SDK workflow; Agent and Ownership@@ -137,6 +138,12 @@ ownership. Cancel, logout, and the ten-minute timeout retire pending callbacks.- Preserve focused chrome editors during deferred split insertion/removal autofocus; explicit return-focus commands may still focus the pane.- Reconcile global focus when focused DOM subtrees are removed; iOS can omit blur events, otherwise floating creation actions stay hidden after search or editor teardown.- Mount the floating mobile AI composer only on the Agents view; other views keep their New action or their own reply/comment composer.+- Keep desktop New actions on `ViewCreateButton`: full width below the inner+ sidebar title and compact in list controls; retain each view's creation+ workflow and mobile controls. Use `ListHeader` for the single-row Email, Drive,+ and Tasks headers: title, filters, view options, New, expandable Search. Put sidebar search in+ `ViewSidebar.Header` so its icon precedes collapse and its field opens above New.+- Keep desktop headers on the shared `ListHeader` / `HeaderActionGroup` pattern: view `Tabs` as pills after the title, 32px semantic islands with 8px gaps on the right, fully rounded elevated frames, New then expandable Search; preserve touch layouts. Pick each control by role from the [design system rule](../../.agents/rules/web/design-system.md); see [UI conventions](../../docs/agent-guide/ui-conventions.md#top-bars). Never use recessed/inset backgrounds in headers.- Keep desktop model and effort controls separate: the model selector opens the catalog and the speedometer opens the runtime's advertised slider stops; retain the mobile effort sheet.- Passive PR mentions must not retry initial GitHub status failures on remount; preserve confirmed status through refetch errors and keep pending data reads out of their parent Suspense boundary.- Keep native booking exit navigation in the route shell, outside page loading boundaries, and use the router so the native hash route stays intact.diff --git a/apps/web/index.html b/apps/web/index.htmlindex 7451b590fe..7be481dbb3 100644--- a/apps/web/index.html+++ b/apps/web/index.html@@ -35,14 +35,14 @@<!--Boot shell: the app frame's background in the saved theme, painted withthe HTML so the screen is never blank while the bundle downloads and- starts — the rail column and, in the desktop app, the content card. It+ starts — the rail column and, on desktop, the content card. Itdraws no app content; the first route shell to mount fades it out (seedismissBootShell).--><style>#boot-shell {- --bs-page: oklch(0.17 0 0);- --bs-panel: oklch(0.17 0 0);+ --bs-page: #0e0e0e;+ --bs-panel: #121212;--bs-ink: oklch(1 0 0);--bs-edge: color-mix(in oklch, var(--bs-ink) 8%, transparent);position: fixed;@@ -50,7 +50,7 @@z-index: 2147483000;display: flex;box-sizing: border-box;- background: var(--bs-panel);+ background: var(--bs-page);color: var(--bs-ink);transition: opacity 180ms ease-out;pointer-events: none;@@ -69,20 +69,19 @@.bs-rail {width: 56px;flex: none;- border-right: 1px solid var(--bs-edge);}.bs-content {flex: 1;min-width: 0;}- /* The desktop app's bordered content card (SplitLayout's bento inset). */- #boot-shell[data-desktop] .bs-rail {- border-right: 0;- }- #boot-shell[data-desktop] .bs-content {- margin: 6px 6px 6px 0;- border: 1px solid var(--bs-edge);- border-radius: 6px;+ /* Match SplitLayout's desktop bento inset before the app mounts. */+ @media (pointer: fine) {+ .bs-content {+ margin: 6px 6px 6px 0;+ border: 1px solid var(--bs-edge);+ border-radius: 8px;+ background: var(--bs-panel);+ }}.bs-mark {width: 44px;@@ -111,9 +110,6 @@try {const shell = document.getElementById("boot-shell");const nativeOs = window.__TAURI_OS_PLUGIN_INTERNALS__?.os_type;- if (nativeOs && nativeOs !== "ios" && nativeOs !== "android") {- shell.dataset.desktop = "";- }// Match RootFrame's native macOS overlay-titlebar clearance before JS loads.if (nativeOs === "macos") shell.style.paddingTop = "40px";let theme = null;diff --git a/apps/web/src/components/app/HeaderActionGroup.tsx b/apps/web/src/components/app/HeaderActionGroup.tsxnew file mode 100644index 0000000000..0b8b4927ed--- /dev/null+++ b/apps/web/src/components/app/HeaderActionGroup.tsx@@ -0,0 +1,37 @@+import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { ButtonGroup, useButtonGroupContext } from '@ui/components/ButtonGroup';+import { cn } from '@ui/utils/classname';+import { type ParentProps, Show } from 'solid-js';++/**+ * A desktop header island: related actions share one elevated frame and+ * their buttons stay flat. Touch renders the actions without a frame, and a+ * nested group reuses its parent's frame. An island with no actions renders+ * nothing, so conditional children need no wrapper.+ *+ * @do Group actions by meaning: filters, view options, sharing, navigation, detail toggles.+ * @do Use `size="icon-md"` for icon-only actions and `size="md"` for labelled ones.+ * @do Mark on/off toggles with `aria-pressed`; the pressed fill matches a selected tab.+ * @dont Do not put Tabs, TabSelector, or Buttons acting as tabs in an island.+ * @dont Do not add borders, shadows, or backgrounds to the buttons inside.+ */+export function HeaderActionGroup(+ props: ParentProps<{ label: string; class?: string }>+) {+ const group = useButtonGroupContext();+ return (+ <Show when={!isTouchDevice() && !group} fallback={props.children}>+ <ButtonGroup+ label={props.label}+ variant="outline"+ size="md"+ class={cn(+ 'hidden h-8 shrink-0 has-[[data-button]]:inline-flex',+ props.class+ )}+ >+ {props.children}+ </ButtonGroup>+ </Show>+ );+}diff --git a/apps/web/src/components/app/Layout.tsx b/apps/web/src/components/app/Layout.tsxindex e4119ff4db..36fd6daa1a 100644--- a/apps/web/src/components/app/Layout.tsx+++ b/apps/web/src/components/app/Layout.tsx@@ -165,7 +165,7 @@ export function RootFrame(props: ParentProps) {<MobileSettingsProvider><divclass={cn(- 'relative flex flex-col justify-between not-touch:bg-panel w-dvw h-[calc(var(--dvh,1dvh)*100)] pl-(--safe-left) pr-(--safe-right)',+ 'relative flex flex-col justify-between not-touch:bg-page w-dvw h-[calc(var(--dvh,1dvh)*100)] pl-(--safe-left) pr-(--safe-right)',hasOverlayTitleBar && 'pt-[40px]')}>diff --git a/apps/web/src/components/app/PreviewPanel.tsx b/apps/web/src/components/app/PreviewPanel.tsxindex f8b64afcc9..d10ee42301 100644--- a/apps/web/src/components/app/PreviewPanel.tsx+++ b/apps/web/src/components/app/PreviewPanel.tsx@@ -46,6 +46,8 @@ export type PreviewFrameProps = {onFocusOut?: VoidFunction;ref?: (el: HTMLElement) => void;headerLeading?: JSX.Element;+ /** The hosted view supplies its own header while retaining preview focus. */+ hideHeader?: boolean;/** A new value marks a new location, which hands focus back to the host. */locationKey?: Accessor<unknown>;children: JSX.Element;@@ -98,33 +100,35 @@ export function PreviewFrame(props: PreviewFrameProps) {onPointerDown={() => setInteractedWith(true)}tabIndex={-1}>- <ViewShell.TopBar- ref={headerCollapseController.setRow}- class="relative w-full py-0 touch:flex"- >- <Show when={props.headerLeading}>- <div class="flex shrink-0 items-center">{props.headerLeading}</div>- </Show>- <PriorityCollapseOverflowSensor- controller={headerCollapseController}- truncateAsLastResort- class="relative h-full min-w-0 shrink overflow-hidden"- contentClass={- props.headerLeading- ? 'flex h-full items-center gap-1 pl-0.5'- : 'flex h-full items-center gap-1'- }- contentRef={(element) => {- scopedLayoutRefs.headerLeft = element;- }}- />- <div- class="flex h-full grow shrink items-center justify-end gap-1"- ref={(ref) => {- scopedLayoutRefs.headerRight = ref;- }}- />- </ViewShell.TopBar>+ <Show when={!props.hideHeader}>+ <ViewShell.TopBar+ ref={headerCollapseController.setRow}+ class="relative w-full py-0 touch:flex"+ >+ <Show when={props.headerLeading}>+ <div class="flex shrink-0 items-center">{props.headerLeading}</div>+ </Show>+ <PriorityCollapseOverflowSensor+ controller={headerCollapseController}+ truncateAsLastResort+ class="relative h-full min-w-0 shrink overflow-hidden"+ contentClass={+ props.headerLeading+ ? 'flex h-full items-center gap-1 pl-0.5'+ : 'flex h-full items-center gap-1'+ }+ contentRef={(element) => {+ scopedLayoutRefs.headerLeft = element;+ }}+ />+ <div+ class="flex h-full grow shrink items-center justify-end gap-1"+ ref={(ref) => {+ scopedLayoutRefs.headerRight = ref;+ }}+ />+ </ViewShell.TopBar>+ </Show><divref={toolbarCollapseController.setRow}class="relative flex min-h-0 w-full shrink-0 items-center justify-between px-2"diff --git a/apps/web/src/components/app/ResponsiveBlockToolbar.tsx b/apps/web/src/components/app/ResponsiveBlockToolbar.tsxindex 3f62eb4eb5..3a7f2aaf27 100644--- a/apps/web/src/components/app/ResponsiveBlockToolbar.tsx+++ b/apps/web/src/components/app/ResponsiveBlockToolbar.tsx@@ -6,6 +6,7 @@ import type { ItemType } from '@service-storage/client';import { Button, cn } from '@ui';import { type Component, For, type JSX, Show } from 'solid-js';import { Dynamic } from 'solid-js/web';+import { HeaderActionGroup } from './HeaderActionGroup';import { SidePanel } from './side-panel';import { HeaderIsland } from './split-layout/components/HeaderIsland';import {@@ -20,7 +21,6 @@ import {SplitPermissionsBadge,SplitTitleFileMenu,} from './split-layout/components/SplitLabel';-import { SplitToolbarRight } from './split-layout/components/SplitToolbar';import type {SplitFileMenuAction,SplitFileMenuActionGroup,@@ -55,7 +55,7 @@ export function ToolButton(props: { tool: BlockTool }) {'px-1',props.tool.isActive?.() && 'bg-accent/20 hover:bg-accent/30 text-accent')}- size="icon-sm"+ size={isTouchDevice() ? 'icon-sm' : 'icon-md'}><Dynamiccomponent={@@ -143,7 +143,20 @@ export function ResponsiveBlockToolbar(props: BlockToolbarProps) {fallback={<><SplitHeaderRight>- <div class="order-[1000] flex items-center gap-1">+ <div class="order-[1000] flex items-center gap-2">+ <Show when={activeToolbarTools().length > 0}>+ <HeaderActionGroup label="Document actions">+ <For each={activeToolbarTools()}>+ {(tool) =>+ tool.buttonComponent ? (+ <tool.buttonComponent />+ ) : (+ <ToolButton tool={tool} />+ )+ }+ </For>+ </HeaderActionGroup>+ </Show><SidePanel.HeaderActionsOutlet /><For each={headerTools()}>{(tool) => (@@ -171,21 +184,6 @@ export function ResponsiveBlockToolbar(props: BlockToolbarProps) {buttonClass="order-first"/></SplitTitleFileMenu>- <Show when={activeToolbarTools().length > 0}>- <SplitToolbarRight>- <For each={activeToolbarTools()}>- {(tool) => (- <>- {tool.buttonComponent ? (- <tool.buttonComponent />- ) : (- <ToolButton tool={tool} />- )}- </>- )}- </For>- </SplitToolbarRight>- </Show></>}>diff --git a/apps/web/src/components/app/side-panel/SidePanel.tsx b/apps/web/src/components/app/side-panel/SidePanel.tsxindex 41be6accf5..618375fe9b 100644--- a/apps/web/src/components/app/side-panel/SidePanel.tsx+++ b/apps/web/src/components/app/side-panel/SidePanel.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import { usePreference } from '@app/preferences/use-preference';import { useMaybeBlockAliasedName } from '@core/block';import { Resize, ResizeZoneContext } from '@core/component/Resize/Resize';@@ -31,6 +32,7 @@ import {} from 'solid-js';import { Portal } from 'solid-js/web';import { Transition } from 'solid-transition-group';+import { HeaderActionGroup } from '../HeaderActionGroup';import { MobileDrawer } from '../mobile/MobileDrawer';import { HeaderIsland } from '../split-layout/components/HeaderIsland';import { SplitHeaderRight } from '../split-layout/components/SplitHeader';@@ -408,45 +410,50 @@ function Toggle() {return (<Show when={ctx.hasSections()}>- <Button- depth={2}- variant="ghost"- size="icon-md"- class={cn(- isTouchDevice() &&- 'border-0 hover:bg-transparent! active:bg-transparent! focus-visible:bg-transparent! active:text-accent',- isTouchDevice() && ctx.isOpen() && 'text-accent'- )}- tooltip={- isTouchDevice()- ? ctx.isOpen()- ? 'Hide details'- : 'Show details'- : ctx.isOpen()- ? 'Hide Side Panel'- : 'Show Side Panel'- }- aria-haspopup={isTouchDevice() ? 'dialog' : undefined}- aria-expanded={ctx.isOpen()}- hotkey={TOKENS.block.toggleSidePanel}- onClick={() => ctx.toggle()}- >- <Show- when={isTouchDevice()}- fallback={- <SidePanelIcon- class={cn('rotate-180', ctx.isOpen() && 'text-accent')}- />+ <HeaderActionGroup label="Details">+ <Button+ depth={2}+ variant="ghost"+ size="icon-md"+ class={cn(+ isTouchDevice() &&+ 'border-0 hover:bg-transparent! active:bg-transparent! focus-visible:bg-transparent! active:text-accent',+ isTouchDevice() && ctx.isOpen() && 'text-accent'+ )}+ tooltip={+ isTouchDevice()+ ? ctx.isOpen()+ ? 'Hide details'+ : 'Show details'+ : ctx.isOpen()+ ? 'Hide Side Panel'+ : 'Show Side Panel'}+ aria-haspopup={isTouchDevice() ? 'dialog' : undefined}+ aria-expanded={ctx.isOpen()}+ hotkey={TOKENS.block.toggleSidePanel}+ onClick={() => ctx.toggle()}>- <InfoIcon class={cn(ctx.isOpen() && 'text-accent')} />- </Show>- </Button>+ <Show+ when={isTouchDevice()}+ fallback={+ <SidePanelIcon+ class={cn('rotate-180', ctx.isOpen() && 'text-accent')}+ />+ }+ >+ <InfoIcon class={cn(ctx.isOpen() && 'text-accent')} />+ </Show>+ </Button>+ </HeaderActionGroup></Show>);}-/** Keeps action state in the owning block while rendering it before Share. */+/**+ * Keeps action state in the owning block while rendering it before Share.+ * Wrap the actions in `HeaderActionGroup` islands; a split button keeps its own frame.+ */function HeaderActions(props: ParentProps) {const ctx = useContext(SidePanelContext);return (@@ -464,7 +471,7 @@ function HeaderActionsOutlet() {<divref={ctx?.setHeaderActionsMount}data-side-panel-header-actions- class="flex shrink-0 items-center gap-1 empty:hidden [&>div]:contents"+ class="flex shrink-0 items-center gap-2 touch:gap-1 empty:hidden [&>div]:contents"/></Show>);@@ -780,7 +787,7 @@ function EmptyPill(props: { label?: JSX.Element } = {}) {function Loading() {return (<div class="flex items-center justify-center p-2">- <div class="animate-pulse text-ink-muted rounded-full h-2 w-full bg-skeleton"></div>+ <ListSkeleton.Bar class="h-2 w-full" /></div>);}diff --git a/apps/web/src/components/app/sidebar-next/sidebar-rail.tsx b/apps/web/src/components/app/sidebar-next/sidebar-rail.tsxindex dcab66ef4d..13425563a6 100644--- a/apps/web/src/components/app/sidebar-next/sidebar-rail.tsx+++ b/apps/web/src/components/app/sidebar-next/sidebar-rail.tsx@@ -4,8 +4,6 @@ import { globalSplitManager } from '@app/signal/splitLayout';import { navigateToSidebarView } from '@components/app/app-sidebar/sidebar';import { useSplitLayout } from '@components/app/split-layout/layout';import { hotkeyScopeNeutralAttribute } from '@core/dom-selectors';-import { isPlatform } from '@core/util/platform';-import { cn } from '@ui';import { For, Match, Suspense, Switch } from 'solid-js';import { useNavigationUnread } from '../use-navigation-unread';import { SidebarRailCreateButton } from './create-button';@@ -67,12 +65,7 @@ const SidebarRailContent = () => {<div{...hotkeyScopeNeutralAttribute}data-ui="sidebar-rail"- class={cn(- 'relative flex h-full w-14 shrink-0 flex-col items-center gap-1 overflow-hidden border-edge-frame bg-panel px-2 pb-3 pt-2',- !isPlatform('desktop') &&- (globalSplitManager()?.splits().length ?? 1) <= 1 &&- 'border-r'- )}+ class="relative flex h-full w-14 shrink-0 flex-col items-center gap-1 overflow-hidden bg-page px-2 pb-3 pt-2"><SidebarRailCreateButton /><SearchRailButton />diff --git a/apps/web/src/components/app/sidebar-next/update-button.tsx b/apps/web/src/components/app/sidebar-next/update-button.tsxindex 903f119db2..1308ec2425 100644--- a/apps/web/src/components/app/sidebar-next/update-button.tsx+++ b/apps/web/src/components/app/sidebar-next/update-button.tsx@@ -73,7 +73,7 @@ export function UpdateButton(props: { update: () => AppUpdate }) {</Popover.Trigger><Popover.Portal><Popover.Content- class="z-modal w-64 rounded-xl border border-edge-muted bg-menu p-4 shadow-xl outline-none animate-menu-open"+ class="menu-surface z-modal w-64 p-4 outline-none animate-menu-open"aria-busy={props.update().busy}><Popover.Title class="text-sm font-semibold text-ink">diff --git a/apps/web/src/components/app/split-layout/SplitLayout.tsx b/apps/web/src/components/app/split-layout/SplitLayout.tsxindex 4be855e0fd..ff7f00fd2d 100644--- a/apps/web/src/components/app/split-layout/SplitLayout.tsx+++ b/apps/web/src/components/app/split-layout/SplitLayout.tsx@@ -6,7 +6,6 @@ import { Resize } from '@core/component/Resize';import { isNativeMobilePlatform } from '@core/mobile/isNativeMobilePlatform';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { tabTitleSignal } from '@core/signal/tabTitle';-import { isPlatform } from '@core/util/platform';import {createEffect,createMemo,@@ -68,8 +67,7 @@ export function SplitLayout() {const panelRefs = new Map<SplitId, HTMLDivElement>();const splits = createMemo(splitManager.splits);- const useBentoLayout = () =>- !isTouchDevice() && (isPlatform('desktop') || splits().length > 1);+ const useBentoLayout = () => !isTouchDevice();// Drop refs for departed splits by reconciling against the live list:// batched mutations can remove several splits in one flush (e.g. closingdiff --git a/apps/web/src/components/app/split-layout/componentRegistry.tsx b/apps/web/src/components/app/split-layout/componentRegistry.tsxindex f7e1a881a2..820313517d 100644--- a/apps/web/src/components/app/split-layout/componentRegistry.tsx+++ b/apps/web/src/components/app/split-layout/componentRegistry.tsx@@ -338,7 +338,11 @@ registerComponent(() => <DriveRouteView />,() => composableLayout(true));-registerComponent('reviews', () => <ReviewsRouteView />);+registerComponent(+ 'reviews',+ () => <ReviewsRouteView />,+ () => composableLayout(true)+);registerComponent('tasks',() => <TasksRouteView />,diff --git a/apps/web/src/components/app/split-layout/components/SplitHeader.tsx b/apps/web/src/components/app/split-layout/components/SplitHeader.tsxindex ec02a6aaa7..adbfd553b9 100644--- a/apps/web/src/components/app/split-layout/components/SplitHeader.tsx+++ b/apps/web/src/components/app/split-layout/components/SplitHeader.tsx@@ -8,6 +8,7 @@ import { useSoup } from '@app/features/next-soup/soup-context';import { openEntityInSplitFromUnifiedList } from '@app/features/next-soup/utils';import { projectRouteId } from '@app/features/projects/core/route';import { useGlobalNotificationSource } from '@components/app/GlobalAppState';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { type BlockName, NonDocumentBlockTypes } from '@core/block';import { fileTypeToBlockName } from '@core/constant/allBlocks';import { TOKENS } from '@core/hotkey/tokens';@@ -339,28 +340,30 @@ export function ListNavigationButtons(props: {class?: string;}) {return (- <div class={cn('flex items-center gap-0.5', props.class)}>- <Button- size="icon-md"- label="Previous item"- hotkey={TOKENS.entity.step.start}- disabled={!props.navigation.canPrevious()}- onMouseDown={(event) => event.preventDefault()}- onClick={props.navigation.previous}- >- <CaretUp class="size-4" />- </Button>- <Button- size="icon-md"- label="Next item"- hotkey={TOKENS.entity.step.end}- disabled={!props.navigation.canNext()}- onMouseDown={(event) => event.preventDefault()}- onClick={props.navigation.next}- >- <CaretDown class="size-4" />- </Button>- </div>+ <HeaderActionGroup label="Item navigation">+ <div class={cn('flex items-center touch:gap-0.5', props.class)}>+ <Button+ size="icon-md"+ label="Previous item"+ hotkey={TOKENS.entity.step.start}+ disabled={!props.navigation.canPrevious()}+ onMouseDown={(event) => event.preventDefault()}+ onClick={props.navigation.previous}+ >+ <CaretUp class="size-4" />+ </Button>+ <Button+ size="icon-md"+ label="Next item"+ hotkey={TOKENS.entity.step.end}+ disabled={!props.navigation.canNext()}+ onMouseDown={(event) => event.preventDefault()}+ onClick={props.navigation.next}+ >+ <CaretDown class="size-4" />+ </Button>+ </div>+ </HeaderActionGroup>);}@@ -506,7 +509,7 @@ export function SplitHeader(props: {}}/>- <div class="header-actions h-full grow shrink flex items-center justify-end gap-1 px-2 touch:px-0 touch:gap-2">+ <div class="header-actions h-full grow shrink flex items-center justify-end gap-2 px-2 touch:px-0"><divclass="contents"ref={(ref) => {diff --git a/apps/web/src/components/app/split-layout/components/SplitPanel.tsx b/apps/web/src/components/app/split-layout/components/SplitPanel.tsxindex 2735b606f1..306d2c34b5 100644--- a/apps/web/src/components/app/split-layout/components/SplitPanel.tsx+++ b/apps/web/src/components/app/split-layout/components/SplitPanel.tsx@@ -13,7 +13,6 @@ import { EVENT_MODIFIER_KEYS } from '@core/hotkey/constants';import { useHotkeyDOMScope } from '@core/hotkey/hotkeys';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { getSafeAreaInset } from '@core/mobile/safeAreaInsets';-import { isPlatform } from '@core/util/platform';import CloseIcon from '@phosphor/x.svg';import { createElementSize } from '@solid-primitives/resize-observer';import { Button, cn, Panel } from '@ui';@@ -291,11 +290,7 @@ export function SplitPanel(props: SplitPanelProps) {<Panelclass={cn('touch:rounded-none touch:after:hidden touch:border-0! bg-panel transition-none',- props.handle.isSpotLight()- ? 'rounded-xl'- : isPlatform('desktop') || multipleSplits()- ? 'rounded-md'- : 'rounded-none',+ props.handle.isSpotLight() ? 'rounded-xl' : 'rounded-lg',splitUnfocusedStyling() && 'split-panel-inactive',{'shadow-sm shadow-drop-shadow/50': splitUnfocusedStyling(),@@ -303,11 +298,7 @@ export function SplitPanel(props: SplitPanelProps) {})}depth={isTouchDevice() ? 0 : 1}- hideBorder={- !props.handle.isSpotLight() &&- !isPlatform('desktop') &&- !multipleSplits()- }+ hideBorder={isTouchDevice()}><Show when={hasSplitHeader()}><Panel.Headerdiff --git a/apps/web/src/components/diff-view/DiffView.tsx b/apps/web/src/components/diff-view/DiffView.tsxindex e31af4e6f0..9c6334fc47 100644--- a/apps/web/src/components/diff-view/DiffView.tsx+++ b/apps/web/src/components/diff-view/DiffView.tsx@@ -12,7 +12,7 @@ import ArrowsOutIcon from '@phosphor/arrows-out.svg';import CaretRightIcon from '@phosphor/caret-right.svg';import { createResizeObserver } from '@solid-primitives/resize-observer';import { debounce } from '@solid-primitives/scheduled';-import { Button, Card, cn, SegmentedControl } from '@ui';+import { Button, Card, cn, Tabs } from '@ui';import {type Accessor,createContext,@@ -447,7 +447,8 @@ function StyleToggle(props: {class?: string;}) {return (- <SegmentedControl+ <Tabs+ touch="segmented"size="sm"aria-label="Diff layout"value={props.value}diff --git a/apps/web/src/components/diff-view/README.md b/apps/web/src/components/diff-view/README.mdindex 1562e5a975..dfdb566364 100644--- a/apps/web/src/components/diff-view/README.md+++ b/apps/web/src/components/diff-view/README.md@@ -30,7 +30,7 @@ disclosure button, the status letter and `text-xs` path (directory inan opaque `bg-surface` with `hover:overlay-hover`, so diff text never shows throughthe sticky row on hover. Hovering the header highlights the row but does not toggleit; only the disclosure and path controls toggle collapse. Toolbar parts use-standard `Button` and `SegmentedControl` sizes, and backgrounds come from the+standard `Button` and `Tabs` sizes, and backgrounds come from thecard's depth.The host composes the rest:diff --git a/apps/web/src/components/diff-view/debug/DiffViewGallery.tsx b/apps/web/src/components/diff-view/debug/DiffViewGallery.tsxindex 7d91a26e41..72a10f2e15 100644--- a/apps/web/src/components/diff-view/debug/DiffViewGallery.tsx+++ b/apps/web/src/components/diff-view/debug/DiffViewGallery.tsx@@ -5,7 +5,7 @@import CopyIcon from '@phosphor/copy.svg';import FileIcon from '@phosphor/file.svg';-import { Button, SegmentedControl } from '@ui';+import { Button, Tabs } from '@ui';import { FileTree } from '@ui/components/FileTree';import { createMemo, createSignal, type JSX, Show } from 'solid-js';import { DiffCounts } from '../DiffCounts';@@ -131,7 +131,8 @@ function LargeChangesetDemo() {const changes = createMemo(() => generatedChanges(Number(count())));return (<>- <SegmentedControl+ <Tabs+ touch="segmented"size="sm"aria-label="Files"value={count()}diff --git a/apps/web/src/components/entity-detail/EntityDetailTopBar.tsx b/apps/web/src/components/entity-detail/EntityDetailTopBar.tsxindex 2ca688f581..8bd983f914 100644--- a/apps/web/src/components/entity-detail/EntityDetailTopBar.tsx+++ b/apps/web/src/components/entity-detail/EntityDetailTopBar.tsx@@ -24,7 +24,7 @@ export function EntityDetailTopBar(<Show when={props.navigation}><div class="min-w-0 overflow-x-auto">{props.navigation}</div></Show>- <div class="ml-auto flex shrink-0 items-center gap-1">+ <div class="ml-auto flex shrink-0 items-center gap-2 touch:gap-1"><SidePanel.HeaderActionsOutlet />{props.children}<SidePanel.Toggle />diff --git a/apps/web/src/components/ui/components/Button.docs.tsx b/apps/web/src/components/ui/components/Button.docs.tsxindex 8699f87d17..1f93ff66fe 100644--- a/apps/web/src/components/ui/components/Button.docs.tsx+++ b/apps/web/src/components/ui/components/Button.docs.tsx@@ -195,7 +195,7 @@ export default defineDoc({id: 'variants',title: 'Variants',description:- '`ghost` for low-emphasis actions in dense chrome, `outline` for standard actions, `strong` for the same frame with bolder text, `accent` for the primary action in a group, `cta` for the single most important action on a screen. `danger` is reserved for destructive work. Framed variants use glass only on touch by default. `glass={true}` opts in on desktop; `glass={false}` removes it everywhere. Success and danger use colored ink with an unfilled outline frame; icon sizes preserve the same emphasis as text buttons.',+ '`ghost` for low-emphasis actions in dense chrome, `outline` for standard actions, `strong` for the same frame with bolder text, `accent` for the primary action in a group, `cta` for the single most important action on a screen. `danger` is reserved for destructive work. Framed variants use the shared elevated surface on desktop and glass on touch. `glass={false}` keeps a flat frame. Success and danger use colored ink with an unfilled outline frame; icon sizes preserve the same emphasis as text buttons.',render: VariantsDemo,fill: true,},diff --git a/apps/web/src/components/ui/components/Button.tsx b/apps/web/src/components/ui/components/Button.tsxindex d1779dc4fd..0a8bd21a66 100644--- a/apps/web/src/components/ui/components/Button.tsx+++ b/apps/web/src/components/ui/components/Button.tsx@@ -75,7 +75,7 @@ export type ButtonClassOptions = {size?: ButtonSize;fullWidth?: boolean;noTouchResize?: boolean;- /** Override glass: framed variants default to touch-only; true enables all devices. */+ /** Framed variants are elevated on desktop and glass on touch; false opts out. */glass?: boolean;square?: boolean;class?: string;@@ -92,7 +92,7 @@ export type ButtonProps = ButtonRootProps<'button'> &*/fullWidth?: boolean;noTouchResize?: boolean;- /** Override glass: framed variants default to touch-only; true enables all devices. */+ /** Framed variants are elevated on desktop and glass on touch; false opts out. */glass?: boolean;square?: boolean;variant?: ButtonVariant;@@ -129,10 +129,18 @@ export function buttonClasses(options: ButtonClassOptions = {}): string {class: className,} = options;+ const framed =+ glass === true || (glass === undefined && (variant ?? 'ghost') !== 'ghost');+return cn(buttonVariants({ variant, size }),- glass === true && 'glass',- glass === undefined && (variant ?? 'ghost') !== 'ghost' && 'touch:glass',+ glass === true && 'glass not-touch:elevated',+ glass === undefined &&+ (variant ?? 'ghost') !== 'ghost' &&+ 'not-touch:elevated touch:glass',+ // Pressed matches a selected Tabs option: the pressed fill, flat.+ framed &&+ 'not-touch:aria-pressed:border-edge-button not-touch:aria-pressed:shadow-none',fullWidth && 'w-full',!noTouchResize && BUTTON_TOUCH_STYLES,square && 'aspect-square p-0',@@ -151,11 +159,15 @@ function isIconSize(size: ButtonSize): boolean {** @do Use ghost for unframed actions, at any size.* @do Use strong for outline actions with bolder type and cta for accent-filled actions.- * @do Use glass={true} to opt in on desktop, or glass={false} to opt out on touch.+ * @do Use the default shared surface, or glass={false} for a flat frame.* @do Always set `label` on icon-only buttons; it is the accessible name.+ * @do Use `icon-*` sizes for icon-only buttons; `icon-md` beside 32px controls.+ * @do Mark on/off toggles with `aria-pressed`; it draws the selected-tab fill.* @do Use `danger` only for destructive actions, paired with a confirmation.* @dont Do not restyle a button with utility classes when a variant already- * covers it.+ * covers it, and never resize one from a wrapper (`[&_button]:size-8`).+ * @dont Do not use `square` for new icon buttons; it keeps the text-size glyph.+ * @dont Do not build tabs from Buttons; use `Tabs` or `TabSelector`.* @dont Do not use a Button for navigation that should be a link.* @dont Do not put two `danger` buttons next to each other.*/diff --git a/apps/web/src/components/ui/components/ButtonGroup.tsx b/apps/web/src/components/ui/components/ButtonGroup.tsxindex db80ade5bf..4ea7431da7 100644--- a/apps/web/src/components/ui/components/ButtonGroup.tsx+++ b/apps/web/src/components/ui/components/ButtonGroup.tsx@@ -24,13 +24,14 @@ type ButtonGroupProps = {size?: ButtonSize;orientation?: ButtonGroupOrientation;class?: string;+ label?: string;children?: JSX.Element;};/** Canonical classes for the button-group frame. */export const buttonGroupVariants = createVariants(cn(- 'inline-flex items-center justify-center rounded-[10px] data-[orientation=horizontal]:rounded-full border border-edge-button bg-control',+ 'inline-flex items-center justify-center rounded-[10px] data-[orientation=horizontal]:rounded-full border border-edge-button bg-control not-touch:elevated','has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-edge-muted','has-[[data-slot=input-group-control]]:rounded-full','data-[orientation=horizontal]:flex-row',@@ -125,6 +126,7 @@ export const ButtonGroup = (props: ButtonGroupProps) => {props.class)}role="group"+ aria-label={props.label}>{/* Clip the segments independently of the group frame. */}<div class="flex size-full min-w-0 items-center justify-center overflow-hidden rounded-[inherit] [flex-direction:inherit]">diff --git a/apps/web/src/components/ui/components/Calendar.tsx b/apps/web/src/components/ui/components/Calendar.tsxindex 522a5c985f..46a6873f92 100644--- a/apps/web/src/components/ui/components/Calendar.tsx+++ b/apps/web/src/components/ui/components/Calendar.tsx@@ -85,16 +85,20 @@ export function Calendar(props: CalendarProps) {</CorvuCalendar.Label><div class="ml-auto flex shrink-0 items-center gap-0.5"><CorvuCalendar.Nav+ as={Button}+ variant="ghost"+ size="icon-sm"action="prev-month"aria-label="Go to previous month"- class="flex size-7 items-center justify-center rounded-md text-ink-muted outline-none hover:bg-hover hover:text-ink focus-visible:ring focus-visible:ring-accent"><CaretLeftIcon class="size-3" /></CorvuCalendar.Nav><CorvuCalendar.Nav+ as={Button}+ variant="ghost"+ size="icon-sm"action="next-month"aria-label="Go to next month"- class="flex size-7 items-center justify-center rounded-md text-ink-muted outline-none hover:bg-hover hover:text-ink focus-visible:ring focus-visible:ring-accent"><CaretRightIcon class="size-3" /></CorvuCalendar.Nav>@@ -205,8 +209,10 @@ function CalendarMonthDropdown(props: CalendarMonthSelectorProps) {return (<Dropdown open={open()} onOpenChange={setOpen} placement="bottom-start"><Dropdown.Trigger+ variant="ghost"+ size="sm"aria-label="Choose month"- class="h-7 max-w-full min-w-0 justify-start gap-1 border-none bg-transparent px-1 text-xs font-medium text-ink hover:bg-hover"+ class="max-w-full min-w-0 justify-start"><span class="min-w-0 truncate">{formatCalendarMonth(props.month)}</span><CaretDownIcon class="size-3 shrink-0 text-ink-muted" />diff --git a/apps/web/src/components/ui/components/ColorPicker.tsx b/apps/web/src/components/ui/components/ColorPicker.tsxindex d596076125..abff9979c6 100644--- a/apps/web/src/components/ui/components/ColorPicker.tsx+++ b/apps/web/src/components/ui/components/ColorPicker.tsx@@ -457,7 +457,7 @@ function Input(props: ColorPickerInputProps) {disabled={context.disabled() || local.disabled}readOnly={context.readOnly() || local.readOnly}class={cn(- 'h-8 w-full min-w-0 rounded-md border border-edge-muted bg-input px-2 font-mono text-sm text-ink outline-none focus-visible:ring-2 focus-visible:ring-edge-muted aria-invalid:border-failure aria-invalid:ring-2 aria-invalid:ring-failure/20 disabled:opacity-50',+ 'h-8 w-full min-w-0 rounded-md border border-edge-muted bg-input not-touch:elevated px-2 font-mono text-sm text-ink outline-none focus-visible:ring-2 focus-visible:ring-edge-muted aria-invalid:border-failure aria-invalid:ring-2 aria-invalid:ring-failure/20 disabled:opacity-50',local.class)}value={draft() ?? context.value()}diff --git a/apps/web/src/components/ui/components/ComposerSurface.tsx b/apps/web/src/components/ui/components/ComposerSurface.tsxindex 82b972096b..e21a08bf66 100644--- a/apps/web/src/components/ui/components/ComposerSurface.tsx+++ b/apps/web/src/components/ui/components/ComposerSurface.tsx@@ -36,8 +36,10 @@ export function ComposerSurface(component={local.as ?? ComposerPanel}{...rest}class={cn(+ // Light mode keeps the composer's wide halo: a fine outline alone+ // vanishes against near-white content.!isTouchDevice() &&- 'rounded-[28px] border-0 bg-composer text-composer-ink dark-mode:glass-input backdrop-filter-none light-mode:after:hidden light-mode:composer-shadow',+ 'rounded-[28px] border-0 bg-composer text-composer-ink glass-input light-mode:composer-shadow',local.class)}/>diff --git a/apps/web/src/components/ui/components/Dialog.tsx b/apps/web/src/components/ui/components/Dialog.tsxindex ffde3c5610..b3485afd92 100644--- a/apps/web/src/components/ui/components/Dialog.tsx+++ b/apps/web/src/components/ui/components/Dialog.tsx@@ -141,8 +141,8 @@ function DesktopDialog(props: DialogProps) {<KobalteDialog.Portal><KobalteDialog.Overlayclass={cn(- // Every floating dialog dims the page behind it with the accent- // sheen; `visibleScrim` layers the heavier legacy coat on top for+ // Every floating dialog dims the page behind it with the shared+ // scrim; `visibleScrim` layers the heavier legacy coat on top for// destructive flows (its background-color wins over the scrim's).'fixed inset-0 z-modal scrim-glass',animateOnOpen() && 'dialog-overlay-open-animation',diff --git a/apps/web/src/components/ui/components/Input.test.tsx b/apps/web/src/components/ui/components/Input.test.tsxnew file mode 100644index 0000000000..2f17b27b51--- /dev/null+++ b/apps/web/src/components/ui/components/Input.test.tsx@@ -0,0 +1,93 @@+import { cleanup, render, screen } from '@solidjs/testing-library';+import { afterEach, expect, it, vi } from 'vitest';+import { type InputClassOptions, inputClasses } from './Input';+import { InputGroup } from './InputGroup';++const device = vi.hoisted(() => ({ touch: false }));+vi.mock('@core/mobile/isTouchDevice', () => ({+ isTouchDevice: () => device.touch,+}));++afterEach(() => {+ cleanup();+ device.touch = false;+});++const tokens = (classes: string) => new Set(classes.split(/\s+/));++// Desktop inputs are pills; touch keeps rounded fields and their old inset,+// and a caller's own shape always wins.+it.each<{+ touch: boolean;+ options: InputClassOptions;+ has: string[];+ lacks: string[];+}>([+ {+ touch: false,+ options: {},+ has: ['rounded-full', 'px-3'],+ lacks: ['rounded-lg'],+ },+ {+ touch: true,+ options: {},+ has: ['rounded-lg', 'px-2'],+ lacks: ['rounded-full', 'px-3'],+ },+ {+ touch: true,+ options: { size: 'lg' },+ has: ['rounded-lg', 'px-3'],+ lacks: ['px-3.5'],+ },+ {+ touch: true,+ options: { class: 'rounded-none' },+ has: ['rounded-none'],+ lacks: ['rounded-lg'],+ },+ { touch: true, options: { class: 'px-0' }, has: ['px-0'], lacks: ['px-2'] },+ {+ touch: false,+ options: { class: 'rounded-[32px]' },+ has: ['rounded-[32px]'],+ lacks: ['rounded-full'],+ },+])('touch=$touch $options keeps the input shape', (row) => {+ device.touch = row.touch;+ const classes = tokens(inputClasses(row.options));+ for (const token of row.has) expect(classes).toContain(token);+ for (const token of row.lacks) expect(classes).not.toContain(token);+});++it.each([+ {+ touch: false,+ groupClass: undefined,+ has: 'rounded-full',+ lacks: 'rounded-lg',+ },+ {+ touch: true,+ groupClass: undefined,+ has: 'rounded-lg',+ lacks: 'rounded-full',+ },+ {+ touch: true,+ groupClass: 'rounded-none',+ has: 'rounded-none',+ lacks: 'rounded-lg',+ },+])('an input group on touch=$touch keeps its shape', (row) => {+ device.touch = row.touch;+ render(() => (+ <InputGroup aria-label="Search" class={row.groupClass}>+ <InputGroup.Input aria-label="Query" />+ </InputGroup>+ ));+ const group = tokens(screen.getByRole('group', { name: 'Search' }).className);+ expect(group).toContain(row.has);+ expect(group).not.toContain(row.lacks);+});diff --git a/apps/web/src/components/ui/components/Input.tsx b/apps/web/src/components/ui/components/Input.tsxindex 214bee127c..2271ed09d2 100644--- a/apps/web/src/components/ui/components/Input.tsx+++ b/apps/web/src/components/ui/components/Input.tsx@@ -1,3 +1,4 @@+import { isTouchDevice } from '@core/mobile/isTouchDevice';import type { ComponentProps } from 'solid-js';import { splitProps } from 'solid-js';import { cn } from '../utils/classname';@@ -9,14 +10,24 @@ type NativeInputSize = number;/** Text-bearing Button sizes that also make sense for an input. */export type InputSize = Exclude<ButtonSize, `icon-${string}`>;+// Single-line inputs are pills like Buttons on desktop, so their text sits further in.const INPUT_SIZE_VARIANTS: Record<InputSize, string> = {- xs: 'h-5 px-1 text-xs',- sm: 'h-6 px-2 text-xs',- md: 'h-8 px-2 text-base',- lg: 'h-9 px-3 text-base',+ xs: 'h-5 px-1.5 text-xs',+ sm: 'h-6 px-2.5 text-xs',+ md: 'h-8 px-3 text-base',+ lg: 'h-9 px-3.5 text-base',xl: 'h-12 px-4 text-base',};+// Touch keeps its rounded fields and their original inset.+const TOUCH_INPUT_SHAPE: Record<InputSize, string> = {+ xs: 'rounded-lg px-1',+ sm: 'rounded-lg px-2',+ md: 'rounded-lg px-2',+ lg: 'rounded-lg px-3',+ xl: 'rounded-lg px-4',+};+/** Shared focus treatment for outlined text-entry controls. */export const inputOutlineFocusClasses ='focus-visible:ring-2 focus-visible:ring-edge-muted';@@ -24,7 +35,7 @@ export const inputOutlineFocusClasses =/** Canonical visual variants for standalone inputs. */export const inputVariants = createVariants(cn(- 'w-full min-w-0 rounded-lg border text-ink caret-current outline-none transition-[background-color,border-color,box-shadow] duration-120 motion-reduce:transition-none',+ 'w-full min-w-0 border text-ink caret-current outline-none transition-[background-color,border-color,box-shadow] duration-120 motion-reduce:transition-none','file:inline-flex file:border-0 file:bg-transparent file:text-[inherit] file:font-medium file:text-ink','placeholder:text-ink-placeholder','aria-invalid:border-failure aria-invalid:ring-2 aria-invalid:ring-failure/20',@@ -32,7 +43,10 @@ export const inputVariants = createVariants(),{variant: {- outline: cn('border-edge-frame bg-control', inputOutlineFocusClasses),+ outline: cn(+ 'border-edge-frame bg-control not-touch:elevated',+ inputOutlineFocusClasses+ ),bare: 'border-transparent bg-transparent',},size: INPUT_SIZE_VARIANTS,@@ -56,6 +70,7 @@ export type InputClassOptions = {export function inputClasses(options: InputClassOptions = {}): string {return cn(inputVariants({ variant: options.variant, size: options.size }),+ isTouchDevice() ? TOUCH_INPUT_SHAPE[options.size ?? 'md'] : 'rounded-full',options.class);}diff --git a/apps/web/src/components/ui/components/InputGroup.tsx b/apps/web/src/components/ui/components/InputGroup.tsxindex 9d5fb48681..79226b3c41 100644--- a/apps/web/src/components/ui/components/InputGroup.tsx+++ b/apps/web/src/components/ui/components/InputGroup.tsx@@ -1,3 +1,4 @@+import { isTouchDevice } from '@core/mobile/isTouchDevice';import XIcon from '@phosphor/x.svg';import { mergeRefs } from '@solid-primitives/refs';import {@@ -38,18 +39,18 @@ const INPUT_GROUP_ADDON_PADDING: Record<buttonEnd: '[&:has([data-button])]:pe-0',},sm: {- start: 'ps-2',- end: 'pe-2',+ start: 'ps-2.5',+ end: 'pe-2.5',buttonEnd: '[&:has([data-button])]:pe-0',},md: {- start: 'ps-2',- end: 'pe-2',+ start: 'ps-3',+ end: 'pe-3',buttonEnd: '[&:has([data-button])]:pe-1',},lg: {- start: 'ps-3',- end: 'pe-3',+ start: 'ps-3.5',+ end: 'pe-3.5',buttonEnd: '[&:has([data-button])]:pe-0.5',},xl: {@@ -59,6 +60,18 @@ const INPUT_GROUP_ADDON_PADDING: Record<},};+// Touch keeps its original addon inset; desktop matches the pill Input.+const TOUCH_INPUT_GROUP_ADDON_PADDING: Record<+ InputSize,+ { start: string; end: string }+> = {+ xs: { start: 'ps-1', end: 'pe-1' },+ sm: { start: 'ps-2', end: 'pe-2' },+ md: { start: 'ps-2', end: 'pe-2' },+ lg: { start: 'ps-3', end: 'pe-3' },+ xl: { start: 'ps-4', end: 'pe-4' },+};+const INPUT_GROUP_BUTTON_SIZE: Record<InputSize, ButtonSize> = {xs: 'icon-xs',sm: 'icon-sm',@@ -70,14 +83,14 @@ const INPUT_GROUP_BUTTON_SIZE: Record<InputSize, ButtonSize> = {/** Canonical variants for a framed input composition. */export const inputGroupVariants = createVariants(cn(- 'group/input-group relative flex w-full min-w-0 items-center overflow-hidden rounded-lg border transition-[background-color,border-color,box-shadow] duration-120 motion-reduce:transition-none',+ 'group/input-group relative flex w-full min-w-0 items-center overflow-hidden border transition-[background-color,border-color,box-shadow] duration-120 motion-reduce:transition-none','has-[[data-slot=input-group-control]:disabled]:pointer-events-none has-[[data-slot=input-group-control]:disabled]:opacity-50','has-[[data-slot=input-group-control][aria-invalid=true]]:border-failure has-[[data-slot=input-group-control][aria-invalid=true]]:ring-2 has-[[data-slot=input-group-control][aria-invalid=true]]:ring-failure/20'),{variant: {outline: cn(- 'border-edge-frame bg-control',+ 'border-edge-frame bg-control not-touch:elevated','has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-edge-muted'),bare: 'border-transparent bg-transparent',@@ -175,6 +188,7 @@ function InputGroupRoot(props: InputGroupProps) {size: size(),variant: grouped() ? 'bare' : variant(),}),+ isTouchDevice() ? 'rounded-lg' : 'rounded-full',grouped() &&'flex-1 rounded-none border-0 bg-transparent outline-none has-[[data-slot=input-group-control]:focus-visible]:ring-0',local.class@@ -220,6 +234,8 @@ function InputGroupInput(props: InputGroupInputProps) {data-slot="input-group-control"class={cn('h-full flex-1 rounded-none border-0 bg-transparent px-2 focus-visible:ring-0 aria-invalid:ring-0 [&::-webkit-search-cancel-button]:hidden',+ // Without an addon beside it, the text keeps the standalone Input inset.+ !isTouchDevice() && 'first:ps-3 last:pe-3',local.class)}on:input={(event) =>@@ -238,7 +254,10 @@ function InputGroupAddon(props: InputGroupAddonProps) {const [local, rest] = splitProps(props, ['align', 'children', 'class']);const group = useInputGroupContext();const align = () => local.align ?? 'inline-start';- const padding = () => INPUT_GROUP_ADDON_PADDING[group.size];+ const padding = () => ({+ ...INPUT_GROUP_ADDON_PADDING[group.size],+ ...(isTouchDevice() ? TOUCH_INPUT_GROUP_ADDON_PADDING[group.size] : {}),+ });return (<divdiff --git a/apps/web/src/components/ui/components/RadioGroup.tsx b/apps/web/src/components/ui/components/RadioGroup.tsxindex c696078426..5232d09370 100644--- a/apps/web/src/components/ui/components/RadioGroup.tsx+++ b/apps/web/src/components/ui/components/RadioGroup.tsx@@ -72,7 +72,7 @@ function RadioGroupItemLabel(props: ItemLabelProps) {* @dont Do not add `RadioGroup.ItemInput` yourself; `RadioGroup.ItemControl`* already renders one.* @dont Do not use a radio group for two mutually exclusive actions inline —- * that is a SegmentedControl.+ * that is `Tabs`.*/export const RadioGroup = Object.assign((props: RadioGroupProps) => {diff --git a/apps/web/src/components/ui/components/SegmentedControl.tsx b/apps/web/src/components/ui/components/SegmentedControl.tsxdeleted file mode 100644index ee783b94ed..0000000000--- a/apps/web/src/components/ui/components/SegmentedControl.tsx+++ /dev/null@@ -1,67 +0,0 @@-import { SegmentedControl as KSegmentedControl } from '@kobalte/core/segmented-control';-import { For, type JSX } from 'solid-js';-import { cn } from '../utils/classname';--type SegmentedControlOption<T extends string | number | boolean> = {- value: T;- label: string;- disabled?: boolean;-};--type SegmentedControlProps<T extends string | number | boolean> = {- value: T;- options: Array<SegmentedControlOption<T>>;- onChange: (value: T) => void;- class?: string;- size?: 'sm' | 'md';- 'aria-label'?: string;-};--const serialize = (v: string | number | boolean): string => String(v);--export const SegmentedControl = <T extends string | number | boolean>(- props: SegmentedControlProps<T>-): JSX.Element => {- const size = () => props.size ?? 'md';-- const handleChange = (serialized: string) => {- const match = props.options.find((o) => serialize(o.value) === serialized);- if (match && !match.disabled) {- props.onChange(match.value);- }- };-- return (- <KSegmentedControl- value={serialize(props.value)}- onChange={handleChange}- aria-label={props['aria-label']}- class={cn(- 'border border-edge-frame rounded-full inline-flex overflow-hidden',- size() === 'sm' ? 'h-6' : 'h-8',- props.class- )}- >- <For each={props.options}>- {(option) => (- <KSegmentedControl.Item- value={serialize(option.value)}- disabled={option.disabled}- class={cn(- 'relative flex h-full items-center justify-center border-r border-edge-divider last:border-r-0 font-medium outline-none has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-edge-focus transition-colors duration-120 motion-reduce:transition-none',- size() === 'sm' ? 'px-2 text-xs' : 'px-3 text-sm',- option.disabled- ? 'opacity-50'- : 'text-ink-muted not-touch:hover:text-ink not-touch:hover:overlay-hover active:overlay-active data-checked:text-ink data-checked:overlay-active'- )}- >- <KSegmentedControl.ItemInput class="absolute inset-0 pointer-events-none" />- <KSegmentedControl.ItemLabel>- {option.label}- </KSegmentedControl.ItemLabel>- </KSegmentedControl.Item>- )}- </For>- </KSegmentedControl>- );-};diff --git a/apps/web/src/components/ui/components/Select.tsx b/apps/web/src/components/ui/components/Select.tsxindex fe9ab641b6..f846ebe47c 100644--- a/apps/web/src/components/ui/components/Select.tsx+++ b/apps/web/src/components/ui/components/Select.tsx@@ -27,7 +27,7 @@ export type SelectTriggerProps = KobalteSelectTriggerProps & {/** Shared appearance for select and searchable-combobox triggers. */export function selectTriggerClasses(className?: string): string {return cn(- 'flex h-8 w-full items-center justify-between gap-2 rounded-full border border-edge-frame bg-control px-2 text-left text-ink-muted outline-none data-expanded:overlay-active data-expanded:text-ink focus-visible:ring-2 focus-visible:ring-edge-muted aria-invalid:border-failure data-invalid:border-failure',+ 'flex h-8 w-full items-center justify-between gap-2 rounded-full border border-edge-frame bg-control not-touch:elevated px-2 text-left text-ink-muted outline-none data-expanded:overlay-active data-expanded:text-ink focus-visible:ring-2 focus-visible:ring-edge-muted aria-invalid:border-failure data-invalid:border-failure',className);}diff --git a/apps/web/src/components/ui/components/TabSelector.docs.tsx b/apps/web/src/components/ui/components/TabSelector.docs.tsxindex 249af624d8..c48a708793 100644--- a/apps/web/src/components/ui/components/TabSelector.docs.tsx+++ b/apps/web/src/components/ui/components/TabSelector.docs.tsx@@ -1,5 +1,4 @@import { defineDoc } from '@app/features/ui-gallery/types';-import { Tabs } from '@kobalte/core/tabs';import { createSignal, For } from 'solid-js';import { Dropdown } from './Dropdown';import { TabSelector } from './TabSelector';@@ -10,7 +9,7 @@ function OverflowDemo() {const [selected, setSelected] = createSignal('Authors');return (<TabSelector class="w-72 max-w-full">- <Tabs+ <TabSelector.Rootvalue={selected()}onChange={setSelected}activationMode="manual"@@ -27,7 +26,7 @@ function OverflowDemo() {)}</For></TabSelector.List>- </Tabs>+ </TabSelector.Root><TabSelector.AddMenu label="Add table or form"><Dropdown.Item>New table</Dropdown.Item><Dropdown.Item>New form</Dropdown.Item>@@ -41,7 +40,7 @@ export default defineDoc({name: 'TabSelector',category: 'Navigation',description:- 'Inset tabs with horizontal scrolling and a fixed add menu. Compose the track with Kobalte Tabs; keep AddMenu outside the tab collection.',+ 'Tabs that own panels or a dynamic collection, drawn as the same pills as Tabs, with horizontal scrolling and a fixed add menu. Root owns selection; keep AddMenu outside the tab collection.',exports: ['TabSelector'],import: "import { TabSelector } from '@ui';",demos: [diff --git a/apps/web/src/components/ui/components/TabSelector.test.tsx b/apps/web/src/components/ui/components/TabSelector.test.tsxindex de75cdd819..3de269ac31 100644--- a/apps/web/src/components/ui/components/TabSelector.test.tsx+++ b/apps/web/src/components/ui/components/TabSelector.test.tsx@@ -1,4 +1,3 @@-import { Tabs } from '@kobalte/core/tabs';import {cleanup,fireEvent,@@ -31,11 +30,11 @@ it('keeps add actions separate from the tab selection', async () => {const create = vi.fn();render(() => (<TabSelector>- <Tabs value="books" onChange={select}>+ <TabSelector.Root value="books" onChange={select}><TabSelector.List aria-label="Tables"><TabSelector.Tab value="books">Books</TabSelector.Tab></TabSelector.List>- </Tabs>+ </TabSelector.Root><TabSelector.AddMenu label="Add"><Dropdown.Item onSelect={create}>New table</Dropdown.Item></TabSelector.AddMenu>@@ -55,11 +54,11 @@ it('keeps add actions separate from the tab selection', async () => {it('scrolls with the wheel and arrows without moving the add menu', async () => {render(() => (<TabSelector>- <Tabs value="books">+ <TabSelector.Root value="books"><TabSelector.List aria-label="Tables"><TabSelector.Tab value="books">Books</TabSelector.Tab></TabSelector.List>- </Tabs>+ </TabSelector.Root><TabSelector.AddMenu label="Add"><Dropdown.Item>New table</Dropdown.Item></TabSelector.AddMenu>diff --git a/apps/web/src/components/ui/components/TabSelector.tsx b/apps/web/src/components/ui/components/TabSelector.tsxindex 989a11d319..e074c17628 100644--- a/apps/web/src/components/ui/components/TabSelector.tsx+++ b/apps/web/src/components/ui/components/TabSelector.tsx@@ -1,3 +1,4 @@+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { Tabs } from '@kobalte/core/tabs';import CaretLeft from '@phosphor/caret-left.svg';import CaretRight from '@phosphor/caret-right.svg';@@ -20,17 +21,23 @@ import { Layer } from './Layer';export type TabSelectorProps = ParentProps<{ class?: string }>;/**- * Inset navigation with a scrollable track and a fixed, independently focused add menu.- * @do Compose List and Tab inside Kobalte Tabs to retain keyboard navigation and selection semantics.+ * Tabs that own panels or a dynamic collection: a scrollable row of the same+ * pills as `Tabs`, with an optional add menu that stays at the end.+ * @do Wrap the List and its Panels in `TabSelector.Root`; it owns selection and tab/tabpanel semantics.* @do Give List an accessible label and provide tooltips for truncated tab names.- * @dont Put AddMenu inside the tab collection; keep it beside Tabs so it remains independently focusable.+ * @do Use for tables, forms, and editor sections whose tabs control `TabSelector.Panel`s.+ * @dont Use for a plain view switch with no panels; use `Tabs`.+ * @dont Put AddMenu inside the tab collection; keep it beside List so it remains independently focusable.+ * @dont Put a TabSelector inside a HeaderActionGroup or ButtonGroup.*/export function TabSelector(props: TabSelectorProps) {return (<Layer depth={0}><divclass={cn(- 'flex min-w-0 items-center rounded-full border border-edge-muted bg-surface p-0.5',+ 'flex min-w-0 items-center',+ // Touch keeps its inset track; desktop tabs are separate pills.+ 'touch:rounded-full touch:border touch:border-edge-muted touch:bg-surface touch:p-0.5',props.class)}>@@ -40,6 +47,16 @@ export function TabSelector(props: TabSelectorProps) {);}+/** Owns the selected tab; wrap the List and every Panel it controls. */+function Root(props: ComponentProps<typeof Tabs>) {+ return <Tabs {...props} />;+}++/** Content shown while its tab is selected. */+function Panel(props: ComponentProps<typeof Tabs.Content>) {+ return <Tabs.Content {...props} />;+}+function List(props: ComponentProps<typeof Tabs.List>) {const [local, rest] = splitProps(props, ['ref', 'class', 'children']);const [rail, setRail] = createSignal<HTMLDivElement>();@@ -90,7 +107,8 @@ function List(props: ComponentProps<typeof Tabs.List>) {if (typeof local.ref === 'function') local.ref(element);}}class={cn(- 'relative flex min-w-0 items-center gap-0.5 overflow-x-auto overscroll-x-contain [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',+ // Desktop padding keeps the pills' outline rings inside the scroll clip.+ 'relative flex min-w-0 items-center gap-0.5 overflow-x-auto overscroll-x-contain [scrollbar-width:none] not-touch:-m-1 not-touch:gap-1.5 not-touch:p-1 [&::-webkit-scrollbar]:hidden',local.class)}onScroll={measure}@@ -145,7 +163,13 @@ function Tab(props: ComponentProps<typeof Tabs.Trigger>) {<Tabs.Trigger{...rest}class={cn(- 'relative flex max-w-40 shrink-0 items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium text-ink-extra-muted outline-none hover:text-ink focus-visible:ring-2 focus-visible:ring-accent/50 data-selected:bg-surface data-selected:text-ink data-selected:ring data-selected:ring-inset data-selected:ring-edge-muted data-selected:shadow-sm',+ 'relative flex max-w-40 shrink-0 items-center gap-1.5 rounded-full font-medium whitespace-nowrap outline-none',+ 'touch:px-3 touch:py-1 touch:text-xs touch:text-ink-extra-muted touch:hover:text-ink touch:focus-visible:ring-2 touch:focus-visible:ring-accent/50 touch:data-selected:bg-surface touch:data-selected:text-ink touch:data-selected:ring touch:data-selected:ring-inset touch:data-selected:ring-edge-muted touch:data-selected:shadow-sm',+ // Desktop matches a `Tabs` pill: the outline Button frame, pressed fill when selected.+ 'not-touch:h-8 not-touch:border not-touch:bg-control not-touch:px-3 not-touch:text-sm not-touch:text-ink-muted not-touch:elevated not-touch:transition-colors not-touch:duration-120 motion-reduce:transition-none',+ 'not-touch:not-data-selected:hover:overlay-hover not-touch:not-data-selected:hover:text-ink',+ 'not-touch:data-selected:border-edge-button not-touch:data-selected:overlay-active not-touch:data-selected:text-ink not-touch:data-selected:shadow-none',+ 'not-touch:focus-visible:ring-2 not-touch:focus-visible:ring-inset not-touch:focus-visible:ring-edge-focus',local.class)}/>@@ -161,11 +185,11 @@ function AddMenu(}>) {return (- <div class="ml-0.5 shrink-0 pl-0.5">+ <div class="ml-0.5 shrink-0 pl-0.5 not-touch:ml-1.5 not-touch:pl-0"><Dropdown><Dropdown.Triggerref={props.ref}- size="icon-sm"+ size={isTouchDevice() ? 'icon-sm' : 'icon-md'}class="rounded-full"aria-label={props.label}>@@ -179,6 +203,8 @@ function AddMenu();}+TabSelector.Root = Root;TabSelector.List = List;TabSelector.Tab = Tab;+TabSelector.Panel = Panel;TabSelector.AddMenu = AddMenu;diff --git a/apps/web/src/components/ui/components/TabbedControl.tsx b/apps/web/src/components/ui/components/TabbedControl.tsxdeleted file mode 100644index 0be0f1afec..0000000000--- a/apps/web/src/components/ui/components/TabbedControl.tsx+++ /dev/null@@ -1,42 +0,0 @@-import {- SegmentedControl as KSegmentedControl,- type SegmentedControlRootProps,-} from '@kobalte/core/segmented-control';-import { For, type ParentComponent } from 'solid-js';--export const TabbedControl: ParentComponent<- {- list: { value: string; label: string }[];- value?: string;- defaultValue?: string;- } & Omit<SegmentedControlRootProps, 'defaultValue'>-> = (props) => {- return (- <KSegmentedControl- class="w-full text-sm rounded-full relative"- value={props.value}- defaultValue={props.defaultValue ?? props.list[0]?.value}- onChange={props.onChange}- disabled={props.disabled}- >- <div class="relative" role="presentation">- <div class="flex h-8" role="presentation">- <For each={props.list}>- {(item) => (- <KSegmentedControl.Item- value={item.value}- disabled={props.disabled}- class="relative flex-1 rounded-full has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-edge-focus data-disabled:pointer-events-none data-disabled:opacity-50"- >- <KSegmentedControl.ItemInput class="absolute inset-0 pointer-events-none" />- <KSegmentedControl.ItemLabel class="relative flex size-full items-center justify-center rounded-full border border-transparent px-4 text-xs font-medium text-ink-extra-muted data-checked:text-ink data-checked:bg-active data-checked:border-edge-frame hover:text-ink select-none transition-colors duration-120 motion-reduce:transition-none">- {item.label}- </KSegmentedControl.ItemLabel>- </KSegmentedControl.Item>- )}- </For>- </div>- </div>- </KSegmentedControl>- );-};diff --git a/apps/web/src/components/ui/components/Tabs.docs.tsx b/apps/web/src/components/ui/components/Tabs.docs.tsxnew file mode 100644index 0000000000..4c5886a7bf--- /dev/null+++ b/apps/web/src/components/ui/components/Tabs.docs.tsx@@ -0,0 +1,156 @@+import { defineDoc } from '@app/features/ui-gallery/types';+import ChatIcon from '@phosphor/chat-text.svg';+import CodeIcon from '@phosphor/code.svg';+import PaperclipIcon from '@phosphor/paperclip.svg';+import UsersIcon from '@phosphor/users.svg';+import { createSignal } from 'solid-js';+import { Tabs } from './Tabs';++// #region demo:view+function ViewDemo() {+ const [value, setValue] = createSignal<'overview' | 'activity' | 'files'>(+ 'overview'+ );+ return (+ <Tabs+ aria-label="Project sections"+ options={[+ { value: 'overview', label: 'Overview' },+ { value: 'activity', label: 'Activity' },+ { value: 'files', label: 'Files' },+ ]}+ value={value()}+ onChange={setValue}+ />+ );+}+// #endregion++// #region demo:counts+function CountsDemo() {+ const [value, setValue] = createSignal<'upcoming' | 'past' | 'canceled'>(+ 'upcoming'+ );+ return (+ <Tabs+ aria-label="Booking status"+ options={[+ { value: 'upcoming', label: 'Upcoming', count: 12 },+ { value: 'past', label: 'Past', count: 48 },+ { value: 'canceled', label: 'Canceled', count: 3 },+ ]}+ value={value()}+ onChange={setValue}+ />+ );+}+// #endregion++// #region demo:icon-only+function IconOnlyDemo() {+ const [value, setValue] = createSignal<'messages' | 'files' | 'people'>(+ 'messages'+ );+ return (+ <Tabs+ aria-label="Channel sections"+ iconOnly+ options={[+ { value: 'messages', label: 'Messages', icon: ChatIcon },+ { value: 'files', label: 'Attachments', icon: PaperclipIcon },+ { value: 'people', label: 'Participants', icon: UsersIcon },+ ]}+ value={value()}+ onChange={setValue}+ />+ );+}+// #endregion++// #region demo:value+function ValueDemo() {+ const [value, setValue] = createSignal<'team' | 'personal'>('team');+ return (+ <div class="w-64">+ <Tabs+ aria-label="Owner"+ size="sm"+ fullWidth+ options={[+ { value: 'team', label: 'Team' },+ { value: 'personal', label: 'Personal' },+ ]}+ value={value()}+ onChange={setValue}+ />+ </div>+ );+}+// #endregion++// #region demo:track+function TrackDemo() {+ const [value, setValue] = createSignal<'chat' | 'code'>('chat');+ return (+ <Tabs+ aria-label="Conversation mode"+ variant="track"+ fullWidth+ options={[+ { value: 'chat', label: 'Chat', icon: ChatIcon },+ { value: 'code', label: 'Code', icon: CodeIcon },+ ]}+ value={value()}+ onChange={setValue}+ class="w-56"+ />+ );+}+// #endregion++export default defineDoc({+ name: 'Tabs',+ category: 'Navigation',+ description:+ 'The one inline single choice: switch a view, a section, or a small set of values. Each option is its own pill; the selected one takes the pressed fill.',+ status: 'stable',+ exports: ['Tabs'],+ import: "import { Tabs } from '@ui';",+ propTypes: ['TabsProps', 'TabOption'],+ demos: [+ {+ id: 'view',+ title: 'View tabs',+ description:+ 'Header view tabs sit after the title, left of the controls. Unselected pills share the outline Button frame at the same height as their neighbours.',+ render: ViewDemo,+ },+ {+ id: 'counts',+ title: 'Counts',+ description: 'Counts follow the label in muted figures.',+ render: CountsDemo,+ },+ {+ id: 'icon-only',+ title: 'Icon only',+ description:+ 'A narrow header collapses labels to icons. Each label stays the accessible name and becomes the tooltip.',+ render: IconOnlyDemo,+ },+ {+ id: 'value',+ title: 'Choosing a value',+ description:+ 'In forms and dialogs, `fullWidth` gives equal-width options and `size="sm"` matches compact rows.',+ render: ValueDemo,+ },+ {+ id: 'track',+ title: 'Composer mode switch',+ description:+ '`variant="track"` slides one raised pill along a filled track on every device. It is only for the agent composer\'s Chat/Code switch in the composer tray.',+ render: TrackDemo,+ },+ ],+});diff --git a/apps/web/src/components/ui/components/Tabs.test.tsx b/apps/web/src/components/ui/components/Tabs.test.tsxnew file mode 100644index 0000000000..af79bfa446--- /dev/null+++ b/apps/web/src/components/ui/components/Tabs.test.tsx@@ -0,0 +1,160 @@+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import { createSignal } from 'solid-js';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import { Tabs, type TabsTouchStyle } from './Tabs';++const device = vi.hoisted(() => ({ touch: false }));+vi.mock('@core/mobile/isTouchDevice', () => ({+ isTouchDevice: () => device.touch,+}));++afterEach(() => {+ cleanup();+ vi.unstubAllGlobals();+});++it('switches a controlled view by its visible label', () => {+ const [value, setValue] = createSignal<'all' | 'recent' | 'threads'>('all');+ render(() => (+ <>+ <Tabs+ aria-label="Conversation view"+ options={[+ { value: 'all', label: 'All' },+ { value: 'recent', label: 'Recent' },+ { value: 'threads', label: 'Threads' },+ ]}+ value={value()}+ onChange={setValue}+ />+ <p>Current view: {value()}</p>+ </>+ ));++ fireEvent.click(screen.getByText('Recent', { exact: true }));+ expect(screen.getByText('Current view: recent')).toBeTruthy();+ expect(+ screen.getByRole('radio', { name: 'Recent', checked: true })+ ).toBeTruthy();+ expect(+ screen.getByRole('radio', { name: 'All', checked: false })+ ).toBeTruthy();++ fireEvent.click(screen.getByText('Threads', { exact: true }));+ expect(screen.getByText('Current view: threads')).toBeTruthy();+});++it('keeps icon-only options named by their labels', () => {+ const [value, setValue] = createSignal<'messages' | 'files'>('messages');+ const Icon = (props: { class?: string }) => <svg class={props.class} />;+ render(() => (+ <Tabs+ aria-label="Channel sections"+ iconOnly+ options={[+ { value: 'messages', label: 'Messages', icon: Icon },+ { value: 'files', label: 'Attachments', icon: Icon },+ ]}+ value={value()}+ onChange={setValue}+ />+ ));++ fireEvent.click(screen.getByRole('radio', { name: 'Attachments' }));+ expect(value()).toBe('files');+});++it('does not select a disabled option', () => {+ const [value, setValue] = createSignal<'team' | 'personal'>('personal');+ render(() => (+ <Tabs+ aria-label="Owner"+ options={[+ { value: 'team', label: 'Team', disabled: true },+ { value: 'personal', label: 'Personal' },+ ]}+ value={value()}+ onChange={setValue}+ />+ ));++ fireEvent.click(screen.getByText('Team', { exact: true }));+ expect(value()).toBe('personal');+});++// Kobalte's sliding indicator measures the selected option.+const stubResizeObserver = () =>+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );++it('slides the composer mode switch along its track on desktop', () => {+ stubResizeObserver();+ const [value, setValue] = createSignal<'chat' | 'code'>('chat');+ render(() => (+ <Tabs+ aria-label="Conversation mode"+ variant="track"+ options={[+ { value: 'chat', label: 'Chat' },+ { value: 'code', label: 'Code' },+ ]}+ value={value()}+ onChange={setValue}+ />+ ));++ fireEvent.click(screen.getByText('Code', { exact: true }));+ expect(value()).toBe('code');+ expect(document.querySelector('[role=presentation]')).not.toBeNull();+});++describe('on touch', () => {+ beforeEach(() => {+ device.touch = true;+ stubResizeObserver();+ });+ afterEach(() => {+ device.touch = false;+ });++ const renderTouch = (touch: TabsTouchStyle | undefined) => {+ const [value, setValue] = createSignal<'available' | 'unavailable'>(+ 'available'+ );+ render(() => (+ <Tabs+ aria-label="Availability type"+ touch={touch}+ options={[+ { value: 'available', label: 'Available' },+ { value: 'unavailable', label: 'Unavailable' },+ ]}+ value={value()}+ onChange={setValue}+ />+ ));+ fireEvent.click(screen.getByText('Unavailable', { exact: true }));+ return {+ value,+ slidingPill: () => document.querySelector('[role=presentation]'),+ };+ };++ it.each([+ { touch: undefined, slides: true },+ { touch: 'pills' as const, slides: false },+ ])('selects with touch=$touch, sliding pill: $slides', (row) => {+ const { value, slidingPill } = renderTouch(row.touch);+ expect(value()).toBe('unavailable');+ expect(+ screen.getByRole('radio', { name: 'Unavailable', checked: true })+ ).toBeTruthy();+ expect(slidingPill() !== null).toBe(row.slides);+ });+});diff --git a/apps/web/src/components/ui/components/Tabs.tsx b/apps/web/src/components/ui/components/Tabs.tsxindex 16fc9bdaac..10e73e0d58 100644--- a/apps/web/src/components/ui/components/Tabs.tsx+++ b/apps/web/src/components/ui/components/Tabs.tsx@@ -1,79 +1,387 @@-import {- SegmentedControl as KSegmentedControl,- type SegmentedControlRootProps,-} from '@kobalte/core/segmented-control';-import { For, type JSX, splitProps } from 'solid-js';+import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { SegmentedControl as KSegmentedControl } from '@kobalte/core/segmented-control';+import { type Component, For, Match, Show, Switch } from 'solid-js';+import { Dynamic } from 'solid-js/web';import { cn } from '../utils/classname';+import { Layer } from './Layer';+import { Tooltip } from './Tooltip';-export type TabItem = {- value: string;- label: string | (() => JSX.Element);+export type TabOption<T extends string> = {+ value: T;+ /** Accessible name, and the tooltip when the group is icon-only. */+ label: string;+ icon?: Component<{ class?: string }>;+ /** Shown after the label in muted figures. */+ count?: number;+ disabled?: boolean;};-export type TabsProps = {- list: TabItem[];- value?: string;- defaultValue?: string;- class?: string;- itemClass?: string;- labelClass?: string;+/** Pill height matches the Button of the same size. */+export type TabsSize = 'sm' | 'md' | 'lg';++/**+ * Desktop always renders separate pills. Touch keeps the treatment each+ * surface already had: a sliding pill, a bordered inset track, divided+ * segments, or the same separate pills as desktop.+ */+export type TabsTouchStyle = 'pill' | 'inset' | 'segmented' | 'pills';++export type TabsProps<T extends string> = {+ 'aria-label': string;+ options: readonly TabOption<T>[];+ value: T | undefined;+ onChange: (value: T) => void;+ /** Stretch to the container with equal-width options. */fullWidth?: boolean;-} & Omit<SegmentedControlRootProps, 'defaultValue'>;+ /** Show only icons, with each label as a tooltip; options without an icon keep their label. */+ iconOnly?: boolean;+ disabled?: boolean;+ /** Placement only (margins, width, alignment); never restyle the options. */+ class?: string;+ ref?: (element: HTMLElement) => void;+} & (+ | {+ variant?: 'pills';+ size?: TabsSize;+ /** Let many options flow onto more lines; renders pills on touch too. */+ wrap?: boolean;+ touch?: TabsTouchStyle;+ }+ | {+ /**+ * One raised pill slides along a filled track, on every device. Only for+ * the agent composer's mode switch, which sits in the composer's tray.+ */+ variant: 'track';+ size?: never;+ wrap?: never;+ touch?: never;+ }+);/**- * Borderless tab switcher. No track chrome — a rounded pill slides behind- * the active item.+ * One inline single choice: switch a view, a section, or a small set of+ * values. On desktop each option is its own pill, the outline Button frame,+ * and the selected option takes the pressed fill.+ *+ * @do Use for two to six short options that are all visible at once.+ * @do Put view tabs left of the header controls, after the title.+ * @do Use `iconOnly` to collapse a narrow header; keep `label` as the name.+ * @do Use `size` to match neighbouring controls: `md` beside 32px buttons.+ * @do Set `touch` to the look the surface had on touch: `pill` (sliding),+ * `inset`, `segmented`, or `pills` for separate pills like desktop.+ * @dont Do not build tabs from Buttons, a ButtonGroup, or HeaderActionGroup.+ * @dont Do not put Tabs inside a HeaderActionGroup or ButtonGroup.+ * @dont Do not use Tabs for tabs that own panels or a dynamic collection; use TabSelector.+ * @dont Do not branch on `isTouchDevice()` to pick a tab component; set `touch`.+ * @dont Do not use `variant="track"` outside the agent composer's tray.*/-export const Tabs = (props: TabsProps) => {- const [local, rootProps] = splitProps(props, [- 'list',- 'value',- 'defaultValue',- 'disabled',- 'class',- 'itemClass',- 'labelClass',- 'fullWidth',- ]);+export function Tabs<T extends string>(props: TabsProps<T>) {+ const select = (value: string) => {+ const option = props.options.find((option) => option.value === value);+ if (option) props.onChange(option.value);+ };+ // Desktop and wrapping rows always render separate pills.+ const touchStyle = (): TabsTouchStyle =>+ isTouchDevice() && !props.wrap ? (props.touch ?? 'pill') : 'pills';return (<KSegmentedControl- value={local.value}- defaultValue={local.defaultValue ?? local.list[0]?.value}- disabled={local.disabled}- {...rootProps}+ ref={props.ref}+ aria-label={props['aria-label']}+ value={props.value ?? ''}+ onChange={select}+ disabled={props.disabled}class={cn(- 'relative inline-flex h-8 items-center',- local.fullWidth && 'flex w-full',- local.class+ 'relative inline-flex min-w-0 items-center',+ props.fullWidth && 'flex w-full',+ props.class+ )}+ >+ <Switch+ fallback={+ <div+ class={cn(+ 'flex min-w-0 items-center',+ props.wrap && 'flex-wrap',+ props.size === 'sm' ? 'gap-1' : 'gap-1.5',+ props.fullWidth && 'w-full'+ )}+ >+ <For each={props.options}>+ {(option) => (+ <PillOption+ option={option}+ size={props.size ?? 'md'}+ iconOnly={props.iconOnly ?? false}+ fullWidth={props.fullWidth ?? false}+ />+ )}+ </For>+ </div>+ }+ >+ <Match when={props.variant === 'track'}>+ <Track {...props} />+ </Match>+ <Match when={touchStyle() === 'pill'}>+ <TouchPill {...props} />+ </Match>+ <Match when={touchStyle() === 'inset'}>+ <TouchInset {...props} />+ </Match>+ <Match when={touchStyle() === 'segmented'}>+ <TouchSegmented {...props} />+ </Match>+ </Switch>+ </KSegmentedControl>+ );+}++function OptionContent<T extends string>(props: {+ option: TabOption<T>;+ iconOnly: boolean;+ iconClass: string;+}) {+ return (+ <>+ <Show when={props.option.icon}>+ {(icon) => (+ <Dynamic component={icon()} class={cn('shrink-0', props.iconClass)} />+ )}+ </Show>+ <span+ class={cn(+ 'truncate',+ props.iconOnly && props.option.icon !== undefined && 'sr-only'+ )}+ >+ {props.option.label}+ </span>+ <Show when={props.option.count !== undefined && !props.iconOnly}>+ <span class="text-ink-extra-muted tabular-nums">+ {props.option.count}+ </span>+ </Show>+ </>+ );+}++function PillOption<T extends string>(props: {+ option: TabOption<T>;+ size: TabsSize;+ iconOnly: boolean;+ fullWidth: boolean;+}) {+ const square = () => props.iconOnly && props.option.icon !== undefined;+ const item = () => (+ <KSegmentedControl.Item+ value={props.option.value}+ disabled={props.option.disabled}+ class={cn(+ 'relative inline-flex min-w-0 shrink-0 rounded-full border text-ink-muted transition-colors duration-120 motion-reduce:transition-none',+ // Unselected options share the outline Button frame.+ 'bg-control elevated not-touch:not-data-checked:hover:overlay-hover not-touch:not-data-checked:hover:text-ink',+ // The selected option takes the pressed fill, flat like a pressed Button.+ 'data-checked:border-edge-button data-checked:overlay-active data-checked:text-ink data-checked:shadow-none',+ 'has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-edge-focus',+ 'data-disabled:pointer-events-none data-disabled:opacity-50',+ props.size === 'sm' && 'h-6',+ props.size === 'md' && 'h-8',+ props.size === 'lg' && 'h-9',+ square() && 'aspect-square',+ props.fullWidth && 'flex-1'+ )}+ >+ <KSegmentedControl.ItemInput class="pointer-events-none absolute inset-0" />+ <KSegmentedControl.ItemLabel+ class={cn(+ 'flex size-full min-w-0 items-center justify-center font-medium whitespace-nowrap select-none',+ props.size === 'sm' && 'gap-1 px-2 text-xs',+ props.size === 'md' && 'gap-1.5 px-3 text-sm',+ props.size === 'lg' && 'gap-2 px-4 text-sm',+ // Equal-width options are centred, so narrow rails keep whole labels.+ props.fullWidth && 'px-1.5',+ square() && 'px-0'+ )}+ >+ <OptionContent+ option={props.option}+ iconOnly={props.iconOnly}+ // Glyphs match a Button of the same size: smaller beside a label.+ iconClass={cn(+ props.size === 'sm' && (square() ? 'size-3.5' : 'size-3'),+ props.size === 'md' && (square() ? 'size-4' : 'size-3.5'),+ props.size === 'lg' && (square() ? 'size-5' : 'size-4')+ )}+ />+ </KSegmentedControl.ItemLabel>+ </KSegmentedControl.Item>+ );++ return (+ <Show when={square()} fallback={item()}>+ <Tooltip label={props.option.label}>{item()}</Tooltip>+ </Show>+ );+}++function Track<T extends string>(props: TabsProps<T>) {+ return (+ <div+ class={cn(+ 'relative flex h-9 items-center rounded-full bg-ink/3 light-mode:bg-[rgb(246_246_246)] dark-mode:bg-[rgb(24_24_24)]',+ props.fullWidth && 'w-full'+ )}+ >+ <KSegmentedControl.Indicator class="pointer-events-none absolute top-0 left-0 z-0 rounded-full bg-panel bg-[linear-gradient(to_bottom,color-mix(in_srgb,var(--color-ink)_2%,transparent),transparent)] transition-[transform,width,height] duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none dark-mode:bg-[rgb(32_32_32)] light-mode:border light-mode:border-ink/7 light-mode:bg-[rgb(250_250_250)] light-mode:bg-none light-mode:shadow-[0_1px_6px_0_color-mix(in_srgb,var(--color-ink)_5%,transparent)]" />+ <For each={props.options}>+ {(option) => (+ <KSegmentedControl.Item+ value={option.value}+ disabled={option.disabled}+ class={cn(+ 'relative z-1 inline-flex h-full min-w-0 items-center rounded-full',+ 'has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-edge-focus data-disabled:pointer-events-none data-disabled:opacity-50',+ props.fullWidth && 'flex-1'+ )}+ >+ <KSegmentedControl.ItemInput class="pointer-events-none absolute inset-0" />+ <KSegmentedControl.ItemLabel+ class={cn(+ 'flex h-full items-center gap-1.5 rounded-full px-4 text-sm font-medium whitespace-nowrap select-none text-ink-extra-muted hover:text-ink data-checked:text-ink transition-colors duration-120 motion-reduce:transition-none touch:px-2.5',+ props.fullWidth && 'w-full justify-center'+ )}+ >+ <OptionContent+ option={option}+ iconOnly={props.iconOnly ?? false}+ iconClass="size-3.5"+ />+ </KSegmentedControl.ItemLabel>+ </KSegmentedControl.Item>+ )}+ </For>+ </div>+ );+}++function TouchPill<T extends string>(props: TabsProps<T>) {+ return (+ <div+ class={cn(+ 'relative flex items-center',+ props.size === 'lg' ? 'h-11' : 'h-8',+ props.fullWidth && 'w-full')}><KSegmentedControl.Indicator class="pointer-events-none absolute top-0 left-0 z-0 rounded-full border border-edge-frame bg-active transition-[transform,width,height] duration-50 motion-reduce:transition-none" />- <For each={local.list}>- {(item) => (+ <For each={props.options}>+ {(option) => (<KSegmentedControl.Item- value={item.value}- disabled={local.disabled}+ value={option.value}+ disabled={option.disabled}class={cn('relative z-1 inline-flex h-full min-w-0 items-center rounded-full','has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-edge-focus data-disabled:pointer-events-none data-disabled:opacity-50',- local.fullWidth && 'flex-1',- local.itemClass+ props.fullWidth && 'flex-1')}><KSegmentedControl.ItemInput class="pointer-events-none absolute inset-0" /><KSegmentedControl.ItemLabelclass={cn(- 'flex h-8 items-center px-4 text-xs font-medium rounded-full select-none text-ink-extra-muted hover:text-ink data-checked:text-ink transition-colors duration-120 motion-reduce:transition-none',- local.fullWidth && 'w-full justify-center',- local.labelClass+ 'flex h-full items-center gap-1.5 rounded-full px-4 text-xs font-medium whitespace-nowrap select-none text-ink-extra-muted hover:text-ink data-checked:text-ink transition-colors duration-120 motion-reduce:transition-none',+ props.fullWidth && 'w-full justify-center')}>- {typeof item.label === 'function' ? item.label() : item.label}+ <OptionContent+ option={option}+ iconOnly={props.iconOnly ?? false}+ iconClass="size-3.5"+ /></KSegmentedControl.ItemLabel></KSegmentedControl.Item>)}</For>- </KSegmentedControl>+ </div>);-};+}++function TouchInset<T extends string>(props: TabsProps<T>) {+ return (+ <Layer depth={0}>+ <div+ class={cn(+ 'relative flex items-center rounded-full border border-edge-muted bg-surface p-0.5 has-focus-visible:ring-2 has-focus-visible:ring-accent/20',+ props.fullWidth && 'w-full'+ )}+ >+ <For each={props.options}>+ {(option) => (+ <Layer depth={2}>+ <KSegmentedControl.Item+ value={option.value}+ disabled={option.disabled}+ class={cn(props.fullWidth && 'flex-1')}+ >+ <KSegmentedControl.ItemInput class="pointer-events-none absolute inset-0" />+ <KSegmentedControl.ItemLabel+ class={cn(+ 'flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium whitespace-nowrap text-ink-extra-muted ring-inset hover:text-ink data-checked:bg-surface data-checked:text-ink data-checked:ring data-checked:ring-edge-muted data-checked:shadow-[0_1px_2px_rgba(0,0,0,0.06)]',+ props.fullWidth && 'w-full justify-center'+ )}+ // Keep a focused input focused while switching.+ onPointerDown={(event) => event.preventDefault()}+ >+ <OptionContent+ option={option}+ iconOnly={props.iconOnly ?? false}+ iconClass="size-3.5"+ />+ </KSegmentedControl.ItemLabel>+ </KSegmentedControl.Item>+ </Layer>+ )}+ </For>+ </div>+ </Layer>+ );+}++function TouchSegmented<T extends string>(props: TabsProps<T>) {+ return (+ <div+ class={cn(+ 'inline-flex overflow-hidden rounded-full border border-edge-frame',+ props.size === 'sm' ? 'h-6' : 'h-8',+ props.fullWidth && 'flex w-full'+ )}+ >+ <For each={props.options}>+ {(option) => (+ <KSegmentedControl.Item+ value={option.value}+ disabled={option.disabled}+ class={cn(+ 'relative flex h-full items-center justify-center border-r border-edge-divider font-medium outline-none last:border-r-0 has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-edge-focus transition-colors duration-120 motion-reduce:transition-none',+ props.size === 'sm' ? 'px-2 text-xs' : 'px-3 text-sm',+ option.disabled+ ? 'opacity-50'+ : 'text-ink-muted active:overlay-active data-checked:text-ink data-checked:overlay-active',+ props.fullWidth && 'flex-1'+ )}+ >+ <KSegmentedControl.ItemInput class="pointer-events-none absolute inset-0" />+ <KSegmentedControl.ItemLabel class="flex items-center gap-1.5">+ <OptionContent+ option={option}+ iconOnly={props.iconOnly ?? false}+ iconClass="size-3.5"+ />+ </KSegmentedControl.ItemLabel>+ </KSegmentedControl.Item>+ )}+ </For>+ </div>+ );+}diff --git a/apps/web/src/components/ui/components/TextField.tsx b/apps/web/src/components/ui/components/TextField.tsxindex 2a5cba1e24..896fbbbd5c 100644--- a/apps/web/src/components/ui/components/TextField.tsx+++ b/apps/web/src/components/ui/components/TextField.tsx@@ -56,7 +56,7 @@ function TextFieldTextArea<T extends ValidComponent = 'textarea'>(<KobalteTextField.TextAreadata-slot="text-field-textarea"class={cn(- 'flex min-h-20 w-full resize-none rounded-[10px] border border-edge-frame bg-control px-2.5 py-2 text-base text-ink caret-current outline-none transition-[border-color,box-shadow] duration-120 motion-reduce:transition-none',+ 'flex min-h-20 w-full resize-none rounded-xl border border-edge-frame bg-control not-touch:elevated px-2.5 py-2 text-base text-ink caret-current outline-none transition-[border-color,box-shadow] duration-120 motion-reduce:transition-none','placeholder:text-ink-placeholder',inputOutlineFocusClasses,'aria-invalid:border-failure aria-invalid:ring-2 aria-invalid:ring-failure/20',diff --git a/apps/web/src/components/ui/foundations/controls.docs.tsx b/apps/web/src/components/ui/foundations/controls.docs.tsxnew file mode 100644index 0000000000..c9b59c704c--- /dev/null+++ b/apps/web/src/components/ui/foundations/controls.docs.tsx@@ -0,0 +1,183 @@+import { defineDoc } from '@app/features/ui-gallery/types';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';+import FilterIcon from '@phosphor/funnel-simple.svg';+import ListIcon from '@phosphor/list-bullets.svg';+import SearchIcon from '@phosphor/magnifying-glass.svg';+import PlusIcon from '@phosphor/plus.svg';+import SidebarIcon from '@phosphor/sidebar-simple.svg';+import SortIcon from '@phosphor/sort-ascending.svg';+import BoardIcon from '@phosphor/squares-four.svg';+import { createSignal, For } from 'solid-js';+import { Button } from '../components/Button';+import { Tabs } from '../components/Tabs';++// #region demo:header+function HeaderDemo() {+ const [section, setSection] = createSignal<'overview' | 'tasks' | 'files'>(+ 'overview'+ );+ const [layout, setLayout] = createSignal<'list' | 'board'>('list');+ return (+ <div class="flex h-12 w-full min-w-0 items-center gap-2 rounded-xl border border-edge-muted px-3">+ <h1 class="shrink-0 px-1 text-sm font-semibold text-ink">Launch</h1>+ <Tabs+ aria-label="Project sections"+ options={[+ { value: 'overview', label: 'Overview' },+ { value: 'tasks', label: 'Tasks', count: 8 },+ { value: 'files', label: 'Files' },+ ]}+ value={section()}+ onChange={setSection}+ />+ <div class="ml-auto flex shrink-0 items-center gap-2">+ <HeaderActionGroup label="Task filters">+ <Button size="icon-md" label="Filter tasks">+ <FilterIcon />+ </Button>+ <Button size="icon-md" label="Sort tasks">+ <SortIcon />+ </Button>+ </HeaderActionGroup>+ <HeaderActionGroup label="Task layout">+ <Button+ size="icon-md"+ label="List"+ aria-pressed={layout() === 'list'}+ onClick={() => setLayout('list')}+ >+ <ListIcon />+ </Button>+ <Button+ size="icon-md"+ label="Board"+ aria-pressed={layout() === 'board'}+ onClick={() => setLayout('board')}+ >+ <BoardIcon />+ </Button>+ </HeaderActionGroup>+ <Button variant="outline" size="md">+ <PlusIcon />+ New+ </Button>+ <Button variant="outline" size="icon-md" label="Search tasks">+ <SearchIcon />+ </Button>+ </div>+ </div>+ );+}+// #endregion++// #region demo:selected+function SelectedDemo() {+ const [value, setValue] = createSignal<'signal' | 'noise'>('signal');+ const [open, setOpen] = createSignal(true);+ return (+ <div class="flex items-center gap-2">+ <Tabs+ aria-label="Inbox view"+ options={[+ { value: 'signal', label: 'Signal' },+ { value: 'noise', label: 'Noise' },+ ]}+ value={value()}+ onChange={setValue}+ />+ <Button+ variant="outline"+ size="icon-md"+ label={open() ? 'Hide details' : 'Show details'}+ aria-pressed={open()}+ onClick={() => setOpen(!open())}+ >+ <SidebarIcon />+ </Button>+ </div>+ );+}+// #endregion++// #region demo:sizes+function SizesDemo() {+ return (+ <div class="flex flex-col gap-3">+ <For each={['sm', 'md'] as const}>+ {(size) => (+ <div class="flex items-center gap-2">+ <span class="w-8 font-mono text-xs text-ink-subtle">{size}</span>+ <Tabs+ aria-label={`Tabs ${size}`}+ size={size}+ options={[+ { value: 'team', label: 'Team' },+ { value: 'me', label: 'Me' },+ ]}+ value="team"+ onChange={() => {}}+ />+ <Button variant="outline" size={size}>+ <PlusIcon />+ New+ </Button>+ <Button+ variant="outline"+ size={size === 'sm' ? 'icon-sm' : 'icon-md'}+ label="Search"+ >+ <SearchIcon />+ </Button>+ </div>+ )}+ </For>+ </div>+ );+}+// #endregion++export default defineDoc({+ name: 'Controls',+ category: 'Foundations',+ description:+ 'Every bar is built from the same few controls in the same places: one component per role, one height per bar, one selected state. Tabs switch views; islands frame actions.',+ demos: [+ {+ id: 'header',+ title: 'Header anatomy',+ description:+ 'Title, then view tabs, on the left. Islands on the right: filters, view options, then New and Search. Every control is 32px; icon-only glyphs are 16px.',+ render: HeaderDemo,+ fill: true,+ },+ {+ id: 'selected',+ title: 'One selected state',+ description:+ 'A selected tab and a pressed toggle share the pressed fill, flat. Unselected options keep the outline Button frame.',+ render: SelectedDemo,+ },+ {+ id: 'sizes',+ title: 'One height per row',+ description:+ 'A tab pill is the height of the Button of the same size, so a row mixes them without drift.',+ render: SizesDemo,+ },+ ],+ guidelines: {+ do: [+ 'Use `Tabs` to switch a view, section, or one of a few values; `TabSelector` when tabs own panels or a dynamic collection.',+ 'Group related actions in a `HeaderActionGroup`: filters, view options, sharing, navigation, detail toggles.',+ 'Use `icon-md` for icon-only header buttons and `md` for labelled ones.',+ 'Mark on/off toggles with `aria-pressed`.',+ 'Collapse a narrow header with `Tabs iconOnly`, then a menu.',+ ],+ dont: [+ 'Do not put tabs in an island or build tabs from Buttons.',+ 'Do not restyle or resize a control from `class` or a wrapper; use its props.',+ 'Do not invent a selected style (accent text, underline, tint) on desktop.',+ 'Do not branch on `isTouchDevice()` to pick a tab component; set `touch`.',+ ],+ },+});diff --git a/apps/web/src/components/ui/foundations/surfaces.docs.tsx b/apps/web/src/components/ui/foundations/surfaces.docs.tsxindex a195bfaa21..a3deb4b5a4 100644--- a/apps/web/src/components/ui/foundations/surfaces.docs.tsx+++ b/apps/web/src/components/ui/foundations/surfaces.docs.tsx@@ -144,10 +144,12 @@ export default defineDoc({'Set `depth` on the container and let children read `bg-surface`.','Use `bg-inset` for wells (inputs and code blocks) and `Layer offset={1}` with `bg-surface` for raised items.','Verify new components at several depths using the toolbar control.',+ 'Float menus, popovers, editor panels, and floating toolbars on `menu-surface`; open dialogs with `Dialog`, which owns `elevated-surface`.',],dont: ['Do not reference `bg-surface-2` and friends directly in a component; that pins it to one depth.','Do not nest more than about three depth steps — past that the steps stop reading.',+ 'Do not hand-build an overlay from `bg-menu`, `bg-surface`, a border, and a shadow, or reuse the retired `bg-menu-glass`.',],},});diff --git a/apps/web/src/components/ui/index.ts b/apps/web/src/components/ui/index.tsindex 7275e67165..a414fb68d3 100644--- a/apps/web/src/components/ui/index.ts+++ b/apps/web/src/components/ui/index.ts@@ -148,7 +148,6 @@ export { PillButton } from './components/PillButton';export type { RadioGroupProps } from './components/RadioGroup';export { RadioGroup } from './components/RadioGroup';export { Scroll } from './components/Scroll';-export { SegmentedControl } from './components/SegmentedControl';export type {SelectContentProps,SelectIconProps,@@ -172,9 +171,13 @@ export type {} from './components/Slider';export { Slider } from './components/Slider';export { Surface } from './components/Surface';-export { TabbedControl } from './components/TabbedControl';export { TabSelector } from './components/TabSelector';-export type { TabItem, TabsProps } from './components/Tabs';+export type {+ TabOption,+ TabsProps,+ TabsSize,+ TabsTouchStyle,+} from './components/Tabs';export { Tabs } from './components/Tabs';export { TagDot, type TagDotProps, type TagDotSize } from './components/TagDot';export type {diff --git a/apps/web/src/components/view-shell/AiFilterInput.tsx b/apps/web/src/components/view-shell/AiFilterInput.tsxindex cb05f78642..dc9999d4b3 100644--- a/apps/web/src/components/view-shell/AiFilterInput.tsx+++ b/apps/web/src/components/view-shell/AiFilterInput.tsx@@ -135,7 +135,7 @@ export function AiFilterInput(props: AiFilterInputProps) {<div class="flex w-60 flex-col gap-1"><divclass={cn(- 'flex h-8 items-center gap-2 rounded-lg border border-edge-muted bg-input px-2',+ 'flex h-8 items-center gap-2 rounded-lg border border-edge-muted bg-input not-touch:elevated px-2','focus-within:border-accent')}>diff --git a/apps/web/src/components/view-shell/ListDropdowns.test.tsx b/apps/web/src/components/view-shell/ListDropdowns.test.tsxindex 988477610f..a5a1f19506 100644--- a/apps/web/src/components/view-shell/ListDropdowns.test.tsx+++ b/apps/web/src/components/view-shell/ListDropdowns.test.tsx@@ -61,6 +61,7 @@ function setup(single = false, searchable = false) {render(() => (<ListFilterDropdownlabel="Filter tasks"+ activeCount={selected().length}open={open()}onOpenChange={setOpen}groups={[@@ -121,12 +122,14 @@ async function openSubmenu() {it('keeps multi-select menus open with Shift while adding and removing filters', async () => {const { selected, open } = setup();+ const trigger = screen.getByLabelText('Filter tasks');await openSubmenu();selectOption(await screen.findByRole('menuitemcheckbox', { name: 'Alice' }),true);expect(selected()).toEqual(['alice']);+ expect(trigger.textContent).toBe('1');expect(open()).toBe(true);expect(screen@@ -135,8 +138,10 @@ it('keeps multi-select menus open with Shift while adding and removing filters',).toBe('true');selectOption(screen.getByRole('menuitemcheckbox', { name: 'Bob' }), true);expect(selected()).toEqual(['alice', 'bob']);+ expect(trigger.textContent).toBe('2');selectOption(screen.getByRole('menuitemcheckbox', { name: 'Alice' }), true);expect(selected()).toEqual(['bob']);+ expect(trigger.textContent).toBe('1');expect(open()).toBe(true);});diff --git a/apps/web/src/components/view-shell/ListDropdowns.tsx b/apps/web/src/components/view-shell/ListDropdowns.tsxindex 2791d48040..948143a1e1 100644--- a/apps/web/src/components/view-shell/ListDropdowns.tsx+++ b/apps/web/src/components/view-shell/ListDropdowns.tsx@@ -51,8 +51,7 @@ function SingleSelectDropdown<TId extends string>(<Dropdown.Triggerref={props.triggerRef}variant="ghost"- size="md"- square+ size="icon-md"class={props.class}label={props.label}>@@ -207,6 +206,7 @@ export type ListFilterDropdownProps<customTrigger?: JSX.Element;triggerRef?: (element: HTMLButtonElement) => void;label?: string;+ activeCount?: number;clearLabel?: string;class?: string;contentClass?: string;@@ -256,12 +256,16 @@ export function ListFilterDropdown<<Dropdown.Triggerref={props.triggerRef}variant="ghost"- size="md"- square+ size={props.activeCount ? 'md' : 'icon-md'}class={props.class}label={props.label ?? 'Filter list'}><FilterIcon />+ <Show when={props.activeCount}>+ <span class="flex min-w-4 h-4 items-center justify-center rounded-full bg-accent px-1 text-xxs font-medium leading-none text-surface">+ {props.activeCount}+ </span>+ </Show></Dropdown.Trigger>}>diff --git a/apps/web/src/components/view-shell/ListHeader.tsx b/apps/web/src/components/view-shell/ListHeader.tsxnew file mode 100644index 0000000000..b426ca494f--- /dev/null+++ b/apps/web/src/components/view-shell/ListHeader.tsx@@ -0,0 +1,86 @@+import SearchIcon from '@phosphor/magnifying-glass.svg';+import { Button, cn } from '@ui';+import { createSignal, type JSX, onMount, Show } from 'solid-js';+import { SearchBar } from './SearchBar';+import { ViewShell } from './ViewShell';++export function ListHeader(props: {+ title: JSX.Element;+ /** Islands and controls after the title; omit for a title-only header. */+ children?: JSX.Element;+}) {+ return (+ <ViewShell.TopBar class="gap-2 pr-4">+ {/* Both regions clip overflow; the padding keeps control rings unclipped. */}+ <div class="-m-1 min-w-0 flex-1 truncate p-1">{props.title}</div>+ <div class="-m-1 flex min-w-0 max-w-full items-center gap-2 overflow-x-auto p-1 [scrollbar-width:none]">+ {props.children}+ </div>+ </ViewShell.TopBar>+ );+}++/** The query belongs to the view; only the expanded presentation is local. */+export function ListHeaderSearch(props: {+ label: string;+ placeholder?: string;+ value: string;+ onValueChange: (value: string) => void;+ onEscape?: () => void;+ registerFocus: (focus: () => void) => void;+ ref?: (element: HTMLDivElement) => void;+}) {+ const [expanded, setExpanded] = createSignal(Boolean(props.value));+ let input: HTMLInputElement | undefined;+ let trigger: HTMLButtonElement | undefined;+ const focus = () => {+ setExpanded(true);+ queueMicrotask(() => {+ input?.focus();+ input?.select();+ });+ };+ const close = () => {+ props.onValueChange('');+ setExpanded(false);+ trigger?.focus();+ };+ onMount(() => props.registerFocus(focus));++ return (+ <div+ ref={props.ref}+ class={cn('shrink-0', expanded() ? 'w-56 max-w-[40cqw] min-w-24' : 'w-8')}+ >+ <Show+ when={expanded()}+ fallback={+ <Button+ ref={trigger}+ variant="outline"+ size="icon-md"+ label={props.label}+ aria-expanded="false"+ onClick={focus}+ >+ <SearchIcon class="size-4" />+ </Button>+ }+ >+ <SearchBar+ ref={input}+ size="sm"+ label={props.label}+ placeholder={props.placeholder ?? props.label}+ value={props.value}+ onValueChange={props.onValueChange}+ onClose={close}+ onEscape={() => {+ close();+ props.onEscape?.();+ }}+ />+ </Show>+ </div>+ );+}diff --git a/apps/web/src/components/view-shell/SearchBar.tsx b/apps/web/src/components/view-shell/SearchBar.tsxindex 8882e6cac7..c9487ee024 100644--- a/apps/web/src/components/view-shell/SearchBar.tsx+++ b/apps/web/src/components/view-shell/SearchBar.tsx@@ -67,8 +67,8 @@ export function SearchBar(props: SearchBarProps) {depth={2}hideBorderclass={cn(- 'w-full min-w-0 rounded-full border border-edge-button bg-control text-ink has-[input:focus-visible]:ring-2 has-[input:focus-visible]:ring-edge-muted',- local.size === 'sm' ? 'h-8' : 'h-10',+ 'w-full min-w-0 rounded-full border border-edge-button bg-control not-touch:elevated text-ink has-[input:focus-visible]:ring-2 has-[input:focus-visible]:ring-edge-muted',+ local.size === 'sm' ? 'h-8' : 'h-[var(--view-search-height,2.5rem)]',local.class)}data-search-bar=""diff --git a/apps/web/src/components/view-shell/SidebarCreateButton.test.tsx b/apps/web/src/components/view-shell/SidebarCreateButton.test.tsxindex aa5716f3fb..b71c248284 100644--- a/apps/web/src/components/view-shell/SidebarCreateButton.test.tsx+++ b/apps/web/src/components/view-shell/SidebarCreateButton.test.tsx@@ -18,7 +18,7 @@ vi.mock('@ui', async () => ({props: JSX.ButtonHTMLAttributes<HTMLButtonElement> & { label?: string }) => (<button- aria-label={props.label}+ aria-label={props['aria-label'] ?? props.label}onMouseDown={props.onMouseDown}onClick={props.onClick}disabled={props.disabled}diff --git a/apps/web/src/components/view-shell/SidebarCreateButton.tsx b/apps/web/src/components/view-shell/SidebarCreateButton.tsxindex ee250cb841..06aac35948 100644--- a/apps/web/src/components/view-shell/SidebarCreateButton.tsx+++ b/apps/web/src/components/view-shell/SidebarCreateButton.tsx@@ -2,6 +2,7 @@ import { isTouchDevice } from '@core/mobile/isTouchDevice';import PlusIcon from '@phosphor/plus.svg';import { pressHandlers } from '@ui';import { type JSX, Show } from 'solid-js';+import { ViewCreateButton } from './ViewCreateButton';import { ViewSidebar } from './ViewSidebar';export function SidebarCreateHeader(props: {@@ -10,11 +11,17 @@ export function SidebarCreateHeader(props: {onCreate: () => void;actions?: JSX.Element;titleActions?: JSX.Element;+ createAction?: JSX.Element;+ search?: () => JSX.Element;+ searchLabel?: string;}) {return (<header class="flex shrink-0 flex-col"><Show when={!isTouchDevice()}>- <ViewSidebar.Header>+ <ViewSidebar.Header+ search={props.search}+ searchLabel={props.searchLabel}+ ><div class="flex min-w-0 items-center gap-1"><ViewSidebar.CloseButton class="shrink-0" /><ViewSidebar.Title>{props.title}</ViewSidebar.Title>@@ -24,7 +31,9 @@ export function SidebarCreateHeader(props: {</ViewSidebar.Header></Show><ViewSidebar.Primary>- <SidebarCreateButton label={props.label} onCreate={props.onCreate} />+ {props.createAction ?? (+ <SidebarCreateButton label={props.label} onCreate={props.onCreate} />+ )}</ViewSidebar.Primary></header>);@@ -36,17 +45,32 @@ export function SidebarCreateButton(props: {ref?: (element: HTMLElement) => void;}) {return (- <ViewSidebar.Action- ref={props.ref}- {...pressHandlers((event) => {- event.preventDefault();- props.onCreate();- })}+ <Show+ when={!isTouchDevice()}+ fallback={+ <ViewSidebar.Action+ ref={props.ref}+ {...pressHandlers((event) => {+ event.preventDefault();+ props.onCreate();+ })}+ >+ <ViewSidebar.Icon>+ <PlusIcon class="size-4" />+ </ViewSidebar.Icon>+ <span class="truncate">{props.label}</span>+ </ViewSidebar.Action>+ }>- <ViewSidebar.Icon>- <PlusIcon class="size-4" />- </ViewSidebar.Icon>- <span class="truncate">{props.label}</span>- </ViewSidebar.Action>+ <ViewCreateButton+ presentation="sidebar"+ aria-label={props.label}+ ref={props.ref}+ {...pressHandlers((event) => {+ event.preventDefault();+ props.onCreate();+ })}+ />+ </Show>);}diff --git a/apps/web/src/components/view-shell/ViewCreateButton.tsx b/apps/web/src/components/view-shell/ViewCreateButton.tsxnew file mode 100644index 0000000000..f06a7602f3--- /dev/null+++ b/apps/web/src/components/view-shell/ViewCreateButton.tsx@@ -0,0 +1,48 @@+import CaretDownIcon from '@phosphor/caret-down.svg';+import PlusIcon from '@phosphor/plus.svg';+import { Button, type ButtonProps, cn } from '@ui';+import { Show, splitProps } from 'solid-js';+import { ViewSidebar } from './ViewSidebar';++/** Shared desktop New action, including polymorphic dropdown triggers. */+export function ViewCreateButton(+ props: ButtonProps & {+ presentation?: 'sidebar' | 'toolbar';+ menu?: boolean;+ }+) {+ const [local, rest] = splitProps(props, [+ 'presentation',+ 'menu',+ 'class',+ 'children',+ ]);+ const sidebar = () => local.presentation === 'sidebar';++ return (+ <Button+ {...rest}+ variant="outline"+ size="md"+ class={cn(+ sidebar() &&+ 'h-(--sidebar-row-height) w-full min-w-0 justify-start gap-(--sidebar-label-gap) px-(--sidebar-item-inset) text-left',+ local.class+ )}+ >+ <Show when={sidebar()} fallback={<PlusIcon class="size-4" />}>+ <ViewSidebar.Icon>+ <PlusIcon class="size-4" />+ </ViewSidebar.Icon>+ </Show>+ <span class="truncate">New</span>+ <Show when={local.menu}>+ <Show when={sidebar()} fallback={<CaretDownIcon class="size-3" />}>+ <ViewSidebar.Trailing>+ <CaretDownIcon class="size-3" />+ </ViewSidebar.Trailing>+ </Show>+ </Show>+ </Button>+ );+}diff --git a/apps/web/src/components/view-shell/ViewShell.tsx b/apps/web/src/components/view-shell/ViewShell.tsxindex f564fc55e4..c582a9dac9 100644--- a/apps/web/src/components/view-shell/ViewShell.tsx+++ b/apps/web/src/components/view-shell/ViewShell.tsx@@ -670,7 +670,7 @@ function TopBar(props: JSX.HTMLAttributes<HTMLDivElement>) {{...rest}ref={mergeRefs(local.ref, tourTarget(VIEW_SHELL_TOUR.topBar))}class={cn(- '@container/split-header flex h-12 min-w-0 shrink-0 items-center gap-1 px-2 py-3 not-touch:pl-3 touch:hidden',+ '@container/split-header flex h-12 min-w-0 shrink-0 items-center gap-1 px-2 py-3 not-touch:gap-2 not-touch:py-2 not-touch:pl-3 touch:hidden',local.class)}data-view-shell-top-bar=""diff --git a/apps/web/src/components/view-shell/ViewSidebar.tsx b/apps/web/src/components/view-shell/ViewSidebar.tsxindex 5d5a21a1b6..1174fbd1dd 100644--- a/apps/web/src/components/view-shell/ViewSidebar.tsx+++ b/apps/web/src/components/view-shell/ViewSidebar.tsx@@ -1,9 +1,11 @@import { SplitHeaderContextMenu } from '@components/app/split-layout/components/SplitHeaderContextMenu';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import CaretDownIcon from '@phosphor/caret-down.svg';+import SearchIcon from '@phosphor/magnifying-glass.svg';import { Button, type ButtonProps, cn } from '@ui';import { CollapseTransition } from '@ui/components/CollapseTransition';import type { JSX } from 'solid-js';-import { Show, splitProps } from 'solid-js';+import { createSignal, Show, splitProps } from 'solid-js';import { Dynamic } from 'solid-js/web';import { ViewSidebarCloseButton, ViewSidebarToggle } from './ViewShell';@@ -23,22 +25,75 @@ function Root(props: JSX.HTMLAttributes<HTMLElement>) {);}-function Header(props: JSX.HTMLAttributes<HTMLDivElement>) {- const [local, rest] = splitProps(props, ['children', 'class']);+function Header(+ props: JSX.HTMLAttributes<HTMLDivElement> & {+ search?: () => JSX.Element;+ searchLabel?: string;+ searchOpen?: boolean;+ onSearchOpenChange?: (open: boolean) => void;+ collapseControl?: JSX.Element;+ }+) {+ const [local, rest] = splitProps(props, [+ 'children',+ 'class',+ 'search',+ 'searchLabel',+ 'searchOpen',+ 'onSearchOpenChange',+ 'collapseControl',+ ]);+ const [open, setOpen] = createSignal(false);+ const searchOpen = () => local.searchOpen ?? open();+ let searchArea: HTMLDivElement | undefined;+ const toggleSearch = () => {+ const next = !searchOpen();+ setOpen(next);+ local.onSearchOpenChange?.(next);+ if (next)+ queueMicrotask(() =>+ searchArea+ ?.querySelector<HTMLElement>('input, [contenteditable="true"]')+ ?.focus()+ );+ };return (- <SplitHeaderContextMenu>- <div- {...rest}- class={cn(- 'flex h-12 min-w-0 shrink-0 items-center justify-between gap-3 py-3 pl-(--sidebar-content-inset) pr-(--sidebar-header-action-inset) [&_[data-split-panel-close]]:ml-(--sidebar-control-overhang)',- local.class- )}- data-view-sidebar-header=""- >- {local.children}- <ViewSidebarToggle action="collapse" />- </div>- </SplitHeaderContextMenu>+ <>+ <SplitHeaderContextMenu>+ <div+ {...rest}+ class={cn(+ 'flex h-12 min-w-0 shrink-0 items-center justify-between gap-3 py-3 pl-(--sidebar-content-inset) pr-(--sidebar-header-action-inset) [&_[data-split-panel-close]]:ml-(--sidebar-control-overhang)',+ local.class+ )}+ data-view-sidebar-header=""+ >+ {local.children}+ <div class="ml-auto flex shrink-0 items-center gap-1">+ <Show when={!isTouchDevice() && local.search}>+ <Control+ label={local.searchLabel ?? 'Search'}+ aria-expanded={searchOpen()}+ onClick={toggleSearch}+ >+ <SearchIcon class="size-4" />+ </Control>+ </Show>+ {local.collapseControl ?? <ViewSidebarToggle action="collapse" />}+ </div>+ </div>+ </SplitHeaderContextMenu>+ <Show when={!isTouchDevice() && searchOpen()}>+ <div+ ref={searchArea}+ class="min-w-0 px-(--sidebar-gutter) pt-(--sidebar-gutter)"+ style={{ '--view-search-height': 'var(--sidebar-row-height)' }}+ data-sidebar-search=""+ >+ {local.search?.()}+ </div>+ </Show>+ </>);}diff --git a/apps/web/src/components/view-shell/ViewSkeleton.tsx b/apps/web/src/components/view-shell/ViewSkeleton.tsxindex 4856fc44f0..e743e90bd1 100644--- a/apps/web/src/components/view-shell/ViewSkeleton.tsx+++ b/apps/web/src/components/view-shell/ViewSkeleton.tsx@@ -1,7 +1,9 @@import { SplitPanel } from '@components/app/split-panel';import { isTouchDevice } from '@core/mobile/isTouchDevice';import MagnifyingGlassIcon from '@phosphor/magnifying-glass.svg';+import { cn } from '@ui';import { For, type JSX, type ParentProps, Show } from 'solid-js';+import { ListHeader } from './ListHeader';import { ListSkeleton } from './ListSkeleton';import { SidebarCreateHeader } from './SidebarCreateButton';import { ViewShell, type ViewShellRootProps } from './ViewShell';@@ -63,7 +65,10 @@ function Root();}-/** The view's sidebar: its title, its create action if it has one, and rows. */+// The sidebar's search field, before the view can search.+const sidebarSearch = () => <ListSkeleton.Bar class="h-8 w-full" />;++/** The view's sidebar: its title and search, its create action if it has one, and rows. */function Sidebar(props: {title: string;createLabel?: string;@@ -75,7 +80,7 @@ function Sidebar(props: {when={props.createLabel}fallback={<Show when={!isTouchDevice()}>- <ViewSidebar.Header>+ <ViewSidebar.Header search={sidebarSearch}><div class="flex min-w-0 items-center gap-1"><ViewSidebar.CloseButton class="shrink-0" /><ViewSidebar.Title>{props.title}</ViewSidebar.Title>@@ -89,6 +94,7 @@ function Sidebar(props: {title={props.title}label={label()}onCreate={() => {}}+ search={sidebarSearch}/>)}</Show>@@ -97,9 +103,47 @@ function Sidebar(props: {);}-/** The view's main area: its top bar title, its search box, and rows or `children`. */+// Icon-only islands are 32px per control.+const ISLAND_WIDTH: Record<number, string> = {+ 1: 'w-8',+ 2: 'w-16',+ 3: 'w-24',+ 4: 'w-32',+};++/**+ * A control that hasn't loaded: a shimmering 32px pill. A string sizes it to+ * that label; a number is an icon-only island of that many controls.+ */+function ControlPill(props: { control: string | number; class?: string }) {+ return (+ <span+ aria-hidden="true"+ class={cn(+ 'skeleton-shimmer inline-flex h-8 shrink-0 items-center rounded-full bg-skeleton text-sm text-transparent select-none',+ typeof props.control === 'number'+ ? (ISLAND_WIDTH[props.control] ?? 'w-8')+ : 'px-3',+ props.class+ )}+ >+ {typeof props.control === 'string' ? props.control : null}+ </span>+ );+}++/**+ * The view's main area: on desktop its one-row header (title, view tabs, and+ * header controls as placeholders); on touch its search box. Then rows or+ * `children`.+ */function Main(props: {title?: string;+ /** View tab labels, left of the header controls. */+ tabs?: readonly string[];+ /** Header controls in order: a label, or an icon-only island's control count. */+ controls?: readonly (string | number)[];+ /** Touch only: the search box above the list. */searchPlaceholder?: string;children?: JSX.Element;}) {@@ -107,17 +151,30 @@ function Main(props: {<ViewShell.Main class="flex flex-col overflow-hidden"><Show when={props.title}>{(title) => (- <ViewShell.TopBar>- <span class="truncate font-semibold text-ink text-sm">- {title()}- </span>- </ViewShell.TopBar>+ <ListHeader+ title={+ <div class="flex min-w-0 items-center gap-3">+ <span class="truncate font-semibold text-ink text-sm">+ {title()}+ </span>+ <div class="flex shrink-0 items-center gap-1.5">+ <For each={props.tabs}>+ {(tab) => <ControlPill control={tab} />}+ </For>+ </div>+ </div>+ }+ >+ <For each={props.controls}>+ {(control) => <ControlPill control={control} />}+ </For>+ </ListHeader>)}</Show>- <Show when={props.searchPlaceholder}>+ <Show when={isTouchDevice() && props.searchPlaceholder}>{(placeholder) => (<ViewShell.Header>- <div class="flex h-10 w-full max-w-md min-w-0 items-center gap-2 rounded-full border border-edge-button bg-control px-3 text-ink-placeholder text-sm">+ <div class="flex h-10 w-full max-w-md min-w-0 items-center gap-2 rounded-full border border-edge-button bg-control not-touch:elevated px-3 text-ink-placeholder text-sm"><MagnifyingGlassIcon class="size-4 shrink-0 text-ink-extra-muted" /><span class="truncate">{placeholder()}</span></div>@@ -132,4 +189,10 @@ function Main(props: {}/** Building blocks for a view's loading skeleton, rendered before its code arrives. */-export const ViewSkeleton = { Root, Sidebar, Main, Rows };+export const ViewSkeleton = {+ Root,+ Sidebar,+ Main,+ Rows,+ Control: ControlPill,+};diff --git a/apps/web/src/features/agents-view/agents-view-skeleton.tsx b/apps/web/src/features/agents-view/agents-view-skeleton.tsxindex 0e38b8669a..3bbb4da7ed 100644--- a/apps/web/src/features/agents-view/agents-view-skeleton.tsx+++ b/apps/web/src/features/agents-view/agents-view-skeleton.tsx@@ -8,7 +8,7 @@ export function AgentsViewSkeleton() {aside={{ min: 224, max: 380, preserveDuringResize: false }}main={{ min: 280, preferredWidth: 640 }}>- <ViewSkeleton.Sidebar title="Agents" />+ <ViewSkeleton.Sidebar title="Agents" createLabel="New" /><ViewSkeleton.Main><div class="flex-1" /></ViewSkeleton.Main>diff --git a/apps/web/src/features/agents-view/components/AgentsSidebar.test.tsx b/apps/web/src/features/agents-view/components/AgentsSidebar.test.tsxindex 8573c21177..1b8182eec6 100644--- a/apps/web/src/features/agents-view/components/AgentsSidebar.test.tsx+++ b/apps/web/src/features/agents-view/components/AgentsSidebar.test.tsx@@ -197,9 +197,8 @@ describe('mixed Agents sidebar', () => {expect(screen.queryByRole('button', { name: /Plan launch/ })).toBeNull();expect(screen.queryByText('Archived')).toBeNull();- expect(- screen.queryByRole('button', { name: 'New conversation' })- ).toBeNull();+ fireEvent.click(screen.getByRole('button', { name: 'New conversation' }));+ expect(openPage).toHaveBeenCalledWith('new');});it('keeps paging while filters leave too few conversations to scroll', () => {diff --git a/apps/web/src/features/agents-view/components/AgentsSidebar.tsx b/apps/web/src/features/agents-view/components/AgentsSidebar.tsxindex 2424a7ccdc..8d652ef84d 100644--- a/apps/web/src/features/agents-view/components/AgentsSidebar.tsx+++ b/apps/web/src/features/agents-view/components/AgentsSidebar.tsx@@ -5,6 +5,7 @@ import {useViewControlHotkeys,ViewSidebar,} from '@app/components/view-shell';+import { SidebarCreateButton } from '@app/components/view-shell/SidebarCreateButton';import { changeSessionArchiveState } from '@app/features/block-agent/queries/change-session-archive-state';import {type EntityActionListState,@@ -266,7 +267,23 @@ export function AgentsSidebar(props: AgentsSidebarProps) {<MaybeSoupEntityActionDrawerManager><ViewSidebar.Root aria-label="Agents navigation"><Show when={!isTouchDevice()}>- <ViewSidebar.Header>+ <ViewSidebar.Header+ searchLabel="Search conversations"+ searchOpen={searchOpen()}+ onSearchOpenChange={(open) => (open ? openSearch() : closeSearch())}+ search={() => (+ <SearchBar+ ref={searchInput}+ placeholder="Search conversations"+ label="Search conversations"+ value={props.search}+ onValueChange={props.onSearchChange}+ onEscape={() => {+ if (!props.search) closeSearch();+ }}+ />+ )}+ ><div class="flex min-w-0 items-center gap-1"><ViewSidebar.CloseButton /><ViewSidebar.Title>Agents</ViewSidebar.Title>@@ -274,6 +291,15 @@ export function AgentsSidebar(props: AgentsSidebarProps) {</ViewSidebar.Header></Show>+ <Show when={!isTouchDevice()}>+ <ViewSidebar.Primary>+ <SidebarCreateButton+ label="New conversation"+ onCreate={() => props.onOpenPage('new')}+ />+ </ViewSidebar.Primary>+ </Show>+<ViewSidebar.Content class="gap-2 overflow-hidden pt-2"><Show when={!isTouchDevice()}><ViewSidebar.Nav aria-label="Agent tools">@@ -327,17 +353,19 @@ export function AgentsSidebar(props: AgentsSidebarProps) {onClearFilters={props.onClearFilters}onGroupingChange={props.onGroupingChange}/>- <CollapsibleSection.Action- label="Search conversations"- aria-pressed={searchOpen()}- class={cn(searchOpen() && 'bg-active text-ink')}- onClick={() => (searchOpen() ? closeSearch() : openSearch())}- >- <MagnifyingGlassIcon class="size-3.5" />- </CollapsibleSection.Action>+ <Show when={isTouchDevice()}>+ <CollapsibleSection.Action+ label="Search conversations"+ aria-pressed={searchOpen()}+ class={cn(searchOpen() && 'bg-active text-ink')}+ onClick={() => (searchOpen() ? closeSearch() : openSearch())}+ >+ <MagnifyingGlassIcon class="size-3.5" />+ </CollapsibleSection.Action>+ </Show></CollapsibleSection.Header><CollapsibleSection.Content class="flex min-h-0 flex-1 flex-col gap-1">- <Show when={searchOpen()}>+ <Show when={isTouchDevice() && searchOpen()}><SearchBarref={searchInput}placeholder="Search conversations"diff --git a/apps/web/src/features/agents-view/components/Topbar.tsx b/apps/web/src/features/agents-view/components/Topbar.tsxindex e20d94b0d5..31edb344c8 100644--- a/apps/web/src/features/agents-view/components/Topbar.tsx+++ b/apps/web/src/features/agents-view/components/Topbar.tsx@@ -31,7 +31,7 @@ export function Topbar(props: {</Show>)}</div>- <div class="header-actions ml-auto flex shrink-0 items-center gap-1">+ <div class="header-actions ml-auto flex shrink-0 items-center gap-2 touch:gap-1">{props.children}</div></ViewShell.TopBar>diff --git a/apps/web/src/features/agents-view/views/AgentsView.tsx b/apps/web/src/features/agents-view/views/AgentsView.tsxindex ed36e59b93..67dc3766e4 100644--- a/apps/web/src/features/agents-view/views/AgentsView.tsx+++ b/apps/web/src/features/agents-view/views/AgentsView.tsx@@ -308,7 +308,11 @@ function AgentsWorkspace(props: { initialRoute?: AgentsRoute }) {onGroupingChange={listView.setGrouping}activePage={selected() ? undefined : page()}onOpenPage={(next) =>- next === 'agents' ? openRoster('agent') : openPage(next)+ next === 'new'+ ? showComposer()+ : next === 'agents'+ ? openRoster('agent')+ : openPage(next)}modeForConversation={modeForConversation}activeConversationId={selected()?.activeConversationId}diff --git a/apps/web/src/features/agents-view/views/NewChatPage.tsx b/apps/web/src/features/agents-view/views/NewChatPage.tsxindex 6b234e0067..92b2ffaba7 100644--- a/apps/web/src/features/agents-view/views/NewChatPage.tsx+++ b/apps/web/src/features/agents-view/views/NewChatPage.tsx@@ -15,6 +15,7 @@ import { fastModeEnabled } from '@core/component/AI/signal/speed';import { ComposerGreeting } from '@core/component/ComposerGreeting';import { useSettingsState } from '@core/constant/SettingsState';import { useUserId } from '@core/context/user';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { fireAndForget } from '@core/util/fireAndForget';import { uploadFile } from '@core/util/upload';import ChatIcon from '@phosphor/chat-circle.svg';@@ -365,25 +366,17 @@ export function NewChatPage(props: {<div ref={tourTarget(AGENTS_TOUR.modeSwitch)} class="shrink-0"><Tabsaria-label="Conversation mode"+ options={[+ { value: 'chat', label: agentsModeLabel('chat'), icon: ChatIcon },+ { value: 'code', label: agentsModeLabel('code'), icon: CodeIcon },+ ]}+ variant="track"fullWidth- list={(['chat', 'code'] as const).map((mode) => ({- value: mode,- label: () => (- <span class="flex items-center gap-1.5">- {mode === 'code' ? (- <CodeIcon class="size-3.5" />- ) : (- <ChatIcon class="size-3.5" />- )}- {/* Phones keep the icons; the name stays for assistive tech. */}- <span class="touch:sr-only">{agentsModeLabel(mode)}</span>- </span>- ),- }))}+ // Phones keep the icons; the name stays for assistive tech.+ iconOnly={isTouchDevice()}value={mode()}- onChange={(value) => setMode(value === 'code' ? 'code' : 'chat')}- class="h-9 w-56 touch:w-24 rounded-full bg-ink/3 light-mode:bg-[rgb(246_246_246)] dark-mode:bg-[rgb(24_24_24)] shadow-none [&>[role=presentation]]:shadow-none [&>[role=presentation]]:duration-250 [&>[role=presentation]]:ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:[&>[role=presentation]]:duration-0 [&>[role=presentation]]:border-0 [&>[role=presentation]]:bg-panel dark-mode:[&>[role=presentation]]:bg-[rgb(32_32_32)] [&>[role=presentation]]:bg-[linear-gradient(to_bottom,color-mix(in_srgb,var(--color-ink)_2%,transparent),transparent)] light-mode:[&>[role=presentation]]:border light-mode:[&>[role=presentation]]:border-ink/7 light-mode:[&>[role=presentation]]:[background-image:none] light-mode:[&>[role=presentation]]:shadow-[0_1px_6px_0_color-mix(in_srgb,var(--color-ink)_5%,transparent)] light-mode:[&>[role=presentation]]:bg-[rgb(250_250_250)]"- labelClass="h-9 px-4 text-sm touch:px-2.5"+ onChange={setMode}+ class="w-56 touch:w-24"/></div>);diff --git a/apps/web/src/features/block-agent/component/AgentSplitHeader.tsx b/apps/web/src/features/block-agent/component/AgentSplitHeader.tsxindex 302b52c4fb..8697191c06 100644--- a/apps/web/src/features/block-agent/component/AgentSplitHeader.tsx+++ b/apps/web/src/features/block-agent/component/AgentSplitHeader.tsx@@ -1,5 +1,6 @@import { ChangesToggle } from '@app/features/changes/changes';import { useBlockEntityCommands } from '@app/features/next-soup/actions/use-block-entity-commands';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import {type BlockTool,ResponsiveBlockToolbar,@@ -183,12 +184,9 @@ export function AgentSplitHeader(props: {/></SplitHeaderLeft>- {/* Tools live on the header row itself — `ResponsiveBlockToolbar`- would push non-Share tools onto a second toolbar row. Markup- mirrors its own header-tools branch; on mobile the tools collapse- into the title menu via `menuTools` below instead. */}+ {/* Session context stays next to the grouped header actions. */}<SplitHeaderRight>- <div class="order-[1000] flex items-center gap-1.5">+ <div class="order-[900] flex items-center gap-2 touch:gap-1.5"><Show when={props.session?.taskId}>{(taskId) => <AgentTaskChip taskId={taskId()} />}</Show>@@ -197,13 +195,15 @@ export function AgentSplitHeader(props: {</Show><Show when={!isTouchDevice()}><ChangesToggle />- <For each={tools}>- {(tool) => (- <Show when={!tool.condition || tool.condition()}>- <ToolButton tool={tool} />- </Show>- )}- </For>+ <HeaderActionGroup label="Session actions">+ <For each={tools}>+ {(tool) => (+ <Show when={!tool.condition || tool.condition()}>+ <ToolButton tool={tool} />+ </Show>+ )}+ </For>+ </HeaderActionGroup></Show></div></SplitHeaderRight>diff --git a/apps/web/src/features/block-ai/components/main-menu.tsx b/apps/web/src/features/block-ai/components/main-menu.tsxindex f972faf98b..7d97f6be34 100644--- a/apps/web/src/features/block-ai/components/main-menu.tsx+++ b/apps/web/src/features/block-ai/components/main-menu.tsx@@ -42,7 +42,7 @@ export function MainMenu(props: { items: (MenuItem | 'divider')[] }) {<Show when={open()}><divrole="menu"- class="absolute top-full left-0 z-50 mt-1 w-64 rounded-lg border border-edge-muted bg-menu p-1 text-xs shadow-lg"+ class="menu-surface absolute top-full left-0 z-50 mt-1 w-64 p-1 text-xs"><MenuItems items={props.items} onDone={() => setOpen(false)} /></div>diff --git a/apps/web/src/features/block-ai/components/notices.tsx b/apps/web/src/features/block-ai/components/notices.tsxindex a8008aa51a..545952a09d 100644--- a/apps/web/src/features/block-ai/components/notices.tsx+++ b/apps/web/src/features/block-ai/components/notices.tsx@@ -45,7 +45,7 @@ export function FileNotice(props: {return (<divrole="status"- class="pointer-events-auto flex max-w-md items-start gap-2 rounded-lg border border-edge-muted bg-menu px-3 py-2 text-ink text-xs shadow-lg"+ class="menu-surface pointer-events-auto flex max-w-md items-start gap-2 px-3 py-2 text-xs"data-testid={props.testId}onPointerDown={(e) => e.stopPropagation()}>diff --git a/apps/web/src/features/block-ai/components/paint-swatch.tsx b/apps/web/src/features/block-ai/components/paint-swatch.tsxindex 84b49cda80..c7bcaf3b9c 100644--- a/apps/web/src/features/block-ai/components/paint-swatch.tsx+++ b/apps/web/src/features/block-ai/components/paint-swatch.tsx@@ -84,7 +84,7 @@ export function PaintSwatch(props: {<Popover.Portal><Layer depth={3}><Popover.Content- class="z-modal flex flex-col gap-2 rounded-xl border border-edge-muted bg-menu p-3 text-xs shadow-xl outline-none"+ class="menu-surface z-modal flex flex-col gap-2 p-3 text-xs outline-none"aria-label={props.label}onKeyDown={(e: KeyboardEvent) => {if (!e.metaKey && !e.ctrlKey) e.stopPropagation();diff --git a/apps/web/src/features/block-ai/components/status-bar.tsx b/apps/web/src/features/block-ai/components/status-bar.tsxindex f8b96af87d..8b293b1886 100644--- a/apps/web/src/features/block-ai/components/status-bar.tsx+++ b/apps/web/src/features/block-ai/components/status-bar.tsx@@ -78,7 +78,7 @@ export function StatusBar(props: {const mod = () => (props.mac ? '⌘' : 'Ctrl+');return (<div- class="-translate-x-1/2 absolute bottom-3 left-1/2 z-10 flex items-center gap-0.5 rounded-xl border border-edge-muted bg-menu p-1 shadow-lg"+ class="menu-surface -translate-x-1/2 absolute bottom-3 left-1/2 z-10 flex items-center gap-0.5 p-1"data-testid="ai-status-bar"onPointerDown={(e) => e.stopPropagation()}>@@ -150,7 +150,7 @@ export function StatusBar(props: {<Show when={open()}><divrole="menu"- class="absolute right-0 bottom-full z-50 mb-2 w-60 rounded-lg border border-edge-muted bg-menu p-1 text-xs shadow-lg"+ class="menu-surface absolute right-0 bottom-full z-50 mb-2 w-60 p-1 text-xs"><MenuItems items={props.zoomItems} onDone={() => setOpen(false)} /></div>diff --git a/apps/web/src/features/block-ai/components/tool-bar.tsx b/apps/web/src/features/block-ai/components/tool-bar.tsxindex 017cdea656..209a5264a2 100644--- a/apps/web/src/features/block-ai/components/tool-bar.tsx+++ b/apps/web/src/features/block-ai/components/tool-bar.tsx@@ -62,7 +62,7 @@ export function ToolBar(props: {const tools = () => TOOLS.filter((t) => props.editable || !t.edit);return (<div- class="absolute top-3 left-3 z-10 flex flex-col items-center gap-0.5 rounded-xl border border-edge-muted bg-menu p-1 shadow-lg"+ class="menu-surface absolute top-3 left-3 z-10 flex flex-col items-center gap-0.5 p-1"data-testid="ai-toolbar"onPointerDown={(e) => e.stopPropagation()}>diff --git a/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.tsx b/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.tsxindex 62a50dda49..5583edf816 100644--- a/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.tsx+++ b/apps/web/src/features/block-call/component/CallRecording/CallRecordingBody.tsx@@ -1,5 +1,6 @@import { AskMacroButton } from '@app/features/chat/ChatWithAgentButton';import { CallChatHistory } from '@channel/Call/chat/CallChatHistory';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { SidePanel } from '@components/app/side-panel';import { CustomScrollbar } from '@core/component/CustomScrollbar';import { isMobile } from '@core/mobile/isMobile';@@ -148,7 +149,7 @@ export function CallRecordingBody(props: {return (<div class="relative flex-1 min-h-0 overflow-hidden"><SidePanel.HeaderActions>- <div class="flex shrink-0 items-center gap-1">+ <HeaderActionGroup label="Actions"><AskMacroButtonentity={{type: 'document',@@ -157,7 +158,7 @@ export function CallRecordingBody(props: {fileType: 'call',}}/>- </div>+ </HeaderActionGroup></SidePanel.HeaderActions><divdata-channel-scrolldiff --git a/apps/web/src/features/block-call/component/CallRecording/CallRecordingSplitHeader.tsx b/apps/web/src/features/block-call/component/CallRecording/CallRecordingSplitHeader.tsxindex a6a64c9354..a0129ee08d 100644--- a/apps/web/src/features/block-call/component/CallRecording/CallRecordingSplitHeader.tsx+++ b/apps/web/src/features/block-call/component/CallRecording/CallRecordingSplitHeader.tsx@@ -3,6 +3,7 @@ import {ChatWithAgentIcon,openChatWithAgent,} from '@app/features/chat/ChatWithAgentButton';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import {type BlockTool,ResponsiveBlockToolbar,@@ -22,6 +23,7 @@ import {} from '@core/component/TopBar/ShareButton';import { useShareModal } from '@core/component/TopBar/shareModal';import { isMobile } from '@core/mobile/isMobile';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { blockMetadataSignal } from '@core/signal/load';import { useGetPermissions } from '@core/signal/permissions';import { buildEntityData } from '@entity';@@ -148,18 +150,20 @@ export function CallRecordingSplitHeader(props: { record: CallRecord }) {</div><Show when={!isMobile() && !record().isActive && canCallAgain()}><div class="order-[900] flex items-center">- <HeaderIsland>- <Button- depth={2}- variant="outline"- size="icon-xs"- class="bg-surface"- tooltip="Call Again"- onClick={callAgain}- >- <PhoneCallIcon class="size-4" />- </Button>- </HeaderIsland>+ <HeaderActionGroup label="Call actions">+ <HeaderIsland>+ <Button+ depth={2}+ variant="outline"+ size={isTouchDevice() ? 'icon-xs' : 'icon-md'}+ class={isTouchDevice() ? 'bg-surface' : undefined}+ tooltip="Call Again"+ onClick={callAgain}+ >+ <PhoneCallIcon class="size-4" />+ </Button>+ </HeaderIsland>+ </HeaderActionGroup></div></Show></SplitHeaderRight>diff --git a/apps/web/src/features/block-call/views/CallDetailView.tsx b/apps/web/src/features/block-call/views/CallDetailView.tsxindex e45593cb8f..dbc4324822 100644--- a/apps/web/src/features/block-call/views/CallDetailView.tsx+++ b/apps/web/src/features/block-call/views/CallDetailView.tsx@@ -1,6 +1,8 @@import { ViewShell } from '@app/components/view-shell';import { useAnalytics } from '@app/lib/analytics/analytics-context';import { createSearchParams } from '@app/lib/split-router';+import { HeaderActionButton } from '@components/app/HeaderActionButton';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { SidePanel } from '@components/app/side-panel';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { SplitPanel } from '@components/app/split-panel';@@ -75,12 +77,15 @@ export function CallDetailActions(props: {}));return (- <div class="ml-auto flex shrink-0 items-center gap-1">+ <div class="ml-auto flex shrink-0 items-center gap-2 touch:gap-1"><Show when={!isMobile() && !props.record.isActive && canCallAgain()}>- <Button variant="outline" size="sm" onClick={callAgain}>- <PhoneCallIcon class="size-4" />- Call Again- </Button>+ <HeaderActionGroup label="Call actions">+ <HeaderActionButton+ label="Call Again"+ icon={<PhoneCallIcon class="size-3.5 touch:size-4" />}+ onClick={callAgain}+ />+ </HeaderActionGroup></Show><SidePanel.HeaderActionsOutlet /><ShareTriggerdiff --git a/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx b/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsxindex 8db14e4062..2a46054b7c 100644--- a/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx+++ b/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx@@ -44,6 +44,7 @@ import {toChannelTargetRequest,} from '@channel/Channel/link';import {+ CallTabLabel,canUseInlineCallTab,normalizeChannelTab,useChannelTabItems,@@ -185,8 +186,8 @@ function NewTop(props: { channelId: string }) {title: 'View',options: tabs().map((tab) => ({value: tab.value,- label: tab.label,- icon: CHANNEL_TAB_ICONS[tab.value as ChannelTabId],+ label: tab.value === 'call' ? <CallTabLabel /> : tab.label,+ icon: CHANNEL_TAB_ICONS[tab.value],})),value: activeTab(),onSelect: (value: string) => setActiveTab(value as ChannelTabId),diff --git a/apps/web/src/features/block-channel/component/Top.tsx b/apps/web/src/features/block-channel/component/Top.tsxindex d55e5caa38..8aeedb4b21 100644--- a/apps/web/src/features/block-channel/component/Top.tsx+++ b/apps/web/src/features/block-channel/component/Top.tsx@@ -1,4 +1,4 @@-import { toIconTabItems } from '@channel/Channel/channel-tab-icons';+import { withChannelTabIcons } 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';@@ -7,12 +7,11 @@ import { SplitHeaderLeft } from '@components/app/split-layout/components/SplitHeimport { 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 { type TabOption, Tabs } from '@ui';import { Show } from 'solid-js';type TopProps = {@@ -24,7 +23,7 @@ type TopProps = {type ChannelTopLeftProps = TopProps & {lockRename?: boolean;- tabs?: readonly TabItem[];+ tabs?: readonly TabOption<ChannelTabId>[];activeTab?: ChannelTabId;onTabChange?: (value: ChannelTabId) => void;};@@ -37,9 +36,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 (@@ -70,10 +66,16 @@ export function ChannelTopLeft(props: ChannelTopLeftProps) {containerClass="ph-no-capture min-w-0 shrink-0 h-full mx-2">{(isCollapsed) => (- <TabsInset- list={isCollapsed() ? iconTabList() : [...(props.tabs ?? [])]}+ <Tabs+ aria-label="Channel sections"+ options={+ isCollapsed()+ ? withChannelTabIcons(props.tabs ?? [])+ : (props.tabs ?? [])+ }+ iconOnly={isCollapsed()}value={props.activeTab}- onChange={(value) => props.onTabChange?.(value as ChannelTabId)}+ onChange={(value) => props.onTabChange?.(value)}/>)}</CollapsibleHeaderItem>diff --git a/apps/web/src/features/block-code/component/CodeFileTypeChip.tsx b/apps/web/src/features/block-code/component/CodeFileTypeChip.tsxindex 410952f821..d40842addc 100644--- a/apps/web/src/features/block-code/component/CodeFileTypeChip.tsx+++ b/apps/web/src/features/block-code/component/CodeFileTypeChip.tsx@@ -89,7 +89,7 @@ export function CodeFileTypeChip() {{fileType()}</Popover.Trigger><Popover.Portal>- <Popover.Content class="z-action-menu w-48 rounded-xl glass bg-menu-glass text-ink text-sm overflow-hidden">+ <Popover.Content class="menu-surface z-action-menu w-48 text-sm overflow-hidden"><div class="p-1.5 border-b border-edge"><inputref={searchRef}diff --git a/apps/web/src/features/block-code/component/CodeModeControl.tsx b/apps/web/src/features/block-code/component/CodeModeControl.tsxindex 0340f2363f..d3d8d2200a 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 { TabsInset } from '@core/component/TabsInset';+import { Tabs } from '@ui';import type { CodeBlockMode } from './CodeContent';export function CodeModeControl(props: {@@ -6,15 +6,16 @@ export function CodeModeControl(props: {onModeChange: (mode: CodeBlockMode) => void;}) {return (- <TabsInset+ <Tabsaria-label="HTML views"- class="shrink-0 whitespace-nowrap"- list={[+ touch="inset"+ class="shrink-0"+ options={[{ value: 'render', label: 'Render' },{ value: 'code', label: 'Code' },]}value={props.mode}- onChange={(value) => props.onModeChange(value as CodeBlockMode)}+ onChange={props.onModeChange}/>);}diff --git a/apps/web/src/features/block-code/component/CodeSearchPanel.tsx b/apps/web/src/features/block-code/component/CodeSearchPanel.tsxindex 8351c210cc..5cbc8c4daf 100644--- a/apps/web/src/features/block-code/component/CodeSearchPanel.tsx+++ b/apps/web/src/features/block-code/component/CodeSearchPanel.tsx@@ -59,7 +59,7 @@ function ModifierToggle(props: {return (<Buttonsize="icon-sm"- variant={props.active ? 'accent' : 'ghost'}+ variant="ghost"tooltip={props.label}aria-pressed={props.active}onClick={props.onToggle}diff --git a/apps/web/src/features/block-database/component/Block.tsx b/apps/web/src/features/block-database/component/Block.tsxindex fabd673537..fca0c8e02b 100644--- a/apps/web/src/features/block-database/component/Block.tsx+++ b/apps/web/src/features/block-database/component/Block.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import { openChatWithInput } from '@app/features/chat/ChatWithAgentButton';import { toQuerySchema } from '@app/features/database-query/queries/query-source';import { useFeatureFlag } from '@app/lib/analytics/posthog';@@ -546,12 +547,10 @@ function DatabaseSkeleton() {aria-label="Loading database"><div class="mb-3 flex gap-2">- <For each={[0, 1]}>- {() => <div class="h-7 w-24 animate-pulse rounded-md bg-hover" />}- </For>+ <For each={[0, 1]}>{() => <ListSkeleton.Bar class="h-8 w-24" />}</For></div><For each={[0, 1, 2, 3, 4, 5]}>- {() => <div class="h-9 animate-pulse rounded-md bg-hover" />}+ {() => <ListSkeleton.Bar class="h-9 w-full rounded-lg" />}</For></div>);diff --git a/apps/web/src/features/block-database/component/TopBar.tsx b/apps/web/src/features/block-database/component/TopBar.tsxindex 3410705883..6528f73437 100644--- a/apps/web/src/features/block-database/component/TopBar.tsx+++ b/apps/web/src/features/block-database/component/TopBar.tsx@@ -1,4 +1,5 @@import { useFeatureFlag } from '@app/lib/analytics/posthog';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { ResponsivePermissionsBadge } from '@components/app/ResponsiveBlockToolbar';import {SplitHeaderLeft,@@ -10,6 +11,7 @@ import { toast } from '@core/component/Toast/Toast';import { ShareTrigger } from '@core/component/TopBar/ShareButton';import { useShareModal } from '@core/component/TopBar/shareModal';import { enableForms } from '@core/constant/featureFlags';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { useGetPermissions } from '@core/signal/permissions';import SparkleIcon from '@phosphor/sparkle.svg';import type { DatabaseDetail } from '@service-storage/generated/schemas/databaseDetail';@@ -134,25 +136,27 @@ export function TopBar(props: {</SplitHeaderLeft><SplitHeaderRight><BlockLiveIndicators />- <div class="order-[1000] flex items-center gap-1">+ <div class="order-[1000] flex items-center gap-2"><ShareTrigger onClick={openShare} /></div></SplitHeaderRight><ResponsivePermissionsBadge /><Show when={props.detail}><SplitHeaderRight>- <Button- variant="ghost"- size="sm"- class="gap-1.5 px-2 text-xs"- disabled={props.openingChat}- aria-label="Database AI"- aria-busy={props.openingChat}- onClick={props.onOpenChat}- >- <SparkleIcon class="size-4" />- <span>AI</span>- </Button>+ <HeaderActionGroup label="Database actions">+ <Button+ variant="ghost"+ size={isTouchDevice() ? 'sm' : 'md'}+ class="gap-1.5 touch:px-2 touch:text-xs"+ disabled={props.openingChat}+ aria-label="Database AI"+ aria-busy={props.openingChat}+ onClick={props.onOpenChat}+ >+ <SparkleIcon class="size-4" />+ <span>AI</span>+ </Button>+ </HeaderActionGroup></SplitHeaderRight></Show></>diff --git a/apps/web/src/features/block-email/EmailBlockAdapter.tsx b/apps/web/src/features/block-email/EmailBlockAdapter.tsxindex 83b37c866b..0b0a82283e 100644--- a/apps/web/src/features/block-email/EmailBlockAdapter.tsx+++ b/apps/web/src/features/block-email/EmailBlockAdapter.tsx@@ -128,6 +128,7 @@ export function EmailBlockAdapter(props: {source={props.source}threadTransport={props.threadTransport}host={host}+ sidePanelHeaderToggle={isTouchDevice()}topBar={({ createTask }) => (<TopBarid={props.threadId()}diff --git a/apps/web/src/features/block-email/EmailThreadHostView.tsx b/apps/web/src/features/block-email/EmailThreadHostView.tsxindex 3861e9cc29..2441434b27 100644--- a/apps/web/src/features/block-email/EmailThreadHostView.tsx+++ b/apps/web/src/features/block-email/EmailThreadHostView.tsx@@ -9,6 +9,7 @@ import {EmailThread,type EmailThreadProps,} from '@app/features/email-thread/email-thread';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { SidePanel } from '@components/app/side-panel';import { useSplitLayout } from '@components/app/split-layout/layout';import { fireAndForget } from '@core/util/fireAndForget';@@ -93,7 +94,7 @@ function ThreadActions(props: { title: string; onCreateTask: () => void }) {const context = useEmailThreadState();return (<SidePanel.HeaderActions>- <div class="flex shrink-0 items-center gap-1">+ <HeaderActionGroup label="Actions"><Show when={context.thread()?.db_id}>{(id) => (<AskMacroButton@@ -104,7 +105,7 @@ function ThreadActions(props: { title: string; onCreateTask: () => void }) {<Show when={context.thread()?.db_id}><EmailTaskButton onClick={props.onCreateTask} /></Show>- </div>+ </HeaderActionGroup></SidePanel.HeaderActions>);}diff --git a/apps/web/src/features/block-email/component/EmailThreadHeaderActions.tsx b/apps/web/src/features/block-email/component/EmailThreadHeaderActions.tsxnew file mode 100644index 0000000000..9a8e5bb3e7--- /dev/null+++ b/apps/web/src/features/block-email/component/EmailThreadHeaderActions.tsx@@ -0,0 +1,61 @@+import type { EmailThreadListNavigation } from '@app/features/email-thread/context/email-thread-context';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';+import { SidePanel } from '@components/app/side-panel';+import { ListNavigationButtons } from '@components/app/split-layout/components/SplitHeader';+import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { type ComponentProps, type JSX, Show } from 'solid-js';+import { EmailThreadControls } from './EmailThreadControls';++export function EmailThreadControlGroups(props: {+ controls: ComponentProps<typeof EmailThreadControls>;+ navigation?: EmailThreadListNavigation;+}) {+ return (+ <div class="flex items-center gap-2 touch:hidden">+ <HeaderActionGroup label="Email actions">+ <EmailThreadControls {...props.controls} />+ </HeaderActionGroup>+ <Show when={props.navigation}>+ {(navigation) => (+ <HeaderActionGroup label="Item navigation">+ <ListNavigationButtons navigation={navigation()} class="gap-0" />+ </HeaderActionGroup>+ )}+ </Show>+ </div>+ );+}++/** The same desktop action groups in Mail and inline thread previews. */+export function EmailThreadHeaderActions(props: {+ controls?: JSX.Element;+ share?: JSX.Element;+}) {+ return (+ <div class="ml-auto flex shrink-0 items-center gap-2 touch:gap-1 @max-[900px]/split-header:[&_[data-header-action]]:w-8 @max-[900px]/split-header:[&_[data-header-action]]:p-0 @max-[900px]/split-header:[&_[data-header-action-label]]:hidden">+ {props.controls}+ <Show+ when={!isTouchDevice()}+ fallback={<SidePanel.HeaderActionsOutlet />}+ >+ <HeaderActionGroup+ label="Actions"+ class="has-[[data-side-panel-header-actions]:empty]:hidden [&_[data-header-action]]:size-8 [&_[data-header-action]]:p-0 [&_[data-header-action-label]]:hidden"+ >+ <SidePanel.HeaderActionsOutlet />+ </HeaderActionGroup>+ </Show>+ <Show when={props.share}>+ <Show when={!isTouchDevice()} fallback={props.share}>+ <HeaderActionGroup+ label="Sharing"+ class="[&_[data-header-action]]:w-auto! [&_[data-header-action]]:px-3! [&_[data-header-action-label]]:inline!"+ >+ {props.share}+ </HeaderActionGroup>+ </Show>+ </Show>+ <SidePanel.Toggle />+ </div>+ );+}diff --git a/apps/web/src/features/block-email/component/TopBar.test.tsx b/apps/web/src/features/block-email/component/TopBar.test.tsxnew file mode 100644index 0000000000..67c380d13f--- /dev/null+++ b/apps/web/src/features/block-email/component/TopBar.test.tsx@@ -0,0 +1,94 @@+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import type { JSX } from 'solid-js';+import { afterEach, expect, it, vi } from 'vitest';+import { TopBar } from './TopBar';++const actions = vi.hoisted(() => ({+ share: vi.fn(),+ read: vi.fn(),+ done: vi.fn(),+ task: vi.fn(),+ details: vi.fn(),+}));+vi.mock('@ui', async () => ({+ Button: (await import('@app/components/ui/components/Button')).Button,+ ButtonGroup: (await import('@app/components/ui/components/ButtonGroup'))+ .ButtonGroup,+}));+vi.mock('@core/mobile/isTouchDevice', () => ({ isTouchDevice: () => false }));+vi.mock('@core/mobile/isMobile', () => ({ isMobile: () => false }));+vi.mock('@core/constant/featureFlags', () => ({ ENABLE_EMAIL_SHARING: true }));+vi.mock('@components/app/split-layout/layoutUtils', () => ({+ useSplitPanelOrThrow: () => ({ splitHotkeyScope: {} }),+}));+vi.mock('@components/app/split-layout/components/SplitHeader', () => ({+ SplitHeaderLeft: (props: { children: JSX.Element }) => <>{props.children}</>,+ SplitHeaderRight: (props: { children: JSX.Element }) => <>{props.children}</>,+ ListNavigationButtons: () => null,+}));+vi.mock('@components/app/split-layout/components/SplitLabel', () => ({+ StaticSplitLabel: (props: { label: string }) => <h1>{props.label}</h1>,+ SplitHeaderBadge: () => null,+ SplitTitleFileMenu: (props: { children: JSX.Element }) => (+ <>{props.children}</>+ ),+}));+vi.mock('@components/app/split-layout/components/SplitFileMenu', () => ({+ BlockSplitFileMenu: () => <button>More email actions</button>,+}));+vi.mock('@components/app/ResponsiveBlockToolbar', () => ({+ ResponsiveBlockToolbar: () => null,+}));+vi.mock('@core/component/TopBar/ShareButton', () => ({+ ShareTrigger: (props: { onClick: () => void }) => (+ <button onClick={props.onClick}>Share</button>+ ),+}));+vi.mock('@components/app/side-panel', () => ({+ SidePanel: {+ HeaderActionsOutlet: () => (+ <button onClick={actions.task}>Create task</button>+ ),+ Toggle: () => <button onClick={actions.details}>Show details</button>,+ },+}));+vi.mock('./useEmailThreadTools', () => ({+ useEmailThreadTools: () => ({+ isInvite: () => false,+ tools: [],+ menuTools: [],+ emailEntity: () => undefined,+ permissions: () => undefined,+ openShare: actions.share,+ controls: {+ isOwnThread: true,+ isDone: false,+ isUnread: false,+ canToggleDone: true,+ onToggleDone: actions.done,+ onToggleUnread: actions.read,+ },+ }),+}));+afterEach(() => {+ cleanup();+ vi.clearAllMocks();+});++it('keeps email actions, sharing, and details available in the preview header', () => {+ render(() => <TopBar id="thread-1" title="A shared email" />);+ expect(screen.getByRole('heading', { name: 'A shared email' })).toBeTruthy();+ fireEvent.click(screen.getByRole('button', { name: 'Mark as unread' }));+ fireEvent.click(screen.getByRole('button', { name: 'Mark done' }));+ fireEvent.click(screen.getByRole('button', { name: 'Share' }));+ fireEvent.click(screen.getByRole('button', { name: 'Create task' }));+ fireEvent.click(screen.getByRole('button', { name: 'Show details' }));+ expect(actions.read).toHaveBeenCalledOnce();+ expect(actions.done).toHaveBeenCalledOnce();+ expect(actions.share).toHaveBeenCalledOnce();+ expect(actions.task).toHaveBeenCalledOnce();+ expect(actions.details).toHaveBeenCalledOnce();+ expect(+ screen.getByRole('button', { name: 'More email actions' })+ ).toBeTruthy();+});diff --git a/apps/web/src/features/block-email/component/TopBar.tsx b/apps/web/src/features/block-email/component/TopBar.tsxindex c9769dba02..295f00567a 100644--- a/apps/web/src/features/block-email/component/TopBar.tsx+++ b/apps/web/src/features/block-email/component/TopBar.tsx@@ -1,20 +1,40 @@import { ResponsiveBlockToolbar } from '@components/app/ResponsiveBlockToolbar';+import { BlockSplitFileMenu } from '@components/app/split-layout/components/SplitFileMenu';import {SplitHeaderLeft,SplitHeaderRight,} from '@components/app/split-layout/components/SplitHeader';import {SplitHeaderBadge,+ SplitTitleFileMenu,StaticSplitLabel,} from '@components/app/split-layout/components/SplitLabel';+import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';+import { ShareTrigger } from '@core/component/TopBar/ShareButton';+import { ENABLE_EMAIL_SHARING } from '@core/constant/featureFlags';+import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { Show } from 'solid-js';import { EmailThreadControls } from './EmailThreadControls';+import {+ EmailThreadControlGroups,+ EmailThreadHeaderActions,+} from './EmailThreadHeaderActions';import {type EmailThreadToolsOptions,useEmailThreadTools,} from './useEmailThreadTools';export function TopBar(props: EmailThreadToolsOptions) {- const { isInvite, tools, menuTools, controls } = useEmailThreadTools(props);+ const panel = useSplitPanelOrThrow();+ const {+ isInvite,+ tools,+ menuTools,+ controls,+ openShare,+ emailEntity,+ permissions,+ } = useEmailThreadTools(props);return (<>@@ -38,17 +58,57 @@ export function TopBar(props: EmailThreadToolsOptions) {</SplitHeaderLeft><SplitHeaderRight>- <EmailThreadControls {...controls} />+ <Show+ when={!isTouchDevice()}+ fallback={<EmailThreadControls {...controls} />}+ >+ <EmailThreadHeaderActions+ controls={+ <EmailThreadControlGroups+ controls={controls}+ navigation={props.listNavigation}+ />+ }+ share={+ <Show when={ENABLE_EMAIL_SHARING}>+ <ShareTrigger+ onClick={openShare}+ id={props.id}+ blockType="email"+ hotkeyScope={panel.splitHotkeyScope}+ />+ </Show>+ }+ />+ </Show></SplitHeaderRight>- <ResponsiveBlockToolbar- tools={tools}- menuTools={menuTools}- ops={[]}- id={props.id}- itemType="email"- name={props.title}- />+ <Show+ when={isTouchDevice()}+ fallback={+ <SplitTitleFileMenu>+ <BlockSplitFileMenu+ id={props.id}+ itemType="email"+ name={props.title}+ ops={[]}+ tools={menuTools}+ entity={emailEntity()}+ permissions={permissions()}+ buttonClass="order-first"+ />+ </SplitTitleFileMenu>+ }+ >+ <ResponsiveBlockToolbar+ tools={tools}+ menuTools={menuTools}+ ops={[]}+ id={props.id}+ itemType="email"+ name={props.title}+ />+ </Show></>);}diff --git a/apps/web/src/features/block-email/component/useEmailThreadTools.tsx b/apps/web/src/features/block-email/component/useEmailThreadTools.tsxindex 28ba1459be..973ac4c15c 100644--- a/apps/web/src/features/block-email/component/useEmailThreadTools.tsx+++ b/apps/web/src/features/block-email/component/useEmailThreadTools.tsx@@ -312,6 +312,7 @@ export function useEmailThreadTools(props: EmailThreadToolsOptions) {];return {+ openShare,isInvite,emailEntity,permissions: () => getPermissions(emailCtx.thread()?.access_level),diff --git a/apps/web/src/features/block-fig/components/actions-palette.tsx b/apps/web/src/features/block-fig/components/actions-palette.tsxindex 46e00eee61..efa8d7bda6 100644--- a/apps/web/src/features/block-fig/components/actions-palette.tsx+++ b/apps/web/src/features/block-fig/components/actions-palette.tsx@@ -75,7 +75,7 @@ export function ActionsPalette(props: {role="dialog"aria-label="Actions"data-testid="fig-actions"- class="absolute inset-x-4 bottom-16 z-20 mx-auto flex max-h-[60%] max-w-md flex-col overflow-hidden rounded-xl border border-edge-muted bg-menu text-ink text-xs shadow-xl"+ class="menu-surface absolute inset-x-4 bottom-16 z-20 mx-auto flex max-h-[60%] max-w-md flex-col overflow-hidden text-xs"onPointerDown={(e) => e.stopPropagation()}onFocusOut={(e) => {const next = e.relatedTarget as Node | null;diff --git a/apps/web/src/features/block-fig/components/comment-pins.tsx b/apps/web/src/features/block-fig/components/comment-pins.tsxindex 7f5fb56469..a816515caf 100644--- a/apps/web/src/features/block-fig/components/comment-pins.tsx+++ b/apps/web/src/features/block-fig/components/comment-pins.tsx@@ -69,7 +69,7 @@ function PinCard(props: {Math.max(8, Math.min(props.at.y - 28, props.viewport.h - 160));return (<div- class="absolute z-10 flex flex-col overflow-hidden rounded-lg border border-edge-muted bg-panel text-ink text-xs shadow-lg"+ class="menu-surface absolute z-10 flex flex-col overflow-hidden text-xs"style={{left: `${Math.max(8, Math.min(props.at.x + 16, props.viewport.w - CARD - 8))}px`,top: `${top()}px`,diff --git a/apps/web/src/features/block-fig/components/component-picker.tsx b/apps/web/src/features/block-fig/components/component-picker.tsxindex 60fb88a719..9cc43459e9 100644--- a/apps/web/src/features/block-fig/components/component-picker.tsx+++ b/apps/web/src/features/block-fig/components/component-picker.tsx@@ -73,7 +73,7 @@ export function ComponentPicker(props: {<Popover.Portal><Layer depth={3}><Popover.Content- class="fig-editor-theme z-modal flex max-h-96 w-64 flex-col rounded-xl border border-edge-muted bg-menu p-2 text-xs shadow-xl outline-none"+ class="menu-surface fig-editor-theme z-modal flex max-h-96 w-64 flex-col p-2 text-xs outline-none"aria-label={props.label}data-testid="fig-component-picker"onKeyDown={(e: KeyboardEvent) => {diff --git a/apps/web/src/features/block-fig/components/editor-menu.tsx b/apps/web/src/features/block-fig/components/editor-menu.tsxindex c58b23c7ed..27f85368ae 100644--- a/apps/web/src/features/block-fig/components/editor-menu.tsx+++ b/apps/web/src/features/block-fig/components/editor-menu.tsx@@ -68,7 +68,7 @@ export function EditorMenu(props: {</DropdownMenu.Trigger><DropdownMenu.Portal><DropdownMenu.Content- class="fig-editor-theme z-modal min-w-52 rounded-xl border border-edge-muted bg-menu p-1 text-ink text-xs shadow-lg outline-none"+ class="menu-surface fig-editor-theme z-modal min-w-52 p-1 text-xs outline-none"classList={{// A submenu trigger must not live in a scroll container: Kobalte's// trigger focus helper loops on that ancestor with overflow-hidden pages.@@ -94,7 +94,7 @@ export function EditorMenu(props: {</DropdownMenu.SubTrigger><DropdownMenu.Portal><DropdownMenu.SubContent- class="fig-editor-theme z-modal max-h-[min(70vh,32rem)] min-w-52 overflow-y-auto rounded-xl border border-edge-muted bg-menu p-1 text-ink text-xs shadow-lg outline-none"+ class="menu-surface fig-editor-theme z-modal max-h-[min(70vh,32rem)] min-w-52 overflow-y-auto p-1 text-xs outline-none"onKeyDown={(e) => e.stopPropagation()}onPointerDown={(e) => e.stopPropagation()}onPointerUp={(e) => e.stopPropagation()}diff --git a/apps/web/src/features/block-fig/components/effect-controls.tsx b/apps/web/src/features/block-fig/components/effect-controls.tsxindex 50af988c88..9f07224dd1 100644--- a/apps/web/src/features/block-fig/components/effect-controls.tsx+++ b/apps/web/src/features/block-fig/components/effect-controls.tsx@@ -54,7 +54,7 @@ function EffectSettings(props: {</Popover.Trigger><Popover.Portal><Popover.Content- class="fig-editor-theme z-modal flex w-60 flex-col rounded-xl border border-edge-muted bg-menu text-ink text-xs shadow-xl outline-none"+ class="menu-surface fig-editor-theme z-modal flex w-60 flex-col text-xs outline-none"aria-label="Effect settings"data-testid={`fig-effect-${props.index}-popover`}onPointerDown={(event) => event.stopPropagation()}diff --git a/apps/web/src/features/block-fig/components/font-picker.tsx b/apps/web/src/features/block-fig/components/font-picker.tsxindex a9ef69ceb8..176ae4ce99 100644--- a/apps/web/src/features/block-fig/components/font-picker.tsx+++ b/apps/web/src/features/block-fig/components/font-picker.tsx@@ -167,7 +167,7 @@ export function FontPicker(props: {<Popover.Portal><Layer depth={3}><Popover.Content- class="fig-editor-theme z-modal flex max-h-96 w-64 flex-col rounded-xl border border-edge-muted bg-menu p-2 text-xs shadow-xl outline-none"+ class="menu-surface fig-editor-theme z-modal flex max-h-96 w-64 flex-col p-2 text-xs outline-none"aria-label="Fonts"data-testid="fig-font-picker"onKeyDown={(e: KeyboardEvent) => {diff --git a/apps/web/src/features/block-fig/components/inspector-select.tsx b/apps/web/src/features/block-fig/components/inspector-select.tsxindex e730935e0f..f61b674e06 100644--- a/apps/web/src/features/block-fig/components/inspector-select.tsx+++ b/apps/web/src/features/block-fig/components/inspector-select.tsx@@ -62,7 +62,7 @@ export function InspectorSelect<T extends string>(props: {</Select.Trigger><Select.Portal><Select.Content- class="fig-editor-theme z-modal min-w-32 max-w-72 rounded-xl border border-edge-muted bg-menu p-1.5 text-xs text-ink shadow-xl outline-none"+ class="menu-surface fig-editor-theme z-modal min-w-32 max-w-72 p-1.5 text-xs outline-none"onKeyDown={(event) => event.stopPropagation()}onPointerDown={(event) => event.stopPropagation()}onPointerUp={(event) => event.stopPropagation()}diff --git a/apps/web/src/features/block-fig/components/library-updates.tsx b/apps/web/src/features/block-fig/components/library-updates.tsxindex 4377f5eee8..0ecfc25ea2 100644--- a/apps/web/src/features/block-fig/components/library-updates.tsx+++ b/apps/web/src/features/block-fig/components/library-updates.tsx@@ -21,7 +21,7 @@ export function LibraryUpdatesNotice(props: {return (<Show when={!dismissed()}><div- class="absolute bottom-14 left-3 z-30 flex w-64 flex-col gap-1.5 rounded-xl border border-edge-muted bg-menu p-3 text-xs shadow-xl"+ class="menu-surface absolute bottom-14 left-3 z-30 flex w-64 flex-col gap-1.5 p-3 text-xs"data-testid="fig-library-updates"onPointerDown={(e) => e.stopPropagation()}>diff --git a/apps/web/src/features/block-fig/components/missing-fonts.tsx b/apps/web/src/features/block-fig/components/missing-fonts.tsxindex cc370534a5..0feed04e14 100644--- a/apps/web/src/features/block-fig/components/missing-fonts.tsx+++ b/apps/web/src/features/block-fig/components/missing-fonts.tsx@@ -21,7 +21,7 @@ export function MissingFonts(props: {return (<Show when={open()}><div- class="absolute right-3 bottom-14 z-30 flex w-64 flex-col gap-1.5 rounded-xl border border-edge-muted bg-menu p-3 text-xs shadow-xl"+ class="menu-surface absolute right-3 bottom-14 z-30 flex w-64 flex-col gap-1.5 p-3 text-xs"data-testid="fig-missing-fonts"onPointerDown={(e) => e.stopPropagation()}>diff --git a/apps/web/src/features/block-fig/components/prototype-panel.tsx b/apps/web/src/features/block-fig/components/prototype-panel.tsxindex 97f1a5c34d..b81a0cc0cd 100644--- a/apps/web/src/features/block-fig/components/prototype-panel.tsx+++ b/apps/web/src/features/block-fig/components/prototype-panel.tsx@@ -268,7 +268,7 @@ export function PrototypePanel(props: {</Popover.Trigger><Popover.Portal><Popover.Content- class="fig-editor-theme z-modal w-64 rounded-xl border border-edge-muted bg-menu p-3 text-ink text-xs shadow-xl outline-none"+ class="menu-surface fig-editor-theme z-modal w-64 p-3 text-xs outline-none"data-testid="fig-proto-settings"onKeyDown={(e) => {if (!e.metaKey && !e.ctrlKey) e.stopPropagation();diff --git a/apps/web/src/features/block-fig/components/shortcuts-dialog.tsx b/apps/web/src/features/block-fig/components/shortcuts-dialog.tsxindex 6355450cbe..b37d00c5a4 100644--- a/apps/web/src/features/block-fig/components/shortcuts-dialog.tsx+++ b/apps/web/src/features/block-fig/components/shortcuts-dialog.tsx@@ -11,7 +11,7 @@ export function ShortcutsDialog(props: { mac: boolean; onClose: () => void }) {role="dialog"aria-label="Keyboard shortcuts"data-testid="fig-shortcuts"- class="absolute inset-x-4 bottom-16 z-20 mx-auto max-h-[70%] max-w-3xl overflow-y-auto rounded-xl border border-edge-muted bg-menu p-4 text-ink text-xs shadow-xl"+ class="menu-surface absolute inset-x-4 bottom-16 z-20 mx-auto max-h-[70%] max-w-3xl overflow-y-auto p-4 text-xs"onPointerDown={(e) => e.stopPropagation()}><div class="mb-3 flex items-center justify-between">diff --git a/apps/web/src/features/block-fig/components/style-control.tsx b/apps/web/src/features/block-fig/components/style-control.tsxindex 01e06e79a1..0006db3863 100644--- a/apps/web/src/features/block-fig/components/style-control.tsx+++ b/apps/web/src/features/block-fig/components/style-control.tsx@@ -123,7 +123,7 @@ export function StyleControl(props: {<Popover.Portal><Layer depth={3}><Popover.Content- class="fig-editor-theme z-modal flex max-h-96 w-60 flex-col rounded-xl border border-edge-muted bg-menu p-2 text-xs shadow-xl outline-none"+ class="menu-surface fig-editor-theme z-modal flex max-h-96 w-60 flex-col p-2 text-xs outline-none"aria-label={`${kind()} styles`}data-testid="fig-style-popover"onKeyDown={(e: KeyboardEvent) => {diff --git a/apps/web/src/features/block-fig/components/swatch-popover.tsx b/apps/web/src/features/block-fig/components/swatch-popover.tsxindex e267547d35..40fa249bda 100644--- a/apps/web/src/features/block-fig/components/swatch-popover.tsx+++ b/apps/web/src/features/block-fig/components/swatch-popover.tsx@@ -42,7 +42,7 @@ export function SwatchPopover(props: {<Popover.Portal><Layer depth={3}><Popover.Content- class="fig-editor-theme z-modal rounded-xl border border-edge-muted bg-menu p-3 shadow-xl outline-none"+ class="menu-surface fig-editor-theme z-modal p-3 outline-none"aria-label={props.label}onKeyDown={(e: KeyboardEvent) => {if (!e.metaKey && !e.ctrlKey) e.stopPropagation();diff --git a/apps/web/src/features/block-fig/components/type-settings.tsx b/apps/web/src/features/block-fig/components/type-settings.tsxindex babb2519bb..f4d93aa981 100644--- a/apps/web/src/features/block-fig/components/type-settings.tsx+++ b/apps/web/src/features/block-fig/components/type-settings.tsx@@ -45,7 +45,7 @@ export function TypeSettings(props: {</Popover.Trigger><Popover.Portal><Popover.Content- class="fig-editor-theme z-modal w-64 rounded-xl border border-edge-muted bg-menu p-3 text-ink text-xs shadow-xl outline-none"+ class="menu-surface fig-editor-theme z-modal w-64 p-3 text-xs outline-none"aria-label="Type settings"onKeyDown={(e) => {if (!e.metaKey && !e.ctrlKey) e.stopPropagation();diff --git a/apps/web/src/features/block-fig/components/variable-controls.tsx b/apps/web/src/features/block-fig/components/variable-controls.tsxindex ca7c9a2007..7d22b76cc4 100644--- a/apps/web/src/features/block-fig/components/variable-controls.tsx+++ b/apps/web/src/features/block-fig/components/variable-controls.tsx@@ -120,7 +120,7 @@ export function VariableControl(props: {<Popover.Portal><Layer depth={3}><Popover.Content- class="fig-editor-theme z-modal flex max-h-96 w-60 flex-col rounded-xl border border-edge-muted bg-menu p-2 text-xs shadow-xl outline-none"+ class="menu-surface fig-editor-theme z-modal flex max-h-96 w-60 flex-col p-2 text-xs outline-none"aria-label="Color variables"onKeyDown={(e: KeyboardEvent) => {if (!e.metaKey && !e.ctrlKey) e.stopPropagation();diff --git a/apps/web/src/features/block-fig/components/viewer-toolbar.tsx b/apps/web/src/features/block-fig/components/viewer-toolbar.tsxindex a18a897854..5e5cba79dd 100644--- a/apps/web/src/features/block-fig/components/viewer-toolbar.tsx+++ b/apps/web/src/features/block-fig/components/viewer-toolbar.tsx@@ -121,7 +121,7 @@ export function ViewerToolbar(props: {}) {return (<div- class="-translate-x-1/2 absolute bottom-4 left-1/2 z-10 flex w-max max-w-[calc(100%-1rem)] items-center gap-1 rounded-2xl border border-edge-muted bg-menu p-2 shadow-lg"+ class="menu-surface -translate-x-1/2 absolute bottom-4 left-1/2 z-10 flex w-max max-w-[calc(100%-1rem)] items-center gap-1 rounded-2xl p-2"data-testid="fig-toolbar"aria-label="Drawing tools"role="toolbar"diff --git a/apps/web/src/features/block-form/components/builder/builder-chrome.tsx b/apps/web/src/features/block-form/components/builder/builder-chrome.tsxindex 64ac5b440f..ed6e103147 100644--- a/apps/web/src/features/block-form/components/builder/builder-chrome.tsx+++ b/apps/web/src/features/block-form/components/builder/builder-chrome.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import CaretDown from '@phosphor/caret-down.svg';import Database from '@phosphor/database.svg';import Plus from '@phosphor/plus.svg';@@ -20,13 +21,11 @@ export function BuilderSkeleton() {aria-hidden="true"class="mx-auto flex w-full max-w-3xl flex-col gap-6 pt-12 px-6">- <div class="h-8 w-2/5 rounded bg-hover motion-safe:animate-pulse" />- <div class="h-5 w-1/4 rounded bg-hover motion-safe:animate-pulse" />- <div class="h-5 w-3/5 rounded bg-hover motion-safe:animate-pulse" />+ <ListSkeleton.Bar class="h-8 w-2/5 rounded-lg" />+ <ListSkeleton.Bar class="h-4 w-1/4" />+ <ListSkeleton.Bar class="h-4 w-3/5" /><For each={[0, 1]}>- {() => (- <div class="h-56 rounded-xl border border-edge-muted bg-surface motion-safe:animate-pulse" />- )}+ {() => <ListSkeleton.Bar class="h-56 w-full rounded-xl" />}</For></div></div>diff --git a/apps/web/src/features/block-form/components/form-tabs.tsx b/apps/web/src/features/block-form/components/form-tabs.tsxindex 57f83d3970..5392485043 100644--- a/apps/web/src/features/block-form/components/form-tabs.tsx+++ b/apps/web/src/features/block-form/components/form-tabs.tsx@@ -1,4 +1,3 @@-import { Tabs } from '@kobalte/core/tabs';import { TabSelector } from '@ui';import { For } from 'solid-js';@@ -19,7 +18,7 @@ export function FormTabs(props: {}) {return (<TabSelector>- <Tabs+ <TabSelector.Rootvalue={props.tab}onChange={(value) => {const tab = TABS.find((tab) => tab.value === value);@@ -46,7 +45,7 @@ export function FormTabs(props: {)}</For></TabSelector.List>- </Tabs>+ </TabSelector.Root></TabSelector>);}diff --git a/apps/web/src/features/block-form/components/responses/stat-tiles.tsx b/apps/web/src/features/block-form/components/responses/stat-tiles.tsxindex 286b3bc9c1..b6a72c88b4 100644--- a/apps/web/src/features/block-form/components/responses/stat-tiles.tsx+++ b/apps/web/src/features/block-form/components/responses/stat-tiles.tsx@@ -17,7 +17,7 @@ export function StatTiles(props: {<Showwhen={!props.loading}fallback={- <span class="inline-block h-6 w-10 animate-pulse rounded bg-hover" />+ <span class="skeleton-shimmer inline-block h-6 w-10 rounded-full bg-skeleton" />}>{tile.value}diff --git a/apps/web/src/features/block-form/components/share/audience-panel.tsx b/apps/web/src/features/block-form/components/share/audience-panel.tsxindex 948071fa70..8bf51f086d 100644--- a/apps/web/src/features/block-form/components/share/audience-panel.tsx+++ b/apps/web/src/features/block-form/components/share/audience-panel.tsx@@ -1,5 +1,5 @@import Copy from '@phosphor/copy.svg';-import { CopyButton, SegmentedControl } from '@ui';+import { CopyButton, Tabs } from '@ui';import { createUniqueId, Show } from 'solid-js';import type { FormAudience } from '../../core/form-model';@@ -19,7 +19,8 @@ export function AudiencePanel(props: {<h3 id={titleId} class="font-medium text-ink">Who can respond</h3>- <SegmentedControl<FormAudience>+ <Tabs<FormAudience>+ touch="segmented"aria-label="Who can respond"value={props.audience}options={[diff --git a/apps/web/src/features/block-form/form-block.tsx b/apps/web/src/features/block-form/form-block.tsxindex dabba57a1f..f7a961b227 100644--- a/apps/web/src/features/block-form/form-block.tsx+++ b/apps/web/src/features/block-form/form-block.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';/*** App-facing entry for the `form` block. It reads the legacy block state once* (id, params, split) and hands identity, capabilities and host actions to@@ -8,6 +9,7 @@import { useFeatureFlag } from '@app/lib/analytics/posthog';import { HeaderActionButton } from '@components/app/HeaderActionButton';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { ResponsivePermissionsBadge } from '@components/app/ResponsiveBlockToolbar';import { HeaderIsland } from '@components/app/split-layout/components/HeaderIsland';import {@@ -35,7 +37,6 @@ import ArrowSquareOut from '@phosphor/arrow-square-out.svg';import Eye from '@phosphor/eye.svg';import PaperPlaneTilt from '@phosphor/paper-plane-tilt.svg';import { useFormSharePermissionsQuery } from '@queries/storage/forms';-import { Button } from '@ui';import { createSignal, type JSX, Show } from 'solid-js';import type { FormTab } from './components/form-tabs';import { FormProvider } from './context/form-context';@@ -141,10 +142,11 @@ function FormBlockContent(props: {/>}>- <Button variant="outline" size="sm" onClick={openRespond}>- <ArrowSquareOut class="size-3.5" />- Open form- </Button>+ <HeaderActionButton+ label="Open form"+ icon={<ArrowSquareOut class="size-3.5" />}+ onClick={openRespond}+ /></Show>);let respondScroll: HTMLDivElement | undefined;@@ -164,7 +166,7 @@ function FormBlockContent(props: {<BlockLiveIndicators /></Show><HeaderIsland>- <div class="order-[1000] flex items-center gap-1.5">+ <div class="order-[1000] flex items-center gap-2 touch:gap-1.5"><Showwhen={!props.respondOnly &&@@ -172,16 +174,15 @@ function FormBlockContent(props: {source.detail()?.access !== 'view'}>- <Button- variant="ghost"- size="sm"- disabled={preview.opening()}- onClick={() => fireAndForget(preview.open(), 'form-preview')}- >- <Eye class="size-3.5" />- Preview- </Button>- {primary()}+ <HeaderActionGroup label="Form actions">+ <HeaderActionButton+ label="Preview"+ icon={<Eye class="size-3.5" />}+ disabled={preview.opening()}+ onClick={() => fireAndForget(preview.open(), 'form-preview')}+ />+ {primary()}+ </HeaderActionGroup></Show><ShareTriggerid={formId}@@ -258,7 +259,7 @@ function FormCardContent() {fallback={<Showwhen={source.failure()}- fallback={<div class="h-24 animate-pulse rounded-lg bg-hover" />}+ fallback={<ListSkeleton.Bar class="h-24 w-full rounded-xl" />}><p class="p-3 text-sm text-ink-muted">This form isn’t available.</p></Show>diff --git a/apps/web/src/features/block-form/form-pickers.tsx b/apps/web/src/features/block-form/form-pickers.tsxindex 0f4338fb58..33d6d11283 100644--- a/apps/web/src/features/block-form/form-pickers.tsx+++ b/apps/web/src/features/block-form/form-pickers.tsx@@ -12,7 +12,7 @@ import MagnifyingGlass from '@phosphor/magnifying-glass.svg';import Plus from '@phosphor/plus.svg';import X from '@phosphor/x.svg';import { useDatabaseTableChanges } from '@queries/storage/databases-sync';-import { Checkbox, cn } from '@ui';+import { Checkbox, cn, Input } from '@ui';import { createSignal, For, Show } from 'solid-js';import { match } from 'ts-pattern';import type {@@ -174,12 +174,11 @@ export function FormRelationPicker(props: RelationPickerProps) {props.invalid ? 'border-failure' : 'border-edge-muted')}>- <input+ <Inputtype="search"aria-label={`Search ${source().name() || 'rows'}`}placeholder={`Search ${source().name() || 'rows'}`}value={search()}- class="h-9 w-full rounded-md border border-edge-muted bg-input px-2.5 text-sm text-ink outline-none placeholder:text-ink-placeholder focus:border-edge-focus"onInput={(event) => setSearch(event.currentTarget.value)}/><Showdiff --git a/apps/web/src/features/block-form/views/booking-step-view.tsx b/apps/web/src/features/block-form/views/booking-step-view.tsxindex 2e12e755a8..672d611b33 100644--- a/apps/web/src/features/block-form/views/booking-step-view.tsx+++ b/apps/web/src/features/block-form/views/booking-step-view.tsx@@ -47,7 +47,7 @@ export function BookingStepView(props: {<Switchfallback={<div- class="h-80 animate-pulse rounded-2xl bg-hover"+ class="skeleton-shimmer h-80 rounded-2xl bg-skeleton"aria-busy="true"aria-label="Loading the calendar"/>diff --git a/apps/web/src/features/block-form/views/form-page-view.tsx b/apps/web/src/features/block-form/views/form-page-view.tsxindex 263917f169..198b1ff84b 100644--- a/apps/web/src/features/block-form/views/form-page-view.tsx+++ b/apps/web/src/features/block-form/views/form-page-view.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import { fireAndForget } from '@core/util/fireAndForget';import { Button } from '@ui';import {@@ -68,9 +69,9 @@ export function FormSkeleton() {aria-busy="true"aria-label="Loading form">- <div class="h-32 animate-pulse rounded-xl bg-hover" />- <div class="h-48 animate-pulse rounded-xl bg-hover" />- <div class="h-24 animate-pulse rounded-xl bg-hover" />+ <ListSkeleton.Bar class="h-32 w-full rounded-xl" />+ <ListSkeleton.Bar class="h-48 w-full rounded-xl" />+ <ListSkeleton.Bar class="h-24 w-full rounded-xl" /></div>);}diff --git a/apps/web/src/features/block-form/views/respond-view.tsx b/apps/web/src/features/block-form/views/respond-view.tsxindex 2daf4559f4..cf6129de12 100644--- a/apps/web/src/features/block-form/views/respond-view.tsx+++ b/apps/web/src/features/block-form/views/respond-view.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import { fireAndForget } from '@core/util/fireAndForget';import ArrowLeft from '@phosphor/arrow-left.svg';import ArrowRight from '@phosphor/arrow-right.svg';@@ -254,8 +255,8 @@ export function RespondView(props: {aria-busy="true"aria-label="Loading">- <div class="h-24 animate-pulse rounded-xl bg-hover" />- <div class="h-24 animate-pulse rounded-xl bg-hover" />+ <ListSkeleton.Bar class="h-24 w-full rounded-xl" />+ <ListSkeleton.Bar class="h-24 w-full rounded-xl" /></div></Match><Matchdiff --git a/apps/web/src/features/block-form/views/share-tab-view.tsx b/apps/web/src/features/block-form/views/share-tab-view.tsxindex 7bb0ada15b..976a819144 100644--- a/apps/web/src/features/block-form/views/share-tab-view.tsx+++ b/apps/web/src/features/block-form/views/share-tab-view.tsx@@ -1,6 +1,6 @@import { fireAndForget } from '@core/util/fireAndForget';import UsersThree from '@phosphor/users-three.svg';-import { Button, ToggleSwitch } from '@ui';+import { Button, Input, ToggleSwitch } from '@ui';import { ResultAsync } from 'neverthrow';import { createSignal, Show } from 'solid-js';import { AudiencePanel } from '../components/share/audience-panel';@@ -121,7 +121,7 @@ export function ShareTabView(props: {Close automatically</span><span class="flex items-center gap-2">- <input+ <Inputtype="datetime-local"value={form().closesAt@@ -129,7 +129,6 @@ export function ShareTabView(props: {: ''}disabled={!isOwner() || pending()}- class="h-9 rounded-md border border-edge-muted bg-input px-2.5 text-sm text-ink outline-none focus:border-edge-focus disabled:opacity-60"onChange={(event) => {const closesAt = instantFromLocalInput(event.currentTarget.valuediff --git a/apps/web/src/features/block-md/component/DispatchAgentMenu.tsx b/apps/web/src/features/block-md/component/DispatchAgentMenu.tsxindex d8e8077d97..9203404902 100644--- a/apps/web/src/features/block-md/component/DispatchAgentMenu.tsx+++ b/apps/web/src/features/block-md/component/DispatchAgentMenu.tsx@@ -335,7 +335,6 @@ export function DispatchAgentButton(variant="outline"size={props.showPrimaryLabel ? 'md' : 'icon-sm'}depth={2}- class={props.showPrimaryLabel ? 'h-8' : undefined}><Dynamiccomponent={lastUsed().key === 'copy' ? CopyButton : Button}@@ -356,8 +355,7 @@ export function DispatchAgentButton(<ButtonGroup.Divider /><Dropdown.Triggervariant="outline"- size={props.showPrimaryLabel ? 'md' : 'icon-sm'}- class="px-2"+ size={props.showPrimaryLabel ? 'icon-md' : 'icon-sm'}label="Agent options"><CaretDown class="size-3.5!" />diff --git a/apps/web/src/features/block-md/component/FindAndReplace.tsx b/apps/web/src/features/block-md/component/FindAndReplace.tsxindex e1afb281ba..9e8b4ba2e2 100644--- a/apps/web/src/features/block-md/component/FindAndReplace.tsx+++ b/apps/web/src/features/block-md/component/FindAndReplace.tsx@@ -13,11 +13,34 @@ import CaretUp from '@phosphor/caret-up.svg';import MagnifyingGlass from '@phosphor/magnifying-glass.svg';import X from '@phosphor/x.svg';import { createCallback } from '@solid-primitives/rootless';-import { cn, Panel, Tooltip } from '@ui';-import type { JSX } from 'solid-js';+import { Button, cn, Input, Panel, Tooltip } from '@ui';+import type { Component, JSX } from 'solid-js';import { createEffect, createSignal, on, onCleanup, Show } from 'solid-js';import { useMarkdownDocument } from '../context/markdown-document-context';+// Clicking a control keeps the caret in the find field so Enter still steps.+const keepInputFocus = (e: MouseEvent) => e.preventDefault();++function FindBarButton(props: {+ label: string;+ icon: Component<{ class?: string }>;+ onClick: () => void;+}) {+ return (+ <Tooltip label={props.label}>+ <Button+ variant="ghost"+ size="icon-sm"+ aria-label={props.label}+ onMouseDown={keepInputFocus}+ onClick={() => props.onClick()}+ >+ <props.icon />+ </Button>+ </Tooltip>+ );+}+export function FindAndReplace(props: { hotkeyScope?: string } = {}) {const { permissions, state } = useMarkdownDocument();const canEdit = permissions.canEdit;@@ -310,131 +333,105 @@ export function FindAndReplace(props: { hotkeyScope?: string } = {}) {<Show when={findAndReplaceStore.searchIsOpen}><Paneldepth={3}- class="flex items-center justify-start rounded-xl bg-surface p-2 shadow-lg shadow-drop-shadow w-fit"+ hideBorder+ class="menu-surface flex w-fit items-start justify-start rounded-xl bg-surface p-2">- <div class="flex items-center px-1">- <Tooltip- label={`${findAndReplaceStore.replaceInputOpen ? 'Collapse' : 'Expand'} Search Bar`}+ <Tooltip+ label={`${findAndReplaceStore.replaceInputOpen ? 'Collapse' : 'Expand'} Search Bar`}+ >+ <Button+ variant="ghost"+ size="sm"+ class="mx-1"+ aria-label={`${findAndReplaceStore.replaceInputOpen ? 'Collapse' : 'Expand'} search bar`}+ onMouseDown={keepInputFocus}+ onClick={toggleReplaceInput}>- <div- class="flex items-center w-8 h-6 justify-center rounded-md hover:bg-hover hover-transition-bg"- onMouseDown={toggleReplaceInput}- >- <Show when={canEdit()}>- {findAndReplaceStore.replaceInputOpen ? (- <CaretDown class="size-3" />- ) : (- <CaretRight class="size-3" />- )}- </Show>- <MagnifyingGlass- class={cn(- 'size-4',- findAndReplaceStore.isSearching- ? 'animate-pulse text-accent'- : 'text-ink'- )}+ <Show when={canEdit()}>+ {findAndReplaceStore.replaceInputOpen ? (+ <CaretDown class="size-3" />+ ) : (+ <CaretRight class="size-3" />+ )}+ </Show>+ <MagnifyingGlass+ class={cn(+ 'size-4',+ findAndReplaceStore.isSearching+ ? 'animate-pulse text-accent'+ : 'text-ink'+ )}+ />+ </Button>+ </Tooltip>++ <div class="flex w-fit flex-col gap-1">+ <div class="flex items-center gap-2 px-1">+ <Input+ size="sm"+ class="w-58"+ type="text"+ placeholder="Find..."+ ref={inputRef}+ value={findAndReplaceStore.searchInputText}+ onInput={(e) => {+ setFindAndReplaceStore('searchInputText', e.target.value);+ performSearch(true, true);+ }}+ onKeyDown={inputKeyDownHandler}+ />+ <p class="text-xs text-ink whitespace-nowrap">+ {findAndReplaceStore.isSearching+ ? 'searching...'+ : findAndReplaceStore.matches > 0+ ? `${findAndReplaceStore.currentMatch === -1 ? '?' : findAndReplaceStore.currentMatch + 1} of ${findAndReplaceStore.matches}` ++ ` match${findAndReplaceStore.matches === 1 ? '' : 'es'}`+ : 'no matches'}+ </p>+ <div class="ml-2 flex items-center">+ <FindBarButton+ label="Previous Match"+ icon={CaretUp}+ onClick={() => jumpTo('prev')}/>- </div>- </Tooltip>- </div>-- <div class="flex flex-col w-fit">- <div class="flex items-center px-1">- <div class="flex rounded-md border bg-surface border-edge px-1 mx-1 w-58">- <input- class="mx-0.5 flex-1 h-6 border-0 text-sm text-ink focus:outline-none focus:ring-0"- type="text"- placeholder="Find..."- ref={inputRef}- value={findAndReplaceStore.searchInputText}- onInput={(e) => {- setFindAndReplaceStore('searchInputText', e.target.value);- performSearch(true, true);- }}- onKeyDown={inputKeyDownHandler}+ <FindBarButton+ label="Next Match"+ icon={CaretDown}+ onClick={() => jumpTo('next')}+ />+ <FindBarButton+ label="Close Search Bar"+ icon={X}+ onClick={closeSearch}/>- </div>- <div class="flex ml-2">- <div class="flex items-center justify-start">- <p class="text-xs text-ink whitespace-nowrap">- {findAndReplaceStore.isSearching- ? 'searching...'- : findAndReplaceStore.matches > 0- ? `${findAndReplaceStore.currentMatch === -1 ? '?' : findAndReplaceStore.currentMatch + 1} of ${findAndReplaceStore.matches}` +- ` match${findAndReplaceStore.matches === 1 ? '' : 'es'}`- : 'no matches'}- </p>- </div>- <div class="ml-4 flex justify-end items-center">- <Tooltip label={`Previous Match`}>- <div- class="flex items-center px-1 size-6 justify-center rounded-md hover:bg-hover hover-transition-bg"- onMouseDown={() => {- jumpTo('prev');- }}- >- <CaretUp />- </div>- </Tooltip>- <Tooltip label={`Next Match`}>- <div- class="flex items-center px-1 size-6 justify-center rounded-md hover:bg-hover hover-transition-bg"- onMouseDown={() => {- jumpTo('next');- }}- >- <CaretDown />- </div>- </Tooltip>- <Tooltip label={`Close Search Bar`}>- <div- class="flex items-center px-1 size-6 justify-center rounded-md hover:bg-hover hover-transition-bg"- onMouseDown={closeSearch}- >- <X />- </div>- </Tooltip>- </div></div></div><Show when={findAndReplaceStore.replaceInputOpen && canEdit()}>- <div class="flex items-center px-1">- <div class="flex rounded-md border bg-surface border-edge px-1 mx-1 mt-1 w-58">- <input- class="mx-0.5 flex-1 h-6 border-0 text-sm text-ink focus:outline-none focus:ring-0"- type="text"- placeholder="Replace with..."- ref={inputReplaceRef}- value={findAndReplaceStore.replaceInputText}- onInput={(e) =>- setFindAndReplaceStore('replaceInputText', e.target.value)- }- onKeyDown={replaceKeyDownHandler}+ <div class="flex items-center gap-2 px-1">+ <Input+ size="sm"+ class="w-58"+ type="text"+ placeholder="Replace with..."+ ref={inputReplaceRef}+ value={findAndReplaceStore.replaceInputText}+ onInput={(e) =>+ setFindAndReplaceStore('replaceInputText', e.target.value)+ }+ onKeyDown={replaceKeyDownHandler}+ />+ <div class="flex grow justify-center">+ <FindBarButton+ label="Replace"+ icon={Replace}+ onClick={() => replaceTextAtIndex()}+ />+ <FindBarButton+ label="Replace All"+ icon={ReplaceAll}+ onClick={() => replaceTextAll()}/>- </div>- <div class="flex grow justify-center ml-2">- <Tooltip label={`Replace`}>- <div- class="flex items-center px-1 size-6 justify-center rounded-md hover:bg-hover hover-transition-bg"- onMouseDown={() => {- replaceTextAtIndex();- }}- >- <Replace />- </div>- </Tooltip>- <Tooltip label={`Replace All`}>- <div- class="flex items-center px-1 size-6 justify-center rounded-md hover:bg-hover hover-transition-bg"- onMouseDown={() => {- replaceTextAll();- }}- >- <ReplaceAll />- </div>- </Tooltip></div></div></Show>diff --git a/apps/web/src/features/block-md/component/sidepanel/MarkdownSidePanelSections.tsx b/apps/web/src/features/block-md/component/sidepanel/MarkdownSidePanelSections.tsxindex 9d3dd8f8f9..d41052c9c9 100644--- a/apps/web/src/features/block-md/component/sidepanel/MarkdownSidePanelSections.tsx+++ b/apps/web/src/features/block-md/component/sidepanel/MarkdownSidePanelSections.tsx@@ -6,6 +6,7 @@ import {} from '@app/features/property/side-panel/properties';import { useFeatureFlag } from '@app/lib/analytics/posthog';import { useGlobalNotificationSource } from '@components/app/GlobalAppState';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import {GithubPullRequestDetailsRows,SidePanel,@@ -69,14 +70,16 @@ export function MarkdownSidePanelSections() {<Show when={isTask() && !isMobile()}><DispatchAgentButton showPrimaryLabel /></Show>- <AskMacroButton- entity={{- type: 'document',- id: documentId(),- name: displayName() ?? '',- fileType: 'md',- }}- />+ <HeaderActionGroup label="Actions">+ <AskMacroButton+ entity={{+ type: 'document',+ id: documentId(),+ name: displayName() ?? '',+ fileType: 'md',+ }}+ />+ </HeaderActionGroup></div></SidePanel.HeaderActions><SidePanel.Footer>diff --git a/apps/web/src/features/block-pdf/component/placeables/Signature.tsx b/apps/web/src/features/block-pdf/component/placeables/Signature.tsxindex 34ea3bab04..721ad233fc 100644--- a/apps/web/src/features/block-pdf/component/placeables/Signature.tsx+++ b/apps/web/src/features/block-pdf/component/placeables/Signature.tsx@@ -166,8 +166,7 @@ function SignatureEditor(props: SignatureEditorProps) {<Dialog.Contentclass={cn('fixed z-modal w-[426px] max-w-[calc(100vw-2rem)] p-3',- 'bg-surface shadow',- 'rounded-lg border border-edge',+ 'elevated-surface','flex-col justify-start inline-flex gap-3','dialog-content-open-animation')}diff --git a/apps/web/src/features/block-pdf/component/sidepanel/PdfSidePanelSections.tsx b/apps/web/src/features/block-pdf/component/sidepanel/PdfSidePanelSections.tsxindex 37e5802f8e..743d4117cc 100644--- a/apps/web/src/features/block-pdf/component/sidepanel/PdfSidePanelSections.tsx+++ b/apps/web/src/features/block-pdf/component/sidepanel/PdfSidePanelSections.tsx@@ -1,4 +1,5 @@import { AskMacroButton } from '@app/features/chat/ChatWithAgentButton';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import {FileDetailsSection,FilePropertiesSection,@@ -26,7 +27,7 @@ function PdfHeaderActions() {const fileType = () => blockMetadataSignal()?.fileType;return (- <div class="flex shrink-0 items-center gap-1">+ <HeaderActionGroup label="Actions"><AskMacroButtonentity={{type: 'document',@@ -35,6 +36,6 @@ function PdfHeaderActions() {fileType: fileType(),}}/>- </div>+ </HeaderActionGroup>);}diff --git a/apps/web/src/features/block-pptx/components/comments-pane.tsx b/apps/web/src/features/block-pptx/components/comments-pane.tsxindex 4095534b0a..2abcfe48fe 100644--- a/apps/web/src/features/block-pptx/components/comments-pane.tsx+++ b/apps/web/src/features/block-pptx/components/comments-pane.tsx@@ -73,7 +73,7 @@ function MoreMenu(props: {</Popover.Trigger><Popover.Portal><Popover.Content- class="z-action-menu w-48 rounded-xl border border-edge bg-menu p-1 text-ink text-xs shadow-xl outline-none"+ class="menu-surface z-action-menu w-48 p-1 text-xs outline-none"onCloseAutoFocus={(e) => e.preventDefault()}>{props.children(() => setOpen(false))}diff --git a/apps/web/src/features/block-pptx/components/effects-pane.tsx b/apps/web/src/features/block-pptx/components/effects-pane.tsxindex 68e2fe5b2f..dc849a4566 100644--- a/apps/web/src/features/block-pptx/components/effects-pane.tsx+++ b/apps/web/src/features/block-pptx/components/effects-pane.tsx@@ -195,7 +195,7 @@ function ColorButton(props: {<span class="text-ink-muted">▾</span></Popover.Trigger><Popover.Portal>- <Popover.Content class="z-action-menu rounded-xl border border-edge bg-menu p-2 shadow-xl outline-none">+ <Popover.Content class="menu-surface z-action-menu p-2 outline-none"><ColorPickerthemeGrid={props.colors.themeGrid}standard={props.colors.standard}@@ -234,7 +234,7 @@ function PresetsButton(props: {<span class="text-ink-muted">▾</span></Popover.Trigger><Popover.Portal>- <Popover.Content class="z-action-menu rounded-xl border border-edge bg-menu p-2 text-ink text-xs shadow-xl outline-none">+ <Popover.Content class="menu-surface z-action-menu p-2 text-xs outline-none">{props.children(() => setOpen(false))}</Popover.Content></Popover.Portal>diff --git a/apps/web/src/features/block-pptx/components/equation-editor.tsx b/apps/web/src/features/block-pptx/components/equation-editor.tsxindex cb8c276aad..40f7a0a376 100644--- a/apps/web/src/features/block-pptx/components/equation-editor.tsx+++ b/apps/web/src/features/block-pptx/components/equation-editor.tsx@@ -58,7 +58,7 @@ export function EquationEditorPanel(props: {return (<divref={panel}- class="absolute top-2 left-1/2 z-20 flex w-[28rem] max-w-[calc(100%-1rem)] -translate-x-1/2 flex-col gap-1.5 rounded-xl border border-edge bg-menu p-2 text-ink shadow-xl"+ class="menu-surface absolute top-2 left-1/2 z-20 flex w-[28rem] max-w-[calc(100%-1rem)] -translate-x-1/2 flex-col gap-1.5 p-2"data-testid="pptx-equation-editor"role="dialog"aria-label={isNew() ? 'New equation' : 'Edit equation'}diff --git a/apps/web/src/features/block-pptx/components/find-replace.tsx b/apps/web/src/features/block-pptx/components/find-replace.tsxindex a09d9418eb..570a399afe 100644--- a/apps/web/src/features/block-pptx/components/find-replace.tsx+++ b/apps/web/src/features/block-pptx/components/find-replace.tsx@@ -138,7 +138,7 @@ export function FindReplace(props: {return (<div- class="absolute top-2 right-3 z-20 flex w-80 flex-col gap-1.5 rounded-xl border border-edge bg-menu p-2 shadow-xl"+ class="menu-surface absolute top-2 right-3 z-20 flex w-80 flex-col gap-1.5 p-2"data-testid="pptx-find"role="search"onKeyDown={onKeyDown}diff --git a/apps/web/src/features/block-pptx/components/format-pane.tsx b/apps/web/src/features/block-pptx/components/format-pane.tsxindex ad04fe59c9..2eda09fd59 100644--- a/apps/web/src/features/block-pptx/components/format-pane.tsx+++ b/apps/web/src/features/block-pptx/components/format-pane.tsx@@ -149,7 +149,7 @@ function ColorButton(props: {<span class="text-ink-muted">▾</span></Popover.Trigger><Popover.Portal>- <Popover.Content class="z-action-menu rounded-xl border border-edge bg-menu p-2 shadow-xl outline-none">+ <Popover.Content class="menu-surface z-action-menu p-2 outline-none"><ColorPickerthemeGrid={props.env.themeGrid()}standard={props.env.standardColors}diff --git a/apps/web/src/features/block-pptx/components/ribbon/controls.tsx b/apps/web/src/features/block-pptx/components/ribbon/controls.tsxindex 90f9908001..b6de9b3625 100644--- a/apps/web/src/features/block-pptx/components/ribbon/controls.tsx+++ b/apps/web/src/features/block-pptx/components/ribbon/controls.tsx@@ -102,7 +102,7 @@ export function RibbonPopover(props: {<Popover.Portal><Popover.Contentclass={cn(- 'z-action-menu rounded-xl border border-edge bg-menu p-2 text-ink text-xs shadow-xl outline-none',+ 'menu-surface z-action-menu p-2 text-xs outline-none',props.class)}onCloseAutoFocus={(e) => e.preventDefault()}diff --git a/apps/web/src/features/block-pptx/components/ribbon/effects-menu.tsx b/apps/web/src/features/block-pptx/components/ribbon/effects-menu.tsxindex b1f8f9bf31..9c5e4ea0e9 100644--- a/apps/web/src/features/block-pptx/components/ribbon/effects-menu.tsx+++ b/apps/web/src/features/block-pptx/components/ribbon/effects-menu.tsx@@ -90,7 +90,7 @@ export function FlyoutMenu(props: {if (r.right > window.innerWidth - 8) setFlip(true);})}- class="absolute -top-2 z-10 w-max rounded-xl border border-edge bg-menu p-2 text-ink text-xs shadow-xl"+ class="menu-surface absolute -top-2 z-10 w-max p-2 text-xs"classList={{'left-full ml-2': !flip(),'right-full mr-2': flip(),diff --git a/apps/web/src/features/block-pptx/components/ribbon/font-controls.tsx b/apps/web/src/features/block-pptx/components/ribbon/font-controls.tsxindex 5c25dceebf..0a54218ec2 100644--- a/apps/web/src/features/block-pptx/components/ribbon/font-controls.tsx+++ b/apps/web/src/features/block-pptx/components/ribbon/font-controls.tsx@@ -128,7 +128,7 @@ function Combo(props: {<Popover.Portal><Popover.Contentid={`${props.label}-list`}- class="z-action-menu max-h-80 overflow-y-auto rounded-xl border border-edge bg-menu p-1 text-ink shadow-xl outline-none"+ class="menu-surface z-action-menu max-h-80 overflow-y-auto p-1 outline-none"onOpenAutoFocus={(e) => e.preventDefault()}onCloseAutoFocus={(e) => e.preventDefault()}>diff --git a/apps/web/src/features/block-pptx/components/ribbon/picture-format-tab.tsx b/apps/web/src/features/block-pptx/components/ribbon/picture-format-tab.tsxindex 5c38dcb5d9..c8b3e7ec0e 100644--- a/apps/web/src/features/block-pptx/components/ribbon/picture-format-tab.tsx+++ b/apps/web/src/features/block-pptx/components/ribbon/picture-format-tab.tsx@@ -404,7 +404,7 @@ function CropButton(props: { crop: CropMode }) {</Popover.Trigger><Popover.Portal><Popover.Content- class="z-action-menu rounded-xl border border-edge bg-menu p-2 text-ink text-xs shadow-xl outline-none"+ class="menu-surface z-action-menu p-2 text-xs outline-none"onCloseAutoFocus={(e) => e.preventDefault()}><div class="flex w-44 flex-col">diff --git a/apps/web/src/features/block-pptx/components/smartart/text-pane.tsx b/apps/web/src/features/block-pptx/components/smartart/text-pane.tsxindex e012895c8d..6b34af5933 100644--- a/apps/web/src/features/block-pptx/components/smartart/text-pane.tsx+++ b/apps/web/src/features/block-pptx/components/smartart/text-pane.tsx@@ -209,7 +209,7 @@ export function SmartArtTextPane(props: {return (<div- class="absolute z-20 flex w-60 flex-col rounded-lg border border-edge bg-menu text-ink shadow-xl"+ class="menu-surface absolute z-20 flex w-60 flex-col"style={{left: `${props.position.left}px`,top: `${props.position.top}px`,diff --git a/apps/web/src/features/block-pptx/pptx-block.tsx b/apps/web/src/features/block-pptx/pptx-block.tsxindex a14a63bdb5..ec6f019fc9 100644--- a/apps/web/src/features/block-pptx/pptx-block.tsx+++ b/apps/web/src/features/block-pptx/pptx-block.tsx@@ -1,3 +1,4 @@+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';/*** The pptx block: app chrome (header, file menu, sharing) around the* presentation editor, wired to the worker engine and document storage.@@ -300,15 +301,17 @@ export default function PptxBlock(props: { share?: string }) {</SplitHeaderRight><SplitHeaderRight><div class="order-[999] flex items-center">- <ChatWithAgentButton- label="Ask Macro"- entity={{- type: 'document',- id: documentId,- name: name(),- fileType: 'pptx',- }}- />+ <HeaderActionGroup label="Presentation actions">+ <ChatWithAgentButton+ label="Ask Macro"+ entity={{+ type: 'document',+ id: documentId,+ name: name(),+ fileType: 'pptx',+ }}+ />+ </HeaderActionGroup></div></SplitHeaderRight><ResponsivePermissionsBadge />diff --git a/apps/web/src/features/block-pr/component/PrLinks.tsx b/apps/web/src/features/block-pr/component/PrLinks.tsxindex ba9cf885f6..0a741c38a4 100644--- a/apps/web/src/features/block-pr/component/PrLinks.tsx+++ b/apps/web/src/features/block-pr/component/PrLinks.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import { URL_PARAMS as CHANNEL_URL_PARAMS } from '@block-channel/constants';import type { SplitContent } from '@components/app/split-layout/layoutManager';import { PopupPreview } from '@core/component/DocumentPreview';@@ -183,7 +184,7 @@ function LinkPill(props: {onClick={(event: MouseEvent) => event.stopPropagation()}><Surface- class="flex flex-col gap-0.5 rounded-xl p-1 glass bg-menu-glass"+ class="menu-surface flex flex-col gap-0.5 p-1"depth={3}hideBorder>@@ -463,9 +464,8 @@ export function PrOriginBadge(props: { origin: PrOrigin; onOpen: OpenPrLink }) {/** Space-holding placeholder while a row's links load, so pills don't shift. */export function PrLinksPending() {return (- <span- aria-hidden="true"- class="h-6 w-12 shrink-0 animate-pulse rounded-full bg-ink/5"- />+ <span aria-hidden="true" class="shrink-0">+ <ListSkeleton.Bar class="h-6 w-12" />+ </span>);}diff --git a/apps/web/src/features/block-pr/component/PrSkeletons.tsx b/apps/web/src/features/block-pr/component/PrSkeletons.tsxindex 82ed366c9c..8b92b608af 100644--- a/apps/web/src/features/block-pr/component/PrSkeletons.tsx+++ b/apps/web/src/features/block-pr/component/PrSkeletons.tsx@@ -13,7 +13,7 @@ export function SkeletonBar(props: { class?: string }) {function MessageSkeleton() {return (<div class="flex gap-2 py-3">- <div class="animate-pulse size-6 rounded-full bg-skeleton shrink-0" />+ <div class="skeleton-shimmer size-6 shrink-0 rounded-full bg-skeleton" /><div class="flex flex-col gap-2 grow min-w-0 pt-1"><SkeletonBar class="h-2.5 w-32" /><SkeletonBar class="h-2 w-full max-w-md" />diff --git a/apps/web/src/features/block-pr/hooks/usePrShare.tsx b/apps/web/src/features/block-pr/hooks/usePrShare.tsxindex 8bccc7ff67..07f75f5dfb 100644--- a/apps/web/src/features/block-pr/hooks/usePrShare.tsx+++ b/apps/web/src/features/block-pr/hooks/usePrShare.tsx@@ -85,7 +85,11 @@ function PrShareModal(props: PrShareModalProps) {class="max-w-[calc(100vw-16px)] mt-20 sm:mt-40 mx-auto overflow-y-auto scrollbar-hidden portal-scope isolate flex flex-col gap-2 *:max-h-[75vh]"style={{ width: '800px' }}>- <Panel depth={2} class="rounded-xl bg-dialog">+ <Panel+ depth={2}+ hideBorder+ class="elevated-surface rounded-[24px] bg-dialog"+ ><Panel.Header class="px-4"><Dialog.Title class="flex items-center gap-1.5 min-w-0 overflow-hidden whitespace-nowrap w-full text-sm font-medium"><span class="shrink-0">Share:</span>@@ -106,7 +110,11 @@ function PrShareModal(props: PrShareModalProps) {/></Panel.Body></Panel>- <Panel depth={2} class="rounded-xl bg-dialog">+ <Panel+ depth={2}+ hideBorder+ class="elevated-surface rounded-[24px] bg-dialog"+ ><Panel.Body><div class="flex items-center justify-between p-4 text-sm"><span class="text-ink-muted">diff --git a/apps/web/src/features/block-pr/views/PrDetail.tsx b/apps/web/src/features/block-pr/views/PrDetail.tsxindex 9e6f1f325c..749a54e3ad 100644--- a/apps/web/src/features/block-pr/views/PrDetail.tsx+++ b/apps/web/src/features/block-pr/views/PrDetail.tsx@@ -3,6 +3,7 @@ import { ChangesSplit, ChangesToggle } from '@app/features/changes/changes';import { useOptionalChanges } from '@app/features/changes/context/changes-controller';import { useGlobalNotificationSource } from '@components/app/GlobalAppState';import { HeaderActionButton } from '@components/app/HeaderActionButton';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { SidePanel } from '@components/app/side-panel';import { SplitPanel } from '@components/app/split-panel';import {@@ -201,20 +202,24 @@ export function PrDetailActions(props: { detail?: PrForeignEntityData }) {<Show when={props.detail}>{(detail) => (<>- <Tooltip label="Share pull request">- <HeaderActionButton- label="Share"- icon={<IconShared />}- onClick={openShare}+ <HeaderActionGroup label="Sharing">+ <Tooltip label="Share pull request">+ <HeaderActionButton+ label="Share"+ icon={<IconShared />}+ onClick={openShare}+ />+ </Tooltip>+ </HeaderActionGroup>+ <HeaderActionGroup label="Pull request actions">+ <MergePullRequestButton+ target={{ ...detail().prRef, title: detail().pullRequest.name }}+ status={detail().pullRequest.status}+ draft={detail().pullRequest.draft}+ checks={detail().pullRequest.checks}+ onMerged={() => invalidatePrForeignEntity(detail().id)}/>- </Tooltip>- <MergePullRequestButton- target={{ ...detail().prRef, title: detail().pullRequest.name }}- status={detail().pullRequest.status}- draft={detail().pullRequest.draft}- checks={detail().pullRequest.checks}- onMerged={() => invalidatePrForeignEntity(detail().id)}- />+ </HeaderActionGroup></>)}</Show>diff --git a/apps/web/src/features/block-project/component/ProjectCreateMenu.tsx b/apps/web/src/features/block-project/component/ProjectCreateMenu.tsxindex 21b25f0d6f..f5ed7ba3f0 100644--- a/apps/web/src/features/block-project/component/ProjectCreateMenu.tsx+++ b/apps/web/src/features/block-project/component/ProjectCreateMenu.tsx@@ -1,3 +1,4 @@+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import { createAiDocument } from '@app/features/block-ai/queries/create-ai';import { createFigDocument } from '@app/features/block-fig/queries/create-fig';import { createPsdDocument } from '@app/features/block-psd/queries/create-psd';@@ -26,9 +27,7 @@ import {} from '@core/util/create';import { fireAndForget } from '@core/util/fireAndForget';import type { ObjectLike } from '@core/util/result';-import CaretDown from '@phosphor/caret-down.svg';import PlusIcon from '@phosphor/plus.svg';-import CirclePlus from '@phosphor/plus-circle.svg';import { PROPERTY_OPTION_IDS, SYSTEM_PROPERTY_IDS } from '@property/constants';import { createProject } from '@queries/storage/projects';import { Dialog, Dropdown, Surface } from '@ui';@@ -450,18 +449,12 @@ export function ProjectCreateMenu(props: { id: string; name: string }) {const [open, setOpen] = createSignal(false);return (<Dropdown open={open()} onOpenChange={setOpen}>- <div class="flex items-center">- <Dropdown.Trigger- variant="outline"- size="sm"- class="bg-surface py-3"- depth={2}- >- <CirclePlus />- Create- <CaretDown />- </Dropdown.Trigger>- </div>+ <Dropdown.Trigger+ as={ViewCreateButton}+ presentation="toolbar"+ menu+ aria-label="Create in folder"+ /><MenuContent projectId={props.id} name={props.name} /></Dropdown>);diff --git a/apps/web/src/features/block-project/component/TopBar.tsx b/apps/web/src/features/block-project/component/TopBar.tsxindex 2d651a3fe8..d2ea09aeab 100644--- a/apps/web/src/features/block-project/component/TopBar.tsx+++ b/apps/web/src/features/block-project/component/TopBar.tsx@@ -5,6 +5,7 @@ import {} from '@app/features/chat/ChatWithAgentButton';import { getIsSpecialProject } from '@block-project/isSpecial';import { projectBlockDataSignal } from '@block-project/signal/projectBlockData';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import {type BlockTool,ResponsivePermissionsBadge,@@ -34,6 +35,7 @@ import {import { useShareModal } from '@core/component/TopBar/shareModal';import { ENABLE_PROJECT_SHARING } from '@core/constant/featureFlags';import { isMobile } from '@core/mobile/isMobile';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import {useCanEdit,useGetPermissions,@@ -117,7 +119,25 @@ export function TopBar() {<BlockItemSplitLabel fallbackName={name()} /></SplitHeaderLeft><SplitHeaderRight>- <div class="order-[1000] flex items-center gap-1">+ <div class="order-[1000] flex items-center gap-2">+ <Show when={!isTouchDevice()}>+ <HeaderActionGroup label="Folder actions">+ <For each={toolbarTools()}>+ {(tool) => (+ <Show when={!tool.condition || tool.condition()}>+ {tool.buttonComponent ? (+ <tool.buttonComponent />+ ) : (+ <ToolButton tool={tool} />+ )}+ </Show>+ )}+ </For>+ </HeaderActionGroup>+ <Show when={ops().length > 0 && canEdit()}>+ <ProjectCreateMenu id={id} name={name()} />+ </Show>+ </Show><Show when={showShare()}><ShareTrigger onClick={openShare} copyLink={handleCopyLink} /></Show>@@ -133,7 +153,7 @@ export function TopBar() {tools={isMobile() ? [...toolbarTools(), ...createTools] : undefined}/></SplitTitleFileMenu>- <Show when={!isMobile()}>+ <Show when={!isMobile() && isTouchDevice()}><SplitToolbarLeft class="flex-0"><div class="flex gap-2 p-1"><Show when={ops().length > 0}>diff --git a/apps/web/src/features/block-psd/components/color-swatch.tsx b/apps/web/src/features/block-psd/components/color-swatch.tsxindex 2c0a915773..9fbf292aeb 100644--- a/apps/web/src/features/block-psd/components/color-swatch.tsx+++ b/apps/web/src/features/block-psd/components/color-swatch.tsx@@ -49,7 +49,7 @@ export function ColorSwatch(props: {ref={(el) => {picker = el;}}- class="w-56 rounded-lg border border-edge-muted bg-menu p-2 shadow-lg"+ class="menu-surface w-56 p-2"testId={props.testId ? `${props.testId}-picker` : undefined}><ColorPicker color={props.color} onChange={props.onChange} />diff --git a/apps/web/src/features/block-psd/components/dialogs.tsx b/apps/web/src/features/block-psd/components/dialogs.tsxindex 76443f386b..73a96f71c4 100644--- a/apps/web/src/features/block-psd/components/dialogs.tsx+++ b/apps/web/src/features/block-psd/components/dialogs.tsx@@ -63,7 +63,7 @@ function DialogShell(props: {role="dialog"aria-label={props.title}data-testid={props.testId}- class="flex w-80 flex-col gap-3 rounded-xl border border-edge-muted bg-dialog p-4 text-ink shadow-xl"+ class="elevated-surface flex w-80 flex-col gap-3 p-4"onKeyDown={(e) => {e.stopPropagation();if (e.key === 'Escape') props.onCancel();@@ -468,7 +468,7 @@ export function ShortcutsDialog(props: { mac: boolean; onClose: () => void }) {role="dialog"aria-label="Keyboard shortcuts"data-testid="psd-shortcuts"- class="absolute inset-x-4 bottom-10 z-30 mx-auto max-h-[70%] max-w-3xl overflow-y-auto rounded-xl border border-edge-muted bg-menu p-4 text-ink text-xs shadow-xl"+ class="menu-surface absolute inset-x-4 bottom-10 z-30 mx-auto max-h-[70%] max-w-3xl overflow-y-auto p-4 text-xs"onPointerDown={(e) => e.stopPropagation()}><div class="mb-3 flex items-center justify-between">diff --git a/apps/web/src/features/block-psd/components/menu-bar.tsx b/apps/web/src/features/block-psd/components/menu-bar.tsxindex 2f97ece3cd..5463ac82d3 100644--- a/apps/web/src/features/block-psd/components/menu-bar.tsx+++ b/apps/web/src/features/block-psd/components/menu-bar.tsx@@ -40,10 +40,7 @@ export function MenuList(props: {return (<divrole="menu"- class={cn(- 'z-50 w-60 rounded-lg border border-edge-muted bg-menu p-1 text-ink text-xs shadow-lg',- props.class- )}+ class={cn('menu-surface z-50 w-60 p-1 text-xs', props.class)}>{/* By position: the entries are rebuilt as the editor changes, andthe rows (and the focus in them) stay. */}diff --git a/apps/web/src/features/block-psd/components/toolbar.tsx b/apps/web/src/features/block-psd/components/toolbar.tsxindex 2a18965acf..7cf0489e91 100644--- a/apps/web/src/features/block-psd/components/toolbar.tsx+++ b/apps/web/src/features/block-psd/components/toolbar.tsx@@ -146,7 +146,7 @@ export function Toolbar(props: {<Portal><divref={list}- class="fixed z-50 w-52 rounded-lg border border-edge-muted bg-menu p-1 text-ink text-xs shadow-lg"+ class="menu-surface fixed z-50 w-52 p-1 text-xs"style={{left: `${open().at.right + 4}px`,top: `${open().at.top}px`,diff --git a/apps/web/src/features/block-psd/views/text-editor.tsx b/apps/web/src/features/block-psd/views/text-editor.tsxindex 9b77a90839..01951b24bb 100644--- a/apps/web/src/features/block-psd/views/text-editor.tsx+++ b/apps/web/src/features/block-psd/views/text-editor.tsx@@ -148,7 +148,7 @@ export function TextEditor(props: {return (<div- class="absolute z-20 w-72 rounded-lg border border-edge-muted bg-menu p-2 shadow-lg"+ class="menu-surface absolute z-20 w-72 p-2"style={{left: `${Math.max(8, at().x)}px`,top: `${Math.max(8, at().y + 8)}px`,diff --git a/apps/web/src/features/block-spreadsheet/SpreadsheetComments.tsx b/apps/web/src/features/block-spreadsheet/SpreadsheetComments.tsxindex 9e0504aeea..7562bee1ea 100644--- a/apps/web/src/features/block-spreadsheet/SpreadsheetComments.tsx+++ b/apps/web/src/features/block-spreadsheet/SpreadsheetComments.tsx@@ -24,8 +24,8 @@ import {useSendMessageMutation,} from '@queries/messages/mutations';import type { MessageListItem } from '@service-storage/messages';+import { Tabs } from '@ui';import { Button } from '@ui/components/Button';-import { SegmentedControl } from '@ui/components/SegmentedControl';import {createEffect,createMemo,@@ -421,7 +421,8 @@ export function SpreadsheetComments(props: {><section aria-label="Cell comments"><div class="mb-3">- <SegmentedControl+ <Tabs+ touch="segmented"value={commentFilter()}options={COMMENT_FILTER_OPTIONS}onChange={setCommentFilter}diff --git a/apps/web/src/features/block-spreadsheet/components/SpreadsheetCommentCard.tsx b/apps/web/src/features/block-spreadsheet/components/SpreadsheetCommentCard.tsxindex b75a40520b..bad9be1bd7 100644--- a/apps/web/src/features/block-spreadsheet/components/SpreadsheetCommentCard.tsx+++ b/apps/web/src/features/block-spreadsheet/components/SpreadsheetCommentCard.tsx@@ -22,7 +22,7 @@ export function SpreadsheetCommentCard(props: {<divrole="dialog"aria-label={`Comments on ${props.label}`}- class="absolute z-modal w-88 max-w-[calc(100vw-24px)] rounded-xl border border-edge bg-panel text-ink shadow-xl"+ class="menu-surface absolute z-modal w-88 max-w-[calc(100vw-24px)]"use:floatWithElement={{element: () => props.element,spacing: 6,diff --git a/apps/web/src/features/calendar-view/calendar-view-skeleton.tsx b/apps/web/src/features/calendar-view/calendar-view-skeleton.tsxindex aeb56b739f..1f98a6ebba 100644--- a/apps/web/src/features/calendar-view/calendar-view-skeleton.tsx+++ b/apps/web/src/features/calendar-view/calendar-view-skeleton.tsx@@ -15,7 +15,10 @@ export function CalendarViewSkeleton() {aside={isMobile() ? false : { preserveDuringResize: false }}><ViewSkeleton.Sidebar title="Calendar" createLabel="New" />- <ViewSkeleton.Main title={monthTitle()}>+ <ViewSkeleton.Main+ title={monthTitle()}+ controls={['Booking links ⌄', 'Today ‹ ›', 'Week ⌄', '+ New ⌄', 1]}+ ><div class="flex min-h-0 flex-1"><CalendarGridSkeleton dayCount={7} showDayHeader showAllDaySlot /></div>diff --git a/apps/web/src/features/calendar-view/calendar-view.tsx b/apps/web/src/features/calendar-view/calendar-view.tsxindex 7ed92344e4..b11eb76f94 100644--- a/apps/web/src/features/calendar-view/calendar-view.tsx+++ b/apps/web/src/features/calendar-view/calendar-view.tsx@@ -20,6 +20,7 @@ import {type Accessor,createEffect,createMemo,+ type JSX,on,onCleanup,onMount,@@ -50,6 +51,7 @@ export type CalendarViewProps = {route: { id: string };/** A new value re-aims at the URL's event without a navigation. */refocus?: Accessor<unknown>;+ headerLeading?: JSX.Element;};/** Route-backed Calendar view, hosted by its own route or inline under another. */@@ -243,7 +245,7 @@ export function CalendarView(props: CalendarViewProps) {onPeriodViewChange={setPeriodView}onFocusedEventIdChange={setFocusedEventId}>- <Workspace />+ <Workspace headerLeading={props.headerLeading} /></CalendarViewContextProvider></CalendarFocusContextProvider></Show>diff --git a/apps/web/src/features/calendar-view/components/CalendarCreateMenu.tsx b/apps/web/src/features/calendar-view/components/CalendarCreateMenu.tsxindex db1f8e19c3..744ba712ad 100644--- a/apps/web/src/features/calendar-view/components/CalendarCreateMenu.tsx+++ b/apps/web/src/features/calendar-view/components/CalendarCreateMenu.tsx@@ -1,5 +1,6 @@+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import { type ButtonSize, Dropdown } from '@ui';-import type { JSX } from 'solid-js';+import { type JSX, Show } from 'solid-js';/** Menu presentation; consumers compose its trigger and creation items. */export function CalendarCreateMenu(props: {@@ -9,16 +10,35 @@ export function CalendarCreateMenu(props: {contentClass?: string;size?: ButtonSize;label?: string;+ presentation?: 'sidebar' | 'toolbar';}) {return (- <Dropdown placement="bottom-start">- <Dropdown.Trigger- size={props.size ?? 'sm'}- class={props.class}- label={props.label}+ <Dropdown+ placement={+ props.presentation === 'toolbar' ? 'bottom-end' : 'bottom-start'+ }+ >+ <Show+ when={props.presentation}+ fallback={+ <Dropdown.Trigger+ size={props.size ?? 'sm'}+ class={props.class}+ label={props.label}+ >+ {props.trigger}+ </Dropdown.Trigger>+ }>- {props.trigger}- </Dropdown.Trigger>+ {(presentation) => (+ <Dropdown.Trigger+ as={ViewCreateButton}+ presentation={presentation()}+ menu+ aria-label="New event or call"+ />+ )}+ </Show><Dropdown.Content class={props.contentClass ?? 'min-w-40'}><Dropdown.Group>{props.children}</Dropdown.Group></Dropdown.Content>diff --git a/apps/web/src/features/calendar-view/components/CalendarSearch.tsx b/apps/web/src/features/calendar-view/components/CalendarSearch.tsxindex 010ee53232..d9e2e62292 100644--- a/apps/web/src/features/calendar-view/components/CalendarSearch.tsx+++ b/apps/web/src/features/calendar-view/components/CalendarSearch.tsx@@ -690,21 +690,24 @@ function CalendarSearchControl(props: {</Popover.Trigger>}>- <div class="relative h-10 min-w-0 w-full flex-1">- <Popover.Anchor as="div" class="h-10 w-full">+ <div class="relative h-[var(--view-search-height,2.5rem)] min-w-0 w-full flex-1">+ <Popover.Anchor+ as="div"+ class="h-[var(--view-search-height,2.5rem)] w-full"+ ><Show when={props.expanded === false}><Buttonref={searchButton}type="button"- variant="ghost"- size="icon-lg"+ variant="outline"+ size="icon-md"label="Search events"hotkey={TOKENS.calendar.search}aria-expanded="false"aria-haspopup="dialog"onClick={props.onExpand}>- <SearchIcon class="size-5" />+ <SearchIcon class="size-4" /></Button></Show>{/* Keep the input mounted while its width animates; inert removes collapsed controls from keyboard navigation. */}@@ -787,7 +790,7 @@ function CalendarSearchControl(props: {><divclass={cn(- 'max-w-[calc(100vw-2rem)] overflow-hidden rounded-xl glass bg-menu-glass text-ink transition-[translate] duration-200 ease-out motion-reduce:transition-none',+ 'menu-surface max-w-[calc(100vw-2rem)] overflow-hidden transition-[translate] duration-200 ease-out motion-reduce:transition-none',props.inline ? 'w-[var(--kb-popper-anchor-width)]' : 'w-80')}classList={{diff --git a/apps/web/src/features/calendar-view/components/CalendarSidebar.tsx b/apps/web/src/features/calendar-view/components/CalendarSidebar.tsxindex f0a8123371..8f41aa3a9e 100644--- a/apps/web/src/features/calendar-view/components/CalendarSidebar.tsx+++ b/apps/web/src/features/calendar-view/components/CalendarSidebar.tsx@@ -8,6 +8,7 @@ import { useCalendarPager } from '@app/features/calendar/components/CalendarPageimport { CalendarSettingsDropdown } from '@app/features/calendar/components/CalendarSettingsDropdown';import { useCalendarView } from '@app/features/calendar/components/CalendarViewContext';import { SourceControls } from '@app/features/calendar/components/SourceControls';+import { useCalendarSearchUiFlag } from '@app/features/calendar/hooks/use-calendar-ui-flag';import {type TeamOooWindow,useHasTeammates,@@ -43,6 +44,7 @@ import {CalendarCreateEventItem,} from './CalendarCreateItems';import { CalendarCreateMenu } from './CalendarCreateMenu';+import { CalendarSearch } from './CalendarSearch';import { ConnectCalendarsPromotion } from './ConnectCalendarsPromotion';function CalendarMiniCalendar() {@@ -292,13 +294,31 @@ function CalendarSidebarOverlayClose() {export function CalendarSidebar() {const shell = useViewShell();+ const searchEnabled = useCalendarSearchUiFlag();+ const [searchOpen, setSearchOpen] = createSignal(false);const closeOverlay = () => {if (shell.aside.isOverlay()) shell.aside.collapse();};return (<ViewSidebar.Root aria-label="Calendar navigation">- <ViewSidebar.Header>+ <ViewSidebar.Header+ searchLabel="Search events"+ searchOpen={searchOpen()}+ onSearchOpenChange={setSearchOpen}+ search={+ searchEnabled()+ ? () => (+ <CalendarSearch+ inline+ expanded+ popupReady+ onDismiss={() => setSearchOpen(false)}+ />+ )+ : undefined+ }+ ><div class="flex min-w-0 items-center gap-1"><ViewSidebar.CloseButton /><ViewSidebar.Title>Calendar</ViewSidebar.Title>@@ -307,6 +327,7 @@ export function CalendarSidebar() {</ViewSidebar.Header><ViewSidebar.Primary><CalendarCreateMenu+ presentation={isTouchDevice() ? undefined : 'sidebar'}size="md"class="h-(--sidebar-row-height) w-full min-w-0 justify-start gap-(--sidebar-label-gap) px-(--sidebar-item-inset) text-left touch:h-11"contentClass="w-[var(--kb-popper-anchor-width)] min-w-40"diff --git a/apps/web/src/features/calendar-view/components/EventGuests.tsx b/apps/web/src/features/calendar-view/components/EventGuests.tsxindex 51b2acf027..1c3e231173 100644--- a/apps/web/src/features/calendar-view/components/EventGuests.tsx+++ b/apps/web/src/features/calendar-view/components/EventGuests.tsx@@ -29,7 +29,7 @@ import CopyIcon from '@phosphor/copy.svg';import EnvelopeIcon from '@phosphor/envelope.svg';import UserPlusIcon from '@phosphor/user-plus.svg';import type { CalendarInviteScope } from '@service-email/client';-import { Button, Checkbox, Dialog, Layer, SegmentedControl } from '@ui';+import { Button, Checkbox, Dialog, Layer, Tabs } from '@ui';import { createMemo, createSignal, Show } from 'solid-js';/** Same wording as the RSVP and delete scope choices. */@@ -125,7 +125,8 @@ function InviteGuestsForm(props: {/><div class="flex shrink-0 flex-wrap items-center gap-2 border-t border-edge-muted p-2"><Show when={recurring()}>- <SegmentedControl+ <Tabs+ touch="segmented"aria-label="Invite to"size="sm"value={scope()}@@ -189,7 +190,7 @@ function EventInviteGuestsAction(props: {</Popover.Trigger><EventComposerPopoverPortal><Layer depth={3}>- <Popover.Content class="z-action-menu flex max-h-[min(30rem,var(--kb-popper-content-available-height,30rem))] w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-xl border border-edge bg-menu-glass text-sm glass menu-open-animation">+ <Popover.Content class="menu-surface z-action-menu flex max-h-[min(30rem,var(--kb-popper-content-available-height,30rem))] w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden text-sm menu-open-animation"><Popover.Title class="sr-only">Add guests</Popover.Title>{form()}</Popover.Content>diff --git a/apps/web/src/features/calendar-view/components/Header.test.tsx b/apps/web/src/features/calendar-view/components/Header.test.tsxnew file mode 100644index 0000000000..09a8d90e94--- /dev/null+++ b/apps/web/src/features/calendar-view/components/Header.test.tsx@@ -0,0 +1,140 @@+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import type { JSX } from 'solid-js';+import { afterEach, describe, expect, it, vi } from 'vitest';+import { Header } from './Header';++const state = vi.hoisted(() => ({+ touch: false,+ previous: vi.fn(),+ next: vi.fn(),+ today: vi.fn(),+}));++vi.mock('@ui', async () => ({+ Button: (await import('@app/components/ui/components/Button')).Button,+ ButtonGroup: (await import('@app/components/ui/components/ButtonGroup'))+ .ButtonGroup,+ Layer: (await import('@app/components/ui/components/Layer')).Layer,+ cn: (await import('@app/components/ui/utils/classname')).cn,+}));+vi.mock('@app/components/view-shell', () => ({+ useViewShell: () => ({+ aside: { isCollapsed: () => false, isOverlay: () => false },+ breakpoints: { narrow: () => false },+ }),+ ViewShell: {+ TopBar: (props: { children: JSX.Element }) => (+ <header>{props.children}</header>+ ),+ },+}));+vi.mock('@components/app/split-layout/layoutUtils', () => ({+ useSplitPanelOrThrow: () => ({ splitHotkeyScope: {} }),+}));+vi.mock('@components/app/split-layout/components/SplitHeader', () => ({+ SplitHeaderLeft: (props: { children: JSX.Element }) => <>{props.children}</>,+ SplitHeaderRight: (props: { children: JSX.Element }) => <>{props.children}</>,+}));+vi.mock('@core/mobile/isTouchDevice', () => ({+ isTouchDevice: () => state.touch,+}));+vi.mock('@core/mobile/isMobile', () => ({ isMobile: () => state.touch }));+vi.mock('@app/features/calendar/components/CalendarPagerContext', () => ({+ useCalendarPager: () => ({+ navigationDate: () => new Date(2026, 9, 20),+ previousPeriod: state.previous,+ nextPeriod: state.next,+ navigateToToday: state.today,+ changeView: vi.fn(),+ }),+}));+vi.mock('@app/features/calendar/components/CalendarViewContext', () => ({+ useCalendarView: () => ({ displaySettings: { periodView: 'timeGridWeek' } }),+}));+vi.mock('@app/features/calendar/hooks/use-calendar-hotkeys', () => ({+ useCalendarHotkeys: () => {},+}));+vi.mock('@solid-primitives/resize-observer', () => ({+ createElementSize: () => ({ width: 1200, height: 60 }),+}));+vi.mock('@app/features/calendar/components/MonthDrawer', () => ({+ MonthDrawer: () => <button>Choose month</button>,+}));+vi.mock('@app/features/calendar/components/PeriodSelector', () => ({+ PeriodSelector: () => <button>Choose calendar view</button>,+}));+vi.mock('@app/features/calendar/components/CalendarSettingsDropdown', () => ({+ CalendarSettingsDropdown: () => <button>Calendar settings</button>,+}));+vi.mock('@app/features/calendar/availability/CopyAvailabilityButton', () => ({+ CopyAvailabilityButton: () => null,+}));+vi.mock('@app/features/scheduling/calendar-actions', () => ({+ CalendarSchedulingActions: () => <button>Booking links</button>,+}));+vi.mock('./CalendarSearch', () => ({+ CalendarSearch: () => <button>Search events</button>,+}));+vi.mock('./CalendarCreateItems', () => ({+ CalendarCreateEventItem: () => null,+ CalendarCreateCallItem: () => null,+}));+vi.mock('./CalendarCreateMenu', () => ({+ CalendarCreateMenu: () => <button>New event or call</button>,+}));+vi.mock('@ui/components/Tour', () => ({ tourTarget: () => () => {} }));+vi.mock('../tour', () => ({+ CALENDAR_TOUR: {+ sidebarToggle: 'calendar-sidebar',+ period: 'calendar-period',+ },+}));++afterEach(() => {+ cleanup();+ state.touch = false;+ vi.clearAllMocks();+});++describe('calendar headers', () => {+ it.each(['workspace', 'preview'] as const)(+ 'keeps date navigation and creation in the shared desktop %s header',+ (presentation) => {+ const goHome = vi.fn();+ render(() => (+ <Header+ presentation={presentation}+ leading={<button onClick={goHome}>Home</button>}+ />+ ));++ expect(+ screen.getByRole('heading', { name: 'October 2026' })+ ).toBeTruthy();+ expect(+ screen.getByRole('button', { name: 'Search events' })+ ).toBeTruthy();+ expect(+ screen.getByRole('button', { name: 'New event or call' })+ ).toBeTruthy();+ fireEvent.click(screen.getByRole('button', { name: 'Previous week' }));+ fireEvent.click(screen.getByRole('button', { name: 'Next week' }));+ fireEvent.click(screen.getByRole('button', { name: 'Go to today' }));+ fireEvent.click(screen.getByRole('button', { name: 'Home' }));+ expect(state.previous).toHaveBeenCalledOnce();+ expect(state.next).toHaveBeenCalledOnce();+ expect(state.today).toHaveBeenCalledOnce();+ expect(goHome).toHaveBeenCalledOnce();+ }+ );++ it('retains the touch preview month picker and settings', () => {+ state.touch = true;+ render(() => <Header presentation="preview" />);+ expect(screen.getByRole('button', { name: 'Choose month' })).toBeTruthy();+ expect(+ screen.getByRole('button', { name: 'Calendar settings' })+ ).toBeTruthy();+ expect(screen.queryByRole('heading', { name: 'October 2026' })).toBeNull();+ });+});diff --git a/apps/web/src/features/calendar-view/components/Header.tsx b/apps/web/src/features/calendar-view/components/Header.tsxindex 334f9f6e3e..2660b2bb28 100644--- a/apps/web/src/features/calendar-view/components/Header.tsx+++ b/apps/web/src/features/calendar-view/components/Header.tsx@@ -25,11 +25,12 @@ import CaretRightIcon from '@phosphor/caret-right.svg';import ListIcon from '@phosphor/list.svg';import PlusIcon from '@phosphor/plus.svg';import { createElementSize } from '@solid-primitives/resize-observer';-import { Button, cn } from '@ui';+import { Button, ButtonGroup, cn } from '@ui';import { tourTarget } from '@ui/components/Tour';import {createMemo,createSignal,+ type JSX,Match,onCleanup,Show,@@ -76,9 +77,12 @@ function createLocalToday() {return today;}-export function Header(props: { presentation: 'workspace' | 'preview' }) {+export function Header(props: {+ presentation: 'workspace' | 'preview';+ leading?: JSX.Element;+}) {const panel = useSplitPanelOrThrow();- // PreviewFrame owns its own top bar and may sit inside another view shell.+ // Inline previews use the host's shell, not Calendar's sidebar state.const shell = props.presentation === 'workspace' ? useViewShell() : undefined;const calendarPager = useCalendarPager();const calendarView = useCalendarView();@@ -88,21 +92,20 @@ export function Header(props: { presentation: 'workspace' | 'preview' }) {headerElement()?.closest<HTMLElement>('[data-view-shell-main]'));// Measure the parent pane so toolbar content cannot affect its own breakpoint.- // A docked sidebar owns New and hides the navigation toggle, so its toolbar- // fits sooner. Avoid wrapping just before the sidebar collapses and unwraps it.+ // A docked sidebar hides the navigation toggle, so its toolbar fits sooner.const hasDockedSidebar = () =>!!shell && !shell.aside.isCollapsed() && !shell.aside.isOverlay();const breakpoints = createSizeBreakpoints(() => paneSize.width ?? 0,() => ({- fullHeader: { min: hasDockedSidebar() ? 480 : 600 },+ fullHeader: { min: hasDockedSidebar() ? 580 : 600 },inlineSearch: { min: 1040 },labeledNew: { min: 360 },labeledToday: { min: 304 },}));const isCompactHeader = () => !breakpoints.fullHeader();- const searchOverlaysTitle = () => !breakpoints.inlineSearch();+ const searchOverlaysControls = () => !breakpoints.inlineSearch();const today = createLocalToday();const [searchExpanded, setSearchExpandedInternal] = createSignal(false);const [searchPopupReady, setSearchPopupReady] = createSignal(false);@@ -155,11 +158,7 @@ export function Header(props: { presentation: 'workspace' | 'preview' }) {);const isNarrow = () => shell?.aside.isCollapsed() ?? true;const showBookingLinks = () => isMobile() || !shell?.breakpoints.narrow?.();- const showHeaderCreate = () =>- isCompactHeader() ||- (shell?.aside.isCollapsed() && !shell?.aside.isOverlay());- const usesSplitHeader = () =>- props.presentation === 'preview' || isTouchDevice();+ const usesSplitHeader = () => isTouchDevice();const createItems = () => (<><CalendarCreateEventItem />@@ -168,6 +167,7 @@ export function Header(props: { presentation: 'workspace' | 'preview' }) {);const headerCreateMenu = () => (<CalendarCreateMenu+ presentation={!isTouchDevice() ? 'toolbar' : undefined}size={breakpoints.labeledNew() ? 'md' : 'icon-md'}label="New"class={cn(@@ -189,37 +189,39 @@ export function Header(props: { presentation: 'workspace' | 'preview' }) {</CalendarCreateMenu>);- const previous = () => (+ const previous = (compact = false) => (<Buttonvariant="ghost"- size="icon-lg"+ size={compact ? 'icon-md' : 'icon-lg'}class="border-transparent bg-transparent"label={`Previous ${periodLabel()}`}hotkey={TOKENS.calendar.period.previous}onClick={calendarPager.previousPeriod}>- <CaretLeftIcon class="size-5" />+ <CaretLeftIcon class={compact ? 'size-4' : 'size-5'} /></Button>);- const next = () => (+ const next = (compact = false) => (<Buttonvariant="ghost"- size="icon-lg"+ size={compact ? 'icon-md' : 'icon-lg'}class="border-transparent bg-transparent"label={`Next ${periodLabel()}`}hotkey={TOKENS.calendar.period.next}onClick={calendarPager.nextPeriod}>- <CaretRightIcon class="size-5" />+ <CaretRightIcon class={compact ? 'size-4' : 'size-5'} /></Button>);- const todayButton = (mobile: boolean) => (+ const todayButton = (mobile: boolean, compact = false) => (<Button- variant={mobile ? 'ghost' : 'outline'}- size={mobile ? 'icon-lg' : 'lg'}+ variant={mobile || compact ? 'ghost' : 'outline'}+ size={compact ? (mobile ? 'icon-md' : 'md') : mobile ? 'icon-lg' : 'lg'}class={cn(mobile && 'relative',- !mobile && 'border-edge-button bg-transparent px-3 text-sm'+ !mobile && 'bg-transparent text-sm',+ !mobile && (compact ? 'px-2' : 'px-3'),+ !mobile && !compact && 'border-edge-button')}label="Go to today"hotkey={TOKENS.calendar.period.today}@@ -302,53 +304,93 @@ export function Header(props: { presentation: 'workspace' | 'preview' }) {<Match when={!usesSplitHeader()}><ViewShell.TopBarref={setHeaderElement}- class="@container/calendar-toolbar h-auto min-h-12 flex-wrap gap-x-2 gap-y-2 py-2"+ class="@container/calendar-toolbar h-auto min-h-12 flex-wrap gap-x-2 gap-y-2 py-2 [--view-search-height:2rem]"><div class="relative flex min-w-0 flex-1 items-center gap-2">- <h1- class="min-w-0 truncate text-[clamp(1rem,calc(0.75rem+1cqw),1.5rem)] font-semibold leading-tight tracking-[-0.03em] text-ink transition-opacity duration-150 motion-reduce:transition-none"+ {props.leading}+ <h1 class="min-w-0 truncate px-1 text-sm font-semibold text-ink">+ {dateTitle()}+ </h1>+ </div>+ <div+ class={cn(+ 'relative flex shrink-0 items-center justify-end gap-2',+ isCompactHeader() && 'basis-full'+ )}+ data-calendar-period-controls=""+ ref={tourTarget(CALENDAR_TOUR.period)}+ onClick={() => setSearchExpanded(false)}+ >+ <div+ class="flex items-center gap-2"classList={{- 'opacity-0': searchOverlaysTitle() && searchExpanded(),+ invisible: searchOverlaysControls() && searchExpanded(),+ 'pointer-events-none':+ searchOverlaysControls() && searchExpanded(),}}>- {dateTitle()}- </h1>+ <Show when={showBookingLinks()}>+ <CalendarSchedulingActions compact />+ </Show>+ <div+ role="group"+ aria-label="Calendar navigation"+ class="flex shrink-0"+ >+ <ButtonGroup variant="outline" size="icon-md">+ {todayButton(!breakpoints.labeledToday(), true)}+ {previous(true)}+ {next(true)}+ </ButtonGroup>+ </div>+ <div+ role="group"+ aria-label="Calendar view"+ class="flex shrink-0"+ >+ <ButtonGroup variant="outline" size="icon-md">+ <PeriodSelector isNarrow={isNarrow()} compact />+ </ButtonGroup>+ </div>+ {headerCreateMenu()}+ </div><divonTransitionEnd={handleSearchTransitionEnd}+ onClick={(event) => event.stopPropagation()}class={cn(- 'ml-auto h-10 shrink-0',- searchOverlaysTitle()- ? 'w-10'+ 'h-8 shrink-0',+ searchOverlaysControls()+ ? 'w-8': 'transition-[width] duration-200 ease-out motion-reduce:transition-none')}style={- searchOverlaysTitle()+ searchOverlaysControls()? undefined: {width: searchExpanded()? 'clamp(22rem, 40cqw, 28rem)'- : '2.5rem',+ : '2rem',}}><divonTransitionEnd={handleSearchTransitionEnd}class={cn(- 'h-10',- searchOverlaysTitle() &&+ 'h-8',+ searchOverlaysControls() &&'absolute right-0 top-0 transition-[width] duration-200 ease-out motion-reduce:transition-none')}style={- searchOverlaysTitle()+ searchOverlaysControls()? {- width: searchExpanded() ? 'min(100%, 28rem)' : '2.5rem',+ width: searchExpanded() ? 'min(100%, 28rem)' : '2rem',}: undefined}><CalendarSearchinline- compact={searchOverlaysTitle()}+ compact={searchOverlaysControls()}expanded={searchExpanded()}popupReady={searchPopupReady()}onExpand={() => setSearchExpanded(true)}@@ -357,28 +399,6 @@ export function Header(props: { presentation: 'workspace' | 'preview' }) {</div></div></div>- <div- class={cn(- 'flex shrink-0 items-center justify-end gap-1',- isCompactHeader() ? 'basis-full' : 'ml-4'- )}- data-calendar-period-controls=""- ref={tourTarget(CALENDAR_TOUR.period)}- onClick={() => setSearchExpanded(false)}- >- <Show when={showHeaderCreate()}>- <div classList={{ 'mr-auto': isCompactHeader() }}>- {headerCreateMenu()}- </div>- </Show>- <Show when={showBookingLinks()}>- <CalendarSchedulingActions />- </Show>- {todayButton(!breakpoints.labeledToday())}- <PeriodSelector isNarrow={isNarrow()} />- {previous()}- {next()}- </div></ViewShell.TopBar></Match></Switch>diff --git a/apps/web/src/features/calendar-view/components/SelectedEventDetails.tsx b/apps/web/src/features/calendar-view/components/SelectedEventDetails.tsxindex 3ac20b5f6e..1da8b970dc 100644--- a/apps/web/src/features/calendar-view/components/SelectedEventDetails.tsx+++ b/apps/web/src/features/calendar-view/components/SelectedEventDetails.tsx@@ -512,7 +512,7 @@ function EventDetailsPopover(props: EventDetailsPopoverProps) {}}><Popover.Arrow class="fill-surface" />- <div class="flex max-h-[min(32rem,var(--kb-popper-content-available-height,32rem))] w-fit min-w-[min(20rem,var(--kb-popper-content-available-width,20rem))] max-w-[min(24rem,var(--kb-popper-content-available-width,24rem))] flex-col overflow-hidden rounded-xl glass bg-menu-glass text-ink">+ <div class="flex max-h-[min(32rem,var(--kb-popper-content-available-height,32rem))] w-fit min-w-[min(20rem,var(--kb-popper-content-available-width,20rem))] max-w-[min(24rem,var(--kb-popper-content-available-width,24rem))] flex-col overflow-hidden menu-surface"><Popover.Title class="sr-only">{props.event.title}</Popover.Title><div class="flex shrink-0 items-center justify-end gap-1 px-2 pt-2"><Show when={!props.event.teamProjection}>diff --git a/apps/web/src/features/calendar-view/components/Workspace.tsx b/apps/web/src/features/calendar-view/components/Workspace.tsxindex 5349254ab6..84b06324ec 100644--- a/apps/web/src/features/calendar-view/components/Workspace.tsx+++ b/apps/web/src/features/calendar-view/components/Workspace.tsx@@ -22,6 +22,7 @@ import {createEffect,createSignal,For,+ type JSX,Match,on,onCleanup,@@ -145,7 +146,7 @@ function CalendarPageContent() {);}-function WorkspaceContent() {+function WorkspaceContent(props: { headerLeading?: JSX.Element }) {const panel = useSplitPanelOrThrow();// An inline preview keeps its host's name.@@ -154,10 +155,12 @@ function WorkspaceContent() {return (<Switch><Match when={panel.isInlinePreview}>- <Header presentation="preview" />- <main class="flex size-full min-h-0">- <CalendarPageContent />- </main>+ <div class="flex size-full min-h-0 min-w-0 flex-col">+ <Header presentation="preview" leading={props.headerLeading} />+ <main class="flex min-h-0 flex-1">+ <CalendarPageContent />+ </main>+ </div></Match><Match when={!panel.isInlinePreview}><SplitPanel.Root>@@ -188,17 +191,17 @@ function WorkspaceContent() {);}-function CalendarPagerWorkspace() {+function CalendarPagerWorkspace(props: { headerLeading?: JSX.Element }) {const calendarPager = useCalendarPager();return (<Pager.Root controller={calendarPager.pager}>- <WorkspaceContent />+ <WorkspaceContent headerLeading={props.headerLeading} /></Pager.Root>);}-export function Workspace() {+export function Workspace(props: { headerLeading?: JSX.Element }) {const calendarView = useCalendarView();return (@@ -209,7 +212,7 @@ export function Workspace() {onNavigate={calendarView.closeEventDetails}onViewChange={calendarView.setPeriodView}>- <CalendarPagerWorkspace />+ <CalendarPagerWorkspace headerLeading={props.headerLeading} /></CalendarPagerContextProvider>);}diff --git a/apps/web/src/features/calendar/components/CalendarGridSkeleton.tsx b/apps/web/src/features/calendar/components/CalendarGridSkeleton.tsxindex d3de9e3560..7cd7163a01 100644--- a/apps/web/src/features/calendar/components/CalendarGridSkeleton.tsx+++ b/apps/web/src/features/calendar/components/CalendarGridSkeleton.tsx@@ -19,7 +19,7 @@ export function CalendarGridSkeleton(props: {role="status"aria-label="Loading calendar"aria-busy="true"- class="flex size-full min-w-0 min-h-0 animate-pulse flex-col overflow-hidden bg-surface"+ class="flex size-full min-w-0 min-h-0 flex-col overflow-hidden bg-surface"><span class="sr-only">Loading calendar</span>@@ -33,8 +33,8 @@ export function CalendarGridSkeleton(props: {{() => (<div class="flex h-14 items-center justify-center border-l border-edge-muted"><div class="flex flex-col items-center gap-2">- <div class="h-2 w-10 rounded-full bg-skeleton" />- <div class="size-6 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-2 w-10 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer size-6 rounded-full bg-skeleton" /></div></div>)}@@ -48,12 +48,12 @@ export function CalendarGridSkeleton(props: {style={{ 'grid-template-columns': dayColumns() }}><div class="flex h-12 items-center justify-end pr-2">- <div class="h-2 w-7 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-2 w-7 rounded-full bg-skeleton" /></div><For each={days()}>{() => (<div class="h-12 border-l border-edge-muted px-1 py-2">- <div class="h-5 w-1/3 rounded bg-skeleton" />+ <div class="skeleton-shimmer h-5 w-1/3 rounded bg-skeleton" /></div>)}</For>@@ -66,7 +66,7 @@ export function CalendarGridSkeleton(props: {{(_, index) => (<div class="relative min-h-8 flex-1 border-t border-edge-muted first:border-t-0"><div- class="absolute top-0 right-2 h-1.5 rounded-full bg-skeleton"+ class="skeleton-shimmer absolute top-0 right-2 h-1.5 rounded-full bg-skeleton"classList={{'w-5': index() % 2 === 0,'w-7': index() % 2 !== 0,@@ -93,11 +93,11 @@ export function CalendarGridSkeleton(props: {</For><div- class="absolute inset-x-1 top-[18%] h-[14%] rounded-md bg-skeleton"+ class="skeleton-shimmer absolute inset-x-1 top-[18%] h-[14%] rounded-md bg-skeleton"classList={{ hidden: dayIndex() % 2 !== 0 }}/><div- class="absolute inset-x-1 top-[54%] h-[9%] rounded-md bg-skeleton"+ class="skeleton-shimmer absolute inset-x-1 top-[54%] h-[9%] rounded-md bg-skeleton"classList={{ hidden: days().length > 1 || dayIndex() !== 0 }}/></div>diff --git a/apps/web/src/features/calendar/components/PeriodSelector.tsx b/apps/web/src/features/calendar/components/PeriodSelector.tsxindex f063a6a5de..eb9ca84075 100644--- a/apps/web/src/features/calendar/components/PeriodSelector.tsx+++ b/apps/web/src/features/calendar/components/PeriodSelector.tsx@@ -130,7 +130,10 @@ function CustomDatePicker(props: { controls: CalendarPeriodControls }) {}/** Desktop calendar period selector and custom-date dropdown. */-export function PeriodSelector(props: { isNarrow?: boolean }) {+export function PeriodSelector(props: {+ isNarrow?: boolean;+ compact?: boolean;+}) {const controls = createCalendarPeriodControls();return (@@ -142,7 +145,7 @@ export function PeriodSelector(props: { isNarrow?: boolean }) {<Dropdown.Triggeraria-label="Choose calendar view"variant="ghost"- size="lg"+ size={props.compact ? 'md' : 'lg'}class="shrink-0 border-transparent bg-transparent text-sm">{CALENDAR_VIEWS.find((view) => view.value === controls.activeView())diff --git a/apps/web/src/features/calendar/components/composer/EventDateTimeInputs.tsx b/apps/web/src/features/calendar/components/composer/EventDateTimeInputs.tsxindex 9cb6c164cc..a0c0c3837e 100644--- a/apps/web/src/features/calendar/components/composer/EventDateTimeInputs.tsx+++ b/apps/web/src/features/calendar/components/composer/EventDateTimeInputs.tsx@@ -152,7 +152,7 @@ export function EventTimeInput(props: EventTimeInputProps) {<EventComposerPopoverPortal><Layer depth={4}><Popover.Content- class="z-action-menu max-h-64 min-w-[var(--kb-popper-anchor-width)] overflow-y-auto rounded-xl border border-edge bg-menu-glass p-1.5 glass menu-open-animation"+ class="menu-surface z-action-menu max-h-64 min-w-[var(--kb-popper-anchor-width)] overflow-y-auto p-1.5 menu-open-animation"style={{'z-index': 'calc(var(--z-index-action-menu) + 1)',}}@@ -252,7 +252,7 @@ export function EventDateField(props: EventDateFieldProps) {<div class="hidden" ref={setPortalSearchRef} /><Popover.Portal mount={portalMount()}><Layer depth={3}>- <Popover.Content class="z-action-menu w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-edge bg-menu-glass p-3 glass menu-open-animation">+ <Popover.Content class="menu-surface z-action-menu w-72 max-w-[calc(100vw-1rem)] p-3 menu-open-animation"><Popover.Title class="sr-only">Choose {props.label.toLowerCase()} date</Popover.Title>diff --git a/apps/web/src/features/calendar/components/composer/EventDateTimeRangeFields.tsx b/apps/web/src/features/calendar/components/composer/EventDateTimeRangeFields.tsxindex f5976d2719..e4d6ddae0f 100644--- a/apps/web/src/features/calendar/components/composer/EventDateTimeRangeFields.tsx+++ b/apps/web/src/features/calendar/components/composer/EventDateTimeRangeFields.tsx@@ -125,7 +125,7 @@ function EventDateTimeDropdown(props: EventDateTimeDropdownProps) {<EventComposerPopoverPortal><Layer depth={3}><Popover.Content- class="portal-scope z-action-menu w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-edge bg-menu-glass glass menu-open-animation"+ class="menu-surface portal-scope z-action-menu w-72 max-w-[calc(100vw-1rem)] menu-open-animation"on:keydown={(event: KeyboardEvent) => {if (event.key !== 'Escape') return;event.preventDefault();diff --git a/apps/web/src/features/calendar/components/composer/EventPropertyPills.tsx b/apps/web/src/features/calendar/components/composer/EventPropertyPills.tsxindex bce310c386..af132945a3 100644--- a/apps/web/src/features/calendar/components/composer/EventPropertyPills.tsx+++ b/apps/web/src/features/calendar/components/composer/EventPropertyPills.tsx@@ -141,7 +141,7 @@ function ReadOnlyEventComposerGuestsPill(props: EventComposerGuestsPillProps) {</Tooltip><EventComposerPopoverPortal><Layer depth={3}>- <Popover.Content class="z-action-menu w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-edge bg-menu-glass p-1.5 text-sm glass menu-open-animation">+ <Popover.Content class="menu-surface z-action-menu w-72 max-w-[calc(100vw-1rem)] p-1.5 text-sm menu-open-animation"><Popover.Title class="sr-only">Event guests</Popover.Title><Show when={props.readOnlyReason}>{(reason) => (@@ -315,7 +315,7 @@ export function EventComposerLocationPill(<EventComposerPopoverPortal><Layer depth={3}><Popover.Content- class="z-action-menu w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-edge bg-menu-glass p-2 glass menu-open-animation"+ class="menu-surface z-action-menu w-72 max-w-[calc(100vw-1rem)] p-2 menu-open-animation"onOpenAutoFocus={(event) => {event.preventDefault();queueMicrotask(() => input?.focus());@@ -832,7 +832,7 @@ export function EventComposerDeclineMessagePill(<EventComposerPopoverPortal><Layer depth={3}><Popover.Content- class="z-action-menu w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-edge bg-menu-glass p-2 glass menu-open-animation"+ class="menu-surface z-action-menu w-72 max-w-[calc(100vw-1rem)] p-2 menu-open-animation"onOpenAutoFocus={(event) => {event.preventDefault();queueMicrotask(() => input?.focus());diff --git a/apps/web/src/features/calendar/components/composer/RecurrenceBuilder.tsx b/apps/web/src/features/calendar/components/composer/RecurrenceBuilder.tsxindex 45ace6e1ec..39648a8e1d 100644--- a/apps/web/src/features/calendar/components/composer/RecurrenceBuilder.tsx+++ b/apps/web/src/features/calendar/components/composer/RecurrenceBuilder.tsx@@ -136,9 +136,7 @@ export function RecurrenceBuilder(props: RecurrenceBuilderProps) {{(code) => (<Buttontype="button"- variant={- props.value.byDay.includes(code) ? 'accent' : 'ghost'- }+ variant="outline"size="icon-sm"class="text-xxs"aria-label={code}diff --git a/apps/web/src/features/calls-view/components/calls-header.tsx b/apps/web/src/features/calls-view/components/calls-header.tsxindex 61bcdbfc6d..aac01df1f9 100644--- a/apps/web/src/features/calls-view/components/calls-header.tsx+++ b/apps/web/src/features/calls-view/components/calls-header.tsx@@ -1,41 +1,90 @@-import { ViewShell } from '@app/components/view-shell';+import {+ ListSortDropdown,+ useViewControlHotkeys,+} from '@app/components/view-shell';+import {+ ListHeader,+ ListHeaderSearch,+} from '@app/components/view-shell/ListHeader';import { SoupActiveFiltersBar } from '@app/features/next-soup/soup-view/filters-bar/soup-active-filters-bar';import { SoupViewContextGroup } from '@app/features/next-soup/soup-view/filters-bar/soup-view-context-group';-import { SoupViewContextSort } from '@app/features/next-soup/soup-view/filters-bar/soup-view-context-sort';import { UnifiedFilterDropdown } from '@app/features/next-soup/soup-view/filters-bar/unified-filter-dropdown';import { useFilterRefinements } from '@app/features/next-soup/soup-view/filters-bar/use-filter-refinements';import { NewCallButton } from '@app/features/next-soup/soup-view/NewCallButton';+import { DEFAULT_SORT_OPTIONS } from '@app/features/next-soup/soup-view/sort-options';import { useSoupView } from '@app/features/next-soup/soup-view/soup-view-context';import { VIEW_TAB_LISTS } from '@app/features/next-soup/soup-view/tab-lists';-import { callViewLabel } from '../core/call-filters';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';+import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';+import { createSignal } from 'solid-js';/** Title, list controls, and active filter chips above the Calls list. */export function CallsHeader() {const view = useSoupView();+ const panel = useSplitPanelOrThrow();+ let focusSearch: (() => void) | undefined;+ const [sortOpen, setSortOpen] = createSignal(false);+ useViewControlHotkeys({+ scopeId: panel.splitHotkeyScope,+ enabled: panel.isPanelActive,+ search: {+ description: 'Search calls',+ run: () => {+ focusSearch?.();+ return true;+ },+ },+ sort: { description: 'Sort calls', run: () => setSortOpen(true) },+ });const { consolidatedFiltersList, resetToTabDefaults } =useFilterRefinements();const title = () => {const tab = VIEW_TAB_LISTS.calls.find((item) => item.value === view.activeTab());- return !tab || tab.value === 'all'- ? 'Calls'- : `${callViewLabel(tab)} calls`;+ return !tab || tab.value === 'all' ? 'Calls' : `${tab.label} calls`;};return (<>- <ViewShell.TopBar>- <h1 class="min-w-0 flex-1 truncate px-1 text-sm font-semibold tracking-[-0.03em] text-ink">- {title()}- </h1>- <div class="flex shrink-0 items-center gap-2 [&_button]:h-8 [&_button]:min-w-8 [&_button>svg]:size-4!">- <SoupViewContextSort />- <SoupViewContextGroup hideLabel variant="ghost" />+ <ListHeader+ title={+ <h1 class="min-w-0 truncate text-sm font-semibold text-ink">+ {title()}+ </h1>+ }+ >+ <HeaderActionGroup label="Call filters"><UnifiedFilterDropdown hideLabel variant="ghost" />- <NewCallButton />- </div>- </ViewShell.TopBar>+ </HeaderActionGroup>+ <HeaderActionGroup label="Call view options">+ <ListSortDropdown+ label="Sort calls"+ value={+ DEFAULT_SORT_OPTIONS.find(+ (option) => option.value === view.soup.sort.active()[0]?.id+ )?.value ?? 'updated_at'+ }+ options={DEFAULT_SORT_OPTIONS.map((option) => ({+ id: option.value,+ label: option.label,+ icon: option.icon,+ }))}+ onChange={(id) => view.soup.sort.setAll([id])}+ open={sortOpen()}+ onOpenChange={setSortOpen}+ />+ <SoupViewContextGroup hideLabel variant="ghost" />+ </HeaderActionGroup>+ <NewCallButton />+ <ListHeaderSearch+ label="Search calls"+ value={view.searchText()}+ onValueChange={view.setSearchText}+ onEscape={() => panel.panelRef()?.focus()}+ registerFocus={(focus) => (focusSearch = focus)}+ />+ </ListHeader><SoupActiveFiltersBarfilters={consolidatedFiltersList()}onClearAll={resetToTabDefaults}diff --git a/apps/web/src/features/calls-view/components/calls-sidebar.tsx b/apps/web/src/features/calls-view/components/calls-sidebar.tsxindex 5f15f70d62..f2f1d2c742 100644--- a/apps/web/src/features/calls-view/components/calls-sidebar.tsx+++ b/apps/web/src/features/calls-view/components/calls-sidebar.tsx@@ -2,6 +2,7 @@ import { CollapsibleSection, ViewSidebar } from '@app/components/view-shell';import { VIEW_TAB_PRESETS } from '@app/features/next-soup/sidebar/soup-filter-presets';import { useSoup } from '@app/features/next-soup/soup-context';import { SoupSearchbar } from '@app/features/next-soup/soup-view/filters-bar/soup-view-search-bar';+import { NewCallButton } from '@app/features/next-soup/soup-view/NewCallButton';import { useSoupView } from '@app/features/next-soup/soup-view/soup-view-context';import { useApplyPreset } from '@app/features/next-soup/soup-view/soup-view-tabs';import { VIEW_TAB_LISTS } from '@app/features/next-soup/soup-view/tab-lists';@@ -33,7 +34,6 @@ import {CALL_AUDIENCES,type CallAudienceId,type CallChannelOption,- callViewLabel,collectCallChannels,selectCallAudience,} from '../core/call-filters';@@ -156,18 +156,23 @@ export function CallsSidebar(props: { onNavigate: () => void }) {return (<ViewSidebar.Root aria-label="Calls navigation">- <ViewSidebar.Header>+ <ViewSidebar.Header+ searchLabel="Search calls"+ search={() => (+ <div onFocusIn={props.onNavigate}>+ <Layer depth={2}>+ <SoupSearchbar variant="secondary" placeholder="Search calls" />+ </Layer>+ </div>+ )}+ ><div class="flex min-w-0 items-center gap-1"><ViewSidebar.CloseButton class="shrink-0" /><ViewSidebar.Title>Calls</ViewSidebar.Title></div></ViewSidebar.Header><ViewSidebar.Primary>- <div onFocusIn={props.onNavigate}>- <Layer depth={2}>- <SoupSearchbar variant="secondary" placeholder="Search calls" />- </Layer>- </div>+ <NewCallButton presentation="sidebar" /></ViewSidebar.Primary><ViewSidebar.Content>@@ -177,7 +182,7 @@ export function CallsSidebar(props: { onNavigate: () => void }) {<Rowactive={activeTab() === tab.value}icon={TAB_ICONS[tab.value] ?? PhoneIcon}- label={callViewLabel(tab)}+ label={tab.label}onClick={() => {props.onNavigate();applyTabPreset('calls', tab.value);diff --git a/apps/web/src/features/calls-view/core/call-filters.ts b/apps/web/src/features/calls-view/core/call-filters.tsindex 7057534379..b87cc0415c 100644--- a/apps/web/src/features/calls-view/core/call-filters.ts+++ b/apps/web/src/features/calls-view/core/call-filters.ts@@ -1,11 +1,5 @@-import type { TabItem } from '@core/component/Tabs';import type { EntityData } from '@entity';-/** A Calls tab's text label; tab items may carry rich labels elsewhere. */-export function callViewLabel(tab: TabItem): string {- return typeof tab.label === 'string' ? tab.label : tab.value;-}-/** Client predicate ids that narrow the Calls list by who attended. */export const CALL_AUDIENCES = [{ id: 'call-internal', label: 'Internal' },diff --git a/apps/web/src/features/changes/components/ChangesToggleButton.tsx b/apps/web/src/features/changes/components/ChangesToggleButton.tsxindex 384c37a8c8..e8b4cb60bb 100644--- a/apps/web/src/features/changes/components/ChangesToggleButton.tsx+++ b/apps/web/src/features/changes/components/ChangesToggleButton.tsx@@ -1,3 +1,4 @@+import { isTouchDevice } from '@core/mobile/isTouchDevice';import SquareSplitHorizontalIcon from '@phosphor/square-split-horizontal.svg';import { Button } from '@ui';@@ -8,14 +9,13 @@ export function ChangesToggleButton(props: {}) {return (<Button- variant={props.open ? 'accent' : 'ghost'}- size="sm"+ variant="ghost"+ size={isTouchDevice() ? 'sm' : 'md'}label="Changes"aria-pressed={props.open}tooltip={props.open ? 'Hide the changes pane' : 'Show the changes pane'}- // Sits beside the `h-7` pull request chip; the `sm` frame is 4px shorter.- // Preserve pressed semantics without stacking a foreground overlay on the tint.- class="h-7 gap-1.5 aria-pressed:[--color-active:transparent] @max-[28rem]/split-header:w-7 @max-[28rem]/split-header:gap-0 @max-[28rem]/split-header:px-0"+ // The label collapses as the header narrows; the pressed fill marks open.+ class="touch:h-7 gap-1.5 not-touch:@max-[28rem]/split-header:w-8 touch:@max-[28rem]/split-header:w-7 @max-[28rem]/split-header:gap-0 @max-[28rem]/split-header:px-0"onClick={() => props.onToggle()}><SquareSplitHorizontalIcon class="size-3.5" />diff --git a/apps/web/src/features/changes/views/ChangesControls.tsx b/apps/web/src/features/changes/views/ChangesControls.tsxindex 3e18cbb157..f8af4ae673 100644--- a/apps/web/src/features/changes/views/ChangesControls.tsx+++ b/apps/web/src/features/changes/views/ChangesControls.tsx@@ -4,6 +4,7 @@* Agent-only actions require the explicit note-sending capability.*/+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { createSignal, Show } from 'solid-js';import { ChangesReadyCard } from '../components/ChangesReadyCard';import { ChangesToggleButton } from '../components/ChangesToggleButton';@@ -16,10 +17,12 @@ export function ChangesToggle() {const { available, layout } = controller;return (<Show when={available()}>- <ChangesToggleButton- open={layout.changesVisible()}- onToggle={layout.toggle}- />+ <HeaderActionGroup label="Changes view">+ <ChangesToggleButton+ open={layout.changesVisible()}+ onToggle={layout.toggle}+ />+ </HeaderActionGroup></Show>);}diff --git a/apps/web/src/features/channel/Bots/BotInviteSelect.tsx b/apps/web/src/features/channel/Bots/BotInviteSelect.tsxindex cb50f20e47..99846ebc18 100644--- a/apps/web/src/features/channel/Bots/BotInviteSelect.tsx+++ b/apps/web/src/features/channel/Bots/BotInviteSelect.tsx@@ -136,7 +136,7 @@ export function BotInviteSelect(props: {<Combobox.Contentas={Surface}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"+ class="menu-surface z-action-menu mt-1 w-[var(--kb-popper-anchor-width)] min-w-72 p-1.5"><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">diff --git a/apps/web/src/features/channel/Bots/ChannelMultiSelect.tsx b/apps/web/src/features/channel/Bots/ChannelMultiSelect.tsxindex a5d9b78b92..7408977159 100644--- a/apps/web/src/features/channel/Bots/ChannelMultiSelect.tsx+++ b/apps/web/src/features/channel/Bots/ChannelMultiSelect.tsx@@ -102,7 +102,7 @@ export function ChannelMultiSelect(props: {<Combobox.Contentas={Surface}depth={3}- class="z-action-menu mt-1 w-[var(--kb-popper-anchor-width)] min-w-64 rounded-xl p-1.5 glass bg-menu-glass"+ class="menu-surface z-action-menu mt-1 w-[var(--kb-popper-anchor-width)] min-w-64 p-1.5"><Showwhen={options().length > 0}diff --git a/apps/web/src/features/channel/Call/NewMeetingButton.tsx b/apps/web/src/features/channel/Call/NewMeetingButton.tsxindex e0814e2f69..26ef7c0898 100644--- a/apps/web/src/features/channel/Call/NewMeetingButton.tsx+++ b/apps/web/src/features/channel/Call/NewMeetingButton.tsx@@ -1,3 +1,4 @@+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import { ManageMeetingsDialog } from '@app/features/meetings/manage-meetings-dialog';import CaretDownIcon from '@phosphor/caret-down.svg';import PhoneIcon from '@phosphor/phone.svg';@@ -8,6 +9,7 @@ import { createSignal, Show } from 'solid-js';import { useQuickCallsFlag } from '../../meetings/use-quick-calls-flag';type NewMeetingActions = {+ presentation?: 'sidebar' | 'toolbar';/** Opens the recipient picker for a channel or direct-message call. */onChannelCall: () => void;/** Opens instant call setup; only offered when quick calls are enabled. */@@ -20,15 +22,27 @@ export function NewMeetingButton(props: NewMeetingActions) {<Showwhen={!flag().loading && flag().enabled}fallback={- <Button variant="accent" size="sm" onClick={props.onChannelCall}>- <VideoCameraIcon class="size-3.5" />- New call- </Button>+ <Show+ when={props.presentation}+ fallback={+ <Button variant="accent" size="sm" onClick={props.onChannelCall}>+ <VideoCameraIcon class="size-3.5" />+ New call+ </Button>+ }+ >+ <ViewCreateButton+ presentation={props.presentation}+ aria-label="New call"+ onClick={props.onChannelCall}+ />+ </Show>}><NewMeetingMenuonChannelCall={props.onChannelCall}onInstantCall={props.onInstantCall}+ presentation={props.presentation}/></Show>);@@ -38,17 +52,34 @@ function NewMeetingMenu(props: NewMeetingActions) {const [managing, setManaging] = createSignal(false);return (<>- <Dropdown placement="bottom-end" modal={false}>- <Dropdown.Trigger- variant="accent"- size="sm"- class="gap-1.5 px-2"- label="New call"+ <Dropdown+ placement={+ props.presentation === 'sidebar' ? 'bottom-start' : 'bottom-end'+ }+ modal={false}+ >+ <Show+ when={props.presentation}+ fallback={+ <Dropdown.Trigger+ variant="accent"+ size="sm"+ class="gap-1.5 px-2"+ label="New call"+ >+ <VideoCameraIcon class="size-3.5" />+ <span>New call</span>+ <CaretDownIcon class="size-3" />+ </Dropdown.Trigger>+ }>- <VideoCameraIcon class="size-3.5" />- <span>New call</span>- <CaretDownIcon class="size-3" />- </Dropdown.Trigger>+ <Dropdown.Trigger+ as={ViewCreateButton}+ presentation={props.presentation}+ aria-label="New call"+ menu+ />+ </Show><Dropdown.Content class="min-w-60" blockingBackdrop><Dropdown.Group><Dropdown.Item closeOnSelect onSelect={props.onInstantCall}>diff --git a/apps/web/src/features/channel/Channel/ChannelDetail.tsx b/apps/web/src/features/channel/Channel/ChannelDetail.tsxindex b9466eec11..27276ba92e 100644--- a/apps/web/src/features/channel/Channel/ChannelDetail.tsx+++ b/apps/web/src/features/channel/Channel/ChannelDetail.tsx@@ -15,6 +15,7 @@ import { ChannelTopIcon } from '@channel/components/ChannelTopIcon';import { DebugSuspense } from '@channel/DebugSuspense';import { ChannelParticipantsTab } from '@channel/Participants/ChannelParticipantsTab';import { useGlobalBlockOrchestrator } from '@components/app/GlobalAppState';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import {createPriorityCollapseController,PriorityCollapseOverflowSensor,@@ -25,7 +26,6 @@ import {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 {useChannel,@@ -36,6 +36,7 @@ import {import { createMethodRegistration } from '@core/orchestrator';import { lazyNamed } from '@core/util/lazyNamed';import { useChannelParticipantsQuery } from '@queries/channel/channel-participants';+import { Tabs } from '@ui';import {type Accessor,children,@@ -55,7 +56,7 @@ import {} from './ChannelSurface';import { ChannelTabProvider, useChannelTab } from './ChannelTabContext';import { ChannelLiveIndicators } from './ChannelTopBarLiveIndicators';-import { toIconTabItems } from './channel-tab-icons';+import { withChannelTabIcons } from './channel-tab-icons';import { type ChannelTabId, DEFAULT_CHANNEL_TAB } from './channel-tabs';import {isJoinCallRequested,@@ -145,11 +146,14 @@ export function ChannelDetailTabs(props: {: () => false;return (- <TabsInset+ <Tabs+ aria-label="Channel sections"+ touch="inset"class="shrink-0"- list={isCollapsed() ? toIconTabItems(tabs()) : tabs()}+ options={isCollapsed() ? withChannelTabIcons(tabs()) : tabs()}+ iconOnly={isCollapsed()}value={activeTab()}- onChange={(value) => setActiveTab(value as ChannelTabId)}+ onChange={setActiveTab}/>);}@@ -173,10 +177,26 @@ export function ChannelDetailActions(props: ChannelDetailHeaderProps) {};return (- <div class="header-actions ml-auto flex shrink-0 items-center gap-1">+ <div class="header-actions ml-auto flex shrink-0 items-center gap-2 touch:gap-1"><DebugSuspense name="ChannelDetail.live-indicators"><ChannelLiveIndicators channelId={props.channelId} /></DebugSuspense>+ <HeaderActionGroup label="Conversation actions">+ <Show+ when={ENABLE_CALLS && !channel()?.agent_dm && !call.isInThisChannel()}+ >+ <DebugSuspense name="ChannelDetail.call-button">+ <ChannelCallButton channelId={props.channelId} />+ </DebugSuspense>+ </Show>+ <Show when={askMacroEntity()}>+ {(entity) => (+ <DebugSuspense name="ChannelDetail.ask-macro">+ <ChatWithAgentButton entity={entity()} label="Ask Macro" />+ </DebugSuspense>+ )}+ </Show>+ </HeaderActionGroup><DebugSuspense name="ChannelDetail.invite"><ChannelInviteButtonchannelId={props.channelId}@@ -184,20 +204,6 @@ export function ChannelDetailActions(props: ChannelDetailHeaderProps) {channelType={channelType()}/></DebugSuspense>- <Show- when={ENABLE_CALLS && !channel()?.agent_dm && !call.isInThisChannel()}- >- <DebugSuspense name="ChannelDetail.call-button">- <ChannelCallButton channelId={props.channelId} />- </DebugSuspense>- </Show>- <Show when={askMacroEntity()}>- {(entity) => (- <DebugSuspense name="ChannelDetail.ask-macro">- <ChatWithAgentButton entity={entity()} label="Ask Macro" />- </DebugSuspense>- )}- </Show></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..ad43044604 100644--- a/apps/web/src/features/channel/Channel/channel-tab-icons.tsx+++ b/apps/web/src/features/channel/Channel/channel-tab-icons.tsx@@ -1,9 +1,9 @@-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';import PhoneCallIcon from '@phosphor/phone-call.svg';import UsersIcon from '@phosphor/users.svg';+import type { TabOption } from '@ui';import type { Component, JSX } from 'solid-js';import type { ChannelTabId } from './channel-tabs';@@ -18,27 +18,12 @@ export const CHANNEL_TAB_ICONS: Record<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>- ),- };- });+/** The same tabs with icons, for a header that renders them `iconOnly`. */+export function withChannelTabIcons(+ options: readonly TabOption<ChannelTabId>[]+): TabOption<ChannelTabId>[] {+ return options.map((option) => ({+ ...option,+ icon: CHANNEL_TAB_ICONS[option.value],+ }));}diff --git a/apps/web/src/features/channel/Channel/tests/channel-detail-top-bar.test.tsx b/apps/web/src/features/channel/Channel/tests/channel-detail-top-bar.test.tsxindex 07ce729d99..d1d52afee8 100644--- a/apps/web/src/features/channel/Channel/tests/channel-detail-top-bar.test.tsx+++ b/apps/web/src/features/channel/Channel/tests/channel-detail-top-bar.test.tsx@@ -88,7 +88,6 @@ vi.mock('@components/app/split-layout/layoutUtils', () => ({useSplitDisplayName: () => {},useSplitPanelOrThrow: () => ({ splitHotkeyScope: 'test-scope' }),}));-vi.mock('@core/component/TabsInset', () => ({ TabsInset: () => null }));vi.mock('@core/constant/allBlocks', () => ({blocks: {},resolveBlockAlias: (type: string) => type,diff --git a/apps/web/src/features/channel/Channel/use-channel-tab-items.tsx b/apps/web/src/features/channel/Channel/use-channel-tab-items.tsxindex 6356ed8590..74199de46c 100644--- a/apps/web/src/features/channel/Channel/use-channel-tab-items.tsx+++ b/apps/web/src/features/channel/Channel/use-channel-tab-items.tsx@@ -1,10 +1,10 @@import { useCall } from '@channel/Call/use-call';import { isNativeCallEnabled } from '@channel/Call/use-callkit';-import type { TabItem } from '@core/component/Tabs';import { ENABLE_CALLS } from '@core/constant/featureFlags';import { useChannel, useChannelType } from '@core/context/channels';import { useActiveCallQuery } from '@queries/call/call';import { ChannelType } from '@service-storage/generated/schemas/channelType';+import { cn, type TabOption } from '@ui';import type { Accessor } from 'solid-js';import { useChannelTab } from './ChannelTabContext';import {@@ -23,10 +23,19 @@ export const normalizeChannelTab = (tab: ChannelTabId) => {return tab === 'call' && !canUseInlineCallTab() ? DEFAULT_CHANNEL_TAB : tab;};-function CallTabLabel() {+function LiveCallDot(props: { class?: string }) {return (- <span class="flex items-center gap-1.5">+ <span class={cn('flex items-center justify-center', props.class)}><span class="size-1.5 rounded-full bg-success animate-pulse" />+ </span>+ );+}++/** The live Call tab's label in menus that draw their own icon. */+export function CallTabLabel() {+ return (+ <span class="flex items-center gap-1.5">+ <LiveCallDot />Call</span>);@@ -37,7 +46,9 @@ function CallTabLabel() {* calls-disabled builds hide call history, and the live Call tab appears only* while relevant. Reads the active tab from the enclosing ChannelTabProvider.*/-export function useChannelTabItems(channelId: string): Accessor<TabItem[]> {+export function useChannelTabItems(+ channelId: string+): Accessor<TabOption<ChannelTabId>[]> {const { activeTab } = useChannelTab();const channelType = useChannelType(channelId);const channel = useChannel(channelId);@@ -67,6 +78,6 @@ export function useChannelTabItems(channelId: string): Accessor<TabItem[]> {return () =>availableTabs().map((tab) =>- tab.value === 'call' ? { ...tab, label: <CallTabLabel /> } : tab+ tab.value === 'call' ? { ...tab, icon: LiveCallDot } : { ...tab });}diff --git a/apps/web/src/features/channel/Message/EmojiReactionPopover.tsx b/apps/web/src/features/channel/Message/EmojiReactionPopover.tsxindex 43e7105b8a..3078d6723d 100644--- a/apps/web/src/features/channel/Message/EmojiReactionPopover.tsx+++ b/apps/web/src/features/channel/Message/EmojiReactionPopover.tsx@@ -49,7 +49,7 @@ export function EmojiReactionPopover(props: EmojiReactionPopoverProps) {<Popover.Content class="z-modal"><Popover.Arrow class="fill-surface" /><div- class="w-64.5 h-78.75 pl-2 pt-2 rounded-xl flex flex-col glass bg-menu-glass"+ class="menu-surface w-64.5 h-78.75 pl-2 pt-2 flex flex-col"role="dialog"aria-label="Emoji search">diff --git a/apps/web/src/features/channel/Message/ReactionChip.tsx b/apps/web/src/features/channel/Message/ReactionChip.tsxindex 6a5c71f8af..fc6f298fd0 100644--- a/apps/web/src/features/channel/Message/ReactionChip.tsx+++ b/apps/web/src/features/channel/Message/ReactionChip.tsx@@ -109,7 +109,7 @@ export function ReactionChip(props: ReactionChipProps) {</HoverCard></Popover.Anchor><Popover.Portal>- <Popover.Content class="z-modal glass bg-menu-glass p-1.5 text-ink-muted text-xs rounded-xl">+ <Popover.Content class="menu-surface z-modal p-1.5 text-ink-muted text-xs"><ReactionTooltipContentusers={props.users}currentUserId={props.currentUserId}diff --git a/apps/web/src/features/channel/Participants/ParticipantsMobileLayout.tsx b/apps/web/src/features/channel/Participants/ParticipantsMobileLayout.tsxindex c329614e3e..294a975a5c 100644--- a/apps/web/src/features/channel/Participants/ParticipantsMobileLayout.tsx+++ b/apps/web/src/features/channel/Participants/ParticipantsMobileLayout.tsx@@ -31,7 +31,8 @@ export function ParticipantsMobileLayout(props: {<div class="shrink-0 overflow-x-auto scrollbar-hidden"><Tabsaria-label="Channel participants"- list={[+ size="lg"+ options={[{ value: 'people', label: 'People' },...(props.bots ? [{ value: 'bots', label: 'Bots' }] : []),...(props.settings@@ -42,8 +43,6 @@ export function ParticipantsMobileLayout(props: {onChange={(tab) =>setSelection({ tab, request: props.inviteBotFocusRequest })}- class="h-11"- labelClass="h-11"/></div><Switch>diff --git a/apps/web/src/features/channel/channel-invite-button.tsx b/apps/web/src/features/channel/channel-invite-button.tsxindex 3cd639965f..1aeb092e11 100644--- a/apps/web/src/features/channel/channel-invite-button.tsx+++ b/apps/web/src/features/channel/channel-invite-button.tsx@@ -1,4 +1,5 @@import { HeaderActionButton } from '@components/app/HeaderActionButton';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { useUserId } from '@core/context/user';import { useCombinedRecipients } from '@core/signal/useCombinedRecipient';import UserPlusIcon from '@phosphor/user-plus.svg';@@ -24,12 +25,14 @@ export function ChannelInviteButton(props: {return (<Show when={canInvite()}>- <HeaderActionButton- label="Invite"- icon={<UserPlusIcon />}- tooltip="Invite people"- onClick={() => setOpen(true)}- />+ <HeaderActionGroup label="Sharing">+ <HeaderActionButton+ label="Invite"+ icon={<UserPlusIcon />}+ tooltip="Invite people"+ onClick={() => setOpen(true)}+ />+ </HeaderActionGroup><Suspense><Show when={open()}><ChannelInviteDialogdiff --git a/apps/web/src/features/channels-view/channels-view-skeleton.tsx b/apps/web/src/features/channels-view/channels-view-skeleton.tsxindex 480fb5c2e4..85212d9791 100644--- a/apps/web/src/features/channels-view/channels-view-skeleton.tsx+++ b/apps/web/src/features/channels-view/channels-view-skeleton.tsx@@ -1,10 +1,18 @@import { ViewSkeleton } from '@app/components/view-shell/ViewSkeleton';+import { For } from 'solid-js';/** Chat while its code loads: the conversation list and the empty main area. */export function ChannelsViewSkeleton() {return (<ViewSkeleton.Root asidePreferenceKey="channels">- <ViewSkeleton.Sidebar title="Chat" />+ <ViewSkeleton.Sidebar title="Chat" createLabel="New">+ <div class="flex gap-1.5 px-(--sidebar-gutter) pt-2 touch:hidden">+ <For each={['All', 'Recent', 'Threads']}>+ {(tab) => <ViewSkeleton.Control control={tab} class="flex-1" />}+ </For>+ </div>+ <ViewSkeleton.Rows label="Loading Chat" class="mt-3" />+ </ViewSkeleton.Sidebar><ViewSkeleton.Main title="Chat"><div class="flex flex-1 items-center justify-center text-ink-muted text-sm">Select a conversationdiff --git a/apps/web/src/features/channels-view/components/ChannelThreadsView.tsx b/apps/web/src/features/channels-view/components/ChannelThreadsView.tsxindex 45424c0c20..6cc9e6d485 100644--- a/apps/web/src/features/channels-view/components/ChannelThreadsView.tsx+++ b/apps/web/src/features/channels-view/components/ChannelThreadsView.tsx@@ -1,6 +1,7 @@import { ViewShell } from '@app/components/view-shell';import { DebugSuspense } from '@channel/DebugSuspense';import { MessageThread, threadListItem } from '@core/messages/MessageThread';+import { createScrollTopFade } from '@core/util/createScrollTopFade';import { fireAndForget } from '@core/util/fireAndForget';import type { ChannelEntity, ChannelThreadEntity } from '@entity';import ArrowSquareOutIcon from '@phosphor/arrow-square-out.svg';@@ -193,6 +194,7 @@ function ThreadList(props: {onOpenThread: ChannelThreadsViewProps['onOpenThread'];}) {const [scrollRoot, setScrollRoot] = createSignal<HTMLDivElement>();+ createScrollTopFade(scrollRoot);const [virtualizer, setVirtualizer] = createSignal<VirtualizerHandle>();// A card being replied to stays mounted while scrolled away, so its draft// and focus survive virtualization.diff --git a/apps/web/src/features/channels-view/components/ConversationsCreateMenu.tsx b/apps/web/src/features/channels-view/components/ConversationsCreateMenu.tsxnew file mode 100644index 0000000000..637b4e44a3--- /dev/null+++ b/apps/web/src/features/channels-view/components/ConversationsCreateMenu.tsx@@ -0,0 +1,55 @@+import { ViewSidebar } from '@app/components/view-shell';+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';+import { runCreateAction } from '@app/features/command/Launcher';+import { openNewChannelModal } from '@channel/CreateChannelModal';+import ChatCircleIcon from '@phosphor/chat-circle.svg';+import HashIcon from '@phosphor/hash.svg';+import PlusIcon from '@phosphor/plus.svg';+import { Dropdown } from '@ui';+import { Show } from 'solid-js';++/** Channel and direct-message creation in the Chat navigation. */+export function ConversationsCreateMenu(props: {+ presentation?: 'sidebar' | 'toolbar';+}) {+ return (+ <Dropdown+ placement={+ props.presentation === 'sidebar' ? 'bottom-start' : 'bottom-end'+ }+ >+ <Show+ when={props.presentation}+ fallback={+ <Dropdown.Trigger+ as={ViewSidebar.Control}+ variant="ghost"+ size="icon-sm"+ label="Create channel or direct message"+ >+ <PlusIcon class="size-3.5" />+ </Dropdown.Trigger>+ }+ >+ <Dropdown.Trigger+ as={ViewCreateButton}+ presentation={props.presentation}+ menu+ aria-label="Create channel or direct message"+ />+ </Show>+ <Dropdown.Content class="min-w-44">+ <Dropdown.Group>+ <Dropdown.Item onSelect={openNewChannelModal}>+ <HashIcon class="size-3.5 shrink-0 text-ink-muted" />+ <span>New channel</span>+ </Dropdown.Item>+ <Dropdown.Item onSelect={() => runCreateAction('channel')}>+ <ChatCircleIcon class="size-3.5 shrink-0 text-ink-muted" />+ <span>New direct message</span>+ </Dropdown.Item>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ );+}diff --git a/apps/web/src/features/channels-view/components/rail/ChannelsRailSection.tsx b/apps/web/src/features/channels-view/components/rail/ChannelsRailSection.tsxindex 63090e3e81..2720c25536 100644--- a/apps/web/src/features/channels-view/components/rail/ChannelsRailSection.tsx+++ b/apps/web/src/features/channels-view/components/rail/ChannelsRailSection.tsx@@ -3,6 +3,7 @@ import {CollapsibleSection as WorkspaceSection,} from '@app/components/view-shell';import { DebugSuspense } from '@channel/DebugSuspense';+import { createScrollTopFade } from '@core/util/createScrollTopFade';import { fireAndForget } from '@core/util/fireAndForget';import CaretDownIcon from '@phosphor/caret-down.svg';import CaretUpIcon from '@phosphor/caret-up.svg';@@ -35,6 +36,7 @@ function SectionScrollArea(props: {children: JSX.Element;}) {const [scrollRoot, setScrollRoot] = createSignal<HTMLDivElement>();+ createScrollTopFade(scrollRoot);const activity = useOffscreenActivity({scrollRoot,targetId: () => props.activityTargetId,diff --git a/apps/web/src/features/channels-view/components/rail/ExpandedChannelsRail.tsx b/apps/web/src/features/channels-view/components/rail/ExpandedChannelsRail.tsxindex 68aea71e5c..9234f9d6b0 100644--- a/apps/web/src/features/channels-view/components/rail/ExpandedChannelsRail.tsx+++ b/apps/web/src/features/channels-view/components/rail/ExpandedChannelsRail.tsx@@ -6,15 +6,13 @@ import { openNewChannelModal } from '@channel/CreateChannelModal';import { ChannelMutedIndicator } from '@channel/components/ChannelMutedIndicator';import { useUserId } from '@core/context/user';import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { createScrollTopFade } from '@core/util/createScrollTopFade';import EmptyStateNoSearchMatchGraphic from '@design/empty-state-no-search-match.svg';import { type ChannelEntity, Entity } from '@entity';import CaretDownIcon from '@phosphor/caret-down.svg';-import ChatCircleIcon from '@phosphor/chat-circle.svg';import ChatsCircleIcon from '@phosphor/chats-circle.svg';import CheckIcon from '@phosphor/check.svg';-import HashIcon from '@phosphor/hash.svg';import MagnifyingGlassIcon from '@phosphor/magnifying-glass.svg';-import PlusIcon from '@phosphor/plus.svg';import SortIcon from '@phosphor/sort-ascending.svg';import XIcon from '@phosphor/x.svg';import {@@ -22,7 +20,15 @@ import {createDroppable,useDragDropContext,} from '@thisbeyond/solid-dnd';-import { cn, Dropdown, EmptyStatePanel, Hotkey, Tabs, Tooltip } from '@ui';+import {+ cn,+ Dropdown,+ EmptyStatePanel,+ Hotkey,+ type TabOption,+ Tabs,+ Tooltip,+} from '@ui';import { tourTarget } from '@ui/components/Tour';import {type Accessor,@@ -41,9 +47,11 @@ import type {ChannelListSort,ChannelsGroup,ChannelsSortGroup,+ ChannelsTab,} from '../../types';import { channelMentionsUser, formatDetailedTimestamp } from '../../utils';import { ChannelsEmptyState } from '../ChannelsEmptyState';+import { ConversationsCreateMenu } from '../ConversationsCreateMenu';import { ChannelFavoritesSection } from './ChannelFavoriteRows';import {ChannelLabelMenuItems,@@ -83,11 +91,11 @@ import {useChannelRailVirtualizer,} from './hooks/useChannelRailState';-const CHANNEL_TABS = [+const CHANNEL_TABS: TabOption<ChannelsTab>[] = [{ value: 'browse', label: 'All' },{ value: 'recents', label: 'Recent' },];-const CHANNEL_TABS_WITH_THREADS = [+const CHANNEL_TABS_WITH_THREADS: TabOption<ChannelsTab>[] = [...CHANNEL_TABS,{ value: 'threads', label: 'Threads' },];@@ -377,49 +385,70 @@ function ChannelOption(props: {function ExpandedHeader(props: { search: ChannelRailSearch }) {const rail = useChannelsRail();- const selectTab = (value: string) => {- if (- value === 'browse' ||- value === 'recents' ||- (value === 'threads' && rail.threadsEnabled())- ) {- rail.selectTab(value);- }+ const selectTab = (value: ChannelsTab) => {+ if (value !== 'threads' || rail.threadsEnabled()) rail.selectTab(value);};return (<div class="flex shrink-0 flex-col">- <ViewSidebar.Header>+ <ViewSidebar.Header+ searchLabel="Search conversations"+ searchOpen={props.search.isOpen()}+ onSearchOpenChange={(open) =>+ open ? props.search.open() : props.search.close()+ }+ search={() => (+ <SearchBar+ ref={props.search.registerInput}+ label="Search channels and direct messages"+ placeholder="Search conversations"+ value={props.search.query()}+ hotkey="cmd+f"+ onValueChange={props.search.setQuery}+ onEscape={() => {+ if (!props.search.query()) props.search.close();+ }}+ />+ )}+ ><div class="flex min-w-0 items-center gap-1"><ViewSidebar.CloseButton /><ViewSidebar.Title>Chat</ViewSidebar.Title></div></ViewSidebar.Header>- <ViewSidebar.Primary>- <ViewSidebar.Toolbar>+ <ViewSidebar.Primary class="flex flex-col gap-3">+ <Show when={!isTouchDevice()}>+ <ConversationsCreateMenu presentation="sidebar" />+ </Show>+ <ViewSidebar.Toolbar class={!isTouchDevice() ? 'px-0' : undefined}><Tabsaria-label="Chat sidebar views"- list={+ fullWidth={!isTouchDevice()}+ options={rail.threadsEnabled() ? CHANNEL_TABS_WITH_THREADS : CHANNEL_TABS}value={rail.tab()}onChange={selectTab}/>- <ViewSidebar.Control- label={- props.search.isOpen() ? 'Close search' : 'Search conversations'- }- aria-pressed={props.search.isOpen()}- class={cn(props.search.isOpen() && 'bg-active text-ink')}- onClick={() =>- props.search.isOpen() ? props.search.close() : props.search.open()- }- >- <MagnifyingGlassIcon class="size-3.5" />- </ViewSidebar.Control>+ <Show when={isTouchDevice()}>+ <ViewSidebar.Control+ label={+ props.search.isOpen() ? 'Close search' : 'Search conversations'+ }+ aria-pressed={props.search.isOpen()}+ class={cn(props.search.isOpen() && 'bg-active text-ink')}+ onClick={() =>+ props.search.isOpen()+ ? props.search.close()+ : props.search.open()+ }+ >+ <MagnifyingGlassIcon class="size-3.5" />+ </ViewSidebar.Control>+ </Show></ViewSidebar.Toolbar></ViewSidebar.Primary>- <Show when={props.search.isOpen()}>+ <Show when={isTouchDevice() && props.search.isOpen()}><div class="px-(--sidebar-content-inset) pt-(--sidebar-gutter)"><SearchBarref={props.search.registerInput}@@ -442,6 +471,7 @@ function ExpandedHeader(props: { search: ChannelRailSearch }) {function ExpandedSearchResults(props: { search: ChannelRailSearch }) {const rail = useChannelsRail();const [scrollRoot, setScrollRoot] = createSignal<HTMLDivElement>();+ createScrollTopFade(scrollRoot);const pagination = useChannelRailVirtualizer(() => 'search');const query = () => props.search.query().trim();const focusedIndex = () => {@@ -904,6 +934,7 @@ function RecentConversationCard(props: { channel: ChannelEntity }) {function ExpandedRecents() {const [scrollRoot, setScrollRoot] = createSignal<HTMLDivElement>();+ createScrollTopFade(scrollRoot);const scope = useChannelRailScopeState(() => 'recents');const pagination = useChannelRailVirtualizer(() => 'recents');const forceEmptyState = useDebugSetting(@@ -964,36 +995,6 @@ function ExpandedRecents() {);}-/** The Threads section's create action: a channel or a direct message. */-function ConversationsCreateMenu() {- return (- <Dropdown placement="bottom-end">- <Dropdown.Trigger- as={ViewSidebar.Control}- variant="ghost"- size="icon-sm"- label="Create channel or direct message"- >- <PlusIcon class="size-3.5" />- </Dropdown.Trigger>- <Dropdown.Content class="min-w-44">- <Dropdown.Group>- <Dropdown.Item onSelect={openNewChannelModal}>- <HashIcon class="size-3.5 shrink-0 text-ink-muted" />- <span class="flex-1 truncate text-ink-muted">New channel</span>- </Dropdown.Item>- <Dropdown.Item onSelect={() => runCreateAction('channel')}>- <ChatCircleIcon class="size-3.5 shrink-0 text-ink-muted" />- <span class="flex-1 truncate text-ink-muted">- New direct message- </span>- </Dropdown.Item>- </Dropdown.Group>- </Dropdown.Content>- </Dropdown>- );-}-function ExpandedThreads() {const rail = useChannelsRail();const [scrollRoot, setScrollRoot] = createSignal<HTMLDivElement>();@@ -1038,7 +1039,9 @@ function ExpandedThreads() {</span><div data-section-action="" class="flex items-center gap-0.5"><ChannelSortDropdown group="threads" label="Conversations" />- <ConversationsCreateMenu />+ <Show when={isTouchDevice()}>+ <ConversationsCreateMenu />+ </Show></div></CollapsibleSection.Header><CollapsibleSection.Contentdiff --git a/apps/web/src/features/command/CommandMenu.tsx b/apps/web/src/features/command/CommandMenu.tsxindex b245c79104..41dadd1155 100644--- a/apps/web/src/features/command/CommandMenu.tsx+++ b/apps/web/src/features/command/CommandMenu.tsx@@ -781,13 +781,11 @@ export function CommandMenuInner(props: {when={isEntityActionMode()}fallback={<Tabs- list={categoryTabs()}+ aria-label="Result categories"+ size="sm"+ options={categoryTabs()}value={categoryFilter()}- onChange={(value) => {- if (value) {- CommandState.setCategoryFilter(value as CategoryFilter);- }- }}+ onChange={CommandState.setCategoryFilter}/>}>diff --git a/apps/web/src/features/command/sidebar/sidebar-create-menu.tsx b/apps/web/src/features/command/sidebar/sidebar-create-menu.tsxindex 9f2ced7ae9..eb6e7cc549 100644--- a/apps/web/src/features/command/sidebar/sidebar-create-menu.tsx+++ b/apps/web/src/features/command/sidebar/sidebar-create-menu.tsx@@ -5,6 +5,7 @@ import { useHotkeyInterceptor } from '@app/signal/hotkeyRoot';import { setActiveScope } from '@core/hotkey/state';import { TOKENS } from '@core/hotkey/tokens';import { activateClosestDOMScope } from '@core/hotkey/utils';+import type { Placement } from '@floating-ui/dom';import CreateIcon from '@phosphor/note-pencil.svg';import PlusIcon from '@phosphor/plus.svg';import { Button, Dropdown, Hotkey, NavRow } from '@ui';@@ -33,6 +34,7 @@ export type SidebarCreateMenuProps = {*/trigger?: ValidComponent;onMenuOpenChange?: (open: boolean) => void;+ placement?: Placement;};export const SidebarCreateMenu = (props: SidebarCreateMenuProps) => {@@ -98,7 +100,7 @@ export const SidebarCreateMenu = (props: SidebarCreateMenuProps) => {<Dropdownopen={open()}onOpenChange={handleOpenChange}- placement="right-start"+ placement={props.placement ?? 'right-start'}gutter={8}><Showdiff --git a/apps/web/src/features/command/view-create-menu.tsx b/apps/web/src/features/command/view-create-menu.tsxnew file mode 100644index 0000000000..407160764e--- /dev/null+++ b/apps/web/src/features/command/view-create-menu.tsx@@ -0,0 +1,22 @@+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';+import type { ButtonProps } from '@ui';+import { SidebarCreateMenu } from './sidebar/sidebar-create-menu';++/** General creation menu for views without their own creation workflow. */+export function ViewCreateMenu(props: { presentation: 'sidebar' | 'toolbar' }) {+ return (+ <SidebarCreateMenu+ placement={+ props.presentation === 'sidebar' ? 'bottom-start' : 'bottom-end'+ }+ trigger={(triggerProps: ButtonProps) => (+ <ViewCreateButton+ {...triggerProps}+ presentation={props.presentation}+ aria-label="New"+ menu+ />+ )}+ />+ );+}diff --git a/apps/web/src/features/crm/components/crm-create-menu.tsx b/apps/web/src/features/crm/components/crm-create-menu.tsxindex 1be64dcd20..a2d36a51f9 100644--- a/apps/web/src/features/crm/components/crm-create-menu.tsx+++ b/apps/web/src/features/crm/components/crm-create-menu.tsx@@ -1,4 +1,6 @@import { ViewSidebar } from '@app/components/view-shell';+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import BuildingsIcon from '@phosphor/buildings.svg';import CaretDownIcon from '@phosphor/caret-down.svg';import PlusIcon from '@phosphor/plus.svg';@@ -9,22 +11,42 @@ import { Show } from 'solid-js';/** Sidebar create action for every CRM record type. */export function CrmCreateMenu(props: {+ presentation?: 'sidebar' | 'toolbar';onCreateCompany(): void;onCreateContact(): void;/** Omitted while pipelines are unavailable to the viewer. */pipeline?: { disabled: boolean; onCreate(): void };}) {return (- <Dropdown placement="bottom-start">- <Dropdown.Trigger as={ViewSidebar.Action} aria-label="Create CRM record">- <ViewSidebar.Icon>- <PlusIcon class="size-4" />- </ViewSidebar.Icon>- <span class="truncate">New</span>- <ViewSidebar.Trailing>- <CaretDownIcon class="size-3 shrink-0" />- </ViewSidebar.Trailing>- </Dropdown.Trigger>+ <Dropdown+ placement={+ props.presentation === 'toolbar' ? 'bottom-end' : 'bottom-start'+ }+ >+ <Show+ when={!isTouchDevice()}+ fallback={+ <Dropdown.Trigger+ as={ViewSidebar.Action}+ aria-label="Create CRM record"+ >+ <ViewSidebar.Icon>+ <PlusIcon class="size-4" />+ </ViewSidebar.Icon>+ <span class="truncate">New</span>+ <ViewSidebar.Trailing>+ <CaretDownIcon class="size-3 shrink-0" />+ </ViewSidebar.Trailing>+ </Dropdown.Trigger>+ }+ >+ <Dropdown.Trigger+ as={ViewCreateButton}+ presentation={props.presentation ?? 'sidebar'}+ aria-label="Create CRM record"+ menu+ />+ </Show><Dropdown.Content class="min-w-48"><Dropdown.Item onSelect={props.onCreateCompany}><BuildingsIcon aria-hidden="true" class="size-4 shrink-0" />diff --git a/apps/web/src/features/crm/components/crm-sidebar.tsx b/apps/web/src/features/crm/components/crm-sidebar.tsxindex c63a3ce5e0..eb4c99bcd3 100644--- a/apps/web/src/features/crm/components/crm-sidebar.tsx+++ b/apps/web/src/features/crm/components/crm-sidebar.tsx@@ -48,11 +48,10 @@ export function CrmSidebar(props: {onImport: () => void;onExport: () => void;onSettings: () => void;- /**- * Collapses the docked sidebar. The narrow navigation menu omits it, along- * with the split close, which stays in the split header beside the menu.- */+ /** Omitted in the narrow menu, which already has split navigation. */onCollapse?: () => void;+ search?: () => JSX.Element;+ searchLabel?: string;}) {const activityFlag = useFeatureFlag(enableCrmActivity);const [recordsOpen, setRecordsOpen] = createSignal(true);@@ -61,25 +60,30 @@ export function CrmSidebar(props: {<ViewSidebar.Root aria-label="CRM navigation"><header class="flex shrink-0 flex-col"><Show when={!isTouchDevice()}>- <ViewSidebar.Header>+ <ViewSidebar.Header+ search={props.search}+ searchLabel={props.searchLabel}+ collapseControl={+ <Show when={props.onCollapse}>+ <Tooltip label="Collapse CRM sidebar">+ <Button+ variant="ghost"+ size="icon-sm"+ label="Collapse CRM sidebar"+ onClick={props.onCollapse}+ >+ <SidebarIcon class="size-4" />+ </Button>+ </Tooltip>+ </Show>+ }+ ><div class="flex min-w-0 items-center gap-1"><Show when={props.onCollapse}><ViewSidebar.CloseButton class="shrink-0" /></Show><ViewSidebar.Title>Customers</ViewSidebar.Title></div>- <Show when={props.onCollapse}>- <Tooltip label="Collapse CRM sidebar">- <Button- variant="ghost"- size="icon-sm"- label="Collapse CRM sidebar"- onClick={props.onCollapse}- >- <SidebarIcon class="size-4" />- </Button>- </Tooltip>- </Show></ViewSidebar.Header></Show><ViewSidebar.Primary ref={tourTarget(COMPANIES_TOUR.create)}>diff --git a/apps/web/src/features/crm/components/record-tabs.tsx b/apps/web/src/features/crm/components/record-tabs.tsxindex 02dc542241..dbced5f988 100644--- a/apps/web/src/features/crm/components/record-tabs.tsx+++ b/apps/web/src/features/crm/components/record-tabs.tsx@@ -1,7 +1,7 @@import { getIconConfig } from '@core/component/EntityIcon';-import { TabsInset } from '@core/component/TabsInset';import SquaresFourIcon from '@phosphor/squares-four.svg';import UsersIcon from '@phosphor/users.svg';+import { Tabs } from '@ui';import type { Component, JSX } from 'solid-js';import {CRM_RECORD_SECTION_LABELS,@@ -30,27 +30,19 @@ export function RecordTabs<S extends CrmRecordSection>(props: {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)}+ <Tabsaria-label="Record sections"- class="shrink-0 whitespace-nowrap"+ touch="inset"+ class="shrink-0"+ options={props.sections.map((section) => ({+ value: section,+ label: CRM_RECORD_SECTION_LABELS[section],+ icon: props.compact ? SECTION_ICONS[section] : undefined,+ }))}+ iconOnly={props.compact}+ value={props.value}+ onChange={props.onChange}/>);}diff --git a/apps/web/src/features/crm/views/company-emails-section.tsx b/apps/web/src/features/crm/views/company-emails-section.tsxindex 41beed0542..c85de9c327 100644--- a/apps/web/src/features/crm/views/company-emails-section.tsx+++ b/apps/web/src/features/crm/views/company-emails-section.tsx@@ -1,5 +1,5 @@-import { TabsInset } from '@core/component/TabsInset';import type { CrmCompanyEntity } from '@entity';+import { Tabs } from '@ui';import { createMemo, createSignal } from 'solid-js';import { RecordSection } from '../components/record-section';import type {@@ -34,21 +34,27 @@ export function CompanyEmailsSection(props: { company?: CrmCompanyEntity }) {onSearchChange={setSearch}actions={<>- <TabsInset- list={[+ <Tabs+ aria-label="Email importance"+ size="sm"+ touch="inset"+ options={[{ value: 'signal', label: 'Signal' },{ value: 'all', label: 'All' },]}value={signalView()}- onChange={(v) => setSignalView(v as EmailSignalView)}+ onChange={setSignalView}/>- <TabsInset- list={[+ <Tabs+ aria-label="Email inboxes"+ size="sm"+ touch="inset"+ options={[{ value: 'team', label: 'Team' },{ value: 'me', label: 'Me' },]}value={view()}- onChange={(v) => setView(v as EmailView)}+ onChange={setView}/></>}diff --git a/apps/web/src/features/crm/views/contact-emails-section.tsx b/apps/web/src/features/crm/views/contact-emails-section.tsxindex 9a51977795..a118d6d89f 100644--- a/apps/web/src/features/crm/views/contact-emails-section.tsx+++ b/apps/web/src/features/crm/views/contact-emails-section.tsx@@ -1,4 +1,4 @@-import { TabsInset } from '@core/component/TabsInset';+import { Tabs } from '@ui';import { createSignal } from 'solid-js';import { RecordSection } from '../components/record-section';import type {@@ -23,21 +23,27 @@ export function ContactEmailsSection(props: { contact?: CrmContactResponse }) {onSearchChange={setSearch}actions={<>- <TabsInset- list={[+ <Tabs+ aria-label="Email importance"+ size="sm"+ touch="inset"+ options={[{ value: 'signal', label: 'Signal' },{ value: 'all', label: 'All' },]}value={signalView()}- onChange={(v) => setSignalView(v as EmailSignalView)}+ onChange={setSignalView}/>- <TabsInset- list={[+ <Tabs+ aria-label="Email inboxes"+ size="sm"+ touch="inset"+ options={[{ value: 'team', label: 'Team' },{ value: 'me', label: 'Me' },]}value={view()}- onChange={(v) => setView(v as EmailView)}+ onChange={setView}/></>}diff --git a/apps/web/src/features/crm/views/crm-settings.tsx b/apps/web/src/features/crm/views/crm-settings.tsxindex 1b0effd047..ef8f11681b 100644--- a/apps/web/src/features/crm/views/crm-settings.tsx+++ b/apps/web/src/features/crm/views/crm-settings.tsx@@ -1,4 +1,5 @@import type { ItemDragOverlayData } from '@app/components/app/ItemDragAndDrop';+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import { isTouchDevice } from '@core/mobile/isTouchDevice';import CaretDownIcon from '@phosphor/caret-down.svg';import CaretUpIcon from '@phosphor/caret-up.svg';@@ -611,7 +612,7 @@ function StagesSection() {</Match><Match when={loading()}><div class="px-4 py-4">- <div class="h-4 w-32 animate-pulse rounded bg-skeleton" />+ <ListSkeleton.Bar class="h-4 w-32" /></div></Match><Match when={editing()}>@@ -746,9 +747,7 @@ function CrmContent() {export function Crm() {return (- <Suspense- fallback={<div class="animate-pulse bg-skeleton rounded h-4 w-32 m-6" />}- >+ <Suspense fallback={<ListSkeleton.Bar class="m-6 h-4 w-32" />}><CrmContent /></Suspense>);diff --git a/apps/web/src/features/crm/views/crm-workspace.test.tsx b/apps/web/src/features/crm/views/crm-workspace.test.tsxindex fd5ccd050a..9da07e5301 100644--- a/apps/web/src/features/crm/views/crm-workspace.test.tsx+++ b/apps/web/src/features/crm/views/crm-workspace.test.tsx@@ -317,6 +317,8 @@ function setup(},source: {},queryFilters: { state: { include: {} }, replace: vi.fn() },+ searchText: () => '',+ setSearchText: vi.fn(),};render(() => (<CrmWorkspaceView>{() => <div>Record list</div>}</CrmWorkspaceView>diff --git a/apps/web/src/features/crm/views/crm-workspace.tsx b/apps/web/src/features/crm/views/crm-workspace.tsxindex e3c74e7bac..28f9047051 100644--- a/apps/web/src/features/crm/views/crm-workspace.tsx+++ b/apps/web/src/features/crm/views/crm-workspace.tsx@@ -4,6 +4,10 @@ import {useViewShell,ViewShell,} from '@app/components/view-shell';+import {+ ListHeader,+ ListHeaderSearch,+} from '@app/components/view-shell/ListHeader';import { VIEW_SHELL_TOUR } from '@app/components/view-shell/tour';import { ConnectorImportSidebar } from '@app/features/connector-import/connector-import';import { NIL_UUID } from '@app/features/next-soup/filters/filter-store';@@ -17,6 +21,7 @@ import { UnifiedFilterDropdown } from '@app/features/next-soup/soup-view/filtersimport { useFilterRefinements } from '@app/features/next-soup/soup-view/filters-bar/use-filter-refinements';import { useFeatureFlag } from '@app/lib/analytics/posthog';import { usePreference } from '@app/preferences/use-preference';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { SplitPanel } from '@components/app/split-panel';import { enableCrmActivity } from '@core/constant/featureFlags';import { isTouchDevice } from '@core/mobile/isTouchDevice';@@ -44,6 +49,7 @@ import {Suspense,} from 'solid-js';import { CrmListDialog } from '../components/company-list-dialog';+import { CrmCreateMenu } from '../components/crm-create-menu';import { CrmMobileTabs } from '../components/crm-mobile-tabs';import { CrmSidebar } from '../components/crm-sidebar';import { PipelineDialog } from '../components/pipeline-dialog';@@ -163,25 +169,12 @@ function CrmSearchBar() {}/** Contacts are not in the search index, so People searches the soup query. */-function PeopleSearchBar() {+function PeopleSearchBar(props: {+ value: string;+ onValueChange: (value: string) => void;+}) {const view = useCrmWorkspace();let input: HTMLInputElement | undefined;- const [text, setText] = createSignal(- view.queryFilters.state.include.crmContactSearch ?? ''- );- // Every applied search restarts the server query; wait for a typing pause.- const applySearch = debounce(- (value: string) =>- view.queryFilters.set({- include: { crmContactSearch: value.trim() || undefined },- }),- 250- );- onCleanup(applySearch.clear);- const search = (value: string) => {- setText(value);- applySearch(value);- };useViewControlHotkeys({scopeId: view.host.scopeId,enabled: view.host.isActive,@@ -199,8 +192,8 @@ function PeopleSearchBar() {ref={(element) => (input = element)}label="Search people"placeholder="Search people"- value={text()}- onValueChange={search}+ value={props.value}+ onValueChange={props.onValueChange}onEscape={view.host.focus}hotkey="cmd+f"class="max-w-md flex-1"@@ -208,6 +201,35 @@ function PeopleSearchBar() {);}+function CrmHeaderSearch(props: {+ label: string;+ value: string;+ onValueChange: (value: string) => void;+}) {+ const view = useCrmWorkspace();+ let focusSearch: (() => void) | undefined;+ useViewControlHotkeys({+ scopeId: view.host.scopeId,+ enabled: view.host.isActive,+ search: {+ description: props.label,+ run: () => {+ focusSearch?.();+ return true;+ },+ },+ });+ return (+ <ListHeaderSearch+ label={props.label}+ value={props.value}+ onValueChange={props.onValueChange}+ onEscape={view.host.focus}+ registerFocus={(focus) => (focusSearch = focus)}+ />+ );+}+function CrmFilterChips(props: { onReset: () => void }) {const { consolidatedFiltersList } = useFilterRefinements();return (@@ -232,6 +254,22 @@ export function CrmWorkspaceView(props: {copyPipelineLink,} = useCrmContext();const view = useCrmWorkspace();+ const [peopleSearch, setPeopleSearch] = createSignal(+ view.queryFilters.state.include.crmContactSearch ?? ''+ );+ const applyPeopleSearch = debounce(+ (value: string) =>+ view.queryFilters.set({+ include: { crmContactSearch: value.trim() || undefined },+ }),+ 250+ );+ onCleanup(applyPeopleSearch.clear);+ const searchPeople = (value: string) => {+ setPeopleSearch(value);+ applyPeopleSearch(value);+ };+const settings = view.host.settings;const { openWithSplit } = useCrmContext().createNavigation();const records = view.host.record.records;@@ -385,6 +423,21 @@ export function CrmWorkspaceView(props: {onMount(() => {if (!listsEnabled() && active().startsWith('list:')) navigate('active');});+ const toolbarCreateMenu = () => (+ <CrmCreateMenu+ presentation="toolbar"+ onCreateCompany={openCreateCompanyModal}+ onCreateContact={() => openCreateContactModal()}+ pipeline={+ pipelinesEnabled()+ ? {+ disabled: !canCreatePipeline(),+ onCreate: () => setCreatingPipeline(true),+ }+ : undefined+ }+ />+ );// Keep cold activity links intact until PostHog resolves; off falls back to Companies.createEffect(on(@@ -396,6 +449,15 @@ export function CrmWorkspaceView(props: {);const sidebar = (onCollapse?: () => void) => (<CrmSidebar+ searchLabel={peopleActive() ? 'Search people' : 'Search companies'}+ search={() => (+ <Show when={peopleActive()} fallback={<CrmSearchBar />}>+ <PeopleSearchBar+ value={peopleSearch()}+ onValueChange={searchPeople}+ />+ </Show>+ )}promotion={<ConnectorImportSidebarcategory="crm"@@ -588,14 +650,21 @@ export function CrmWorkspaceView(props: {{(tab) => (<><Show when={!isTouchDevice()}>- <div class="flex h-12 shrink-0 items-center gap-3 px-4">- <NavigationToggle onExpand={() => setCollapsed(false)}>- <Suspense>{sidebar()}</Suspense>- </NavigationToggle>- <h1 class="flex h-7 min-w-0 flex-1 items-center px-1 text-sm font-semibold tracking-[-0.03em]">- {title()}- </h1>- </div>+ <ListHeader+ title={+ <div class="flex min-w-0 items-center gap-3">+ <NavigationToggle onExpand={() => setCollapsed(false)}>+ <Suspense>{sidebar()}</Suspense>+ </NavigationToggle>+ <h1+ class="min-w-0 truncate text-sm font-semibold"+ title={title()}+ >+ {title()}+ </h1>+ </div>+ }+ /></Show><Suspensefallback={@@ -617,26 +686,16 @@ export function CrmWorkspaceView(props: {!activityPending()}>- <Show when={!isTouchDevice() || peopleActive()}>- <Show when={!isTouchDevice()}>- <div class="flex h-12 shrink-0 items-center gap-3 px-4">- <NavigationToggle onExpand={() => setCollapsed(false)}>- <Suspense>{sidebar()}</Suspense>- </NavigationToggle>- <h1- class="flex h-7 min-w-0 flex-1 items-center px-1 text-sm font-semibold tracking-[-0.03em]"- title={title()}- >- <span class="truncate">{title()}</span>- </h1>- </div>- </Show>- <Show- when={!peopleActive()}- fallback={+ <Show+ when={!isTouchDevice()}+ fallback={+ <Show when={peopleActive()}><ViewShell.Header class="touch:pt-0"><div class="flex min-w-0 items-center justify-between gap-3">- <PeopleSearchBar />+ <PeopleSearchBar+ value={peopleSearch()}+ onValueChange={searchPeople}+ /><Buttonvariant="outline"class="ml-auto shrink-0"@@ -647,46 +706,66 @@ export function CrmWorkspaceView(props: {</Button></div></ViewShell.Header>+ </Show>+ }+ >+ <ListHeader+ title={+ <div class="flex min-w-0 items-center gap-3">+ <NavigationToggle onExpand={() => setCollapsed(false)}>+ <Suspense>{sidebar()}</Suspense>+ </NavigationToggle>+ <h1+ class="min-w-0 truncate text-sm font-semibold"+ title={title()}+ >+ {title()}+ </h1>+ </div>}>- <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>svg]:size-4!">- <SoupViewContextSort />- <SoupViewContextGroup hideLabel variant="ghost" />- <UnifiedFilterDropdown hideLabel variant="ghost" />- <CompanyDisplayMenu />- <Suspense>- <CompanyViewsMenu hideLabel />- </Suspense>- <Show when={listsEnabled() && activeList()}>- {(list) => (- <Button- variant="ghost"- size="sm"- onClick={() =>- setEditing({- id: list().id,- name: list().name,- companyIds: [...list().config.companyIds],- })- }- >- Edit list- </Button>- )}- </Show>- <Button- variant="outline"- onClick={openCreateCompanyModal}- >- <PlusIcon />- New company- </Button>- </div>- </div>- </ViewShell.Header>+ <Show when={!peopleActive()}>+ <HeaderActionGroup label="Company filters">+ <UnifiedFilterDropdown hideLabel variant="ghost" />+ </HeaderActionGroup>+ <HeaderActionGroup label="Company view options">+ <SoupViewContextSort />+ <SoupViewContextGroup hideLabel variant="ghost" />+ <CompanyDisplayMenu />+ <Suspense>+ <CompanyViewsMenu hideLabel />+ </Suspense>+ <Show when={listsEnabled() && activeList()}>+ {(list) => (+ <Button+ variant="ghost"+ size="md"+ onClick={() =>+ setEditing({+ id: list().id,+ name: list().name,+ companyIds: [...list().config.companyIds],+ })+ }+ >+ Edit list+ </Button>+ )}+ </Show>+ </HeaderActionGroup>+ </Show>+ {toolbarCreateMenu()}+ <CrmHeaderSearch+ label={peopleActive() ? 'Search people' : 'Search companies'}+ value={peopleActive() ? peopleSearch() : view.searchText()}+ onValueChange={(value) =>+ peopleActive()+ ? searchPeople(value)+ : view.setSearchText(value)+ }+ />+ </ListHeader>+ <Show when={!peopleActive()}><Suspense><CrmFilterChips onReset={() => navigate(active())} /></Suspense>diff --git a/apps/web/src/features/crm/views/pipeline.tsx b/apps/web/src/features/crm/views/pipeline.tsxindex ae2f2c4458..b4fa883390 100644--- a/apps/web/src/features/crm/views/pipeline.tsx+++ b/apps/web/src/features/crm/views/pipeline.tsx@@ -1,3 +1,4 @@+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { InlineTitleEditor } from '@core/component/InlineTitleEditor';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { fireAndForget } from '@core/util/fireAndForget';@@ -137,7 +138,7 @@ export function PipelineView(props: {<Dropdown placement="bottom-start"><Dropdown.Triggervariant="ghost"- size="icon-sm"+ size="icon-md"aria-label="Pipeline actions"class="shrink-0"disabled={pending()}@@ -175,11 +176,13 @@ export function PipelineView(props: {</Dropdown.Content></Dropdown></Show>- <div class="ml-auto flex shrink-0 items-center gap-1">- <props.Sharing- pipeline={props.pipeline}- onCopyLink={props.onCopyLink}- />+ <div class="ml-auto flex shrink-0 items-center gap-2">+ <HeaderActionGroup label="Sharing">+ <props.Sharing+ pipeline={props.pipeline}+ onCopyLink={props.onCopyLink}+ />+ </HeaderActionGroup></div></div></Show>diff --git a/apps/web/src/features/crm/views/record-detail.test.tsx b/apps/web/src/features/crm/views/record-detail.test.tsxindex de5986dd5d..bcdf6cd503 100644--- a/apps/web/src/features/crm/views/record-detail.test.tsx+++ b/apps/web/src/features/crm/views/record-detail.test.tsx@@ -13,7 +13,7 @@ import {type ParentProps,Show,} from 'solid-js';-import { afterEach, expect, it, vi } from 'vitest';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';import { useCrmContext } from '../context/crm-context';import type { CrmCommentTarget } from '../context/workspace-context';import type { CrmContact } from '../core/contact';@@ -197,8 +197,19 @@ vi.mock('./record-associations', () => ({RecordReferencesSection: () => null,}));+beforeEach(() => {+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );+});afterEach(() => {cleanup();+ vi.unstubAllGlobals();taskContext.records.length = 0;taskContext.contactCompanyId = undefined;taskContext.recordError = () => false;diff --git a/apps/web/src/features/crm/views/record-detail.tsx b/apps/web/src/features/crm/views/record-detail.tsxindex 5d5e921510..55974afd53 100644--- a/apps/web/src/features/crm/views/record-detail.tsx+++ b/apps/web/src/features/crm/views/record-detail.tsx@@ -1,4 +1,5 @@import { ViewBreadcrumbs } from '@app/components/view-shell';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { SidePanel } from '@components/app/side-panel';import { EntityIcon } from '@core/component/EntityIcon';import {@@ -6,8 +7,10 @@ import {ParamsProvider,} from '@core/component/ParamsProvider';import { COMMENT_LINK_PARAM } from '@core/messages/comment-link';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { fireAndForget } from '@core/util/fireAndForget';import SpinnerIcon from '@phosphor/spinner.svg';+import { createElementSize } from '@solid-primitives/resize-observer';import { Button, Tooltip } from '@ui';import {createEffect,@@ -103,6 +106,8 @@ export function CrmRecordDetail(props: {const back = () =>trail().length > 1 ? returnTo(trail().length - 2) : props.onClose();let container: HTMLDivElement | undefined;+ const size = createElementSize(() => container);+ const compactTabs = () => !isTouchDevice() && (size.width ?? 0) < 900;onMount(() => container?.focus());return (@@ -172,7 +177,7 @@ export function CrmRecordDetail(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 touch:h-auto touch:min-h-12 touch:pt-[calc(var(--mobile-content-inset-top,var(--safe-top,0px))+0.5rem)] touch:pb-2">+ <div class="flex h-12 min-w-0 shrink-0 items-center gap-2 px-3 touch:gap-3 touch:border-b touch:border-edge-muted touch:px-4 touch:h-auto touch:min-h-12 touch:pt-[calc(var(--mobile-content-inset-top,var(--safe-top,0px))+0.5rem)] touch:pb-2">{props.navigation}<ViewBreadcrumbs.Outletaria-label="CRM record location"@@ -184,6 +189,7 @@ export function CrmRecordDetail(props: {fallback={<RecordTabssections={COMPANY_SECTIONS}+ compact={compactTabs()}value={companySection()}onChange={props.onSectionChange}/>@@ -191,13 +197,16 @@ export function CrmRecordDetail(props: {><RecordTabssections={CONTACT_SECTIONS}+ compact={compactTabs()}value={contactSection()}onChange={props.onSectionChange}/></Show></div>- <div class="ml-auto flex shrink-0 items-center gap-1">- <CrmCopyLinkButton type={current().type} id={current().id} />+ <div class="ml-auto flex shrink-0 items-center gap-2 touch:gap-1">+ <HeaderActionGroup label="Sharing">+ <CrmCopyLinkButton type={current().type} id={current().id} />+ </HeaderActionGroup><SidePanel.Toggle /></div></div>diff --git a/apps/web/src/features/crm/views/saved-views-menu.tsx b/apps/web/src/features/crm/views/saved-views-menu.tsxindex 2e6313dd24..031ce614d4 100644--- a/apps/web/src/features/crm/views/saved-views-menu.tsx+++ b/apps/web/src/features/crm/views/saved-views-menu.tsx@@ -6,7 +6,7 @@ import PushPinIcon from '@phosphor/push-pin.svg';import SlidersIcon from '@phosphor/sliders-horizontal.svg';import StackIcon from '@phosphor/stack.svg';import TrashIcon from '@phosphor/trash.svg';-import { Button, cn, Dropdown, SegmentedControl, Tooltip } from '@ui';+import { Button, cn, Dropdown, Tabs, Tooltip } from '@ui';import { createSignal, For, type JSX, Show } from 'solid-js';import { unwrap } from 'solid-js/store';import { useCrmContext } from '../context/crm-context';@@ -183,6 +183,7 @@ export function CompanyViewsMenu(props: { hideLabel?: boolean } = {}) {<Dropdown open={open()} onOpenChange={handleOpenChange}><Dropdown.Triggervariant="ghost"+ size={props.hideLabel ? 'icon-md' : 'sm'}label={props.hideLabel ? 'Views' : undefined}aria-label={props.hideLabel ? 'Views' : undefined}>@@ -278,7 +279,8 @@ export function CompanyViewsMenu(props: { hideLabel?: boolean } = {}) {)}/><div class="flex items-center justify-between gap-1.5">- <SegmentedControl+ <Tabs+ touch="segmented"size="sm"aria-label="View visibility"value={saveScope()}@@ -329,7 +331,11 @@ export function CompanyDisplayMenu() {return (<Dropdown><Tooltip label="Display options">- <Dropdown.Trigger variant="ghost" label="Display options">+ <Dropdown.Trigger+ variant="ghost"+ size="icon-md"+ label="Display options"+ ><SlidersIcon /></Dropdown.Trigger></Tooltip>diff --git a/apps/web/src/features/database/components/database-editor-toolbar.tsx b/apps/web/src/features/database/components/database-editor-toolbar.tsxindex 74373e9576..63524eca62 100644--- a/apps/web/src/features/database/components/database-editor-toolbar.tsx+++ b/apps/web/src/features/database/components/database-editor-toolbar.tsx@@ -1,5 +1,6 @@+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import CheckIcon from '@phosphor/check.svg';-import FunnelIcon from '@phosphor/funnel.svg';+import FunnelIcon from '@phosphor/funnel-simple.svg';import PlusIcon from '@phosphor/plus.svg';import SortAscendingIcon from '@phosphor/sort-ascending.svg';import StackIcon from '@phosphor/stack.svg';@@ -44,78 +45,82 @@ export function DatabaseEditorToolbar(props: {</div><div class="flex shrink-0 items-center gap-2 @max-[520px]/view-toolbar:w-full @max-[520px]/view-toolbar:flex-wrap @max-[520px]/view-toolbar:justify-end"><Show when={props.canChangeView !== false}>- <Show when={board()}>- {(current) => (- <Dropdown placement="bottom-start">- <Dropdown.Trigger- label="Group board by"- tooltip="Group by"- size="md"- square- variant="ghost"- >- <StackIcon class="size-3.5" />- </Dropdown.Trigger>- <Dropdown.Content class="min-w-48">- <Dropdown.Group>- <Dropdown.RadioGroup- value={current().groupBy}- onChange={(columnId) => {- if (columnId !== current().groupBy)- props.onChangeView({- layout: {- ...current(),- groupBy: columnId,- lanes: [],- },- });- }}- >- <For each={groupColumns()}>- {(column) => (- <Dropdown.RadioItem closeOnSelect value={column.id}>- <span class="flex-1">{column.name}</span>- <Dropdown.ItemIndicator>- <CheckIcon class="size-3.5 text-accent" />- </Dropdown.ItemIndicator>- </Dropdown.RadioItem>- )}- </For>- </Dropdown.RadioGroup>- </Dropdown.Group>- </Dropdown.Content>- </Dropdown>- )}- </Show>+ <HeaderActionGroup label="Table view options">+ <Show when={board()}>+ {(current) => (+ <Dropdown placement="bottom-start">+ <Dropdown.Trigger+ label="Group board by"+ tooltip="Group by"+ size="icon-md"+ variant="ghost"+ >+ <StackIcon class="size-4 touch:size-3.5" />+ </Dropdown.Trigger>+ <Dropdown.Content class="min-w-48">+ <Dropdown.Group>+ <Dropdown.RadioGroup+ value={current().groupBy}+ onChange={(columnId) => {+ if (columnId !== current().groupBy)+ props.onChangeView({+ layout: {+ ...current(),+ groupBy: columnId,+ lanes: [],+ },+ });+ }}+ >+ <For each={groupColumns()}>+ {(column) => (+ <Dropdown.RadioItem+ closeOnSelect+ value={column.id}+ >+ <span class="flex-1">{column.name}</span>+ <Dropdown.ItemIndicator>+ <CheckIcon class="size-3.5 text-accent" />+ </Dropdown.ItemIndicator>+ </Dropdown.RadioItem>+ )}+ </For>+ </Dropdown.RadioGroup>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ )}+ </Show>- <ToolbarPopover- label="Filter"- compact- count={filterConditionCount(props.view.query.filter)}- icon={<FunnelIcon class="size-3.5" />}- >- <FilterPanel- columns={props.columns}- filter={props.view.query.filter}- onChange={(filter) =>- props.onChangeView({- query: { ...props.view.query, filter },- })- }- />- </ToolbarPopover>- <ToolbarPopover- label="Sort"- compact- count={sort().length}- icon={<SortAscendingIcon class="size-3.5" />}- >- <SortPanel- columns={props.columns}- view={props.view}- onChange={props.onChangeView}- />- </ToolbarPopover>+ <ToolbarPopover+ label="Filter"+ compact+ count={filterConditionCount(props.view.query.filter)}+ icon={<FunnelIcon class="size-4 touch:size-3.5" />}+ >+ <FilterPanel+ columns={props.columns}+ filter={props.view.query.filter}+ onChange={(filter) =>+ props.onChangeView({+ query: { ...props.view.query, filter },+ })+ }+ />+ </ToolbarPopover>+ <ToolbarPopover+ label="Sort"+ compact+ count={sort().length}+ icon={<SortAscendingIcon class="size-4 touch:size-3.5" />}+ >+ <SortPanel+ columns={props.columns}+ view={props.view}+ onChange={props.onChangeView}+ />+ </ToolbarPopover>+ </HeaderActionGroup></Show>{props.search}<div class="flex shrink-0 items-center gap-2">diff --git a/apps/web/src/features/database/components/database-load-state.tsx b/apps/web/src/features/database/components/database-load-state.tsxindex 8a8dc0b5ce..09c01bb5a4 100644--- a/apps/web/src/features/database/components/database-load-state.tsx+++ b/apps/web/src/features/database/components/database-load-state.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import ArrowClockwiseIcon from '@phosphor/arrow-clockwise.svg';import WarningIcon from '@phosphor/warning-circle.svg';import { Button } from '@ui/components/Button';@@ -33,9 +34,12 @@ export function TableSkeleton() {aria-label="Loading records"aria-busy="true">- <div class="mb-4 h-8 animate-pulse rounded bg-hover" />+ <div class="mb-4 flex gap-1.5">+ <ListSkeleton.Bar class="h-8 w-28" />+ <ListSkeleton.Bar class="h-8 w-20" />+ </div><For each={[0, 1, 2, 3, 4, 5]}>- {() => <div class="mb-2 h-9 animate-pulse rounded bg-hover/60" />}+ {() => <ListSkeleton.Bar class="mb-2 h-9 w-full rounded-lg" />}</For></div>);@@ -52,9 +56,9 @@ export function BoardSkeleton() {<For each={[0, 1, 2]}>{() => (<div class="flex w-70 shrink-0 flex-col gap-2">- <div class="h-7 w-24 animate-pulse rounded bg-hover" />+ <ListSkeleton.Bar class="h-6 w-24" /><For each={[0, 1, 2]}>- {() => <div class="h-20 animate-pulse rounded-lg bg-hover/60" />}+ {() => <ListSkeleton.Bar class="h-20 w-full rounded-xl" />}</For></div>)}diff --git a/apps/web/src/features/database/components/database-search.tsx b/apps/web/src/features/database/components/database-search.tsxindex 70d579fb46..b8d302082d 100644--- a/apps/web/src/features/database/components/database-search.tsx+++ b/apps/web/src/features/database/components/database-search.tsx@@ -1,3 +1,4 @@+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import MagnifyingGlassIcon from '@phosphor/magnifying-glass.svg';import XIcon from '@phosphor/x.svg';import { Button } from '@ui/components/Button';@@ -68,19 +69,20 @@ export function DatabaseSearch(props: {<Showwhen={props.isOpen}fallback={- <Button- ref={searchButton}- type="button"- variant="ghost"- size="md"- square- label="Search"- aria-keyshortcuts="Control+F Meta+F"- tooltip="Search every table"- onClick={() => props.onOpen()}- >- <MagnifyingGlassIcon class="size-3.5" />- </Button>+ <HeaderActionGroup label="Search">+ <Button+ ref={searchButton}+ type="button"+ variant="ghost"+ size="icon-md"+ label="Search"+ aria-keyshortcuts="Control+F Meta+F"+ tooltip="Search every table"+ onClick={() => props.onOpen()}+ >+ <MagnifyingGlassIcon class="size-4 touch:size-3.5" />+ </Button>+ </HeaderActionGroup>}><divdiff --git a/apps/web/src/features/database/components/database-toolbar.tsx b/apps/web/src/features/database/components/database-toolbar.tsxindex b914203953..48a8f7feeb 100644--- a/apps/web/src/features/database/components/database-toolbar.tsx+++ b/apps/web/src/features/database/components/database-toolbar.tsx@@ -15,6 +15,7 @@ import {import { Button } from '@ui/components/Button';import { DeleteDialog } from '@ui/components/DeleteDialog';import { Dropdown } from '@ui/components/Dropdown';+import { Input } from '@ui/components/Input';import { Tooltip } from '@ui/components/Tooltip';import type { ResultAsync } from 'neverthrow';import { createSignal, For, type JSX, Show } from 'solid-js';@@ -151,17 +152,17 @@ export function DatabaseToolbar(props: DatabaseToolbarProps) {<><divref={viewRail}- class="flex min-w-0 items-center gap-0.5 overflow-x-auto"+ class="-m-1 flex min-w-0 items-center gap-1.5 overflow-x-auto p-1"aria-label="Views"><Buttonref={allRecordsButton}type="button"- variant="ghost"+ variant="outline"size="md"aria-pressed={!props.selectedViewId}onClick={() => props.onSelectView()}- class="max-w-40 px-4 aria-pressed:border-edge-frame aria-pressed:bg-active aria-pressed:text-ink"+ class="max-w-40"><span class="truncate">All records</span></Button>@@ -223,14 +224,13 @@ export function DatabaseToolbar(props: DatabaseToolbarProps) {<Show when={props.canEdit}><Dropdown placement="bottom-start"><Dropdown.Trigger- size="md"- square+ size="icon-md"variant="ghost"label="New view"- class="ml-2 shrink-0"+ class="ml-1.5 shrink-0"disabled={creating()}>- <PlusIcon class="size-3.5" />+ <PlusIcon class="size-4 touch:size-3.5" /></Dropdown.Trigger><Dropdown.Content class="min-w-40"><Dropdown.Item@@ -333,13 +333,13 @@ function ViewTab(props: {props.onRenameSave(true);}}>- <input+ <Inputref={props.renameInput}aria-label="View name"maxlength={100}value={props.renameDraft}readOnly={props.renamePending}- class="h-8 w-36 rounded-md border border-ink/40 bg-input px-2 text-sm text-ink outline-none focus:ring-2 focus:ring-ink/10"+ class="w-36"onInput={(event) =>props.onRenameInput(event.currentTarget.value)}@@ -358,7 +358,7 @@ function ViewTab(props: {<Tooltip label={props.view.name}><ContextMenu.Triggeras={Button}- variant="ghost"+ variant="outline"size="md"tooltipDisabledtype="button"@@ -377,7 +377,7 @@ function ViewTab(props: {props.onRename();}}}- class="max-w-40 px-4 aria-pressed:border-edge-frame aria-pressed:bg-active aria-pressed:text-ink"+ class="max-w-40"><span class="truncate">{props.view.name}</span></ContextMenu.Trigger>diff --git a/apps/web/src/features/database/components/database-view-filters.tsx b/apps/web/src/features/database/components/database-view-filters.tsxindex 3304ef64bf..7f78b7aed1 100644--- a/apps/web/src/features/database/components/database-view-filters.tsx+++ b/apps/web/src/features/database/components/database-view-filters.tsx@@ -1,16 +1,9 @@import PlusIcon from '@phosphor/plus.svg';import XIcon from '@phosphor/x.svg';+import { Input, type InputProps } from '@ui';import { Button } from '@ui/components/Button';import { Dropdown } from '@ui/components/Dropdown';-import {- createSignal,- For,- Index,- type JSX,- Match,- Show,- Switch,-} from 'solid-js';+import { createSignal, For, Index, Match, Show, Switch } from 'solid-js';import type {Conjunction,FilterGroup,@@ -279,26 +272,20 @@ function ConditionEditor(props: {</>)}</Show>- <button- type="button"- aria-label="Remove filter"- class="rounded-md p-1.5 text-ink-muted hover:bg-hover focus-visible:ring-2 focus-visible:ring-ink/50"+ <Button+ variant="ghost"+ size="icon-md"+ label="Remove filter"onClick={props.onRemove}>- <XIcon class="size-3.5" />- </button>+ <XIcon class="size-4 touch:size-3.5" />+ </Button></div>);}-function FilterValueInput(props: JSX.InputHTMLAttributes<HTMLInputElement>) {- return (- <input- aria-label="Filter value"- class="h-8 min-w-28 flex-1 rounded-md border border-edge-muted bg-input px-2 text-xs outline-none placeholder:text-ink-placeholder focus:border-ink/50"- {...props}- />- );+function FilterValueInput(props: InputProps) {+ return <Input aria-label="Filter value" class="min-w-28 flex-1" {...props} />;}/** What a test compares against: text, a number, a day, or options. */diff --git a/apps/web/src/features/database/components/new-table-tab.tsx b/apps/web/src/features/database/components/new-table-tab.tsxindex 67330c2ec6..562caba098 100644--- a/apps/web/src/features/database/components/new-table-tab.tsx+++ b/apps/web/src/features/database/components/new-table-tab.tsx@@ -52,7 +52,7 @@ export function NewTableTab(props: {return (<form- class="flex h-6 shrink-0 items-center rounded-full bg-input px-3 ring-1 ring-inset ring-edge-muted"+ class="flex h-6 shrink-0 items-center rounded-full bg-input px-3 ring-1 ring-inset ring-edge-muted not-touch:h-8"aria-label="New table"onSubmit={submit}aria-busy={pending()}diff --git a/apps/web/src/features/database/components/table-navigation.tsx b/apps/web/src/features/database/components/table-navigation.tsxindex 7d98a44f61..fc4bd93f3f 100644--- a/apps/web/src/features/database/components/table-navigation.tsx+++ b/apps/web/src/features/database/components/table-navigation.tsx@@ -1,6 +1,5 @@import { fireAndForget } from '@core/util/fireAndForget';import { ContextMenu } from '@kobalte/core/context-menu';-import { Tabs } from '@kobalte/core/tabs';import ArrowLeftIcon from '@phosphor/arrow-left.svg';import ArrowRightIcon from '@phosphor/arrow-right.svg';import TableIcon from '@phosphor/table.svg';@@ -224,7 +223,7 @@ export function TableNavigation(props: {axis="x"onCancel={tabReorder.cancel}/>- <Tabs+ <TabSelector.Rootvalue={props.activeTableId ?? ''}onChange={props.onSelect}activationMode="manual"@@ -325,7 +324,7 @@ export function TableNavigation(props: {readOnly={tableRename.pending()}onFocusIn={(event) => event.stopPropagation()}onMouseDown={(event) => event.stopPropagation()}- class="h-8 w-full min-w-0 rounded-md border border-ink/40 bg-input px-2 text-xs text-ink outline-none"+ class="h-8 w-full min-w-0 rounded-full border border-ink/40 bg-input px-3 text-xs text-ink outline-none not-touch:text-sm"onInput={(event) =>tableRename.setDraft(event.currentTarget.value)}@@ -371,7 +370,7 @@ export function TableNavigation(props: {)}</Show></TabSelector.List>- </Tabs>+ </TabSelector.Root><DragOverlayclass="pointer-events-none select-none rounded-md bg-panel shadow-md"style={{ 'z-index': 1000 }}diff --git a/apps/web/src/features/database/components/view-control-popover.tsx b/apps/web/src/features/database/components/view-control-popover.tsxindex 84e834d0b1..7ecfd96268 100644--- a/apps/web/src/features/database/components/view-control-popover.tsx+++ b/apps/web/src/features/database/components/view-control-popover.tsx@@ -21,8 +21,7 @@ export function ToolbarPopover(props: {<Popover.Triggeras={Button}variant="ghost"- size="md"- square={props.compact && !props.count}+ size={props.compact && !props.count ? 'icon-md' : 'md'}class={props.count ? 'text-accent' : undefined}label={`${props.label}${props.count ? ` ${props.count}` : ''}`}tooltip={props.label}diff --git a/apps/web/src/features/devtools/debug/ProjectionPlayground.tsx b/apps/web/src/features/devtools/debug/ProjectionPlayground.tsxindex ff6a4c1476..33adbb85d1 100644--- a/apps/web/src/features/devtools/debug/ProjectionPlayground.tsx+++ b/apps/web/src/features/devtools/debug/ProjectionPlayground.tsx@@ -3,7 +3,7 @@ import { createAIProjection } from '@queries/ai/projection';import type { Expiry } from '@service-cognition/generated/schemas/expiry';import type { RefreshCadence } from '@service-cognition/generated/schemas/refreshCadence';import { createConnectionWebsocketEffect } from '@service-connection/websocket';-import { Button, InlineCheckbox, SegmentedControl } from '@ui';+import { Button, InlineCheckbox, Tabs } from '@ui';import { createMemo, createSignal, For, Show } from 'solid-js';import { z } from 'zod';@@ -136,8 +136,10 @@ export default function ProjectionPlayground() {<section class="space-y-2"><div class="text-sm font-medium">Output</div>- <SegmentedControl- class="w-full"+ <Tabs+ aria-label="Output mode"+ touch="segmented"+ fullWidthsize="sm"value={outputMode()}options={[@@ -155,8 +157,10 @@ export default function ProjectionPlayground() {<section class="space-y-2"><div class="text-sm font-medium">Model</div>- <SegmentedControl- class="w-full"+ <Tabs+ aria-label="Model"+ touch="segmented"+ fullWidthsize="sm"value={modelChoice()}options={[diff --git a/apps/web/src/features/drive-view/drive-create-menu.tsx b/apps/web/src/features/drive-view/drive-create-menu.tsxindex 733a5a1562..ddbe4da8c5 100644--- a/apps/web/src/features/drive-view/drive-create-menu.tsx+++ b/apps/web/src/features/drive-view/drive-create-menu.tsx@@ -1,10 +1,12 @@import { ViewSidebar } from '@app/components/view-shell';+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import {CREATABLE_BLOCKS,type CreatableName,runCreateAction,useCreatableEnabled,} from '@app/features/command/Launcher';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import CaretDownIcon from '@phosphor/caret-down.svg';import FolderIcon from '@phosphor/folder.svg';import PlusIcon from '@phosphor/plus.svg';@@ -85,8 +87,23 @@ export function DriveCreateMenu(props: {return (<Dropdown placement={isToolbar() ? 'bottom-end' : 'bottom-start'}>- <Show when={isToolbar()} fallback={<SidebarTrigger label={label()} />}>- <ToolbarTrigger label={label()} />+ <Show+ when={!isTouchDevice()}+ fallback={+ <Show+ when={isToolbar()}+ fallback={<SidebarTrigger label={label()} />}+ >+ <ToolbarTrigger label={label()} />+ </Show>+ }+ >+ <Dropdown.Trigger+ as={ViewCreateButton}+ presentation={props.presentation ?? 'sidebar'}+ menu+ aria-label={label()}+ /></Show><Dropdown.Content class="min-w-48 max-w-72"><Dropdown.Group>diff --git a/apps/web/src/features/drive-view/drive-view-skeleton.tsx b/apps/web/src/features/drive-view/drive-view-skeleton.tsxindex b5420f6401..1b859fe921 100644--- a/apps/web/src/features/drive-view/drive-view-skeleton.tsx+++ b/apps/web/src/features/drive-view/drive-view-skeleton.tsx@@ -5,7 +5,11 @@ export function DriveViewSkeleton() {return (<ViewSkeleton.Root asidePreferenceKey="documents"><ViewSkeleton.Sidebar title="Drive" createLabel="New" />- <ViewSkeleton.Main title="Drive" searchPlaceholder="Search files" />+ <ViewSkeleton.Main+ title="My Files"+ controls={[1, 1, '+ New ⌄', 1]}+ searchPlaceholder="Search files"+ /></ViewSkeleton.Root>);}diff --git a/apps/web/src/features/drive-view/views/drive-header.tsx b/apps/web/src/features/drive-view/views/drive-header.tsxindex 4c4ff63062..7fa4effbef 100644--- a/apps/web/src/features/drive-view/views/drive-header.tsx+++ b/apps/web/src/features/drive-view/views/drive-header.tsx@@ -1,25 +1,25 @@import {ListSortDropdown,- SearchBar,useViewControlHotkeys,ViewShell,} from '@app/components/view-shell';+import {+ ListHeader,+ ListHeaderSearch,+} from '@app/components/view-shell/ListHeader';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { Show, Suspense } from 'solid-js';import { DriveBreadcrumbsOutlet } from '../components/DriveBreadcrumbs';import { useDriveView } from '../context/drive-context';-import { driveLocationLabel } from '../core/location-label';import { DRIVE_SORT_OPTIONS } from '../core/types';import { DriveCreateMenu } from '../drive-create-menu';import { DriveFilterMenu } from './drive-filter-menu';import { DriveMobileTabs } from './drive-mobile-tabs';export function DriveHeader() {- const { state, sidebar } = useDriveView();-- const title = () =>- driveLocationLabel(state.value().location, sidebar.folders());+ const { state } = useDriveView();const isRecent = () => {const location = state.value().location;@@ -29,7 +29,7 @@ export function DriveHeader() {const panel = useSplitPanelOrThrow();- let searchInput: HTMLInputElement | undefined;+ let focusSearch: (() => void) | undefined;useViewControlHotkeys({scopeId: panel.splitHotkeyScope,@@ -40,8 +40,7 @@ export function DriveHeader() {condition: () => !state.projectId(),run: () => {- searchInput?.focus();- searchInput?.select();+ focusSearch?.();return true;},@@ -49,7 +48,44 @@ export function DriveHeader() {});return (- <>+ <Show+ when={isTouchDevice()}+ fallback={+ <ListHeader+ title={<DriveBreadcrumbsOutlet aria-label="Drive location" />}+ >+ <Show when={state.value().location.kind === 'tab'}>+ <HeaderActionGroup label="File filters">+ <Suspense>+ <DriveFilterMenu />+ </Suspense>+ </HeaderActionGroup>+ </Show>+ <Show when={!isRecent()}>+ <HeaderActionGroup label="File view options">+ <ListSortDropdown+ label="Sort files"+ value={state.value().sort}+ onChange={state.setSort}+ options={DRIVE_SORT_OPTIONS}+ />+ </HeaderActionGroup>+ </Show>+ <DriveCreateMenu presentation="toolbar" />+ <Show when={!state.projectId()}>+ <ListHeaderSearch+ label="Search Drive"+ placeholder="Search files"+ value={state.value().search}+ onValueChange={state.setSearch}+ registerFocus={(focus) => {+ focusSearch = focus;+ }}+ />+ </Show>+ </ListHeader>+ }+ ><ViewShell.TopBar><h1 class="hidden min-w-0 truncate text-sm font-semibold tracking-[-0.03em] text-ink @max-[720px]/view-shell:block">Drive@@ -61,58 +97,9 @@ export function DriveHeader() {</ViewShell.TopBar><ViewShell.Header><div class="flex min-w-0 flex-col gap-3">- <Show- when={isTouchDevice()}- fallback={- <>- <div class="hidden min-w-0 items-center gap-2 @max-[720px]/view-shell:flex">- <h1 class="min-w-0 truncate text-xl font-semibold tracking-[-0.03em] text-ink">- {title()}- </h1>- <div class="ml-auto shrink-0">- <DriveCreateMenu />- </div>- </div>- <div class="flex min-w-0 items-center justify-between gap-3">- <Show when={!state.projectId()}>- <SearchBar- ref={(element) => {- searchInput = element;- }}- label="Search Drive"- placeholder="Search files"- value={state.value().search}- onValueChange={state.setSearch}- hotkey="cmd+f"- class="max-w-md flex-1"- />- </Show>- <div class="ml-auto flex shrink-0 items-center gap-2">- <Show when={!isRecent()}>- <ListSortDropdown- label="Sort files"- value={state.value().sort}- onChange={state.setSort}- options={DRIVE_SORT_OPTIONS}- />- </Show>- <Show when={state.value().location.kind === 'tab'}>- <Suspense>- <DriveFilterMenu />- </Suspense>- </Show>- <div class="shrink-0 @max-[720px]/view-shell:hidden">- <DriveCreateMenu presentation="toolbar" />- </div>- </div>- </div>- </>- }- >- <DriveMobileTabs />- </Show>+ <DriveMobileTabs /></div></ViewShell.Header>- </>+ </Show>);}diff --git a/apps/web/src/features/drive-view/views/drive-list.tsx b/apps/web/src/features/drive-view/views/drive-list.tsxindex 928094ef48..9a10b6746d 100644--- a/apps/web/src/features/drive-view/views/drive-list.tsx+++ b/apps/web/src/features/drive-view/views/drive-list.tsx@@ -13,6 +13,7 @@ import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { StaticMarkdownContext } from '@core/component/LexicalMarkdown/component/core/StaticMarkdown';import { toast } from '@core/component/Toast/Toast';import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { createScrollTopFade } from '@core/util/createScrollTopFade';import { fireAndForget } from '@core/util/fireAndForget';import { useIsKeyPressActive } from '@core/util/useIsKeyPressActive';import EmptyStateFolderGraphic from '@design/empty-state-folder.svg';@@ -81,6 +82,7 @@ export function DriveList() {const [grid, setGrid] = createSignal<HTMLDivElement>();const [viewport, setViewport] = createSignal<HTMLDivElement>();+ createScrollTopFade(viewport);const [virtualizer, setVirtualizer] = createSignal<VirtualizerHandle>();diff --git a/apps/web/src/features/drive-view/views/drive-sidebar.tsx b/apps/web/src/features/drive-view/views/drive-sidebar.tsxindex 2cb05f0a7a..61c6e2e8b9 100644--- a/apps/web/src/features/drive-view/views/drive-sidebar.tsx+++ b/apps/web/src/features/drive-view/views/drive-sidebar.tsx@@ -227,9 +227,20 @@ function DriveImportPromotion() {}export function DriveSidebar() {+ const { state } = useDriveView();return (<ViewSidebar.Root aria-label="Drive navigation">- <ViewSidebar.Header>+ <ViewSidebar.Header+ searchLabel="Search files"+ search={() => (+ <SearchBar+ label="Search files"+ placeholder="Search files"+ value={state.value().search}+ onValueChange={state.setSearch}+ />+ )}+ ><div class="flex min-w-0 items-center gap-1"><ViewSidebar.CloseButton /><ViewSidebar.Title>Drive</ViewSidebar.Title>diff --git a/apps/web/src/features/email-compose/components/date-selector.tsx b/apps/web/src/features/email-compose/components/date-selector.tsxindex 4f50901038..193b327d77 100644--- a/apps/web/src/features/email-compose/components/date-selector.tsx+++ b/apps/web/src/features/email-compose/components/date-selector.tsx@@ -324,7 +324,7 @@ export const DateSelector = (props: DateSelectorProps) => {<DateSelectorPortalWrapper disabled={props.disablePortal}><Combobox.Content- class="rounded-xl size-auto z-action-menu menu-open-animation glass w-full max-w-70 text-ink bg-menu-glass"+ class="menu-surface size-auto z-action-menu menu-open-animation w-full max-w-70"as={Surface}depth={3}on:keydown={handleKeyDown}diff --git a/apps/web/src/features/email-message/components/calendar-invite-card.test.tsx b/apps/web/src/features/email-message/components/calendar-invite-card.test.tsxindex 1f3c5d413c..1168bc7f58 100644--- a/apps/web/src/features/email-message/components/calendar-invite-card.test.tsx+++ b/apps/web/src/features/email-message/components/calendar-invite-card.test.tsx@@ -10,6 +10,7 @@ import { CalendarInviteCard } from './calendar-invite-card';vi.mock('@ui', async () => ({...(await vi.importActual('@app/components/ui/components/Avatar')),+ ...(await vi.importActual('@app/components/ui/components/Tabs')),Button: (props: JSX.ButtonHTMLAttributes<HTMLButtonElement>) => (<button {...props} />),@@ -58,20 +59,22 @@ describe('native invitation card', () => {}}/>));- const yes = screen.getByRole('button', { name: 'Yes' });- const maybe = screen.getByRole('button', { name: 'Maybe' });- expect(yes.getAttribute('aria-pressed')).toBe('true');+ const yes = screen.getByRole('radio', { name: 'Yes' }) as HTMLInputElement;+ const maybe = screen.getByRole('radio', {+ name: 'Maybe',+ }) as HTMLInputElement;+ expect(yes.checked).toBe(true);maybe.focus();fireEvent.click(maybe);- expect(screen.getByRole('button', { name: 'Maybe' })).toBe(maybe);+ expect(screen.getByRole('radio', { name: 'Maybe' })).toBe(maybe);expect(document.activeElement).toBe(maybe);- expect(maybe.getAttribute('aria-pressed')).toBe('true');+ expect(maybe.checked).toBe(true);expect(screen.getByRole('status').textContent).toContain('Saving');setPending(false);setError('Could not save. Please try again.');setState(resolved);expect(document.activeElement).toBe(maybe);- expect(yes.getAttribute('aria-pressed')).toBe('true');+ expect(yes.checked).toBe(true);expect(screen.getByRole('status').textContent).toContain('try again');});it.each(['cancelled', 'reply', 'counter'] as const)(@@ -87,7 +90,7 @@ describe('native invitation card', () => {}}/>));- expect(screen.queryByRole('button', { name: 'Yes' })).toBeNull();+ expect(screen.queryByRole('radio', { name: 'Yes' })).toBeNull();expect(screen.queryByRole('button', { name: /Join meeting/ })).toBeNull();});@@ -158,7 +161,7 @@ describe('native invitation card', () => {expect(screen.getByRole('heading', { name: 'Product review' })).toBeTruthy();- expect(screen.queryByRole('button', { name: 'Yes' })).toBeNull();+ expect(screen.queryByRole('radio', { name: 'Yes' })).toBeNull();expect(screen.getByText(/Responses are paused/)).toBeTruthy();});it('renders formatted descriptions and keeps lists outside paragraphs', () => {diff --git a/apps/web/src/features/email-message/components/calendar-invite-card.tsx b/apps/web/src/features/email-message/components/calendar-invite-card.tsxindex f4da6aa19b..55b1f32317 100644--- a/apps/web/src/features/email-message/components/calendar-invite-card.tsx+++ b/apps/web/src/features/email-message/components/calendar-invite-card.tsx@@ -8,7 +8,7 @@ import PauseCircle from '@phosphor/pause-circle.svg';import Users from '@phosphor/users.svg';import VideoCamera from '@phosphor/video-camera.svg';import X from '@phosphor/x.svg';-import { Button } from '@ui';+import { Button, Tabs } from '@ui';import { createMemo, createSignal, For, type JSX, Show } from 'solid-js';import { match } from 'ts-pattern';import { sanitizeCalendarDescription } from '../../calendar/utils/calendar-description-sanitizer';@@ -290,27 +290,17 @@ export function CalendarInviteCard(props: {</div>}>- <div- role="group"+ <Tabs+ touch="segmented"aria-label="Your response"- class="flex overflow-hidden rounded-lg border border-edge"- >- <For each={RESPONSES}>- {(option, index) => (- <Button- variant="ghost"- class={`h-10 gap-1 rounded-none px-3.5 text-sm text-ink aria-pressed:bg-accent-bg aria-pressed:font-semibold aria-pressed:text-accent ${index() > 0 ? 'border-l border-edge' : ''}`}- aria-pressed={resolved()?.response === option.value}- onClick={() => props.actions?.respond?.(option.value)}- >- <Show when={resolved()?.response === option.value}>- <Check class="size-3.5" />- </Show>- {option.label}- </Button>- )}- </For>- </div>+ options={RESPONSES}+ value={+ RESPONSES.find(+ (option) => option.value === resolved()?.response+ )?.value+ }+ onChange={(response) => props.actions?.respond?.(response)}+ /></Show><div class="flex items-center gap-2"><Show@@ -320,8 +310,7 @@ export function CalendarInviteCard(props: {}><Button- variant="ghost"- class="h-10 border border-edge px-3.5 text-sm font-semibold text-ink"+ variant="strong"onClick={() => props.actions?.connectCalendar?.()}>Connect calendar@@ -329,20 +318,19 @@ export function CalendarInviteCard(props: {</Show><Show when={conference() && props.actions?.openExternal}><Button- variant="ghost"- class="h-10 gap-1.5 bg-accent px-3.5 text-sm font-semibold text-accent-contrast"+ variant="cta"aria-label="Join meeting"onClick={() => props.actions?.openExternal?.(conference()!)}>- <VideoCamera class="size-4" />+ <VideoCamera class="size-3.5 touch:size-4" />Join</Button></Show><Show when={props.actions?.openCalendar}><Button- variant="ghost"- class="size-10 border border-edge p-0 text-ink-muted"- aria-label="Open in calendar"+ variant="outline"+ size="icon-md"+ label="Open in calendar"onClick={() => props.actions?.openCalendar?.()}><CalendarBlank class="size-4" />diff --git a/apps/web/src/features/email-thread/calendar-invitation.test.tsx b/apps/web/src/features/email-thread/calendar-invitation.test.tsxindex 6d5be4e82e..cdc985626d 100644--- a/apps/web/src/features/email-thread/calendar-invitation.test.tsx+++ b/apps/web/src/features/email-thread/calendar-invitation.test.tsx@@ -58,6 +58,7 @@ vi.mock('./calendar-invitation-day', () => ({}));vi.mock('@ui', async () => ({...(await vi.importActual('@app/components/ui/components/Avatar')),+ ...(await vi.importActual('@app/components/ui/components/Tabs')),Button: (props: JSX.ButtonHTMLAttributes<HTMLButtonElement>) => (<button {...props} />),@@ -129,14 +130,14 @@ describe('email invitation production host', () => {/>));expect(- screen.getByRole('button', { name: 'Yes' }).getAttribute('aria-pressed')- ).toBe('true');+ (screen.getByRole('radio', { name: 'Yes' }) as HTMLInputElement).checked+ ).toBe(true);setFailed(true);expect(screen.getByRole('heading', { name: 'Current product review' })).toBeTruthy();expect(screen.getByText('Last response: Yes')).toBeTruthy();- expect(screen.queryByRole('button', { name: 'Yes' })).toBeNull();+ expect(screen.queryByRole('radio', { name: 'Yes' })).toBeNull();expect(screen.getByText(/Calendar unavailable. Showing last-known/)).toBeTruthy();@@ -144,8 +145,8 @@ describe('email invitation production host', () => {expect(queryState.refetch).toHaveBeenCalled();setFailed(false);expect(- screen.getByRole('button', { name: 'Yes' }).getAttribute('aria-pressed')- ).toBe('true');+ (screen.getByRole('radio', { name: 'Yes' }) as HTMLInputElement).checked+ ).toBe(true);});it.each(['counter', 'request'] as const)('opens the displayed proposal or newer snapshot day for %s',diff --git a/apps/web/src/features/email-thread/views/email-thread.tsx b/apps/web/src/features/email-thread/views/email-thread.tsxindex ba159aa0cb..9ada66e2bb 100644--- a/apps/web/src/features/email-thread/views/email-thread.tsx+++ b/apps/web/src/features/email-thread/views/email-thread.tsx@@ -2,6 +2,7 @@ import { EmailFormContextProvider } from '@app/features/email-compose/context/emimport { observeDraftRestoration } from '@app/features/email-compose/primitives/draft-restoration';import { EmailComposeView } from '@app/features/email-compose/views/email-compose';import { CustomScrollbar } from '@core/component/CustomScrollbar';+import { createScrollTopFade } from '@core/util/createScrollTopFade';import type { JSX } from 'solid-js';import { type Accessor, Match, Show, Switch } from 'solid-js';import type { EmailThreadHost } from '../context/email-thread-context';@@ -21,6 +22,7 @@ export type EmailThreadViewProps = {};export function EmailThreadView(props: EmailThreadViewProps) {const context = useEmailThreadState();+ createScrollTopFade(context.messagesListRef);const viewContext = useEmailThreadViewContext();const threadContext = viewContext.thread;const isTouchDevice = threadContext.isTouch;diff --git a/apps/web/src/features/email-view/components/EmailControls.tsx b/apps/web/src/features/email-view/components/EmailControls.tsxindex 93db95004a..86daba7140 100644--- a/apps/web/src/features/email-view/components/EmailControls.tsx+++ b/apps/web/src/features/email-view/components/EmailControls.tsx@@ -1,7 +1,5 @@-import {- ListFilterCountBadge,- ListFilterDropdown,-} from '@app/components/view-shell';+import { ListFilterDropdown } from '@app/components/view-shell';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { TOKENS } from '@core/hotkey/tokens';import { isTouchDevice } from '@core/mobile/isTouchDevice';import ColumnsIcon from '@phosphor/columns.svg';@@ -9,6 +7,7 @@ import { Button } from '@ui';import { Show } from 'solid-js';import { useEmailView } from '../email-view-context';import { useEmailFilters } from '../filters/use-email-filters';+import { EmailInboxMenu } from './EmailInboxSelector';export type EmailControlsProps = {/** Controlled filter-menu state, so the header's `f` hotkey can open it. */@@ -21,32 +20,43 @@ export function EmailControls(props: EmailControlsProps) {const { readingPane, setReadingPane } = useEmailView();return (- <div class="flex min-w-0 shrink-0 items-center justify-end gap-2 @max-[720px]/view-shell:gap-1">- <Show when={!isTouchDevice()}>- <Button- variant="ghost"- size="icon-sm"- label={readingPane() ? 'Hide reading pane' : 'Show reading pane'}- hotkey={TOKENS.email.toggleReadingPane}- aria-pressed={readingPane()}- class={readingPane() ? 'text-ink' : 'text-ink-muted'}- onClick={() => setReadingPane(!readingPane())}- >- <ColumnsIcon class="size-4" />- </Button>- </Show>- <div class="relative shrink-0">- <ListFilterDropdown- label="Filter email"- open={props.filterOpen}- onOpenChange={props.onFilterOpenChange}- groups={filters.groups()}- isSelected={filters.isSelected}- onSelectionChange={filters.setSelected}- onClear={filters.clear}- />- <ListFilterCountBadge count={filters.activeCount()} />+ <>+ <div class="contents @max-[640px]/split-header:hidden">+ <HeaderActionGroup label="Email filters">+ <EmailInboxMenu />+ <div class="relative shrink-0">+ <ListFilterDropdown+ label="Filter email"+ open={props.filterOpen}+ onOpenChange={props.onFilterOpenChange}+ groups={filters.groups()}+ isSelected={filters.isSelected}+ onSelectionChange={filters.setSelected}+ onClear={filters.clear}+ />+ <Show when={filters.activeCount() > 0}>+ <span class="pointer-events-none absolute -top-0.5 right-0 z-10 flex size-4 translate-x-1/2 not-touch:top-0.5 not-touch:right-0.5 not-touch:size-3.5 not-touch:translate-x-0 items-center justify-center rounded-full bg-accent text-xxs font-medium leading-none text-surface">+ {filters.activeCount()}+ </span>+ </Show>+ </div>+ </HeaderActionGroup></div>- </div>+ <HeaderActionGroup label="Email view options">+ <Show when={!isTouchDevice()}>+ <Button+ variant="ghost"+ size="icon-md"+ label={readingPane() ? 'Hide reading pane' : 'Show reading pane'}+ hotkey={TOKENS.email.toggleReadingPane}+ aria-pressed={readingPane()}+ class={readingPane() ? 'text-ink' : 'text-ink-muted'}+ onClick={() => setReadingPane(!readingPane())}+ >+ <ColumnsIcon class="size-4" />+ </Button>+ </Show>+ </HeaderActionGroup>+ </>);}diff --git a/apps/web/src/features/email-view/components/EmailDetailView.tsx b/apps/web/src/features/email-view/components/EmailDetailView.tsxindex a0623d1faa..c36cabc977 100644--- a/apps/web/src/features/email-view/components/EmailDetailView.tsx+++ b/apps/web/src/features/email-view/components/EmailDetailView.tsx@@ -7,7 +7,10 @@ import { createEmailThreadSource } from '@app/features/email-thread/queries/threimport { useBlockEntityCommands } from '@app/features/next-soup/actions';import { createSearchParams, useRouteParams } from '@app/lib/split-router';import { emailThreadRoute } from '@app/routes/routes';-import { EmailThreadControls } from '@block-email/component/EmailThreadControls';+import {+ EmailThreadControlGroups,+ EmailThreadHeaderActions,+} from '@block-email/component/EmailThreadHeaderActions';import { EmailThreadLoadGate } from '@block-email/component/EmailThreadLoadGate';import {type EmailThreadToolsOptions,@@ -18,7 +21,6 @@ import { registerEmailHotkeys } from '@block-email/util/emailHotkeys';import { useGlobalNotificationSource } from '@components/app/GlobalAppState';import { SidePanel } from '@components/app/side-panel';import { SplitFileMenu } from '@components/app/split-layout/components/SplitFileMenu';-import { ListNavigationButtons } from '@components/app/split-layout/components/SplitHeader';import {useCanAutofocusSplitContent,useSplitDisplayName,@@ -38,7 +40,6 @@ import { fireAndForget } from '@core/util/fireAndForget';import { buildEntityData } from '@entity';import { useThreadQuery } from '@queries/email/thread';import { representativeThreadMessage } from '@queries/email/thread-subject';-import { ButtonGroup } from '@ui';import { createEffect, createMemo, createSignal, Show } from 'solid-js';import { Portal } from 'solid-js/web';import { emailDetailSearch } from '../email-route';@@ -97,17 +98,10 @@ function EmailDetailHeader(<Show when={props.controlsMount}>{(mount) => (<Portal mount={mount()}>- <ButtonGroup variant="outline" size="icon-md" class="touch:hidden">- <EmailThreadControls {...controls} />- <Show when={props.listNavigation}>- {(navigation) => (- <ListNavigationButtons- navigation={navigation()}- class="gap-0"- />- )}- </Show>- </ButtonGroup>+ <EmailThreadControlGroups+ controls={controls}+ navigation={props.listNavigation}+ /></Portal>)}</Show>@@ -253,19 +247,19 @@ export function EmailDetailView(props: {aria-label="Email location"fallback={<EntityDetailBreadcrumbSkeleton />}/>- <div class="ml-auto flex shrink-0 items-center gap-1 @max-[900px]/split-header:[&_[data-header-action]]:w-8 @max-[900px]/split-header:[&_[data-header-action]]:p-0 @max-[900px]/split-header:[&_[data-header-action-label]]:hidden">- <div ref={setControlsMount} class="flex items-center" />- <SidePanel.HeaderActionsOutlet />- <Show when={ENABLE_EMAIL_SHARING}>- <ShareTrigger- onClick={openShare}- id={props.thread.id}- blockType="email"- hotkeyScope={keyScope}- />- </Show>- <SidePanel.Toggle />- </div>+ <EmailThreadHeaderActions+ controls={<div ref={setControlsMount} class="flex items-center" />}+ share={+ <Show when={ENABLE_EMAIL_SHARING}>+ <ShareTrigger+ onClick={openShare}+ id={props.thread.id}+ blockType="email"+ hotkeyScope={keyScope}+ />+ </Show>+ }+ /></ViewShell.TopBar><divref={container}diff --git a/apps/web/src/features/email-view/components/EmailHeader.tsx b/apps/web/src/features/email-view/components/EmailHeader.tsxindex 975e9bebcc..61aee26315 100644--- a/apps/web/src/features/email-view/components/EmailHeader.tsx+++ b/apps/web/src/features/email-view/components/EmailHeader.tsx@@ -1,31 +1,39 @@import {- SearchBar,useViewControlHotkeys,ViewBreadcrumbs,- ViewShell,} from '@app/components/view-shell';-import { SidebarCreateButton } from '@app/components/view-shell/SidebarCreateButton';+import {+ ListHeader,+ ListHeaderSearch,+} from '@app/components/view-shell/ListHeader';+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import { useSplitLayout } from '@components/app/split-layout/layout';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { registerHotkey } from '@core/hotkey/hotkeys';+import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { Tabs } from '@ui';import { tourTarget } from '@ui/components/Tour';import { createSignal, Show } from 'solid-js';import { composeEmail } from '../compose-email';-import { EMAIL_TABS } from '../constants';+import { EMAIL_TAB_LABELS, EMAIL_TABS } from '../constants';import { useEmailView } from '../email-view-context';import { EMAIL_TOUR } from '../tour';import { EmailControls } from './EmailControls';-import { EmailInboxFilter, EmailInboxMenu } from './EmailInboxSelector';export type EmailHeaderProps = {/** Restores list focus when Escape leaves the search field. */onSearchEscape?: () => void;+ tabOnly?: boolean;};export function EmailViewBreadcrumbItem() {const { state } = useEmailView();+ const inboxSelected = () =>+ !isTouchDevice() && (state.tab === 'important' || state.tab === 'noise');const tabTitle = () =>- EMAIL_TABS.find((tab) => tab.id === state.tab)?.label ?? 'Email';+ inboxSelected()+ ? 'Inbox'+ : (EMAIL_TABS.find((tab) => tab.id === state.tab)?.label ?? 'Email');return (<ViewBreadcrumbs.Item@@ -42,50 +50,31 @@ export function EmailViewBreadcrumbItem() {<span class="truncate @max-[720px]/view-shell:hidden">{tabTitle()}</span>- <span class="hidden @max-[720px]/view-shell:inline">Email</span>+ <span class="hidden @max-[720px]/view-shell:inline">+ {inboxSelected() ? 'Inbox' : 'Email'}+ </span></ViewBreadcrumbs.Button>)}</ViewBreadcrumbs.Item>);}-export function EmailTopBar(props: {- /** Beside a reading pane the reader shows the trail; the list shows its tab. */- tabOnly?: boolean;-}) {- const { state } = useEmailView();- const tabTitle = () =>- EMAIL_TABS.find((tab) => tab.id === state.tab)?.label ?? 'Email';- return (- <ViewShell.TopBar>- <div class="flex min-w-0 flex-1 items-baseline gap-2">- <Show- when={props.tabOnly}- fallback={<ViewBreadcrumbs.Outlet aria-label="Email location" />}- >- <h2 class="truncate px-1 text-sm font-medium text-ink">- {tabTitle()}- </h2>- </Show>- <EmailInboxFilter class="@max-[720px]/view-shell:hidden" />- </div>- </ViewShell.TopBar>- );-}-export function EmailHeader(props: EmailHeaderProps) {const panel = useSplitPanelOrThrow();const { openWithSplit } = useSplitLayout();- const { state, setState } = useEmailView();+ const { state, setState, setTab } = useEmailView();const [filterOpen, setFilterOpen] = createSignal(false);- let searchInput: HTMLInputElement | undefined;+ let focusSearch: (() => void) | undefined;const searchTarget = tourTarget(EMAIL_TOUR.search);+ const inboxSelected = () =>+ state.tab === 'important' || state.tab === 'noise';const selectedTabLabel = () =>- EMAIL_TABS.find((tab) => tab.id === state.tab)?.label ?? 'Email';+ inboxSelected()+ ? 'Inbox'+ : (EMAIL_TABS.find((tab) => tab.id === state.tab)?.label ?? 'Email');- const focusSearch = () => {- searchInput?.focus();- searchInput?.select();+ const runSearch = () => {+ focusSearch?.();return true;};const canSearch = () =>@@ -97,7 +86,7 @@ export function EmailHeader(props: EmailHeaderProps) {scopeId: panel.splitHotkeyScope,description: 'Search email',condition: () => panel.isPanelActive() && canSearch(),- keyDownHandler: focusSearch,+ keyDownHandler: runSearch,});// The view's control hotkeys are registered once, here, for the split scope.@@ -107,7 +96,7 @@ export function EmailHeader(props: EmailHeaderProps) {search: {description: 'Search email',condition: canSearch,- run: focusSearch,+ run: runSearch,},filter: {description: 'Filter email',@@ -120,46 +109,65 @@ export function EmailHeader(props: EmailHeaderProps) {});return (- <div class="flex min-w-0 flex-col">- <div class="mb-4 hidden min-h-8 min-w-0 flex-wrap items-baseline gap-2 @max-[720px]/view-shell:flex">- <h1 class="min-w-0 shrink-0 truncate text-xl font-semibold tracking-[-0.03em] text-ink">- {selectedTabLabel()}- </h1>- <EmailInboxFilter class="@max-[480px]/view-shell:order-3 @max-[480px]/view-shell:w-full" />- <div class="ml-auto flex shrink-0 items-center self-center gap-2">- <EmailInboxMenu />- <div class="shrink-0">- <SidebarCreateButton- label="New"- onCreate={() => composeEmail(openWithSplit, state.inboxIds)}- />+ <ListHeader+ title={+ <div class="flex min-w-0 items-center gap-3">+ <div+ class={+ inboxSelected()+ ? 'min-w-0 @max-[640px]/split-header:hidden'+ : 'min-w-0'+ }+ >+ <Show+ when={props.tabOnly}+ fallback={<ViewBreadcrumbs.Outlet aria-label="Email location" />}+ >+ <h2 class="truncate px-1 text-sm font-medium text-ink">+ {selectedTabLabel()}+ </h2>+ </Show></div>- </div>- </div>-- <Show when={state.tab !== 'scheduled'}>- <div class="flex min-w-0 items-center justify-between gap-3">- <Show when={state.tab !== 'reminders'}>- <SearchBar- ref={(element) => {- searchInput = element;- searchTarget(element);- }}- label="Search email"- value={state.search}- hotkey="cmd+f"- onValueChange={(search) => setState('search', search)}- onEscape={props.onSearchEscape}- placeholder="Search email"- class="max-w-md flex-1"+ <Show when={inboxSelected()}>+ <Tabs+ ref={tourTarget(EMAIL_TOUR.signalNoise)}+ aria-label="Inbox view"+ class="shrink-0"+ options={[+ { value: 'important', label: EMAIL_TAB_LABELS.important },+ { value: 'noise', label: EMAIL_TAB_LABELS.noise },+ ]}+ value={state.tab}+ onChange={setTab}/></Show>- <EmailControls- filterOpen={filterOpen()}- onFilterOpenChange={setFilterOpen}- /></div>+ }+ >+ <Show when={state.tab !== 'scheduled'}>+ <EmailControls+ filterOpen={filterOpen()}+ onFilterOpenChange={setFilterOpen}+ />+ </Show>+ <div class="contents @max-[640px]/split-header:hidden">+ <ViewCreateButton+ aria-label="New email"+ onClick={() => composeEmail(openWithSplit, state.inboxIds)}+ />+ </div>+ <Show when={state.tab !== 'reminders' && state.tab !== 'scheduled'}>+ <ListHeaderSearch+ ref={searchTarget}+ label="Search email"+ value={state.search}+ onValueChange={(search) => setState('search', search)}+ onEscape={props.onSearchEscape}+ registerFocus={(focus) => {+ focusSearch = focus;+ }}+ /></Show>- </div>+ </ListHeader>);}diff --git a/apps/web/src/features/email-view/components/EmailInboxSelector.tsx b/apps/web/src/features/email-view/components/EmailInboxSelector.tsxindex 95f8bcee85..704a748fd0 100644--- a/apps/web/src/features/email-view/components/EmailInboxSelector.tsx+++ b/apps/web/src/features/email-view/components/EmailInboxSelector.tsx@@ -4,13 +4,14 @@ import { inboxIconProps } from '@core/component/inboxIcon';import { UserIcon, type UserIconSize } from '@core/component/UserIcon';import { enableMultiInbox } from '@core/constant/featureFlags';import { useAddInboxFlow } from '@core/email-link';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { fireAndForget } from '@core/util/fireAndForget';import CaretDownIcon from '@phosphor/caret-down.svg';import CheckIcon from '@phosphor/check.svg';import PlusIcon from '@phosphor/plus.svg';import TrayIcon from '@phosphor/tray.svg';import { useMailAccountsQuery } from '@queries/email/mail-accounts';-import { cn, Dropdown, pressHandlers } from '@ui';+import { AvatarGroup, Button, cn, Dropdown, pressHandlers } from '@ui';import { createMemo, For, type JSX, Show } from 'solid-js';import { fromInboxOptions } from '../../email-compose/core/email-sender';import { useEmailView } from '../email-view-context';@@ -118,81 +119,205 @@ function InboxAvatar(props: {);}-/**- * The inbox list at the top of the Email sidebar: `All inboxes` followed by- * one row per inbox, with a separate action to connect another account.- * Clicking a row selects that inbox alone; there is no multi-select.- */-export function EmailInboxList(props: { class?: string }) {- const selection = useInboxSelection();+function AllInboxesAvatar(props: { options: readonly InboxOption[] }) {+ const inboxes = () =>+ props.options.filter((option) => !option.aliasAddress).slice(0, 2);return (- <Show when={selection.visible()}>- <div- class={cn(- 'flex shrink-0 flex-col gap-(--sidebar-row-gap)',- props.class- )}- >- <ViewSidebar.Nav- aria-label="Inboxes"- class="max-h-[calc(4*var(--sidebar-row-height)+3*var(--sidebar-row-gap))] overflow-y-auto overscroll-none touch:max-h-[calc(11rem+3*var(--sidebar-row-gap))]"+ <Show+ when={!isTouchDevice() && inboxes().length > 0}+ fallback={<TrayIcon aria-hidden="true" class="size-4 shrink-0" />}+ >+ <AvatarGroup size="sm" aria-hidden="true">+ <For each={inboxes()}>+ {(option) => <InboxAvatar option={option} size="sm" />}+ </For>+ </AvatarGroup>+ </Show>+ );+}++function InboxAccountGroup(props: {+ selection: ReturnType<typeof useInboxSelection>;+ class?: string;+}) {+ const selection = props.selection;+ const selectedOption = () =>+ selection.selectedOption() ??+ (selection.options().length === 1 && selection.isAll()+ ? selection.options()[0]+ : undefined);+ const label = () =>+ selectedOption()?.label ??+ (selection.options().length ? selection.label() : 'No inboxes connected');++ return (+ <section+ aria-label="Email accounts"+ class={cn(+ 'shrink-0 rounded-xl border border-edge-button bg-control not-touch:elevated p-1',+ props.class+ )}+ >+ <h2 class="px-2 pt-1 pb-1.5 text-xs font-medium text-ink-muted">+ Accounts+ </h2>+ <Dropdown placement="bottom-start">+ <Dropdown.Trigger+ variant="ghost"+ size="md"+ disabled={selection.options().length === 0}+ aria-label={`Select inbox: ${label()}`}+ title={label()}+ class="w-full min-w-0 justify-start gap-2 rounded-lg px-2 text-ink">- <Show when={selection.hasMultipleInboxes()}>+ <Show+ when={selectedOption()}+ fallback={<AllInboxesAvatar options={selection.options()} />}+ >+ {(option) => (+ <InboxAvatar option={option()} size="sm" class="size-5" />+ )}+ </Show>+ <span class="min-w-0 flex-1 truncate text-left">{label()}</span>+ <CaretDownIcon aria-hidden="true" class="size-3.5 shrink-0" />+ </Dropdown.Trigger>+ <Dropdown.Content class="min-w-[var(--kb-popper-anchor-width)] max-w-80">+ <Dropdown.Group>+ <Dropdown.RadioGroup+ value={+ selectedOption()?.id ??+ (selection.isAll() ? ALL_INBOXES_ID : '')+ }+ onChange={(value) => {+ if (value === ALL_INBOXES_ID) selection.selectAll();+ else selection.select(value);+ }}+ >+ <Show when={selection.hasMultipleInboxes()}>+ <InboxRadioItem+ value={ALL_INBOXES_ID}+ icon={<AllInboxesAvatar options={selection.options()} />}+ >+ All inboxes+ </InboxRadioItem>+ </Show>+ <For each={selection.options()}>+ {(option) => (+ <InboxRadioItem+ value={option.id}+ icon={<InboxAvatar option={option} size="sm" />}+ >+ {option.label}+ </InboxRadioItem>+ )}+ </For>+ </Dropdown.RadioGroup>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ <Show when={selection.canAddInbox()}>+ <div class="mt-1 border-t border-edge-divider pt-1">+ <Button+ variant="ghost"+ size="md"+ class="w-full justify-start gap-2 rounded-lg px-2 text-xs"+ onClick={selection.addInbox}+ >+ <PlusIcon class="size-4" />+ Connect another account+ </Button>+ </div>+ </Show>+ </section>+ );+}++function InboxAccountList(props: {+ selection: ReturnType<typeof useInboxSelection>;+ class?: string;+}) {+ const selection = props.selection;+ return (+ <div+ class={cn('flex shrink-0 flex-col gap-(--sidebar-row-gap)', props.class)}+ >+ <ViewSidebar.Nav+ aria-label="Inboxes"+ class="max-h-[calc(4*var(--sidebar-row-height)+3*var(--sidebar-row-gap))] overflow-y-auto overscroll-none touch:max-h-[calc(11rem+3*var(--sidebar-row-gap))]"+ >+ <Show when={selection.hasMultipleInboxes()}>+ <ViewSidebar.Item+ active={selection.isAll()}+ aria-current={selection.isAll() ? 'true' : undefined}+ {...pressHandlers(selection.selectAll)}+ >+ <ViewSidebar.Icon>+ <Show+ when={selection.isAll()}+ fallback={<TrayIcon class="size-4" />}+ >+ <CheckIcon class="size-4 text-accent" />+ </Show>+ </ViewSidebar.Icon>+ <span class="truncate">All inboxes</span>+ </ViewSidebar.Item>+ </Show>+ <For each={selection.options()}>+ {(option) => (<ViewSidebar.Item- active={selection.isAll()}- aria-current={selection.isAll() ? 'true' : undefined}- {...pressHandlers(selection.selectAll)}+ active={selection.isSelected(option.id)}+ aria-current={+ selection.isSelected(option.id) ? 'true' : undefined+ }+ {...pressHandlers(() => selection.select(option.id))}><ViewSidebar.Icon><Show- when={selection.isAll()}- fallback={<TrayIcon class="size-4" />}+ when={selection.isSelected(option.id)}+ fallback={+ <InboxAvatar option={option} size="sm" class="size-5" />+ }><CheckIcon class="size-4 text-accent" /></Show></ViewSidebar.Icon>- <span class="truncate">All inboxes</span>- </ViewSidebar.Item>- </Show>- <For each={selection.options()}>- {(option) => (- <ViewSidebar.Item- active={selection.isSelected(option.id)}- aria-current={- selection.isSelected(option.id) ? 'true' : undefined- }- {...pressHandlers(() => selection.select(option.id))}+ <span+ class={cn('truncate', option.aliasAddress && 'pl-2')}+ title={option.label}>- <ViewSidebar.Icon>- <Show- when={selection.isSelected(option.id)}- fallback={- <InboxAvatar option={option} size="sm" class="size-5" />- }- >- <CheckIcon class="size-4 text-accent" />- </Show>- </ViewSidebar.Icon>- <span- class={cn('truncate', option.aliasAddress && 'pl-2')}- title={option.label}- >- {option.label}- </span>- </ViewSidebar.Item>- )}- </For>- </ViewSidebar.Nav>- <Show when={selection.canAddInbox()}>- <ViewSidebar.Item {...pressHandlers(selection.addInbox)}>- <ViewSidebar.Icon>- <PlusIcon class="size-4" />- </ViewSidebar.Icon>- <span class="truncate">Connect another account</span>- </ViewSidebar.Item>- </Show>- </div>+ {option.label}+ </span>+ </ViewSidebar.Item>+ )}+ </For>+ </ViewSidebar.Nav>+ <Show when={selection.canAddInbox()}>+ <ViewSidebar.Item {...pressHandlers(selection.addInbox)}>+ <ViewSidebar.Icon>+ <PlusIcon class="size-4" />+ </ViewSidebar.Icon>+ <span class="truncate">Connect another account</span>+ </ViewSidebar.Item>+ </Show>+ </div>+ );+}++/** A contained desktop account selector; touch keeps its existing inbox list. */+export function EmailInboxList(props: { class?: string }) {+ const selection = useInboxSelection();++ return (+ <Show when={selection.visible()}>+ <Show+ when={!isTouchDevice()}+ fallback={+ <InboxAccountList selection={selection} class={props.class} />+ }+ >+ <InboxAccountGroup selection={selection} class={props.class} />+ </Show></Show>);}@@ -232,7 +357,7 @@ export function EmailInboxFilter(props: { class?: string }) {><InboxRadioItemvalue={ALL_INBOXES_ID}- icon={<TrayIcon class="size-4" />}+ icon={<AllInboxesAvatar options={selection.options()} />}>All inboxes</InboxRadioItem>@@ -278,16 +403,15 @@ export function EmailInboxMenu(props: { class?: string }) {<Dropdown placement="bottom-end"><Dropdown.Triggervariant="ghost"- size="sm"- square+ size="icon-md"depth={2}aria-label={`Inbox: ${selection.label()}`}tooltip={selection.label()}- class={cn('size-8 shrink-0', props.class)}+ class={cn('shrink-0', props.class)}><Showwhen={selection.selectedOption()}- fallback={<TrayIcon aria-hidden="true" class="size-4 shrink-0" />}+ fallback={<AllInboxesAvatar options={selection.options()} />}>{(option) => <InboxAvatar option={option()} size="sm" />}</Show>@@ -297,7 +421,7 @@ export function EmailInboxMenu(props: { class?: string }) {<Dropdown.RadioGroup value={radioValue()} onChange={onRadioChange}><InboxRadioItemvalue={ALL_INBOXES_ID}- icon={<TrayIcon class="size-4" />}+ icon={<AllInboxesAvatar options={selection.options()} />}>All inboxes</InboxRadioItem>diff --git a/apps/web/src/features/email-view/components/EmailList.tsx b/apps/web/src/features/email-view/components/EmailList.tsxindex d2f2963a9f..c04343f8a8 100644--- a/apps/web/src/features/email-view/components/EmailList.tsx+++ b/apps/web/src/features/email-view/components/EmailList.tsx@@ -22,6 +22,7 @@ import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { createSplitAutofocus } from '@components/app/split-layout/utils/createSplitAutofocus';import { TOKENS } from '@core/hotkey/tokens';import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { createScrollTopFade } from '@core/util/createScrollTopFade';import { debounce } from '@core/util/debounce';import { fireAndForget } from '@core/util/fireAndForget';import {@@ -169,6 +170,7 @@ export function EmailList(props: EmailListProps) {});const [viewport, setViewport] = createSignal<HTMLDivElement>();+ createScrollTopFade(viewport);const [topSpacer, setTopSpacer] = createSignal<HTMLDivElement>();const topSpacerSize = createElementSize(topSpacer);const [emptyViewport, setEmptyViewport] = createSignal<HTMLDivElement>();diff --git a/apps/web/src/features/email-view/components/EmailSidebar.tsx b/apps/web/src/features/email-view/components/EmailSidebar.tsxindex a8e608a263..215af1aa65 100644--- a/apps/web/src/features/email-view/components/EmailSidebar.tsx+++ b/apps/web/src/features/email-view/components/EmailSidebar.tsx@@ -1,4 +1,8 @@-import { useViewTabHotkeys, ViewSidebar } from '@app/components/view-shell';+import {+ SearchBar,+ useViewTabHotkeys,+ ViewSidebar,+} from '@app/components/view-shell';import { SidebarCreateButton } from '@app/components/view-shell/SidebarCreateButton';import { useFeatureFlag } from '@app/lib/analytics/posthog';import { useSplitLayout } from '@components/app/split-layout/layout';@@ -13,6 +17,7 @@ import EnvelopeIcon from '@phosphor/envelope.svg';import FileIcon from '@phosphor/file.svg';import PaperPlaneTiltIcon from '@phosphor/paper-plane-tilt.svg';import StarIcon from '@phosphor/star.svg';+import TrayIcon from '@phosphor/tray.svg';import UsersThreeIcon from '@phosphor/users-three.svg';import SignalIcon from '@phosphor/wave-sine.svg';import NoiseIcon from '@phosphor/waveform.svg';@@ -23,7 +28,7 @@ import { tourTarget } from '@ui/components/Tour';import { type Component, For, Show } from 'solid-js';import { Dynamic } from 'solid-js/web';import { composeEmail } from '../compose-email';-import { EMAIL_TAB_IDS, EMAIL_TABS, type EmailTabItem } from '../constants';+import { EMAIL_TAB_IDS, EMAIL_TAB_LABELS, EMAIL_TABS } from '../constants';import { useEmailView } from '../email-view-context';import { EMAIL_TOUR } from '../tour';import type { EmailTab } from '../types';@@ -31,6 +36,23 @@ import { EmailInboxList } from './EmailInboxSelector';// Email is personal, so the sidebar lists only the user's own tags.const SIDEBAR_TAG_SCOPES: readonly TagScope[] = ['user'];+const PRIMARY_TAB_IDS = [+ 'favorites',+ 'drafts',+ 'sent',+ 'scheduled',+ 'reminders',+] as const satisfies readonly EmailTab[];+const LIBRARY_TAB_IDS = [+ 'all',+ 'archived',+ 'shared',+] as const satisfies readonly EmailTab[];+const DESKTOP_TAB_IDS = [+ 'important',+ ...PRIMARY_TAB_IDS,+ ...LIBRARY_TAB_IDS,+] as const;const TAB_ICONS: Record<EmailTab, Component<{ class?: string }>> = {important: SignalIcon,@@ -46,49 +68,89 @@ const TAB_ICONS: Record<EmailTab, Component<{ class?: string }>> = {all: EnvelopeIcon,};-function Tab(props: { item: EmailTabItem; onNavigate?: () => void }) {+function Tab(props: { id: EmailTab; label?: string; onNavigate?: () => void }) {const { state, setTab } = useEmailView();return (<ViewSidebar.Item- active={state.tab === props.item.id}+ active={state.tab === props.id}{...pressHandlers(() => {- setTab(props.item.id);+ setTab(props.id);props.onNavigate?.();})}><ViewSidebar.Icon>- <Dynamic component={TAB_ICONS[props.item.id]} class="size-4" />+ <Dynamic component={TAB_ICONS[props.id]} class="size-4" /></ViewSidebar.Icon>- <span class="truncate">{props.item.label}</span>+ <span class="truncate">{props.label ?? EMAIL_TAB_LABELS[props.id]}</span></ViewSidebar.Item>);}export function EmailNavigation(props: { onNavigate?: () => void }) {- const { state } = useEmailView();+ const { state, setTab } = useEmailView();const reminders = useFeatureFlag(enableReminders);+ const showTab = (id: EmailTab) =>+ id !== 'reminders' ||+ reminders().enabled ||+ (reminders().loading && state.tab === 'reminders');return (- <ViewSidebar.Nav aria-label="Email tabs">- <div- ref={tourTarget(EMAIL_TOUR.signalNoise)}- class="flex flex-col gap-(--sidebar-row-gap)"- >- <For each={EMAIL_TABS.slice(0, 2)}>- {(item) => <Tab item={item} onNavigate={props.onNavigate} />}+ <Show+ when={!isTouchDevice()}+ fallback={+ <ViewSidebar.Nav aria-label="Email tabs">+ <div+ ref={tourTarget(EMAIL_TOUR.signalNoise)}+ class="flex flex-col gap-(--sidebar-row-gap)"+ >+ <For each={EMAIL_TABS.slice(0, 2)}>+ {(item) => <Tab id={item.id} onNavigate={props.onNavigate} />}+ </For>+ </div>+ <For each={EMAIL_TABS.slice(2).filter((tab) => showTab(tab.id))}>+ {(item) => <Tab id={item.id} onNavigate={props.onNavigate} />}+ </For>+ </ViewSidebar.Nav>+ }+ >+ <ViewSidebar.Nav aria-label="Email tabs">+ <ViewSidebar.Item+ ref={tourTarget(EMAIL_TOUR.inbox)}+ active={state.tab === 'important' || state.tab === 'noise'}+ {...pressHandlers(() => {+ setTab(state.tab === 'noise' ? 'noise' : 'important');+ props.onNavigate?.();+ })}+ >+ <ViewSidebar.Icon>+ <TrayIcon class="size-4" />+ </ViewSidebar.Icon>+ <span class="truncate">Inbox</span>+ </ViewSidebar.Item>+ <For each={PRIMARY_TAB_IDS.filter(showTab)}>+ {(id) => <Tab id={id} onNavigate={props.onNavigate} />}</For>- </div>- <For- each={EMAIL_TABS.slice(2).filter(- (tab) =>- tab.id !== 'reminders' ||- reminders().enabled ||- (reminders().loading && state.tab === 'reminders')- )}- >- {(item) => <Tab item={item} onNavigate={props.onNavigate} />}- </For>- </ViewSidebar.Nav>+ </ViewSidebar.Nav>+ <section aria-label="Library" class="shrink-0">+ <h2 class="flex h-(--sidebar-row-height) items-center px-(--sidebar-item-inset) text-xs font-medium text-ink-muted">+ Library+ </h2>+ <ViewSidebar.Nav+ aria-label="Email library"+ class="pt-(--sidebar-section-content-gap)"+ >+ <For each={LIBRARY_TAB_IDS}>+ {(id) => (+ <Tab+ id={id}+ label={id === 'all' ? 'All mail' : undefined}+ onNavigate={props.onNavigate}+ />+ )}+ </For>+ </ViewSidebar.Nav>+ </section>+ </Show>);}@@ -98,6 +160,7 @@ export function EmailSidebar() {const { openWithSplit } = useSplitLayout();const {state,+ setState,setTab,showTags,isSidebarSectionOpen,@@ -108,13 +171,14 @@ export function EmailSidebar() {scopeId: panel.splitHotkeyScope,enabled: panel.isPanelActive,ids: () =>- EMAIL_TAB_IDS.filter(+ (isTouchDevice() ? EMAIL_TAB_IDS : DESKTOP_TAB_IDS).filter((id) =>id !== 'reminders' ||reminders().enabled ||(reminders().loading && state.tab === 'reminders')),- activeId: () => state.tab,+ activeId: () =>+ !isTouchDevice() && state.tab === 'noise' ? 'important' : state.tab,setActiveId: setTab,shouldHandleSequentialKeyEvent: (event) =>!(@@ -126,7 +190,17 @@ export function EmailSidebar() {return (<ViewSidebar.Root aria-label="Email navigation"><Show when={!isTouchDevice()}>- <ViewSidebar.Header>+ <ViewSidebar.Header+ searchLabel="Search email"+ search={() => (+ <SearchBar+ label="Search email"+ placeholder="Search email"+ value={state.search}+ onValueChange={(search) => setState('search', search)}+ />+ )}+ ><div class="flex min-w-0 items-center gap-1"><ViewSidebar.CloseButton class="shrink-0" /><ViewSidebar.Title>Email</ViewSidebar.Title>@@ -134,13 +208,24 @@ export function EmailSidebar() {</ViewSidebar.Header></Show>+ <Show when={!isTouchDevice()}>+ <ViewSidebar.Primary>+ <SidebarCreateButton+ label="New email"+ onCreate={() => composeEmail(openWithSplit, state.inboxIds)}+ />+ </ViewSidebar.Primary>+ </Show>+<ViewSidebar.Content><EmailInboxList />- <SidebarCreateButton- label="New email"- onCreate={() => composeEmail(openWithSplit, state.inboxIds)}- />+ <Show when={isTouchDevice()}>+ <SidebarCreateButton+ label="New email"+ onCreate={() => composeEmail(openWithSplit, state.inboxIds)}+ />+ </Show><EmailNavigation />diff --git a/apps/web/src/features/email-view/constants.ts b/apps/web/src/features/email-view/constants.tsindex 35b88556fd..506327ee36 100644--- a/apps/web/src/features/email-view/constants.ts+++ b/apps/web/src/features/email-view/constants.ts@@ -18,7 +18,7 @@ export const EMAIL_TAB_IDS = [export type EmailTab = (typeof EMAIL_TAB_IDS)[number];-const EMAIL_TAB_LABELS = {+export const EMAIL_TAB_LABELS = {important: 'Signal',noise: 'Noise',favorites: 'Favorites',diff --git a/apps/web/src/features/email-view/email-view-skeleton.tsx b/apps/web/src/features/email-view/email-view-skeleton.tsxindex d195a97824..861aa2a4fc 100644--- a/apps/web/src/features/email-view/email-view-skeleton.tsx+++ b/apps/web/src/features/email-view/email-view-skeleton.tsx@@ -5,7 +5,12 @@ export function EmailViewSkeleton() {return (<ViewSkeleton.Root asidePreferenceKey="email"><ViewSkeleton.Sidebar title="Email" createLabel="New email" />- <ViewSkeleton.Main title="Inbox" searchPlaceholder="Search email" />+ <ViewSkeleton.Main+ title="Inbox"+ tabs={['Signal', 'Noise']}+ controls={[2, 1, '+ New', 1]}+ searchPlaceholder="Search email"+ /></ViewSkeleton.Root>);}diff --git a/apps/web/src/features/email-view/email-view.tsx b/apps/web/src/features/email-view/email-view.tsxindex b041e18f81..5e704bccad 100644--- a/apps/web/src/features/email-view/email-view.tsx+++ b/apps/web/src/features/email-view/email-view.tsx@@ -25,11 +25,7 @@ import {Suspense,} from 'solid-js';import { EmailFilterDrawer } from './components/EmailFilterDrawer';-import {- EmailHeader,- EmailTopBar,- EmailViewBreadcrumbItem,-} from './components/EmailHeader';+import { EmailHeader, EmailViewBreadcrumbItem } from './components/EmailHeader';import { EmailList } from './components/EmailList';import { EmailReader } from './components/EmailReader';import { EmailSidebar } from './components/EmailSidebar';@@ -83,10 +79,10 @@ function EmailPanes(props: {const shell = useViewShell();const listColumn = (beside?: 'reader') => (<>- <EmailTopBar tabOnly={beside === 'reader'} />- <ViewShell.Header>- <EmailHeader onSearchEscape={props.focusList} />- </ViewShell.Header>+ <EmailHeader+ tabOnly={beside === 'reader'}+ onSearchEscape={props.focusList}+ /><ViewTour tour={emailTour} /><ViewShell.Content>{props.list}</ViewShell.Content></>diff --git a/apps/web/src/features/email-view/tour.ts b/apps/web/src/features/email-view/tour.tsindex e58d67cd86..faa02d0aa2 100644--- a/apps/web/src/features/email-view/tour.ts+++ b/apps/web/src/features/email-view/tour.ts@@ -3,6 +3,7 @@ import { defineViewTour } from '@app/features/tours/core/view-tour';import { defineTourTargets } from '@ui/components/Tour';export const EMAIL_TOUR = defineTourTargets('email', [+ 'inbox','signalNoise','tags','list',@@ -17,8 +18,8 @@ export const emailTour = defineViewTour({steps: [{target: EMAIL_TOUR.signalNoise,- entry: VIEW_SHELL_TOUR.sidebarToggle,- entryLabel: 'Show the email sidebar to continue',+ entry: EMAIL_TOUR.inbox,+ entryLabel: 'Open Inbox to continue',title: 'Find the signal in your inbox',description:'Signal keeps important conversations in focus. Noise gives lower-priority mail its own space, so you can catch up when it suits you.',diff --git a/apps/web/src/features/entity/EntitySelectionToolbarModal.tsx b/apps/web/src/features/entity/EntitySelectionToolbarModal.tsxindex 66566dcf24..3d25093cc5 100644--- a/apps/web/src/features/entity/EntitySelectionToolbarModal.tsx+++ b/apps/web/src/features/entity/EntitySelectionToolbarModal.tsx@@ -21,7 +21,7 @@ export const EntitySelectionToolbarModal = (<ScopedPortal scope="split"><Layer depth={2}><div class="absolute left-1/2 bottom-16 w-max max-w-[calc(100%-1rem)] -translate-x-1/2">- <div class="text-sm font-bold flex flex-wrap rounded-xl flex-row items-center gap-2 p-2 bg-surface border border-edge shadow-xl shadow-drop-shadow">+ <div class="menu-surface text-sm font-bold flex flex-wrap flex-row items-center gap-2 p-2"><Buttontype="button"size="icon-sm"diff --git a/apps/web/src/features/entity/bulk-edit/BulkRenameEntitiesView.tsx b/apps/web/src/features/entity/bulk-edit/BulkRenameEntitiesView.tsxindex 05f407fe03..9f7d2dcec7 100644--- a/apps/web/src/features/entity/bulk-edit/BulkRenameEntitiesView.tsx+++ b/apps/web/src/features/entity/bulk-edit/BulkRenameEntitiesView.tsx@@ -83,16 +83,8 @@ export const BulkRenameEntitiesView = (props: {aria-label="Rename mode"value={mode()}fullWidth- onChange={(next) => {- if (- next === 'prepend' ||- next === 'append' ||- next === 'replace' ||- next === 'total'- )- setMode(next);- }}- list={[+ onChange={setMode}+ options={[{ value: 'prepend', label: 'Prepend' },{ value: 'append', label: 'Append' },{ value: 'replace', label: 'Replace' },diff --git a/apps/web/src/features/entity/components/ProjectBreadCrumb.tsx b/apps/web/src/features/entity/components/ProjectBreadCrumb.tsxindex e426dfd45d..96fcd1e1cf 100644--- a/apps/web/src/features/entity/components/ProjectBreadCrumb.tsx+++ b/apps/web/src/features/entity/components/ProjectBreadCrumb.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import FolderIcon from '@phosphor/folder-simple.svg';import { useProjectPreviewQuery } from '@queries/storage/project-preview';import { cn, Tooltip } from '@ui';@@ -57,9 +58,7 @@ export function ProjectBreadCrumb(props: {})}><FolderIcon class="size-[1em]" />- <Suspense- fallback={<div class="h-1 w-10 bg-ink-placeholder animate-pulse" />}- >+ <Suspense fallback={<ListSkeleton.Bar class="h-2 w-10" />}><Show when={projectQuery.data}>{(data) => <Path path={data().path} />}</Show>diff --git a/apps/web/src/features/entity/composed/list-entity/foreign.tsx b/apps/web/src/features/entity/composed/list-entity/foreign.tsxindex d2ccc2f5cb..14790ad97c 100644--- a/apps/web/src/features/entity/composed/list-entity/foreign.tsx+++ b/apps/web/src/features/entity/composed/list-entity/foreign.tsx@@ -403,7 +403,7 @@ export function GithubPullRequestChecksIndicator(props: {onClick={(event) => event.stopPropagation()}><Surface- class="flex items-stretch justify-start rounded-xl w-full glass bg-menu-glass"+ class="menu-surface flex items-stretch justify-start w-full"depth={3}hideBorder>diff --git a/apps/web/src/features/gtm-invite/InviteWelcome.tsx b/apps/web/src/features/gtm-invite/InviteWelcome.tsxindex 178a3afdf4..1707802f21 100644--- a/apps/web/src/features/gtm-invite/InviteWelcome.tsx+++ b/apps/web/src/features/gtm-invite/InviteWelcome.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import { useAnalytics } from '@app/lib/analytics/analytics-context';import { NoiseBackground } from '@core/component/NoiseBackground';import { useIsAuthenticated } from '@core/context/user';@@ -140,8 +141,8 @@ export function InviteWelcome() {<Switch><Match when={view().kind === 'loading'}><div class="flex flex-col gap-3">- <div class="h-8 w-56 animate-pulse rounded-md bg-ink/10" />- <div class="h-4 w-80 max-w-full animate-pulse rounded-md bg-ink/10" />+ <ListSkeleton.Bar class="h-8 w-56 rounded-lg" />+ <ListSkeleton.Bar class="h-4 w-80 max-w-full" /></div></Match>diff --git a/apps/web/src/features/home/components/HomeListLayout.tsx b/apps/web/src/features/home/components/HomeListLayout.tsxindex fc789817f0..b0d23d08d7 100644--- a/apps/web/src/features/home/components/HomeListLayout.tsx+++ b/apps/web/src/features/home/components/HomeListLayout.tsx@@ -1,8 +1,10 @@+import { SearchBar } from '@app/components/view-shell';import { SidebarCreateHeader } from '@app/components/view-shell/SidebarCreateButton';import { MobileTopEdgeFade } from '@components/app/mobile/MobileEdgeFade';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { tourTarget } from '@ui/components/Tour';import { type JSX, type ParentProps, Show } from 'solid-js';+import { useHomeView } from '../home-view-context';import { HOME_TOUR } from '../tour';import { HomeFilterDropdown } from './HomeFilters';@@ -25,6 +27,7 @@ export function HomeListLayout(footer?: JSX.Element;}>) {+ const { state, setState } = useHomeView();return (<divref={tourTarget(HOME_TOUR.list)}@@ -41,6 +44,15 @@ export function HomeListLayout(label="New chat"onCreate={props.onNewChat}titleActions={<HomeFilterDropdown />}+ searchLabel="Search Home"+ search={() => (+ <SearchBar+ label="Search Home"+ placeholder="Search Home"+ value={state.search}+ onValueChange={(search) => setState('search', search)}+ />+ )}/>}>diff --git a/apps/web/src/features/home/components/HomeTabs.tsx b/apps/web/src/features/home/components/HomeTabs.tsxindex 1899be0ff3..6b125d7bff 100644--- a/apps/web/src/features/home/components/HomeTabs.tsx+++ b/apps/web/src/features/home/components/HomeTabs.tsx@@ -41,9 +41,9 @@ export function HomeTabs() {<div class="flex h-8 min-w-0 flex-1 items-center gap-3"><Tabsaria-label="Home views"- list={HOME_TABS}+ options={HOME_TABS}value={state.tab}- onChange={handleTabChange}+ onChange={setTab}/><HomeFilterDropdown /></div>diff --git a/apps/web/src/features/home/home-view.tsx b/apps/web/src/features/home/home-view.tsxindex 3910080f88..548c390cf9 100644--- a/apps/web/src/features/home/home-view.tsx+++ b/apps/web/src/features/home/home-view.tsx@@ -219,9 +219,18 @@ function HomeCalendarRouteContent() {<PreviewFramesplitPanelContext={panel}headerLeading={<HomeReturnBreadcrumb onReturn={closePreview} />}+ hideHeader={!isTouchDevice()}locationKey={() => `${search.eventId}:${search.occurrenceKey}`}>- <CalendarView route={homeCalendarRoute} refocus={calendarRefocus} />+ <CalendarView+ route={homeCalendarRoute}+ refocus={calendarRefocus}+ headerLeading={+ <Show when={!isTouchDevice()}>+ <HomeReturnBreadcrumb onReturn={closePreview} />+ </Show>+ }+ /></PreviewFrame></div>);diff --git a/apps/web/src/features/home/tour.ts b/apps/web/src/features/home/tour.tsindex e162d9f5a1..40dac1cba3 100644--- a/apps/web/src/features/home/tour.ts+++ b/apps/web/src/features/home/tour.ts@@ -33,7 +33,7 @@ export const homeTour = defineViewTour({target: VIEW_SHELL_TOUR.main,title: 'Start something new',description:- 'Choose New chat to work with an agent, or use Create in the sidebar to start a document, task, or conversation.',+ 'Choose New to work with an agent, or use Create in the sidebar to start a document, task, or conversation.',},],});diff --git a/apps/web/src/features/meetings/views/meeting-page.tsx b/apps/web/src/features/meetings/views/meeting-page.tsxindex 0bf6cef773..49d50c14d2 100644--- a/apps/web/src/features/meetings/views/meeting-page.tsx+++ b/apps/web/src/features/meetings/views/meeting-page.tsx@@ -4,7 +4,7 @@ import { fireAndForget } from '@core/util/fireAndForget';import { Telemetry } from '@macro-inc/observability';import ArrowLeft from '@phosphor/arrow-left.svg';import Phone from '@phosphor/phone-call.svg';-import { Button } from '@ui';+import { Button, Input } from '@ui';import {type Accessor,createEffect,@@ -299,8 +299,8 @@ export function MeetingPage(props: {><label class="flex flex-col gap-2 text-sm font-medium">Your name- <input- class="rounded-lg border border-edge-muted bg-input px-3 py-2.5 text-ink placeholder:text-ink-placeholder outline-none focus:border-accent"+ <Input+ size="lg"placeholder="Enter your name"autocomplete="name"value={name()}diff --git a/apps/web/src/features/next-soup/debug/DocumentWherePlayground.tsx b/apps/web/src/features/next-soup/debug/DocumentWherePlayground.tsxindex d652c711d7..c1d29f204f 100644--- a/apps/web/src/features/next-soup/debug/DocumentWherePlayground.tsx+++ b/apps/web/src/features/next-soup/debug/DocumentWherePlayground.tsx@@ -21,7 +21,7 @@ import type {SoupApiItem,SoupPage,} from '@service-storage/generated/schemas';-import { Button, InlineCheckbox, SegmentedControl } from '@ui';+import { Button, InlineCheckbox, Tabs } from '@ui';import { createMemo, createSignal, For, Show } from 'solid-js';type FilterTokenId =@@ -465,8 +465,10 @@ export default function DocumentWherePlayground() {<aside class="flex min-h-0 flex-col gap-4 border-edge-muted border-r p-4"><section class="space-y-2"><div class="text-sm font-medium">Endpoint</div>- <SegmentedControl- class="w-full"+ <Tabs+ aria-label="Endpoint"+ touch="segmented"+ fullWidthsize="sm"value={mode()}options={[diff --git a/apps/web/src/features/next-soup/soup-view/NewCallButton.tsx b/apps/web/src/features/next-soup/soup-view/NewCallButton.tsxindex bc5d63328c..6ac11e9f31 100644--- a/apps/web/src/features/next-soup/soup-view/NewCallButton.tsx+++ b/apps/web/src/features/next-soup/soup-view/NewCallButton.tsx@@ -2,6 +2,7 @@ import { joinChannelCall } from '@channel/Call/join-channel-call';import { NewMeetingButton } from '@channel/Call/NewMeetingButton';import { RecipientSelector } from '@core/component/RecipientSelector';import { toast } from '@core/component/Toast/Toast';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { useCombinedRecipients } from '@core/signal/useCombinedRecipient';import type { WithCustomUserInput } from '@core/user';import { getDestinationFromOptions } from '@core/util/destination';@@ -15,7 +16,7 @@ import { useNavigate } from '@solidjs/router';import { Button, Dialog, Surface } from '@ui';import { createSignal } from 'solid-js';-export function NewCallButton() {+export function NewCallButton(props: { presentation?: 'sidebar' | 'toolbar' }) {const navigate = useNavigate();const [isOpen, setIsOpen] = createSignal(false);const { all: destinationOptions } = useCombinedRecipients();@@ -85,6 +86,9 @@ export function NewCallButton() {return (<><NewMeetingButton+ presentation={+ isTouchDevice() ? undefined : (props.presentation ?? 'toolbar')+ }onChannelCall={() => setIsOpen(true)}onInstantCall={() => navigate('/meet/new')}/>diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/consolidated-filter-chip.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/consolidated-filter-chip.tsxindex f885a76d51..e790642246 100644--- a/apps/web/src/features/next-soup/soup-view/filters-bar/consolidated-filter-chip.tsx+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/consolidated-filter-chip.tsx@@ -66,7 +66,7 @@ interface ConsolidatedFilterChipProps {const ChipDivider = (props: { mobile?: boolean }) => (<Show when={!props.mobile}>- <div class="w-px self-stretch bg-edge-muted shrink-0" />+ <div class="w-px self-stretch bg-edge-divider shrink-0" /></Show>);@@ -101,7 +101,7 @@ const MultiValueDisplay = (props: { values: FilterValue[] }) => {</Show><span class="truncate max-w-32">{first()?.label}</span><Show when={overflowCount() > 0}>- <span class="inline-flex items-center justify-center px-1 min-w-4 h-4 rounded-full bg-ink/10 text-xxs">+ <span class="inline-flex items-center justify-center px-1 min-w-4 h-4 rounded-full bg-active text-xxs">+{overflowCount()}</span></Show>@@ -130,7 +130,7 @@ const PeopleMultiValueDisplay = (props: { values: FilterValue[] }) => {</Show><span class="truncate max-w-32">{first()?.label}</span><Show when={overflowCount() > 0}>- <span class="inline-flex items-center justify-center px-1 min-w-4 h-4 rounded-full bg-ink/10 text-xxs">+ <span class="inline-flex items-center justify-center px-1 min-w-4 h-4 rounded-full bg-active text-xxs">+{overflowCount()}</span></Show>@@ -315,7 +315,7 @@ const StandardValueSegment = (props: {'inline-flex items-center gap-1.5 px-2.5 h-auto!',props.mobile? 'bg-active hover:bg-active active:bg-active rounded-none px-3'- : 'hover:bg-ink/5 active:bg-ink/8 rounded-none',+ : 'hover:overlay-hover active:overlay-active rounded-none',props.class)}>@@ -337,10 +337,11 @@ export const ConsolidatedFilterChip = (props: ConsolidatedFilterChipProps) => {<Layer depth={2}><divclass={cn(- props.mobile ? 'h-10' : 'h-7',- 'flex items-stretch text-xs whitespace-nowrap rounded-md',- 'bg-surface text-ink border border-edge-muted overflow-clip',- props.mobile && 'bg-active border-none rounded-lg',+ 'flex items-stretch text-xs whitespace-nowrap text-ink overflow-clip',+ // Desktop chips share the control frame; touch keeps its filled chip.+ props.mobile+ ? 'h-10 bg-active rounded-lg'+ : 'h-6 rounded-full border border-edge-button bg-control not-touch:elevated',props.class)}>diff --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 d7a557fad0..05545dc07c 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@@ -26,8 +26,8 @@ export const GroupDropdown: Component<GroupDropdownProps> = (props) => {<Tooltip label="Group"><Dropdown.Triggervariant={props.variant ?? 'outline'}+ size={props.hideLabel ? 'icon-md' : 'sm'}depth={2}- 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/search/search-facet-chip.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/search/search-facet-chip.tsxindex daa99a6799..12559c4999 100644--- a/apps/web/src/features/next-soup/soup-view/filters-bar/search/search-facet-chip.tsx+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/search/search-facet-chip.tsx@@ -21,7 +21,7 @@ interface SearchFacetChipProps {}const ChipDivider = () => (- <div class="w-px self-stretch bg-edge-muted shrink-0" />+ <div class="w-px self-stretch bg-edge-divider shrink-0" />);const ValueDisplay = (props: { values: FacetOption[] }) => {@@ -42,7 +42,7 @@ const ValueDisplay = (props: { values: FacetOption[] }) => {</Show><span class="truncate max-w-32">{first()?.label}</span><Show when={overflowCount() > 0}>- <span class="inline-flex items-center justify-center px-1 min-w-4 h-4 rounded-full bg-ink/10 text-xxs">+ <span class="inline-flex items-center justify-center px-1 min-w-4 h-4 rounded-full bg-active text-xxs">+{overflowCount()}</span></Show>@@ -63,7 +63,7 @@ const SingleValueSegment = (props: {<Dropdown open={isOpen()} onOpenChange={setOpen}><Dropdown.Triggervariant="ghost"- class="inline-flex items-center gap-1.5 px-2 h-auto! hover:bg-ink/5 active:bg-ink/8 rounded-none"+ class="inline-flex items-center gap-1.5 px-2 h-auto! hover:overlay-hover active:overlay-active rounded-none"><ValueDisplay values={props.facet.values()} /></Dropdown.Trigger>@@ -104,7 +104,7 @@ const ModeSegment = (props: { mode: FacetModeVM }) => (<Dropdown><Dropdown.Triggervariant="ghost"- class="inline-flex items-center px-2 h-auto! text-ink-muted hover:bg-ink/5 active:bg-ink/8 rounded-none"+ class="inline-flex items-center px-2 h-auto! text-ink-muted hover:overlay-hover active:overlay-active rounded-none">{MODE_OPTIONS.find((o) => o.id === props.mode.value())?.label}</Dropdown.Trigger>@@ -165,7 +165,7 @@ const MultiValueSegment = (props: {*/export const SearchFacetChip = (props: SearchFacetChipProps) => (<Layer depth={2}>- <div class="h-7 flex items-stretch text-xs whitespace-nowrap rounded-md bg-surface text-ink border border-edge-muted overflow-clip">+ <div class="flex h-6 items-stretch overflow-clip whitespace-nowrap rounded-full border border-edge-button bg-control text-xs text-ink not-touch:elevated"><span class="inline-flex items-center px-2 text-ink-muted">{props.facet.label}</span>diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/sort-dropdown.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/sort-dropdown.tsxindex c4b881fcba..2928681342 100644--- a/apps/web/src/features/next-soup/soup-view/filters-bar/sort-dropdown.tsx+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/sort-dropdown.tsx@@ -4,7 +4,7 @@ import type {} from '@app/features/next-soup/soup-view/sort-options';import { TOKENS } from '@core/hotkey/tokens';import SortIcon from '@phosphor/sort-ascending.svg';-import { Dropdown, SingleSelectCheck, Tooltip } from '@ui';+import { Dropdown, SingleSelectCheck } from '@ui';import { type Component, For, Show } from 'solid-js';interface SortDropdownProps {@@ -29,12 +29,14 @@ export const SortDropdown: Component<SortDropdownProps> = (props) => {onOpenChange={props.onOpenChange}placement="bottom-start">- <Tooltip label="Sort" hotkey={TOKENS.soup.sort}>- <Dropdown.Trigger depth={2} class="bg-surface">- <SortIcon />- <span>Sort</span>- </Dropdown.Trigger>- </Tooltip>+ <Dropdown.Trigger+ variant="ghost"+ size="icon-md"+ label="Sort"+ hotkey={TOKENS.soup.sort}+ >+ <SortIcon />+ </Dropdown.Trigger><Dropdown.Content><Dropdown.Group><For each={options()}>diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/soup-active-filters-bar.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/soup-active-filters-bar.tsxindex 8dd5a3ad21..61e7e0eb5a 100644--- a/apps/web/src/features/next-soup/soup-view/filters-bar/soup-active-filters-bar.tsx+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/soup-active-filters-bar.tsx@@ -19,13 +19,8 @@ interface SoupActiveFiltersBarProps {* Contains filter chips on the left, and add/clear buttons on the right.*/const AddFilterButton = () => (- <Dropdown.Trigger- variant="ghost"- size="icon-sm"- tooltip="Add filters"- class="p-1"- >- <Plus class="size-3" />+ <Dropdown.Trigger variant="ghost" size="icon-sm" tooltip="Add filters">+ <Plus /></Dropdown.Trigger>);@@ -35,8 +30,9 @@ export function SoupActiveFiltersBar(props: SoupActiveFiltersBarProps) {return (<Show when={props.filters.length > 0}><Layer depth={0}>- <div class={cn('w-full p-2', props.class)}>- <div class="flex items-start p-2 border border-edge-muted bg-surface rounded-lg font-medium">+ {/* Chips sit directly below the header, like Linear's filter row. */}+ <div class={cn('w-full px-4 py-2', props.class)}>+ <div class="flex items-start font-medium">{/* Filter chips and add button - flex left */}<div class="flex items-center gap-2 flex-wrap flex-1 min-w-0"><For each={props.filters}>@@ -54,7 +50,6 @@ export function SoupActiveFiltersBar(props: SoupActiveFiltersBarProps) {onClick={() => props.onClearAll()}variant="outline"size="sm"- class="h-7"tooltip="Clear active filters"><XIcon />diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/soup-filters-bar.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/soup-filters-bar.tsxindex 8b4ee3f951..3fe23d534a 100644--- a/apps/web/src/features/next-soup/soup-view/filters-bar/soup-filters-bar.tsx+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/soup-filters-bar.tsx@@ -1,80 +1,42 @@import { SearchFiltersRow } from '@app/features/next-soup/soup-view/filters-bar/search/search-filters-row';import { SoupActiveFiltersBar } from '@app/features/next-soup/soup-view/filters-bar/soup-active-filters-bar';-import { SoupViewContextGroup } from '@app/features/next-soup/soup-view/filters-bar/soup-view-context-group';-import { SoupViewContextSort } from '@app/features/next-soup/soup-view/filters-bar/soup-view-context-sort';-import { UnifiedFilterDropdown } from '@app/features/next-soup/soup-view/filters-bar/unified-filter-dropdown';import { useFilterRefinements } from '@app/features/next-soup/soup-view/filters-bar/use-filter-refinements';-import { CollapsibleToolbarItem } from '@components/app/split-layout/components/CollapsibleItem';import { SplitToolbarLeft } from '@components/app/split-layout/components/SplitToolbar';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { isTouchDevice } from '@core/mobile/isTouchDevice';-import { createMemo, createSignal, Show } from 'solid-js';+import { createMemo, Show } from 'solid-js';+/**+ * The row below a desktop soup header: Search's facet row, or the active+ * filter chips. Filter, sort, and group live in the header's islands.+ */export function SoupFiltersBar(props: { variant?: 'default' | 'tag' }) {const { resetToTabDefaults, consolidatedFiltersList } =useFilterRefinements();- const [filterDropdownOpen, setFilterDropdownOpen] = createSignal(false);-const panel = useSplitPanelOrThrow();const isSearchView = createMemo(() => {const content = panel.handle.content();return content.type === 'component' && content.id === 'search';});- const isTagView = createMemo(() => props.variant === 'tag');-- // The inbox hides sort (it's fixed to updated_at for this view).- const isHomeView = createMemo(() => {- const content = panel.handle.content();- return content.type === 'component' && content.id === 'home';- });-- const CollapsibleGroup = () => (- <CollapsibleToolbarItem id="soup-toolbar-group" priority={0}>- {(isCollapsed) => <SoupViewContextGroup hideLabel={isCollapsed()} />}- </CollapsibleToolbarItem>- );-- const CollapsibleFilter = () => (- <CollapsibleToolbarItem id="soup-toolbar-filter" priority={1}>- {(isCollapsed) => (- <UnifiedFilterDropdown- open={filterDropdownOpen}- onOpenChange={setFilterDropdownOpen}- hideLabel={isCollapsed()}- />- )}- </CollapsibleToolbarItem>- );return (<Show when={!isTouchDevice()}>- <SplitToolbarLeft>- <Show- when={!isSearchView() && !isTagView()}- fallback={- <Show when={isTagView()} fallback={<SearchFiltersRow />}>- <Show when={!isHomeView()}>- <SoupViewContextSort />- </Show>- <CollapsibleGroup />- </Show>- }- >- <Show when={!isHomeView()}>- <SoupViewContextSort />+ <Show+ when={isSearchView()}+ fallback={+ <Show when={props.variant !== 'tag'}>+ <SoupActiveFiltersBar+ filters={consolidatedFiltersList()}+ onClearAll={resetToTabDefaults}+ /></Show>- <CollapsibleGroup />- <CollapsibleFilter />- </Show>- </SplitToolbarLeft>- {/* Active filters bar - shown below the toolbar when there are filters */}- <Show when={!isSearchView() && !isTagView()}>- <SoupActiveFiltersBar- filters={consolidatedFiltersList()}- onClearAll={resetToTabDefaults}- />+ }+ >+ <SplitToolbarLeft>+ <SearchFiltersRow />+ </SplitToolbarLeft></Show></Show>);diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/soup-view-search-bar.tsxindex 201ea907b7..44b8264a6c 100644--- a/apps/web/src/features/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx@@ -35,11 +35,10 @@ interface SoupSearchbarProps {initialValue?: string;}+// Both variants draw the shared SearchBar pill; they differ only in emphasis.const variantStyles: Record<SearchbarVariant, string> = {- filled:- 'bg-ink/5 text-ink-muted hover:bg-ink/7 hover:text-ink border-edge-muted focus-within:bg-ink/7 focus-within:text-ink focus-within:border-accent',- secondary:- 'bg-surface text-ink-muted border-edge-muted hover:text-ink focus-within:text-ink focus-within:border-accent',+ filled: 'text-ink-muted focus-within:text-ink',+ secondary: 'text-ink-muted hover:text-ink focus-within:text-ink',};export const SoupSearchbar = (props: SoupSearchbarProps) => {@@ -172,7 +171,7 @@ export const SoupSearchbar = (props: SoupSearchbarProps) => {><divclass={cn(- 'group w-full relative flex items-center gap-1 rounded-lg h-7 mobile:h-9 pl-1 pr-1 py-1 mobile:min-w-35 border text-xs',+ 'group w-full relative flex items-center gap-1.5 rounded-full h-8 mobile:h-9 px-3 mobile:min-w-35 border border-edge-button bg-control not-touch:elevated text-sm focus-within:ring-2 focus-within:ring-edge-muted',variantStyles[props.variant ?? 'secondary'])}>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 0668902218..33bbd3e61d 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@@ -716,8 +716,8 @@ export const UnifiedFilterDropdown = (<Tooltip label="Filter" hotkey={TOKENS.soup.filter}><Dropdown.Triggervariant={props.variant ?? 'outline'}+ size={props.hideLabel ? 'icon-md' : 'sm'}depth={2}- class={props.variant === 'ghost' ? undefined : 'bg-surface'}aria-label={props.hideLabel ? 'Filter' : undefined}><FilterIcon />diff --git a/apps/web/src/features/next-soup/soup-view/search-ask-ai-button.tsx b/apps/web/src/features/next-soup/soup-view/search-ask-ai-button.tsxindex 86d9ae7b16..6d51dcebb6 100644--- a/apps/web/src/features/next-soup/soup-view/search-ask-ai-button.tsx+++ b/apps/web/src/features/next-soup/soup-view/search-ask-ai-button.tsx@@ -46,10 +46,10 @@ export function SearchAskAiButton() {return (<Buttonvariant="ghost"- size="sm"+ size="md"depth={2}tooltip="Ask AI"- class="shrink-0 h-7 touch:h-9 gap-1.5 px-2"+ class="shrink-0"disabled={isAsking()}onClick={askAi}>diff --git a/apps/web/src/features/next-soup/soup-view/soup-view-create-button.tsx b/apps/web/src/features/next-soup/soup-view/soup-view-create-button.tsxindex 4def04690f..be1066f11b 100644--- a/apps/web/src/features/next-soup/soup-view/soup-view-create-button.tsx+++ b/apps/web/src/features/next-soup/soup-view/soup-view-create-button.tsx@@ -1,3 +1,4 @@+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import { isListViewID, type ListView } from '@app/constants/list-views';import {CREATABLE_BLOCKS,@@ -8,7 +9,6 @@ import {import { openCreateCompanyModal } from '@app/features/crm/creation-adapter';import { useHandleFileUpload } from '@app/util/handleFileUpload';import { openNewChannelModal } from '@channel/CreateChannelModal';-import { CollapsibleHeaderItem } from '@components/app/split-layout/components/CollapsibleItem';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import type { BlockName } from '@core/block';import { EntityIcon } from '@core/component/EntityIcon';@@ -18,10 +18,8 @@ import {openFolderPicker,} from '@core/util/upload';import BuildingsIcon from '@phosphor/buildings.svg';-import ChevronDownIcon from '@phosphor/caret-down.svg';-import PlusCircleIcon from '@phosphor/plus-circle.svg';import UploadIcon from '@phosphor/upload-simple.svg';-import { Button, cn, Dropdown } from '@ui';+import { Dropdown } from '@ui';import { createMemo, For, Show } from 'solid-js';import { NewCallButton } from './NewCallButton';import { useMaybeSoupView } from './soup-view-context';@@ -184,38 +182,22 @@ export const SoupViewCreateButton = () => {runCreateAction(option.id);};- const SingleOptionButton = (props: { hideLabel?: boolean }) => (- <Button- variant="accent"- class={cn(- 'border-0 px-3 py-2 pl-1 font-semibold',- props.hideLabel && 'pr-1'- )}- size="sm"+ const SingleOptionButton = () => (+ <ViewCreateButton+ presentation="toolbar"+ aria-label={createLabel()}onClick={() => handleSelect(options()[0])}- >- <PlusCircleIcon class="size-3.5 text-accent" />- <Show when={!props.hideLabel}>- <span>{createLabel()}</span>- </Show>- </Button>+ />);- const MultiOptionButton = (props: { hideLabel?: boolean }) => (- <Dropdown placement="bottom-start">+ const MultiOptionButton = () => (+ <Dropdown placement="bottom-end"><Dropdown.Trigger- variant="accent"- class={cn(- 'border-0 px-3 py-2 pl-1 font-semibold',- props.hideLabel && 'pr-1'- )}- >- <PlusCircleIcon class="size-3.5" />- <Show when={!props.hideLabel}>- <span>{createLabel()}</span>- </Show>- <ChevronDownIcon class="size-2.5" />- </Dropdown.Trigger>+ as={ViewCreateButton}+ presentation="toolbar"+ menu+ aria-label={createLabel()}+ /><Dropdown.Content><Dropdown.Group><For each={options()}>@@ -239,16 +221,9 @@ export const SoupViewCreateButton = () => {<NewCallButton /></Show><Show when={options().length > 0}>- <CollapsibleHeaderItem id="create-button" priority={2}>- {(isCollapsed) => (- <Show- when={options().length > 1}- fallback={<SingleOptionButton hideLabel={isCollapsed()} />}- >- <MultiOptionButton hideLabel={isCollapsed()} />- </Show>- )}- </CollapsibleHeaderItem>+ <Show when={options().length > 1} fallback={<SingleOptionButton />}>+ <MultiOptionButton />+ </Show></Show></>);diff --git a/apps/web/src/features/next-soup/soup-view/soup-view-tabs.tsx b/apps/web/src/features/next-soup/soup-view/soup-view-tabs.tsxindex 3a5aefb0db..4fb6f9a266 100644--- a/apps/web/src/features/next-soup/soup-view/soup-view-tabs.tsx+++ b/apps/web/src/features/next-soup/soup-view/soup-view-tabs.tsx@@ -21,12 +21,12 @@ import {} from '@app/features/next-soup/soup-view/tab-lists';import { PillTabs } from '@components/app/mobile/PillTabs';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';-import type { TabItem } from '@core/component/Tabs';-import { TabsInset } from '@core/component/TabsInset';-import { TabsInsetDropdown } from '@core/component/TabsInsetDropdown';import { useUserContext } from '@core/context/user';+import CaretDownIcon from '@phosphor/caret-down.svg';+import CheckIcon from '@phosphor/check.svg';import { useIsTeamAdmin } from '@queries/team/teams';-import { batch, createMemo, For, Match, Switch } from 'solid-js';+import { Dropdown, type TabOption, Tabs } from '@ui';+import { batch, createMemo, For, Match, Show, Switch } from 'solid-js';const useCurrentListView = () => {const panel = useSplitPanelOrThrow();@@ -46,7 +46,7 @@ const useCurrentListView = () => {* pills, and the number/cycle hotkeys — agrees on which tabs exist.*/export const useVisibleViewTabs = () => {- return (view: TabbedListView): TabItem[] => VIEW_TAB_LISTS[view];+ return (view: TabbedListView): TabOption<string>[] => VIEW_TAB_LISTS[view];};const PRESERVE_FILTERS_ON_TAB_CHANGE: ListView[] = [@@ -229,16 +229,17 @@ const ViewTabs = (props: { view: TabbedListView }) => {const visibleViewTabs = useVisibleViewTabs();return (- <TabsInset- list={visibleViewTabs(props.view)}- value={activeTab()}- defaultValue={VIEW_TAB_PRESETS[props.view].default}+ <Tabs+ aria-label="View tabs"+ class="shrink-0"+ options={visibleViewTabs(props.view)}+ value={activeTab() ?? VIEW_TAB_PRESETS[props.view].default}onChange={(value) => applyTabPreset(props.view, value)}/>);};-/** Compact dropdown variant of tabs, used when the header is too narrow for the full segmented control. */+/** The selected tab as a menu, for a header too narrow for every tab. */export const CollapsedSoupViewTabs = () => {const listView = useCurrentListView();const { applyTabPreset } = useApplyPreset();@@ -250,28 +251,43 @@ export const CollapsedSoupViewTabs = () => {return v && v in VIEW_TAB_LISTS ? (v as TabbedListView) : undefined;});- const list = createMemo(() => {+ const options = () => {const v = view();return v ? visibleViewTabs(v) : [];- });+ };- const defaultValue = createMemo(() => {+ const selected = () => {const v = view();- return v ? VIEW_TAB_PRESETS[v].default : undefined;- });+ const value = activeTab() ?? (v ? VIEW_TAB_PRESETS[v].default : undefined);+ return options().find((option) => option.value === value) ?? options()[0];+ };return (- <TabsInsetDropdown- list={list()}- value={activeTab()}- defaultValue={defaultValue()}- onChange={(value) => {- const v = view();- if (v) {- applyTabPreset(v, value);- }- }}- />+ <Dropdown placement="bottom-start">+ <Dropdown.Trigger variant="outline" size="md">+ {selected()?.label}+ <CaretDownIcon class="size-3 text-ink-extra-muted" />+ </Dropdown.Trigger>+ <Dropdown.Content>+ <Dropdown.Group>+ <For each={options()}>+ {(option) => (+ <Dropdown.Item+ onSelect={() => {+ const v = view();+ if (v) applyTabPreset(v, option.value);+ }}+ >+ <span class="flex-1 truncate">{option.label}</span>+ <Show when={selected()?.value === option.value}>+ <CheckIcon class="size-3.5 text-accent" />+ </Show>+ </Dropdown.Item>+ )}+ </For>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>);};diff --git a/apps/web/src/features/next-soup/soup-view/soup-view.tsx b/apps/web/src/features/next-soup/soup-view/soup-view.tsxindex 250e5937e1..6fb058dfd2 100644--- a/apps/web/src/features/next-soup/soup-view/soup-view.tsx+++ b/apps/web/src/features/next-soup/soup-view/soup-view.tsx@@ -1,3 +1,4 @@+import { ListHeaderSearch } from '@app/components/view-shell/ListHeader';import { LIST_VIEW_DOCS_URL } from '@app/constants/docs-links';import { isListViewID, type ListView } from '@app/constants/list-views';import { SoupChatInput } from '@app/features/chat/SoupChatInput';@@ -21,7 +22,10 @@ import {} from '@app/features/next-soup/soup-view/empty-states';import { InboxSelector } from '@app/features/next-soup/soup-view/filters-bar/inbox-selector';import { SoupFiltersBar } from '@app/features/next-soup/soup-view/filters-bar/soup-filters-bar';+import { SoupViewContextGroup } from '@app/features/next-soup/soup-view/filters-bar/soup-view-context-group';+import { SoupViewContextSort } from '@app/features/next-soup/soup-view/filters-bar/soup-view-context-sort';import { SoupSearchbar } from '@app/features/next-soup/soup-view/filters-bar/soup-view-search-bar';+import { UnifiedFilterDropdown } from '@app/features/next-soup/soup-view/filters-bar/unified-filter-dropdown';import { useFilterRefinements } from '@app/features/next-soup/soup-view/filters-bar/use-filter-refinements';import { SoupSectionHeader } from '@app/features/next-soup/soup-view/section-header';import {@@ -57,6 +61,7 @@ import {import { DEBUG_SETTING_KEYS, useDebugSetting } from '@app/lib/debugSettings';import { usePreference } from '@app/preferences/use-preference';import { useGlobalNotificationSource } from '@components/app/GlobalAppState';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { PullToRefresh } from '@components/app/mobile/PullToRefresh';import { SwipableRowProvider } from '@components/app/mobile/SwipableRow';import { CollapsibleHeaderItem } from '@components/app/split-layout/components/CollapsibleItem';@@ -96,11 +101,10 @@ import CaretDownIcon from '@phosphor/caret-down.svg';import ChevronRightIcon from '@phosphor/caret-right.svg';import CheckIcon from '@phosphor/check.svg';import InfoIcon from '@phosphor/info.svg';-import SearchIcon from '@phosphor/magnifying-glass.svg';import Spinner from '@phosphor/spinner.svg';import { createElementSize } from '@solid-primitives/resize-observer';import { debounce } from '@solid-primitives/scheduled';-import { Button, cn, Layer, Tooltip } from '@ui';+import { Button, cn, Layer } from '@ui';import { tourTarget } from '@ui/components/Tour';import {type Accessor,@@ -368,8 +372,8 @@ export const SoupView = (props: SoupViewProps) => {return view ? LIST_VIEW_DOCS_URL[view] : undefined;});- const [narrowSearchExpanded, setNarrowSearchExpanded] = createSignal(false);- const [searchIsCollapsed, setSearchIsCollapsed] = createSignal(false);+ const [filterOpen, setFilterOpen] = createSignal(false);+ let focusSearch: (() => void) | undefined;registerHotkey({hotkey: 'cmd+f',@@ -378,8 +382,9 @@ export const SoupView = (props: SoupViewProps) => {registrationType: 'add',description: 'Search',keyDownHandler: () => {- if (narrowSearchExpanded() || !searchIsCollapsed()) return false;- setNarrowSearchExpanded(true);+ // The Search view's own field owns the shortcut.+ if (isTouchDevice() || isComponentListView('search')) return false;+ focusSearch?.();return true;},});@@ -396,8 +401,7 @@ export const SoupView = (props: SoupViewProps) => {class={cn('h-full flex gap-3 @max-[380px]/split-header:gap-2 items-center',{- 'shrink-0': !isTouchDevice() && !narrowSearchExpanded(),- 'flex-1 min-w-0': !isTouchDevice() && narrowSearchExpanded(),+ 'shrink-0': !isTouchDevice(),'w-full flex-1 min-w-0': isTouchDevice(),})}@@ -408,27 +412,25 @@ export const SoupView = (props: SoupViewProps) => {<Show when={isTouchDevice()}><MobileSoupViewTabs /></Show>- <Show when={!isTouchDevice() && !narrowSearchExpanded()}>+ <Show when={!isTouchDevice()}><div class="flex items-center gap-1"><span class="text-sm font-semibold">{props.viewName}</span><Show when={docsUrl()}>{(url) => (<Button- size="icon-md"+ size="icon-sm"variant="ghost"- class="p-0.5 text-ink-extra-muted hover:text-ink-muted @max-[380px]/split-header:hidden"+ class="@max-[380px]/split-header:hidden"label="View documentation"onClick={() => openExternalUrl(url())}>- <InfoIcon class="size-3.5" />+ <InfoIcon /></Button>)}</Show></div></Show>- <Show- when={!narrowSearchExpanded() && !isComponentListView('search')}- >+ <Show when={!isComponentListView('search')}><Show when={!isTouchDevice()}><CollapsibleHeaderItemid="tabs"@@ -446,40 +448,13 @@ export const SoupView = (props: SoupViewProps) => {</CollapsibleHeaderItem></Show></Show>- <Show- when={- !isTouchDevice() &&- !narrowSearchExpanded() &&- isComponentListView('mail')- }- >+ <Show when={!isTouchDevice() && isComponentListView('mail')}><InboxSelector /></Show></div></SplitHeaderLeft><Show when={!isTouchDevice()}><SplitHeaderRight>- <Show- when={- !narrowSearchExpanded() &&- !isComponentListView('search') &&- props.showCreateButton !== false- }- >- <SoupViewCreateButton />- </Show>- <Show when={narrowSearchExpanded()}>- <Layer depth={2}>- <div class="flex-1 min-w-0">- <SoupSearchbar- variant="secondary"- autoFocus- initialValue={props.initialSearchText}- onDismiss={() => setNarrowSearchExpanded(false)}- />- </div>- </Layer>- </Show><Showwhen={!isComponentListView('search')}fallback={@@ -497,47 +472,32 @@ export const SoupView = (props: SoupViewProps) => {</>}>- <Show when={!narrowSearchExpanded()}>- <CollapsibleHeaderItem- id="search"- priority={0}- onCollapsedChange={(isCollapsed) => {- setSearchIsCollapsed(isCollapsed);- if (!isCollapsed) setNarrowSearchExpanded(false);- }}- >- {(isCollapsed) => (- <Show- when={!isCollapsed()}- fallback={- <Tooltip- label="Search"- hotkey={TOKENS.soup.openSearch}- >- <Button- size="icon-md"- variant="outline"- class="p-1 size-7 ml-2"- onClick={() => setNarrowSearchExpanded(true)}- depth={2}- >- <SearchIcon class="size-4 touch:size-6" />- </Button>- </Tooltip>- }- >- <Layer depth={2}>- <div class="w-60 ml-2">- <SoupSearchbar- variant="secondary"- initialValue={props.initialSearchText}- />- </div>- </Layer>- </Show>- )}- </CollapsibleHeaderItem>+ <Show when={props.filterBarVariant !== 'tag'}>+ <HeaderActionGroup label="Filters">+ <UnifiedFilterDropdown+ hideLabel+ variant="ghost"+ open={filterOpen}+ onOpenChange={setFilterOpen}+ />+ </HeaderActionGroup>+ </Show>+ <HeaderActionGroup label="View options">+ <Show when={!isComponentListView('home')}>+ <SoupViewContextSort />+ </Show>+ <SoupViewContextGroup hideLabel variant="ghost" />+ </HeaderActionGroup>+ <Show when={props.showCreateButton !== false}>+ <SoupViewCreateButton /></Show>+ <ListHeaderSearch+ label={`Search ${props.viewName}`}+ value={soupView.searchText()}+ onValueChange={soupView.setSearchText}+ onEscape={() => panel.panelRef()?.focus()}+ registerFocus={(focus) => (focusSearch = focus)}+ /></Show></SplitHeaderRight></Show>diff --git a/apps/web/src/features/next-soup/soup-view/tab-lists.ts b/apps/web/src/features/next-soup/soup-view/tab-lists.tsindex 16ca571521..cead7ef495 100644--- a/apps/web/src/features/next-soup/soup-view/tab-lists.ts+++ b/apps/web/src/features/next-soup/soup-view/tab-lists.ts@@ -1,5 +1,5 @@import type { ListView } from '@app/constants/list-views';-import type { TabItem } from '@core/component/Tabs';+import type { TabOption } from '@ui';/** Views that have tab definitions. Shared between VIEW_TAB_LISTS and VIEW_TAB_PRESETS. */export type TabbedListView = Extract<@@ -15,7 +15,7 @@ export type TabbedListView = Extract<>;/** Tab definitions for each list view. */-export const VIEW_TAB_LISTS: Record<TabbedListView, TabItem[]> = {+export const VIEW_TAB_LISTS: Record<TabbedListView, TabOption<string>[]> = {home: [{ value: 'signal', label: 'Signal' },{ value: 'noise', label: 'Noise' },diff --git a/apps/web/src/features/projects/primitives/project-collection.ts b/apps/web/src/features/projects/primitives/project-collection.tsindex 279999cb25..4e5a483bc4 100644--- a/apps/web/src/features/projects/primitives/project-collection.ts+++ b/apps/web/src/features/projects/primitives/project-collection.ts@@ -53,12 +53,15 @@ export function createProjectCollection(capabilities: {onOpen?: (id: string, metadata?: ProjectListActivation) => void;initialState?: ProjectCollectionSnapshot;captureState?: (read: Accessor<ProjectCollectionSnapshot>) => void;+ search?: { value: Accessor<string>; onChange: (value: string) => void };}) {const initial = capabilities.initialState;const [layout, setLayout] = createSignal<'list' | 'gantt'>(initial?.layout ?? 'list');- const [search, setSearch] = createSignal(initial?.search ?? '');+ const [localSearch, setLocalSearch] = createSignal(initial?.search ?? '');+ const search = capabilities.search?.value ?? localSearch;+ const setSearch = capabilities.search?.onChange ?? setLocalSearch;const query = debouncedDependent(search, 150);const [status, setStatus] = createSignal(initial?.status ?? '');const [priority, setPriority] = createSignal(initial?.priority ?? '');diff --git a/apps/web/src/features/projects/project-detail.tsx b/apps/web/src/features/projects/project-detail.tsxindex d2e408c6fd..329b824759 100644--- a/apps/web/src/features/projects/project-detail.tsx+++ b/apps/web/src/features/projects/project-detail.tsx@@ -17,7 +17,6 @@ import {useSplitDisplayName,useSplitPanelOrThrow,} from '@components/app/split-layout/layoutUtils';-import { TabsInset } from '@core/component/TabsInset';import { toast } from '@core/component/Toast/Toast';import { ShareTrigger } from '@core/component/TopBar/ShareButton';import { isTouchDevice } from '@core/mobile/isTouchDevice';@@ -25,7 +24,7 @@ import { fireAndForget } from '@core/util/fireAndForget';import StackIcon from '@phosphor/stack.svg';import { SYSTEM_PROPERTY_IDS } from '@property/identifiers';import type { Property } from '@property/types';-import { Button } from '@ui';+import { Button, Tabs } from '@ui';import { createSignal, Match, Show, Suspense, Switch } from 'solid-js';import type { TaskCreateOptions } from '../tasks-view/types';import { DeleteProjectsDialog } from './components/delete-projects-dialog';@@ -259,15 +258,16 @@ function ProjectDetailHost(props: ProjectDetailProps) {</Show>}navigation={- <TabsInset- list={[+ <Tabs+ aria-label="Project sections"+ touch="inset"+ class="shrink-0"+ options={[{ 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"+ onChange={section}/>}>diff --git a/apps/web/src/features/projects/projects.test.tsx b/apps/web/src/features/projects/projects.test.tsxindex fded85fce5..520d63b5ba 100644--- a/apps/web/src/features/projects/projects.test.tsx+++ b/apps/web/src/features/projects/projects.test.tsx@@ -44,6 +44,9 @@ vi.mock('./project-collection-persistence', () => ({}));vi.mock('./project-share', () => ({}));vi.mock('./views/project-assignment', () => ({}));vi.mock('./views/projects-collection', () => ({}));+vi.mock('@app/features/tasks-view/tasks-create-action', () => ({+ TasksCreateAction: () => null,+}));vi.mock('@queries/activity/push-registry', () => ({registerActivityRevalidator: () => () => {},revalidateActivityQueries: async () => {},diff --git a/apps/web/src/features/projects/projects.tsx b/apps/web/src/features/projects/projects.tsxindex 7029855cec..71a032bb73 100644--- a/apps/web/src/features/projects/projects.tsx+++ b/apps/web/src/features/projects/projects.tsx@@ -3,6 +3,7 @@ import {makeCopyEntityIdAction,makeCopyLinkAction,} from '@app/features/next-soup/actions';+import { TasksCreateAction } from '@app/features/tasks-view/tasks-create-action';import { ShowFeatureFlag, useFeatureFlag } from '@app/lib/analytics/posthog';import { createSearchParams } from '@app/lib/split-router';import { globalSplitManager } from '@app/signal/splitLayout';@@ -13,6 +14,7 @@ import {} from '@components/app/split-layout/layoutUtils';import { enableGantt, enableProjects } from '@core/constant/featureFlags';import { useUserId } from '@core/context/user';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { fireAndForget } from '@core/util/fireAndForget';import { usePropertyUserDisplay } from '@property/hooks/usePropertyUserDisplay';import { queryClient } from '@queries/client';@@ -100,9 +102,12 @@ function ProjectsContent(props: ParentProps) {);}-export function ProjectsTab(props: {+type ProjectsTabProps = {onOpen: (id: string, event?: MouseEvent, newSplit?: boolean) => void;-}) {+ search?: Parameters<typeof createProjectCollection>[0]['search'];+};++export function ProjectsTab(props: ProjectsTabProps) {return (<Projects><ProjectsCollectionHost {...props} />@@ -118,9 +123,7 @@ export function ProjectsSidebarSection(props: ProjectsSidebarProps) {);}-function ProjectsCollectionHost(props: {- onOpen: (id: string, event?: MouseEvent, newSplit?: boolean) => void;-}) {+function ProjectsCollectionHost(props: ProjectsTabProps) {const panel = useSplitPanelOrThrow();const layout = useSplitLayout();const context = useProjectsContext();@@ -146,6 +149,7 @@ function ProjectsCollectionHost(props: {createProjectCollection({...createProjectCollectionPersistence(panel.handle),createSource: context.createCollectionSource,+ search: props.search,userId: context.userId,onOpen: (id, metadata) => activation.current?.(id, metadata),})@@ -172,6 +176,11 @@ function ProjectsCollectionHost(props: {return (<><ProjectsCollection+ createAction={+ <Show when={!isTouchDevice()}>+ <TasksCreateAction presentation="toolbar" projectsEnabled />+ </Show>+ }onOpen={open}collection={displayCollection}ganttEnabled={ganttFlag().enabled}diff --git a/apps/web/src/features/projects/views/projects-collection.test.tsx b/apps/web/src/features/projects/views/projects-collection.test.tsxindex 6c54a5fd44..d9fb752864 100644--- a/apps/web/src/features/projects/views/projects-collection.test.tsx+++ b/apps/web/src/features/projects/views/projects-collection.test.tsx@@ -75,6 +75,10 @@ vi.mock('@app/components/view-shell', () => ({),useViewControlHotkeys: () => {},}));+vi.mock('@app/components/view-shell/ListHeader', () => ({+ ListHeader: (props: ParentProps) => props.children,+ ListHeaderSearch: () => null,+}));vi.mock('@app/components/view-shell/SidebarCreateButton', () => ({SidebarCreateButton: () => null,}));diff --git a/apps/web/src/features/projects/views/projects-collection.tsx b/apps/web/src/features/projects/views/projects-collection.tsxindex 003880ea69..4b92d385a6 100644--- a/apps/web/src/features/projects/views/projects-collection.tsx+++ b/apps/web/src/features/projects/views/projects-collection.tsx@@ -4,7 +4,6 @@ import { ganttGroupPlacement } from '@app/components/gantt/gantt-group-placementimport { useListInteractions } from '@app/components/list';import { ListViewport } from '@app/components/list/ListViewport';import {- ListFilterCountBadge,ListFilterDropdown,type ListFilterGroup,ListGroupDropdown,@@ -14,20 +13,25 @@ import {ViewLayoutDropdown,ViewShell,} from '@app/components/view-shell';+import {+ ListHeader,+ ListHeaderSearch,+} from '@app/components/view-shell/ListHeader';import { SidebarCreateButton } from '@app/components/view-shell/SidebarCreateButton';+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';import {getSoupMenuEntities,getSoupRowEntities,} from '@app/features/soup/collection/rows';import { TaskGroupHeader } from '@app/features/tasks-view/components/task-list/TaskGroupHeader';import { taskGridColumnCount } from '@app/features/tasks-view/components/task-list/task-grid-template';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { toast } from '@core/component/Toast/Toast';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { compareDateDesc } from '@core/util/date';import { fireAndForget } from '@core/util/fireAndForget';import { EntitySelectionToolbarModal } from '@entity/EntitySelectionToolbarModal';import CalendarIcon from '@phosphor/calendar.svg';-import PlusIcon from '@phosphor/plus.svg';import SpinnerIcon from '@phosphor/spinner.svg';import { PropertyValueIcon } from '@property/component/propertyValue';import {@@ -75,6 +79,7 @@ export function ProjectsCollection(props: {onOpen(id: string, metadata?: ProjectListActivation): void;createAssigneeName: (id: Accessor<string>) => Accessor<string>;onCreate(draft?: ProjectComposerDraft): void;+ createAction?: JSX.Element;scopeId: string;isActive: Accessor<boolean>;collection: ReturnType<typeof createProjectCollection>;@@ -94,6 +99,7 @@ export function ProjectsCollection(props: {let grid: HTMLDivElement | undefined;let timeline: HTMLDivElement | undefined;let searchInput: HTMLInputElement | undefined;+ let focusSearch: (() => void) | undefined;const [openMenu, setOpenMenu] = createSignal<'filters' | 'sort'>();const isGantt = () =>props.ganttEnabled && !isTouchDevice() && collection.layout() === 'gantt';@@ -388,7 +394,8 @@ export function ProjectsCollection(props: {search: {description: 'Search projects',run: () => {- searchInput?.focus();+ if (isTouchDevice()) searchInput?.focus();+ else focusSearch?.();return true;},},@@ -426,147 +433,187 @@ export function ProjectsCollection(props: {const state = collection.state();return state.kind === 'ready' ? state.backgroundError : undefined;};+ const layoutControl = () => (+ <Show when={!isTouchDevice()}>+ <ViewLayoutDropdown+ label="Project layout"+ layouts={props.ganttEnabled ? ['list', 'gantt'] : ['list']}+ value={isGantt() ? 'gantt' : 'list'}+ onChange={(layout) => {+ if (layout !== 'board') collection.setLayout(layout);+ }}+ />+ </Show>+ );+ const sortControl = () => (+ <ListSortDropdown+ label="Sort projects"+ value={collection.sort()}+ options={[+ { id: 'updated', label: 'Updated' },+ { id: 'created', label: 'Created' },+ ]}+ onChange={collection.setSort}+ open={openMenu() === 'sort'}+ onOpenChange={(open) => setOpenMenu(open ? 'sort' : undefined)}+ />+ );+ const groupControl = () => (+ <ListGroupDropdown+ label="Group projects"+ value={collection.groupBy()}+ options={[+ { id: 'none', label: 'None' },+ { id: 'status', label: 'Status' },+ { id: 'priority', label: 'Priority' },+ { id: 'assignee', label: 'Assignee' },+ ]}+ onChange={collection.setGroupBy}+ />+ );+ const filterControl = () => (+ <div class="relative shrink-0">+ <ListFilterDropdown+ label="Filter projects"+ groups={filters()}+ open={openMenu() === 'filters'}+ onOpenChange={(open) => setOpenMenu(open ? 'filters' : undefined)}+ isSelected={(group, id) =>+ group === 'assignee'+ ? collection.mine()+ : (group === 'status'+ ? collection.status()+ : collection.priority()) === id+ }+ onSelectionChange={(group, id, selected) => {+ if (group === 'assignee') collection.setMine(selected);+ else if (group === 'status') collection.setStatus(selected ? id : '');+ else collection.setPriority(selected ? id : '');+ }}+ onClear={clearFilters}+ />+ <Show when={activeCount()}>+ <span class="pointer-events-none absolute -top-0.5 right-0 z-10 flex size-4 translate-x-1/2 not-touch:top-0.5 not-touch:right-0.5 not-touch:size-3.5 not-touch:translate-x-0 items-center justify-center rounded-full bg-accent text-xxs font-medium leading-none text-surface">+ {activeCount()}+ </span>+ </Show>+ </div>+ );+ const dueDateControl = () => (+ <Dropdown>+ <Dropdown.Trigger variant="ghost" size="icon-md" label="Filter due date">+ <CalendarIcon />+ </Dropdown.Trigger>+ <Dropdown.Content>+ <div class="flex flex-col gap-3 p-2">+ <label class="flex flex-col gap-1 text-xs">+ From+ <Input+ type="date"+ value={collection.dueAfter()}+ onInput={(event) =>+ collection.setDueAfter(event.currentTarget.value)+ }+ />+ </label>+ <label class="flex flex-col gap-1 text-xs">+ Through+ <Input+ type="date"+ value={collection.dueBefore()}+ onInput={(event) =>+ collection.setDueBefore(event.currentTarget.value)+ }+ />+ </label>+ <Button+ size="sm"+ onClick={() => {+ collection.setDueAfter('');+ collection.setDueBefore('');+ }}+ >+ Clear dates+ </Button>+ </div>+ </Dropdown.Content>+ </Dropdown>+ );return (<>- <ViewShell.Header>- <div class="flex min-w-0 flex-col gap-3">- <div class="hidden h-8 min-w-0 items-center touch:flex @max-[720px]/view-shell:flex">- <h1 class="min-w-0 truncate text-xl font-semibold tracking-[-0.03em] text-ink">- Projects- </h1>- <div class="ml-auto shrink-0">- <SidebarCreateButton- label="New"- onCreate={() => props.onCreate()}+ <Show+ when={isTouchDevice()}+ fallback={+ <ListHeader+ title={+ <h1 class="truncate text-sm font-semibold tracking-[-0.03em] text-ink">+ Projects+ </h1>+ }+ >+ <HeaderActionGroup label="Project filters">+ {filterControl()}+ {dueDateControl()}+ </HeaderActionGroup>+ <HeaderActionGroup label="Project view options">+ {layoutControl()}+ {sortControl()}+ {groupControl()}+ </HeaderActionGroup>+ {props.createAction ?? (+ <ViewCreateButton+ aria-label="New project"+ onClick={() => props.onCreate()}/>- </div>- </div>- <div class="flex min-w-0 items-center justify-between gap-3">- <SearchBar- ref={(element) => {- searchInput = element;- }}+ )}+ <ListHeaderSearchlabel="Search projects"- placeholder="Search projects"value={collection.search()}onValueChange={collection.setSearch}onEscape={() => grid?.focus()}- class="max-w-md flex-1"- hotkey="cmd+f"+ registerFocus={(focus) => {+ focusSearch = focus;+ }}/>- <div class="flex shrink-0 items-center gap-2">- <Show when={!isTouchDevice()}>- <ViewLayoutDropdown- label="Project layout"- layouts={props.ganttEnabled ? ['list', 'gantt'] : ['list']}- value={isGantt() ? 'gantt' : 'list'}- onChange={(layout) => {- if (layout !== 'board') collection.setLayout(layout);- }}+ </ListHeader>+ }+ >+ <ViewShell.Header>+ <div class="flex min-w-0 flex-col gap-3">+ <div class="hidden h-8 min-w-0 items-center touch:flex @max-[720px]/view-shell:flex">+ <h1 class="min-w-0 truncate text-xl font-semibold tracking-[-0.03em] text-ink">+ Projects+ </h1>+ <div class="ml-auto shrink-0">+ <SidebarCreateButton+ label="New"+ onCreate={() => props.onCreate()}/>- </Show>- <ListSortDropdown- label="Sort projects"- value={collection.sort()}- options={[- { id: 'updated', label: 'Updated' },- { id: 'created', label: 'Created' },- ]}- onChange={collection.setSort}- open={openMenu() === 'sort'}- onOpenChange={(open) => setOpenMenu(open ? 'sort' : undefined)}- />- <ListGroupDropdown- label="Group projects"- value={collection.groupBy()}- options={[- { id: 'none', label: 'None' },- { id: 'status', label: 'Status' },- { id: 'priority', label: 'Priority' },- { id: 'assignee', label: 'Assignee' },- ]}- onChange={collection.setGroupBy}+ </div>+ </div>+ <div class="flex min-w-0 items-center justify-between gap-3">+ <SearchBar+ ref={(element) => {+ searchInput = element;+ }}+ label="Search projects"+ placeholder="Search projects"+ value={collection.search()}+ onValueChange={collection.setSearch}+ onEscape={() => grid?.focus()}+ class="max-w-md flex-1"+ hotkey="cmd+f"/>- <div class="relative shrink-0">- <ListFilterDropdown- label="Filter projects"- groups={filters()}- open={openMenu() === 'filters'}- onOpenChange={(open) =>- setOpenMenu(open ? 'filters' : undefined)- }- isSelected={(group, id) =>- group === 'assignee'- ? collection.mine()- : (group === 'status'- ? collection.status()- : collection.priority()) === id- }- onSelectionChange={(group, id, selected) => {- if (group === 'assignee') collection.setMine(selected);- else if (group === 'status')- collection.setStatus(selected ? id : '');- else collection.setPriority(selected ? id : '');- }}- onClear={clearFilters}- />- <ListFilterCountBadge count={activeCount()} />+ <div class="ml-auto flex shrink-0 items-center gap-2">+ {sortControl()}+ {groupControl()}+ {filterControl()}+ {dueDateControl()}</div>- <Dropdown>- <Dropdown.Trigger- variant="ghost"- size="md"- square- label="Filter due date"- >- <CalendarIcon />- </Dropdown.Trigger>- <Dropdown.Content>- <div class="flex flex-col gap-3 p-2">- <label class="flex flex-col gap-1 text-xs">- From- <Input- type="date"- value={collection.dueAfter()}- onInput={(event) =>- collection.setDueAfter(event.currentTarget.value)- }- />- </label>- <label class="flex flex-col gap-1 text-xs">- Through- <Input- type="date"- value={collection.dueBefore()}- onInput={(event) =>- collection.setDueBefore(event.currentTarget.value)- }- />- </label>- <Button- size="sm"- onClick={() => {- collection.setDueAfter('');- collection.setDueBefore('');- }}- >- Clear dates- </Button>- </div>- </Dropdown.Content>- </Dropdown>- <Button- variant="outline"- class="touch:hidden @max-[720px]/view-shell:hidden"- onClick={() => props.onCreate()}- >- <PlusIcon class="size-4" />- New project- </Button></div></div>- </div>- </ViewShell.Header>+ </ViewShell.Header>+ </Show><ViewShell.Content><Showwhen={isGantt()}diff --git a/apps/web/src/features/property/component/modal/CreatePropertyModal.tsx b/apps/web/src/features/property/component/modal/CreatePropertyModal.tsxindex 962bce164e..959c8f57a1 100644--- a/apps/web/src/features/property/component/modal/CreatePropertyModal.tsx+++ b/apps/web/src/features/property/component/modal/CreatePropertyModal.tsx@@ -1,5 +1,4 @@import { useMaybeBlockId } from '@core/block';-import { TabsInset } from '@core/component/TabsInset';import { useUserId } from '@core/context/user';import type { CollectionNode } from '@kobalte/core';import { Select } from '@kobalte/core/select';@@ -24,6 +23,7 @@ import {Dialog,Hotkey,Layer,+ Tabs,} from '@ui';import {type Component,@@ -666,27 +666,27 @@ export const CreatePropertyModal: Component<CreatePropertyModalProps> = (<Show when={hasTeam()}><EditorRow label="Owner">- <TabsInset- depth={0}- list={[+ <Tabs+ aria-label="Owner"+ size="sm"+ touch="inset"+ options={[{ value: 'team', label: 'Team' },{ value: 'user', label: 'Personal' },]}value={selectedPropertyScope()}- onChange={(value) => {- if (value === 'user' || value === 'team') {- setPropertyScope(value);- }- }}+ onChange={setPropertyScope}/></EditorRow></Show><Show when={shouldShowMultiSelect()}><EditorRow label="Selection">- <TabsInset- depth={0}- list={[+ <Tabs+ aria-label="Selection"+ size="sm"+ touch="inset"+ options={[{ value: 'single', label: 'Single' },{ value: 'multi', label: 'Multi' },]}diff --git a/apps/web/src/features/property/extractors/PropertyTooltip.tsx b/apps/web/src/features/property/extractors/PropertyTooltip.tsxindex dd70a3ba1f..640940242d 100644--- a/apps/web/src/features/property/extractors/PropertyTooltip.tsx+++ b/apps/web/src/features/property/extractors/PropertyTooltip.tsx@@ -39,9 +39,7 @@ export function PropertyTooltip(props: Props) {}disabled={ctx?.editorOpen() ?? false}placement={hasActions() ? 'bottom-start' : 'bottom'}- contentClass={- hasActions() ? undefined : 'rounded-xl p-1.5 px-3 glass bg-menu-glass'- }+ contentClass={hasActions() ? undefined : 'menu-surface p-1.5 px-3'}>{props.children}</HoverCard>diff --git a/apps/web/src/features/property/tags/TagEditorDialog.tsx b/apps/web/src/features/property/tags/TagEditorDialog.tsxindex 5c25594fc1..0ba910585d 100644--- a/apps/web/src/features/property/tags/TagEditorDialog.tsx+++ b/apps/web/src/features/property/tags/TagEditorDialog.tsx@@ -1,4 +1,3 @@-import { TabsInset } from '@core/component/TabsInset';import TagIcon from '@phosphor/tag-simple.svg';import TrashIcon from '@phosphor/trash.svg';import XIcon from '@phosphor/x.svg';@@ -10,7 +9,7 @@ import {} from '@queries/properties/tags';import type { PropertyOptionResponse } from '@service-properties/generated/schemas/propertyOptionResponse';import type { TagScope } from '@service-properties/generated/schemas/tagScope';-import { Button, CommandMenuShell, Dialog, Hotkey } from '@ui';+import { Button, CommandMenuShell, Dialog, Hotkey, Tabs } from '@ui';import type { JSX } from 'solid-js';import { createEffect, createMemo, createSignal, Show } from 'solid-js';import { ColorSwatches } from './components/color-swatches';@@ -228,19 +227,20 @@ export function TagEditorDialog(props: {<Show when={props.mode?.type === 'create'}><EditorRow label="Sharing">- <TabsInset- depth={0}- list={[- { value: 'team', label: 'Team' },+ <Tabs+ aria-label="Sharing"+ size="sm"+ touch="inset"+ options={[+ {+ value: 'team',+ label: 'Team',+ disabled: !props.teamAvailable,+ },{ value: 'user', label: 'Personal' },]}value={scope()}- onChange={(value) => {- if (value === 'team' && !props.teamAvailable) return;- if (value === 'team' || value === 'user') {- setScope(value);- }- }}+ onChange={setScope}/></EditorRow></Show>diff --git a/apps/web/src/features/property/tags/TagPicker.tsx b/apps/web/src/features/property/tags/TagPicker.tsxindex a04e1a16e6..ebcd201ce4 100644--- a/apps/web/src/features/property/tags/TagPicker.tsx+++ b/apps/web/src/features/property/tags/TagPicker.tsx@@ -707,7 +707,7 @@ function TagPickerBody(props: {<Popover.Portal><Layer depth={3}><Popover.Content- class="z-modal w-96 max-w-[min(24rem,calc(100vw-1.5rem))] rounded-xl glass bg-menu-glass text-sm menu-open-animation"+ class="menu-surface z-modal w-96 max-w-[min(24rem,calc(100vw-1.5rem))] text-sm menu-open-animation"onCloseAutoFocus={(event) => event.preventDefault()}onFocusOutside={(event) => {if (shouldIgnoreOutsideEvent()) event.preventDefault();diff --git a/apps/web/src/features/reminders/components/email-reminder-form.tsx b/apps/web/src/features/reminders/components/email-reminder-form.tsxindex 900912e5ea..86de96183b 100644--- a/apps/web/src/features/reminders/components/email-reminder-form.tsx+++ b/apps/web/src/features/reminders/components/email-reminder-form.tsx@@ -7,7 +7,7 @@ import {createCommandListController,Dialog,type ManagedDialogProps,- SegmentedControl,+ Tabs,} from '@ui';import { createUniqueId, Show } from 'solid-js';import type {@@ -164,7 +164,8 @@ export function EmailReminderForm(Saving…</Show></span>- <SegmentedControl<EmailReminderCondition>+ <Tabs<EmailReminderCondition>+ touch="segmented"aria-label="Reminder condition"class="justify-self-end whitespace-nowrap touch:ml-auto"value={props.condition}diff --git a/apps/web/src/features/reviews-view/components/ReviewsControls.tsx b/apps/web/src/features/reviews-view/components/ReviewsControls.tsxindex f0d947bc60..d7feb8da6e 100644--- a/apps/web/src/features/reviews-view/components/ReviewsControls.tsx+++ b/apps/web/src/features/reviews-view/components/ReviewsControls.tsx@@ -1,6 +1,5 @@import {type ListControlOption,- ListFilterCountBadge,ListFilterDropdown,type ListFilterGroup,ListSortDropdown,@@ -14,14 +13,19 @@ import {type PrLinkKind,} from '@block-pr/data/pr-links';import { PR_ORIGIN_LABELS, PR_ORIGIN_TOOLS } from '@block-pr/data/pr-origin';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { MobileDrawer } from '@components/app/mobile/MobileDrawer';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { Accordion } from '@kobalte/core/accordion';+import BoardIcon from '@phosphor/kanban.svg';+import ListIcon from '@phosphor/list-bullets.svg';+import { Button } from '@ui';import { createSignal, For } from 'solid-js';import { UNKNOWN_ORIGIN } from '../reviews-filter';import type {ReviewsFilterId,ReviewsFilterSelection,+ ReviewsLayout,ReviewsReviewFilterId,ReviewsSortId,ReviewsStatusFilterId,@@ -142,7 +146,12 @@ function isSelected(export const activeReviewsFilterCount = (selected: ReviewsFilterSelection) =>Object.values(selected).reduce((count, ids) => count + ids.length, 0);-export function ReviewsControls(props: ReviewsControlProps) {+export function ReviewsControls(+ props: ReviewsControlProps & {+ layout: ReviewsLayout;+ onLayoutChange: (layout: ReviewsLayout) => void;+ }+) {const panel = useSplitPanelOrThrow();const [openMenu, setOpenMenu] = createSignal<'filters' | 'sort'>();let filterTrigger: HTMLButtonElement | undefined;@@ -179,19 +188,11 @@ export function ReviewsControls(props: ReviewsControlProps) {const activeCount = () => activeReviewsFilterCount(props.selected);return (- <div class="flex min-w-0 shrink-0 items-center justify-end gap-2 @max-[720px]/view-shell:gap-1">- <ListSortDropdown- label="Sort pull requests"- value={props.sort}- options={SORT_OPTIONS}- open={openMenu() === 'sort'}- onChange={props.onSortChange}- onOpenChange={handleMenuOpenChange('sort')}- triggerRef={(element) => (sortTrigger = element)}- />- <div class="relative shrink-0">+ <>+ <HeaderActionGroup label="Review filters"><ListFilterDropdownlabel="Filter pull requests"+ activeCount={activeCount()}groups={filterGroups(props)}open={openMenu() === 'filters'}onOpenChange={handleMenuOpenChange('filters')}@@ -200,9 +201,39 @@ export function ReviewsControls(props: ReviewsControlProps) {onSelectionChange={props.onFilterChange}onClear={props.onClearFilters}/>- <ListFilterCountBadge count={activeCount()} />- </div>- </div>+ </HeaderActionGroup>+ <HeaderActionGroup label="Review layout">+ <Button+ variant="ghost"+ size="icon-md"+ label="List"+ aria-pressed={props.layout === 'list'}+ onClick={() => props.onLayoutChange('list')}+ >+ <ListIcon class="size-4" />+ </Button>+ <Button+ variant="ghost"+ size="icon-md"+ label="Board"+ aria-pressed={props.layout === 'board'}+ onClick={() => props.onLayoutChange('board')}+ >+ <BoardIcon class="size-4" />+ </Button>+ </HeaderActionGroup>+ <HeaderActionGroup label="Review view options">+ <ListSortDropdown+ label="Sort pull requests"+ value={props.sort}+ options={SORT_OPTIONS}+ open={openMenu() === 'sort'}+ onChange={props.onSortChange}+ onOpenChange={handleMenuOpenChange('sort')}+ triggerRef={(element) => (sortTrigger = element)}+ />+ </HeaderActionGroup>+ </>);}diff --git a/apps/web/src/features/reviews-view/components/ReviewsSidebar.tsx b/apps/web/src/features/reviews-view/components/ReviewsSidebar.tsxindex 6ed134c494..6c3dfe3f79 100644--- a/apps/web/src/features/reviews-view/components/ReviewsSidebar.tsx+++ b/apps/web/src/features/reviews-view/components/ReviewsSidebar.tsx@@ -4,6 +4,7 @@ import {useViewTabHotkeys,ViewSidebar,} from '@app/components/view-shell';+import { ViewCreateMenu } from '@app/features/command/view-create-menu';import { globalSplitManager } from '@app/signal/splitLayout';import { PrOriginIcon } from '@block-pr/component/PrLinks';import { PrStatusIcon } from '@block-pr/component/PrStatus';@@ -15,7 +16,6 @@ import {import { prDisplayName } from '@block-pr/util/prKey';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { ContextMenuContent, MenuItem } from '@core/component/ContextMenu';-import { TabsInset } from '@core/component/TabsInset';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { githubLabelColor } from '@entity/components/GithubLabelPill';import type { GithubPullRequestLabel } from '@entity/types/entity';@@ -39,7 +39,6 @@ import { TagDot } from '@ui';import { type Component, createMemo, createSignal, For, Show } from 'solid-js';import {REVIEWS_SCOPES,- type ReviewsLayout,type ReviewsScope,type ReviewsStatusTabId,} from '../reviews-types';@@ -262,8 +261,6 @@ function ReviewAgents(props: {export function ReviewsSidebar(props: {search: string;onSearchChange: (search: string) => void;- layout: ReviewsLayout;- onLayoutChange: (layout: ReviewsLayout) => void;/** The status toggle; omitted when the status selection is custom or the board shows. */status?: {value: ReviewsStatusTabId | undefined;@@ -292,48 +289,50 @@ export function ReviewsSidebar(props: {return (<ViewSidebar.Root aria-label="Reviews navigation">- <ViewSidebar.Header>+ <ViewSidebar.Header+ searchLabel="Search reviews"+ search={() => (+ <SearchBar+ label="Search reviews"+ placeholder="Search reviews"+ autocomplete="off"+ value={props.search}+ onValueChange={props.onSearchChange}+ onEscape={() => props.onSearchChange('')}+ />+ )}+ ><div class="flex min-w-0 items-center gap-1"><ViewSidebar.CloseButton /><ViewSidebar.Title>Reviews</ViewSidebar.Title></div></ViewSidebar.Header>- <ViewSidebar.Primary class="flex flex-col gap-2">- <SearchBar- label="Search reviews"- placeholder="Search reviews"- autocomplete="off"- value={props.search}- onValueChange={props.onSearchChange}- class="border-0 bg-ink/5 shadow-none"- onEscape={() => props.onSearchChange('')}- />- {/* Touch layouts list pull requests; the board needs a pointer to drag. */}- <Show when={!isTouchDevice()}>- <TabsInset- aria-label="Pull request layout"- fullWidth- class="h-auto"- labelClass="py-1.5"- list={[- { value: 'board', label: 'Board' },- { value: 'list', label: 'List' },- ]}- value={props.layout}- onChange={(layout) =>- props.onLayoutChange(layout === 'board' ? 'board' : 'list')- }+ <Show when={!isTouchDevice()}>+ <ViewSidebar.Primary>+ <ViewCreateMenu presentation="sidebar" />+ </ViewSidebar.Primary>+ </Show>+ <Show when={isTouchDevice()}>+ <ViewSidebar.Primary class="flex flex-col gap-2">+ <SearchBar+ label="Search reviews"+ placeholder="Search reviews"+ autocomplete="off"+ value={props.search}+ onValueChange={props.onSearchChange}+ class="border-0 bg-ink/5 shadow-none"+ onEscape={() => props.onSearchChange('')}/>- </Show>- <Show when={props.status}>- {(status) => (- <ReviewsStatusTabs- value={status().value}- onChange={status().onChange}- />- )}- </Show>- </ViewSidebar.Primary>+ <Show when={props.status}>+ {(status) => (+ <ReviewsStatusTabs+ value={status().value}+ onChange={status().onChange}+ />+ )}+ </Show>+ </ViewSidebar.Primary>+ </Show><ViewSidebar.Content><ViewSidebar.Nav aria-label="Pull request views"><For each={REVIEWS_SCOPES}>diff --git a/apps/web/src/features/reviews-view/components/ReviewsStatusTabs.tsx b/apps/web/src/features/reviews-view/components/ReviewsStatusTabs.tsxindex cf28853451..ac6bd9485b 100644--- a/apps/web/src/features/reviews-view/components/ReviewsStatusTabs.tsx+++ b/apps/web/src/features/reviews-view/components/ReviewsStatusTabs.tsx@@ -1,48 +1,29 @@-import { TabsInset } from '@core/component/TabsInset';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import GitMergeIcon from '@phosphor/git-merge.svg';import GitPullRequestIcon from '@phosphor/git-pull-request.svg';import StackIcon from '@phosphor/stack.svg';-import type { Component } from 'solid-js';-import { match } from 'ts-pattern';+import { Tabs } from '@ui';import type { ReviewsStatusTabId } from '../reviews-types';-const STATUS_TABS: {- value: ReviewsStatusTabId;- label: string;- icon: Component<{ class?: string }>;-}[] = [- { value: 'open', label: 'Open', icon: GitPullRequestIcon },- { value: 'closed', label: 'Closed', icon: GitMergeIcon },- { value: 'all', label: 'All', icon: StackIcon },-];--/** Open, Closed (closed and merged), or All pull requests, as a toggle. */+/** Open, Closed (closed and merged), or All pull requests. */export function ReviewsStatusTabs(props: {value: ReviewsStatusTabId | undefined;onChange: (value: ReviewsStatusTabId) => void;class?: string;}) {return (- <TabsInset+ <Tabsaria-label="Pull request status"- fullWidth- class={props.class ?? 'h-auto'}- labelClass="gap-1.5 py-1.5"- list={STATUS_TABS.map((tab) => ({- value: tab.value,- label: (- <>- <tab.icon class="size-3.5 shrink-0" aria-hidden="true" />- {tab.label}- </>- ),- }))}- value={props.value ?? ''}- onChange={(value) =>- match(value)- .with('open', 'closed', 'all', (status) => props.onChange(status))- .otherwise(() => undefined)- }+ touch="inset"+ fullWidth={isTouchDevice()}+ class={props.class}+ options={[+ { value: 'open', label: 'Open', icon: GitPullRequestIcon },+ { value: 'closed', label: 'Closed', icon: GitMergeIcon },+ { value: 'all', label: 'All', icon: StackIcon },+ ]}+ value={props.value}+ onChange={props.onChange}/>);}diff --git a/apps/web/src/features/reviews-view/reviews-view-skeleton.tsx b/apps/web/src/features/reviews-view/reviews-view-skeleton.tsxindex cbbeb38d91..0d834344b8 100644--- a/apps/web/src/features/reviews-view/reviews-view-skeleton.tsx+++ b/apps/web/src/features/reviews-view/reviews-view-skeleton.tsx@@ -4,8 +4,13 @@ import { ViewSkeleton } from '@app/components/view-shell/ViewSkeleton';export function ReviewsViewSkeleton() {return (<ViewSkeleton.Root asidePreferenceKey="reviews">- <ViewSkeleton.Sidebar title="Reviews" />- <ViewSkeleton.Main title="Reviews" searchPlaceholder="Search reviews" />+ <ViewSkeleton.Sidebar title="Reviews" createLabel="New" />+ <ViewSkeleton.Main+ title="Involves me"+ tabs={['• Open', '• Closed', '• All']}+ controls={[1, 2, 1, '+ New ⌄', 1]}+ searchPlaceholder="Search reviews"+ /></ViewSkeleton.Root>);}diff --git a/apps/web/src/features/reviews-view/reviews-view.tsx b/apps/web/src/features/reviews-view/reviews-view.tsxindex a75bb914f8..7e74560688 100644--- a/apps/web/src/features/reviews-view/reviews-view.tsx+++ b/apps/web/src/features/reviews-view/reviews-view.tsx@@ -1,9 +1,15 @@import {SearchBar,+ useViewControlHotkeys,useViewShell,ViewBreadcrumbs,ViewShell,} from '@app/components/view-shell';+import {+ ListHeader,+ ListHeaderSearch,+} from '@app/components/view-shell/ListHeader';+import { ViewCreateMenu } from '@app/features/command/view-create-menu';import {createSearchParams,SplitRouter,@@ -111,29 +117,6 @@ function ReviewsHeaderStatusTabs(props: { children: JSX.Element }) {);}-/** Shown in the list header when the sidebar, with its own search, is hidden. */-function ReviewsListScopeHeading(props: {- title: string;- search: string;- onSearchChange: (search: string) => void;-}) {- const shell = useViewShell();- return (- <Show when={shell.breakpoints.narrow?.() || shell.aside.isCollapsed()}>- <div class="flex h-8 min-w-0 items-center">- <h2 class="truncate text-xl font-semibold text-ink">{props.title}</h2>- </div>- <SearchBar- label="Search reviews"- value={props.search}- onValueChange={props.onSearchChange}- placeholder="Search reviews"- class="max-w-md"- />- </Show>- );-}-function ReviewsRoot() {const panel = useSplitPanelOrThrow();const layout = useSplitLayout();@@ -156,6 +139,18 @@ function ReviewsRoot() {DEFAULT_REVIEWS_FILTERS);const listVisible = () => !params.foreignEntityId;+ let focusSearch: (() => void) | undefined;+ useViewControlHotkeys({+ scopeId: panel.splitHotkeyScope,+ enabled: () => panel.isPanelActive() && listVisible() && !isTouchDevice(),+ search: {+ description: 'Search reviews',+ run: () => {+ focusSearch?.();+ return true;+ },+ },+ });const githubLink = useGithubLinkStatusQuery({ enabled: listVisible });const viewer = useUserContext();const authorLogin = () =>@@ -347,23 +342,43 @@ function ReviewsRoot() {});const list = () => (<>- <ReviewsListTopBar />- <ViewShell.Header>- <Show- when={isTouchDevice()}- fallback={- <div class="flex min-w-0 flex-col gap-3">- <ReviewsListScopeHeading- title={scopeTitle()}- search={search()}- onSearchChange={setSearch}- />- <div class="flex min-w-0 items-center justify-end gap-3">- <ReviewsControls {...controls()} />+ <Show+ when={isTouchDevice()}+ fallback={+ <ListHeader+ title={+ <div class="flex min-w-0 items-center gap-3">+ <ViewBreadcrumbs.Outlet aria-label="Review location" />+ <Show when={statusToggle()}>+ {(status) => (+ <ReviewsStatusTabs+ value={status().value}+ onChange={status().onChange}+ class="shrink-0"+ />+ )}+ </Show></div>- </div>- }- >+ }+ >+ <ReviewsControls+ {...controls()}+ layout={reviewsLayout()}+ onLayoutChange={setReviewsLayout}+ />+ <ViewCreateMenu presentation="toolbar" />+ <ListHeaderSearch+ label="Search reviews"+ value={search()}+ onValueChange={setSearch}+ onEscape={() => panel.panelRef()?.focus()}+ registerFocus={(focus) => (focusSearch = focus)}+ />+ </ListHeader>+ }+ >+ <ReviewsListTopBar />+ <ViewShell.Header><div class="flex min-w-0 flex-col gap-3"><div class="h-10 min-w-0 flex-1"><PillTabs@@ -381,20 +396,20 @@ function ReviewsRoot() {placeholder="Search reviews"/></div>- </Show>- {/* The sidebar holds the toggle; without one it sits above the list. */}- <Show when={statusToggle()}>- {(status) => (- <ReviewsHeaderStatusTabs>- <ReviewsStatusTabs- value={status().value}- onChange={status().onChange}- class="h-auto max-w-sm"- />- </ReviewsHeaderStatusTabs>- )}- </Show>- </ViewShell.Header>+ {/* The sidebar holds the toggle; without one it sits above the list. */}+ <Show when={statusToggle()}>+ {(status) => (+ <ReviewsHeaderStatusTabs>+ <ReviewsStatusTabs+ value={status().value}+ onChange={status().onChange}+ class="h-auto max-w-sm"+ />+ </ReviewsHeaderStatusTabs>+ )}+ </Show>+ </ViewShell.Header>+ </Show><ViewShell.Content><Showwhen={boardVisible()}@@ -517,8 +532,6 @@ function ReviewsRoot() {status={statusToggle()}search={search()}onSearchChange={setSearch}- layout={reviewsLayout()}- onLayoutChange={setReviewsLayout}scope={scope()}onScopeChange={selectScope}labels={facets.labels()}diff --git a/apps/web/src/features/routines/components/routine-editor.tsx b/apps/web/src/features/routines/components/routine-editor.tsxindex e935f1eea5..b344e4c600 100644--- a/apps/web/src/features/routines/components/routine-editor.tsx+++ b/apps/web/src/features/routines/components/routine-editor.tsx@@ -1,8 +1,9 @@import { ViewBreadcrumbs, ViewShell } from '@app/components/view-shell';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { InlineTitleEditor } from '@core/component/InlineTitleEditor';-import { Tabs } from '@kobalte/core/tabs';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import ClockIcon from '@phosphor/clock.svg';-import { cn, EntityComposer, Layer } from '@ui';+import { cn, EntityComposer, Layer, TabSelector } from '@ui';import { For, type JSX, Show } from 'solid-js';import type { ScheduleDraft } from '../core/draft';@@ -55,11 +56,13 @@ export function RoutineEditor(props: {<ClockIcon class="size-3 shrink-0" /><span class="truncate">{props.draft.name}</span></ViewBreadcrumbs.Button>- <div class="shrink-0">{props.actions}</div>+ <Show when={isTouchDevice()}>+ <div class="shrink-0">{props.actions}</div>+ </Show></div>)}</ViewBreadcrumbs.Item>- <Tabs+ <TabSelector.Rootvalue={props.tab}onChange={(value) => {if (value === 'settings' || value === 'history') props.onTab(value);@@ -75,11 +78,8 @@ export function RoutineEditor(props: {class="min-w-0 @max-[600px]/routine:flex-1"/><div class="shrink-0 @max-[600px]/routine:order-last @max-[600px]/routine:w-full">- <Layer depth={0}>- <Tabs.List- aria-label="Routine details"- class="inline-flex shrink-0 items-center rounded-full border border-edge-muted bg-surface p-0.5"- >+ <TabSelector class="w-fit">+ <TabSelector.List aria-label="Routine details"><Foreach={[{ value: 'settings', label: 'Overview' },@@ -87,21 +87,23 @@ export function RoutineEditor(props: {]}>{(tab) => (- <Layer depth={2}>- <Tabs.Trigger- value={tab.value}- class="rounded-full px-3 py-1 text-xs font-medium text-ink-extra-muted outline-none hover:text-ink focus-visible:ring-2 focus-visible:ring-edge-focus data-selected:bg-surface data-selected:text-ink data-selected:ring data-selected:ring-inset data-selected:ring-edge-muted"- >- {tab.label}- </Tabs.Trigger>- </Layer>+ <TabSelector.Tab value={tab.value}>+ {tab.label}+ </TabSelector.Tab>)}</For>- </Tabs.List>- </Layer>+ </TabSelector.List>+ </TabSelector></div>+ <Show when={!isTouchDevice() && props.actions}>+ <div class="ml-auto shrink-0">+ <HeaderActionGroup label="Routine actions">+ {props.actions}+ </HeaderActionGroup>+ </div>+ </Show></ViewShell.TopBar>- <Tabs.Content+ <TabSelector.Panelvalue="settings"class="min-h-0 flex-1 overflow-y-auto px-6 pb-8 pt-12 outline-none touch:pt-6">@@ -187,14 +189,14 @@ export function RoutineEditor(props: {</fieldset><div class="mt-4 grid gap-2">{props.feedback}</div></div>- </Tabs.Content>- <Tabs.Content+ </TabSelector.Panel>+ <TabSelector.Panelvalue="history"class="flex min-h-0 flex-1 flex-col overflow-hidden outline-none">{props.history}- </Tabs.Content>- </Tabs>+ </TabSelector.Panel>+ </TabSelector.Root></ViewBreadcrumbs.Root>);}diff --git a/apps/web/src/features/routines/components/routine-run-button.tsx b/apps/web/src/features/routines/components/routine-run-button.tsxindex b7d2546150..12905cb006 100644--- a/apps/web/src/features/routines/components/routine-run-button.tsx+++ b/apps/web/src/features/routines/components/routine-run-button.tsx@@ -17,16 +17,11 @@ export function RoutineRunButton(props: {}) {return (<Dropdown placement="bottom-end">- <ButtonGroup- variant="ghost"- size="sm"- depth={2}- class="rounded-full border border-edge-muted"- >+ <ButtonGroup variant="outline" size="sm" depth={2} label="Run routine"><Button+ variant="ghost"disabled={props.runDisabled}onClick={props.onRun}- class="bg-transparent hover:bg-ink/[0.04]"><PlayIcon class="size-3" />Run now@@ -34,8 +29,8 @@ export function RoutineRunButton(props: {<ButtonGroup.Divider /><Dropdown.Triggervariant="ghost"+ size="icon-sm"aria-label="Run options"- class="bg-transparent p-1 hover:bg-ink/[0.04]"><CaretDownIcon class="size-3.5" /></Dropdown.Trigger>diff --git a/apps/web/src/features/routines/components/routine-schedule-settings.tsx b/apps/web/src/features/routines/components/routine-schedule-settings.tsxindex 3932167fa3..1815e2d591 100644--- a/apps/web/src/features/routines/components/routine-schedule-settings.tsx+++ b/apps/web/src/features/routines/components/routine-schedule-settings.tsx@@ -4,7 +4,7 @@ import { parseTime } from '@core/util/dateSearch/parseTime';import { useDateSearch } from '@core/util/dateSearch/useDateSearch';import CalendarIcon from '@phosphor/calendar.svg';import CaretRightIcon from '@phosphor/caret-right.svg';-import { cn } from '@ui';+import { Button, Input, Tabs } from '@ui';import { addDays, format } from 'date-fns';import { createSignal, For, onMount, Show } from 'solid-js';import {@@ -45,13 +45,14 @@ function RunOnceSettings(props: {when={!calendar()}fallback={<>- <button- type="button"- class="px-2 text-left text-xs text-ink-muted hover:text-ink"+ <Button+ variant="ghost"+ size="sm"+ class="justify-self-start"onClick={() => setCalendar(false)}>Type a date instead- </button>+ </Button><div class="[&>div]:w-full [&>div]:p-0"><DatePickerUIvalue={selected() ?? tomorrow}@@ -66,7 +67,7 @@ function RunOnceSettings(props: {</>}>- <input+ <Inputref={inputRef}aria-label="Run once date"placeholder="Tomorrow 9am, in 2 hours…"@@ -78,7 +79,6 @@ function RunOnceSettings(props: {props.onChange({ onceAt: options()[0].date.toISOString() });}}}- class="w-full rounded-md border border-edge-muted bg-input px-3 py-2 text-sm outline-none focus:border-accent"/><div class="grid gap-0.5" aria-label="Suggested dates"><For each={options()}>@@ -103,13 +103,14 @@ function RunOnceSettings(props: {</p></Show></div>- <button- type="button"- class="flex items-center gap-2 rounded-md px-2 py-2 text-sm text-ink-muted hover:bg-hover"+ <Button+ variant="ghost"+ class="justify-self-start"onClick={() => setCalendar(true)}>- <CalendarIcon class="size-4" /> Custom date and time…- </button>+ <CalendarIcon class="size-3.5 touch:size-4" />+ Custom date and time…+ </Button></Show><Show when={selected()}>{(date) => (@@ -151,56 +152,43 @@ function RecurringSettings(props: {when={choosingZone()}fallback={<div class="grid gap-4">- <input+ <Inputref={inputRef}aria-label="Describe schedule"placeholder="Every weekday at 9am"value={words()}onInput={(e) => describe(e.currentTarget.value)}- class="w-full rounded-md border border-edge-muted bg-input px-3 py-2 text-sm outline-none focus:border-accent"/><Show when={words() && !parsed()}><p class="text-xs text-ink-muted">Try “every day at 9am”, or choose below.</p></Show>- <div class="flex flex-wrap gap-1" role="group" aria-label="Repeat">- <For- each={triggerFrequencies.filter((item) => item.value !== 'once')}- >- {(item) => (- <button- type="button"- class={cn(- 'rounded-md px-2 py-1.5 text-xs hover:bg-hover',- props.trigger.frequency === item.value- ? 'bg-hover text-ink'- : 'text-ink-muted'- )}- aria-pressed={props.trigger.frequency === item.value}- onClick={() => {- setWords('');- props.onChange({ frequency: item.value });- }}- >- {item.value === 'custom' ? 'Cron' : item.label}- </button>- )}- </For>- </div>+ <Tabs+ aria-label="Repeat"+ size="sm"+ wrap+ options={triggerFrequencies+ .filter((item) => item.value !== 'once')+ .map((item) => ({+ value: item.value,+ label: item.value === 'custom' ? 'Cron' : item.label,+ }))}+ value={props.trigger.frequency}+ onChange={(frequency) => {+ setWords('');+ props.onChange({ frequency });+ }}+ /><Show when={props.trigger.frequency === 'week'}><div class="flex gap-1" role="group" aria-label="Days of the week"><For each={WEEKDAY_OPTIONS}>{(day) => (- <button- type="button"+ <Button+ variant="outline"+ size="sm"+ class="flex-1"aria-pressed={props.trigger.daysOfWeek.includes(day.value)}- class={cn(- 'flex-1 rounded-md py-1.5 text-xs hover:bg-hover',- props.trigger.daysOfWeek.includes(day.value)- ? 'bg-hover text-ink'- : 'text-ink-muted'- )}onClick={() =>props.onChange({daysOfWeek: props.trigger.daysOfWeek.includes(day.value)@@ -212,7 +200,7 @@ function RecurringSettings(props: {}>{day.label}- </button>+ </Button>)}</For></div>@@ -220,7 +208,7 @@ function RecurringSettings(props: {<Show when={props.trigger.frequency === 'month'}><label class="flex items-center justify-between gap-3 text-xs text-ink-muted">Day of month- <input+ <Inputtype="number"min="1"max="31"@@ -228,7 +216,7 @@ function RecurringSettings(props: {onInput={(e) =>props.onChange({ dayOfMonth: e.currentTarget.value })}- class="w-16 rounded-md border border-edge-muted bg-input px-2 py-1.5 text-sm text-ink"+ class="w-20"/></label></Show>@@ -240,7 +228,7 @@ function RecurringSettings(props: {><label class="flex items-center justify-between gap-3 text-xs text-ink-muted">Time- <input+ <Inputaria-label="Run time"placeholder="9:00 AM"value={timeText()}@@ -254,18 +242,18 @@ function RecurringSettings(props: {: text;props.onChange({ time });}}- class="w-28 rounded-md border border-edge-muted bg-input px-2 py-1.5 text-sm text-ink outline-none focus:border-accent"+ class="w-28"/></label></Show><Show when={props.trigger.frequency === 'custom'}><label class="grid gap-2 text-xs text-ink-muted">Cron expression- <input+ <Inputaria-label="Cron expression"value={props.trigger.cron}onInput={(e) => props.onChange({ cron: e.currentTarget.value })}- class="w-full rounded-md border border-edge-muted bg-input p-2 font-mono text-sm text-ink outline-none focus:border-accent"+ class="font-mono"/><span>Seconds, minutes, hours, day, month, weekday, optional year.@@ -321,7 +309,7 @@ function TimezoneChoices(props: {);return (<div class="grid gap-2">- <input+ <Inputref={inputRef}aria-label="Search timezones"placeholder="Search time zones…"@@ -333,7 +321,6 @@ function TimezoneChoices(props: {props.onChange(options()[0]);}}}- class="w-full rounded-md border border-edge-muted bg-input px-3 py-2 text-sm outline-none focus:border-accent"/><div class="max-h-48 overflow-y-auto" aria-label="Time zones"><For each={options()}>@@ -352,13 +339,14 @@ function TimezoneChoices(props: {<p class="p-2 text-xs text-ink-muted">No matching time zones</p></Show></div>- <button- type="button"- class="px-2 py-1 text-left text-xs text-ink-muted hover:text-ink"+ <Button+ variant="ghost"+ size="sm"+ class="justify-self-start"onClick={props.onBack}>Back to schedule- </button>+ </Button></div>);}diff --git a/apps/web/src/features/routines/components/routines-list.test.tsx b/apps/web/src/features/routines/components/routines-list.test.tsxindex da1e45c2fa..4c0815b1e0 100644--- a/apps/web/src/features/routines/components/routines-list.test.tsx+++ b/apps/web/src/features/routines/components/routines-list.test.tsx@@ -57,6 +57,7 @@ function setup(overrides: { rows?: RoutineRow[]; pendingId?: string } = {}) {describe('routines list', () => {it('filters routines and agents without losing navigation', () => {const props = setup();+ fireEvent.click(screen.getByRole('button', { name: 'Search routines' }));fireEvent.input(screen.getByRole('searchbox'), {target: { value: 'finance' },});@@ -68,7 +69,7 @@ describe('routines list', () => {);expect(props.onOpen).toHaveBeenCalledWith('revenue');expect(props.onOpen).toHaveBeenCalledOnce();- fireEvent.click(screen.getByRole('button', { name: 'Clear search' }));+ fireEvent.click(screen.getByRole('button', { name: 'Close search' }));fireEvent.click(screen.getByRole('button', { name: 'Morning briefing' }));expect(props.onOpen).toHaveBeenLastCalledWith('mine');expect(screen.queryByRole('button', { name: /^Team$/ })).toBeNull();diff --git a/apps/web/src/features/routines/components/routines-list.tsx b/apps/web/src/features/routines/components/routines-list.tsxindex 2a66fc7db3..65ec0fdac1 100644--- a/apps/web/src/features/routines/components/routines-list.tsx+++ b/apps/web/src/features/routines/components/routines-list.tsx@@ -1,4 +1,10 @@import { SearchBar, ViewShell } from '@app/components/view-shell';+import {+ ListHeader,+ ListHeaderSearch,+} from '@app/components/view-shell/ListHeader';+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import ClockIcon from '@phosphor/clock-clockwise.svg';import { Button } from '@ui';import { createSignal, For, Show } from 'solid-js';@@ -10,7 +16,7 @@ export function RoutinesList(props: {loading: boolean;error: boolean;pendingId?: string;- searchRef?: (input: HTMLInputElement) => void;+ registerSearchFocus?: (focus: () => void) => void;onCreate: () => void;onOpen: (id: string, history?: boolean) => void;onToggle: (row: RoutineRow) => void;@@ -26,31 +32,53 @@ export function RoutinesList(props: {);return (<div class="flex size-full min-h-0 min-w-0 flex-col">- <ViewShell.TopBar>- <h1 class="truncate text-sm font-semibold tracking-[-0.03em] text-ink">- Routines- </h1>- </ViewShell.TopBar>- <ViewShell.Header>- <h1 class="mb-3 text-xl font-semibold tracking-[-0.03em] text-ink not-touch:hidden">- Routines- </h1>- <div class="flex min-w-0 items-center justify-between gap-3">- <SearchBar- ref={props.searchRef}+ <Show+ when={!isTouchDevice()}+ fallback={+ <ViewShell.Header>+ <h1 class="mb-3 text-xl font-semibold tracking-[-0.03em] text-ink">+ Routines+ </h1>+ <div class="flex min-w-0 items-center justify-between gap-3">+ <SearchBar+ ref={(input) =>+ props.registerSearchFocus?.(() => {+ input.focus();+ input.select();+ })+ }+ label="Search routines"+ placeholder="Search routines"+ value={search()}+ onValueChange={setSearch}+ onEscape={() => list?.focus()}+ class="max-w-md flex-1"+ hotkey="cmd+f"+ />+ <Button variant="outline" onClick={props.onCreate}>+ Create Routine+ </Button>+ </div>+ </ViewShell.Header>+ }+ >+ <ListHeader+ title={<h1 class="text-sm font-semibold text-ink">Routines</h1>}+ >+ <ViewCreateButton+ presentation="toolbar"+ aria-label="Create Routine"+ onClick={props.onCreate}+ />+ <ListHeaderSearchlabel="Search routines"- placeholder="Search routines"value={search()}onValueChange={setSearch}onEscape={() => list?.focus()}- class="max-w-md flex-1"- hotkey="cmd+f"+ registerFocus={(focus) => props.registerSearchFocus?.(focus)}/>- <Button variant="outline" onClick={props.onCreate}>- Create Routine- </Button>- </div>- </ViewShell.Header>+ </ListHeader>+ </Show><Show when={props.error}><divrole="alert"diff --git a/apps/web/src/features/routines/routine-creator.test.tsx b/apps/web/src/features/routines/routine-creator.test.tsxindex f1f8843822..d41a9e82cc 100644--- a/apps/web/src/features/routines/routine-creator.test.tsx+++ b/apps/web/src/features/routines/routine-creator.test.tsx@@ -218,7 +218,7 @@ async function addScheduled(name = 'Daily') {const add = screen.getByRole('button', { name: 'Add trigger' });fireEvent.click(add);fireEvent.click(await screen.findByRole('button', { name: 'Scheduled' }));- fireEvent.click(await screen.findByRole('button', { name }));+ fireEvent.click(await screen.findByRole('radio', { name }));fireEvent.click(within(screen.getByRole('dialog', { name: 'Add trigger' })).getByRole('button',diff --git a/apps/web/src/features/routines/routine-detail.test.tsx b/apps/web/src/features/routines/routine-detail.test.tsxindex f6ee612d49..42bd3fdbc0 100644--- a/apps/web/src/features/routines/routine-detail.test.tsx+++ b/apps/web/src/features/routines/routine-detail.test.tsx@@ -283,6 +283,14 @@ let setStatus: Setter<string>;let setActivationPending: Setter<boolean>;beforeEach(() => {vi.clearAllMocks();+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );mocks.update.mockReset().mockResolvedValue(cron);mocks.writeClipboardData.mockReset().mockResolvedValue(true);vi.useFakeTimers();@@ -305,6 +313,7 @@ beforeEach(() => {afterEach(() => {cleanup();vi.useRealTimers();+ vi.unstubAllGlobals();});const agentTarget: RoutineTarget = {diff --git a/apps/web/src/features/routines/routines-page.tsx b/apps/web/src/features/routines/routines-page.tsxindex 4fd0dc5e1b..16275b142c 100644--- a/apps/web/src/features/routines/routines-page.tsx+++ b/apps/web/src/features/routines/routines-page.tsx@@ -23,15 +23,14 @@ function RoutinesContent() {activate: true,search: {},});- let searchInput: HTMLInputElement | undefined;+ let focusSearch: (() => void) | undefined;useViewControlHotkeys({scopeId: panel.splitHotkeyScope,enabled: () => panel.isPanelActive() && !selectedId(),search: {description: 'Search routines',run: () => {- searchInput?.focus();- searchInput?.select();+ focusSearch?.();return true;},},@@ -70,7 +69,7 @@ function RoutinesContent() {?.defaultModel): target.model}- searchRef={(input) => (searchInput = input)}+ registerSearchFocus={(focus) => (focusSearch = focus)}onCreate={create}onOpen={(id) => open(id)}/>diff --git a/apps/web/src/features/routines/views/routines-list.tsx b/apps/web/src/features/routines/views/routines-list.tsxindex 79c012df3a..4e3f4263cb 100644--- a/apps/web/src/features/routines/views/routines-list.tsx+++ b/apps/web/src/features/routines/views/routines-list.tsx@@ -10,7 +10,7 @@ export function RoutinesListView(props: {userId: Accessor<string | undefined>;targetLabel(target: RoutineTarget): string;targetModel(target: RoutineTarget): string | undefined;- searchRef(input: HTMLInputElement): void;+ registerSearchFocus(focus: () => void): void;onCreate(): void;onOpen(id: string): void;}) {@@ -22,7 +22,7 @@ export function RoutinesListView(props: {);return (<RoutinesList- searchRef={props.searchRef}+ registerSearchFocus={props.registerSearchFocus}rows={rows()}loading={props.source.loading()}error={props.source.error()}diff --git a/apps/web/src/features/scheduling/calendar-actions.tsx b/apps/web/src/features/scheduling/calendar-actions.tsxindex 9a864b4171..0008e640ab 100644--- a/apps/web/src/features/scheduling/calendar-actions.tsx+++ b/apps/web/src/features/scheduling/calendar-actions.tsx@@ -16,7 +16,7 @@ import { For, Show, Suspense } from 'solid-js';import type { EventType } from './core/types';import { useSchedulingProfileWithAutoSetupQuery } from './queries/source';-function Actions(props: { sidebar?: boolean }) {+function Actions(props: { sidebar?: boolean; compact?: boolean }) {const user = useUserId();const navigate = useNavigate();const source = useSchedulingProfileWithAutoSetupQuery(@@ -55,12 +55,14 @@ function Actions(props: { sidebar?: boolean }) {return (<Dropdown placement={props.sidebar ? 'bottom-start' : 'bottom-end'}><Dropdown.Trigger- variant="ghost"- size={props.sidebar ? 'md' : 'lg'}+ variant={props.compact ? 'outline' : 'ghost'}+ size={props.sidebar || props.compact ? 'md' : 'lg'}class={props.sidebar? 'h-(--sidebar-row-height) w-full justify-start gap-(--sidebar-label-gap) rounded-lg px-(--sidebar-item-inset) text-left font-normal touch:h-11'- : 'shrink-0 px-2 text-sm lg:px-3'+ : props.compact+ ? 'shrink-0 px-2 text-sm'+ : 'shrink-0 px-2 text-sm lg:px-3'}label="Booking links">@@ -120,11 +122,14 @@ function Actions(props: { sidebar?: boolean }) {</Dropdown>);}-export function CalendarSchedulingActions(props: { sidebar?: boolean }) {+export function CalendarSchedulingActions(props: {+ sidebar?: boolean;+ compact?: boolean;+}) {return (<ShowFeatureFlag flag={enableCalendarScheduling}><Suspense>- <Actions sidebar={props.sidebar} />+ <Actions sidebar={props.sidebar} compact={props.compact} /></Suspense></ShowFeatureFlag>);diff --git a/apps/web/src/features/scheduling/components/availability-type-picker.tsx b/apps/web/src/features/scheduling/components/availability-type-picker.tsxindex 54f6616b75..5a9ef41b71 100644--- a/apps/web/src/features/scheduling/components/availability-type-picker.tsx+++ b/apps/web/src/features/scheduling/components/availability-type-picker.tsx@@ -1,5 +1,4 @@-import { Button } from '@ui';-import { For } from 'solid-js';+import { Tabs } from '@ui';import type { AvailabilityChange } from '../core/availability';export function AvailabilityTypePicker(props: {@@ -9,42 +8,17 @@ export function AvailabilityTypePicker(props: {onChange: (mode: AvailabilityChange['mode']) => void;}) {return (- <div- class="flex flex-wrap gap-2"- role="group"+ <Tabs+ touch="pills"aria-label={props.label ?? 'Availability type'}- >- <For- each={[- { value: 'available' as const, label: 'Available' },- { value: 'unavailable' as const, label: 'Unavailable' },- ]}- >- {(option) => (- <Button- type="button"- size="sm"- variant="ghost"- disabled={props.disabled}- tooltip={- option.value === 'available'- ? 'Choose available hours'- : 'Choose time off'- }- aria-pressed={props.mode === option.value}- class={`rounded-full border px-4 ${- props.mode === option.value- ? option.value === 'available'- ? 'border-accent bg-accent text-accent-contrast not-touch:not-disabled:hover:bg-accent not-touch:not-disabled:hover:text-accent-contrast'- : 'border-edge bg-edge text-ink not-touch:not-disabled:hover:bg-edge not-touch:not-disabled:hover:text-ink'- : 'border-edge-muted text-ink-muted not-touch:not-disabled:hover:text-ink-muted'- }`}- onClick={() => props.onChange(option.value)}- >- {option.label}- </Button>- )}- </For>- </div>+ size="sm"+ disabled={props.disabled}+ options={[+ { value: 'available', label: 'Available' },+ { value: 'unavailable', label: 'Unavailable' },+ ]}+ value={props.mode}+ onChange={props.onChange}+ />);}diff --git a/apps/web/src/features/scheduling/components/booking-page-editor.tsx b/apps/web/src/features/scheduling/components/booking-page-editor.tsxindex 4df044488e..5d85cb0c62 100644--- a/apps/web/src/features/scheduling/components/booking-page-editor.tsx+++ b/apps/web/src/features/scheduling/components/booking-page-editor.tsx@@ -1,6 +1,8 @@+import { ListHeader } from '@app/components/view-shell/ListHeader';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { createResizeObserver } from '@solid-primitives/resize-observer';import { Button, Tabs } from '@ui';-import { createSignal, Show } from 'solid-js';+import { createSignal, type JSX, Show } from 'solid-js';import type { PublicProfile } from '../core/types';import { Field, TextArea, TextInput } from './fields';import {@@ -10,6 +12,8 @@ import {import { PublicBookingProfile } from './public-booking-profile';export function BookingPageEditor(props: {+ headerTitle?: JSX.Element;+ shareAction?: JSX.Element;profile: PublicProfile;canEdit: boolean;saving: boolean;@@ -20,39 +24,24 @@ export function BookingPageEditor(props: {onRevert: () => void;}) {const [mode, setMode] = createSignal<'edit' | 'preview'>('edit');- return (- <form- aria-label="Booking page details"- aria-busy={props.saving}- class="relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-xl border border-edge-muted bg-panel"- onSubmit={(event) => {- event.preventDefault();- if (- mode() !== 'edit' ||- !props.canEdit ||- props.saving ||- !props.hasChanges- )- return;- props.onSave();- }}- >- <div class="pointer-events-none absolute inset-x-4 top-3 z-10 flex items-center justify-between gap-2">- <div class="pointer-events-auto rounded-full bg-panel">- <Tabs- aria-label="Booking page mode"- list={[- { value: 'edit', label: 'Edit' },- { value: 'preview', label: 'Preview' },- ]}- value={mode()}- onChange={(value) => {- if (value === 'edit' || value === 'preview') setMode(value);- }}- />- </div>- <Show when={mode() === 'edit'}>- <div class="pointer-events-auto flex items-center gap-2 rounded-lg bg-panel">+ const modeTabs = () => (+ <div class="pointer-events-auto rounded-full touch:bg-panel">+ <Tabs+ aria-label="Booking page mode"+ options={[+ { value: 'edit', label: 'Edit' },+ { value: 'preview', label: 'Preview' },+ ]}+ value={mode()}+ onChange={setMode}+ />+ </div>+ );+ const actions = () => (+ <>+ <Show when={mode() === 'edit'}>+ <div class="pointer-events-auto flex items-center gap-2 touch:rounded-lg touch:bg-panel">+ <HeaderActionGroup label="Booking page changes"><Show when={props.canEdit && props.hasChanges}><Buttontype="button"@@ -66,7 +55,7 @@ export function BookingPageEditor(props: {</Show><Buttontype="submit"- variant="cta"+ variant="strong"aria-label={props.saving ? 'Saving booking page' : 'Save booking page'}@@ -74,9 +63,57 @@ export function BookingPageEditor(props: {>{props.saving ? 'Saving…' : 'Save'}</Button>+ </HeaderActionGroup>+ </div>+ </Show>+ <Show when={props.shareAction}>+ <HeaderActionGroup label="Sharing">+ {props.shareAction}+ </HeaderActionGroup>+ </Show>+ </>+ );+ return (+ <form+ aria-label="Booking page details"+ aria-busy={props.saving}+ class={+ props.headerTitle+ ? 'relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden'+ : 'relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-xl border border-edge-muted bg-panel'+ }+ onSubmit={(event) => {+ event.preventDefault();+ if (+ mode() !== 'edit' ||+ !props.canEdit ||+ props.saving ||+ !props.hasChanges+ )+ return;+ props.onSave();+ }}+ >+ <Show+ when={props.headerTitle}+ fallback={+ <div class="pointer-events-none absolute inset-x-4 top-3 z-10 flex items-center justify-between gap-2">+ {modeTabs()}+ {actions()}</div>- </Show>- </div>+ }+ >+ <ListHeader+ title={+ <div class="flex min-w-0 items-center gap-3">+ {props.headerTitle}+ {modeTabs()}+ </div>+ }+ >+ {actions()}+ </ListHeader>+ </Show><Show when={props.hasChanges}><span role="status" class="sr-only">Unsaved changes@@ -84,7 +121,11 @@ export function BookingPageEditor(props: {</Show><sectionaria-label="Booking page preview"- class="flex min-h-0 flex-1 flex-col"+ class={+ props.headerTitle+ ? 'mx-4 mb-4 flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border border-edge-muted bg-panel'+ : 'flex min-h-0 flex-1 flex-col'+ }><div class="min-h-0 flex-1 overflow-y-auto"><PublicBookingLayoutdiff --git a/apps/web/src/features/scheduling/components/booking-rule-value.tsx b/apps/web/src/features/scheduling/components/booking-rule-value.tsxindex d46835fb36..fb22eddf67 100644--- a/apps/web/src/features/scheduling/components/booking-rule-value.tsx+++ b/apps/web/src/features/scheduling/components/booking-rule-value.tsx@@ -1,5 +1,5 @@-import { Button, Select } from '@ui';-import { createMemo, createSignal, For, Show } from 'solid-js';+import { Select, Tabs } from '@ui';+import { createMemo, createSignal, Show } from 'solid-js';import type { BookingValueUnit } from '../core/booking-units';import { BookingValueInput } from './booking-value-input';@@ -16,46 +16,24 @@ export function BookingPresets(props: {onCustom: () => void;}) {return (- <div- role="group"+ <Tabsaria-label={`${props.label} presets`}- class={`flex flex-wrap ${props.compact ? 'gap-1' : 'gap-1.5'}`}- >- <For each={props.presets}>- {(preset) => (- <Button- type="button"- size={props.compact ? 'sm' : 'md'}- variant="ghost"- disabled={props.disabled}- aria-pressed={!props.custom && props.value === preset.value}- class={`rounded-full border ${props.compact ? 'h-6 px-2 text-[11px]' : 'px-4'} ${- !props.custom && props.value === preset.value- ? 'border-accent/40 bg-accent/10 text-accent not-touch:not-disabled:hover:text-accent'- : 'border-edge-muted text-ink-muted not-touch:not-disabled:hover:text-ink-muted'- }`}- onClick={() => props.onChange(preset.value)}- >- {preset.label}- </Button>- )}- </For>- <Button- type="button"- size={props.compact ? 'sm' : 'md'}- variant="ghost"- disabled={props.disabled}- aria-pressed={props.custom}- class={`rounded-full border ${props.compact ? 'h-6 px-2 text-[11px]' : 'px-4'} ${- props.custom- ? 'border-accent/40 bg-accent/10 text-accent not-touch:not-disabled:hover:text-accent'- : 'border-edge-muted text-ink-muted not-touch:not-disabled:hover:text-ink-muted'- }`}- onClick={props.onCustom}- >- Custom- </Button>- </div>+ size={props.compact ? 'sm' : 'md'}+ wrap+ disabled={props.disabled}+ options={[+ ...props.presets.map((preset) => ({+ value: String(preset.value),+ label: preset.label,+ })),+ { value: 'custom', label: 'Custom' },+ ]}+ value={props.custom ? 'custom' : String(props.value)}+ onChange={(value) => {+ if (value === 'custom') props.onCustom();+ else props.onChange(Number(value));+ }}+ />);}diff --git a/apps/web/src/features/scheduling/components/bookings-panel.tsx b/apps/web/src/features/scheduling/components/bookings-panel.tsxindex 8f7524150d..1601765204 100644--- a/apps/web/src/features/scheduling/components/bookings-panel.tsx+++ b/apps/web/src/features/scheduling/components/bookings-panel.tsx@@ -6,6 +6,7 @@ import type { Booking, SchedulingMember } from '../core/types';import { BookingCard } from './booking-card';export function BookingsPanel(props: {+ hideTabs?: boolean;groups: BookingDateGroup[];tabs: { value: BookingTab; count: number }[];tab: BookingTab;@@ -32,31 +33,13 @@ export function BookingsPanel(props: {const filtered = () => !!props.search.trim() || props.eventId !== 'all';return (<div class="@container/bookings flex min-w-0 flex-col gap-5">- <div class="flex min-w-0 items-center gap-3">- <div class="max-w-full overflow-x-auto pb-1">- <Tabs- aria-label="Booking status"- class="w-fit"- labelClass="gap-2 whitespace-nowrap px-3 text-sm"- list={props.tabs.map((tab) => ({- value: tab.value,- label: () => (- <>- {tab.value}- <span class="text-xs text-ink-muted tabular-nums">- {tab.count}- </span>- </>- ),- }))}- value={props.tab}- onChange={(value) => {- const tab = props.tabs.find((tab) => tab.value === value);- if (tab) props.onTab(tab.value);- }}- />- </div>- </div>+ <Show when={!props.hideTabs}>+ <BookingStatusTabs+ tabs={props.tabs}+ tab={props.tab}+ onTab={props.onTab}+ />+ </Show><Show when={props.tab === 'Needs attention'}><p class="text-sm text-ink-muted">These bookings are awaiting calendar synchronization or need help.@@ -143,3 +126,24 @@ export function BookingsPanel(props: {</div>);}++export function BookingStatusTabs(props: {+ tabs: { value: BookingTab; count: number }[];+ tab: BookingTab;+ onTab: (tab: BookingTab) => void;+}) {+ return (+ <div class="-m-1 max-w-full overflow-x-auto p-1 [scrollbar-width:none]">+ <Tabs+ aria-label="Booking status"+ options={props.tabs.map((tab) => ({+ value: tab.value,+ label: tab.value,+ count: tab.count,+ }))}+ value={props.tab}+ onChange={props.onTab}+ />+ </div>+ );+}diff --git a/apps/web/src/features/scheduling/components/event-editor.tsx b/apps/web/src/features/scheduling/components/event-editor.tsxindex 69ffa17f6f..a6bf16854f 100644--- a/apps/web/src/features/scheduling/components/event-editor.tsx+++ b/apps/web/src/features/scheduling/components/event-editor.tsx@@ -6,7 +6,7 @@ import Plus from '@phosphor/plus.svg';import Trash from '@phosphor/trash.svg';import VideoCamera from '@phosphor/video-camera.svg';import Warning from '@phosphor/warning.svg';-import { Button, ToggleSwitch } from '@ui';+import { Button, Tabs, ToggleSwitch } from '@ui';import { Stepper } from '@ui/components/Stepper';import {batch,@@ -591,38 +591,17 @@ export function EventEditor(props: EventEditorProps) {</Button></div><div class="flex min-w-0 flex-col gap-3">- <div- role="group"+ <Tabs+ touch="pills"aria-label="Scheduling type"- class="flex flex-wrap gap-2"- >- <For- each={- [- { value: 'collective', label: 'Collective' },- { value: 'roundRobin', label: 'Round robin' },- ] as const- }- >- {(option) => (- <Button- type="button"- size="md"- variant="ghost"- disabled={props.saving || props.step !== 'location'}- aria-pressed={props.draft.mode === option.value}- class={`rounded-full border px-4 ${- props.draft.mode === option.value- ? 'border-accent/30 bg-accent/10 text-accent not-touch:not-disabled:hover:bg-accent/15 not-touch:not-disabled:hover:text-accent'- : 'border-edge-frame text-ink-muted not-touch:not-disabled:hover:text-ink-muted'- }`}- onClick={() => props.onUpdate('mode', option.value)}- >- {option.label}- </Button>- )}- </For>- </div>+ disabled={props.saving || props.step !== 'location'}+ options={[+ { value: 'collective', label: 'Collective' },+ { value: 'roundRobin', label: 'Round robin' },+ ]}+ value={props.draft.mode}+ onChange={(mode) => props.onUpdate('mode', mode)}+ /><div class="flex w-72 max-w-full min-w-0 flex-col gap-2"><div class="flex min-w-0 items-center gap-2"><div class="min-w-0 flex-1">diff --git a/apps/web/src/features/scheduling/components/insights-panel.tsx b/apps/web/src/features/scheduling/components/insights-panel.tsxindex c9e1080507..8fbcc15ada 100644--- a/apps/web/src/features/scheduling/components/insights-panel.tsx+++ b/apps/web/src/features/scheduling/components/insights-panel.tsx@@ -1,6 +1,8 @@+import { ListHeader } from '@app/components/view-shell/ListHeader';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import DownloadIcon from '@phosphor/download-simple.svg';import InfoIcon from '@phosphor/info.svg';-import { Button, Tooltip } from '@ui';+import { Button, cn, Tooltip } from '@ui';import { createMemo, createSignal, For, type JSX, Show } from 'solid-js';import {type InsightHostOption,@@ -352,6 +354,8 @@ export function InsightsPanel(props: {onRangeChange: (from: string, to: string) => void;onRetry: () => void;scopeSelector?: JSX.Element;+ /** Desktop: render the controls in a ListHeader with this title. */+ headerTitle?: JSX.Element;renderHostAvatar?: (host: InsightHostOption) => JSX.Element;}) {const [eventId, setEventId] = createSignal('all');@@ -410,247 +414,270 @@ export function InsightsPanel(props: {link.click();setTimeout(() => URL.revokeObjectURL(url), 1000);};- return (- <div- class="@container/insights flex w-full min-w-0 flex-col gap-5"- aria-busy={props.loading}- >- <div class="flex min-w-0 flex-wrap items-center gap-2">- {props.scopeSelector}- <div class="ml-auto flex min-w-0 items-center gap-2">- <Button- variant="outline"- onClick={download}- disabled={- props.loading || !!props.error || !current().bookings.length- }- >- <DownloadIcon class="size-4" />- Download- </Button>- <SchedulingFilters- title="Insights filters"- activeCount={- Number(eventId() !== 'all') + Number(hostId() !== 'all')+ const canDownload = () =>+ !props.loading && !props.error && current().bookings.length > 0;+ const filters = () => (+ <SchedulingFilters+ title="Insights filters"+ activeCount={Number(eventId() !== 'all') + Number(hostId() !== 'all')}+ onClear={() => {+ setEventId('all');+ setHostId('all');+ }}+ mobileChildren={+ <>+ <SchedulingFilterSection+ value="booking-links"+ label="Booking links"+ selected={eventId()}+ options={eventOptions()}+ onChange={setEventId}+ />+ <SchedulingFilterSection+ value="hosts"+ label="Hosts"+ selected={hostId()}+ options={+ hostOptions().some((option) => option.value === hostId())+ ? hostOptions()+ : [+ ...hostOptions(),+ insightHostSelection(hostOptions(), hostId()),+ ]}- onClear={() => {- setEventId('all');- setHostId('all');- }}- mobileChildren={- <>- <SchedulingFilterSection- value="booking-links"- label="Booking links"- selected={eventId()}- options={eventOptions()}- onChange={setEventId}- />- <SchedulingFilterSection- value="hosts"- label="Hosts"- selected={hostId()}- options={- hostOptions().some((option) => option.value === hostId())- ? hostOptions()- : [- ...hostOptions(),- insightHostSelection(hostOptions(), hostId()),- ]- }- onChange={setHostId}- renderIcon={(option) =>- props.renderHostAvatar?.(option) ?? (- <InsightHostAvatar host={option} />- )- }- />- <InsightsRangeSelector- inline- from={props.from}- to={props.to}- timeZone={props.timeZone}- now={now}- onChange={props.onRangeChange}- />- </>+ onChange={setHostId}+ renderIcon={(option) =>+ props.renderHostAvatar?.(option) ?? (+ <InsightHostAvatar host={option} />+ )}- >- <SelectInput- label="Filter event types"- class="w-full text-sm touch:h-9"- value={eventId()}- options={eventOptions()}- onChange={setEventId}- />- <InsightsHostFilter- value={hostId()}- options={hostOptions()}- onChange={setHostId}- renderAvatar={props.renderHostAvatar}- />- <InsightsRangeSelector- from={props.from}- to={props.to}- timeZone={props.timeZone}- now={now}- onChange={props.onRangeChange}- />- </SchedulingFilters>- </div>- </div>- <div class="flex flex-wrap items-center justify-between gap-2 text-xs text-ink-muted">- <p>- {formatDate(props.from)} – {formatDate(props.to)} ·{' '}- {props.timeZone.replaceAll('_', ' ')}- </p>- <Show when={eventId() !== 'all' || hostId() !== 'all'}>- <button- type="button"- class="underline underline-offset-2"- onClick={() => {- setEventId('all');- setHostId('all');- }}- >- Clear filters- </button>+ />+ <InsightsRangeSelector+ inline+ from={props.from}+ to={props.to}+ timeZone={props.timeZone}+ now={now}+ onChange={props.onRangeChange}+ />+ </>+ }+ >+ <SelectInput+ label="Filter event types"+ class="w-full text-sm touch:h-9"+ value={eventId()}+ options={eventOptions()}+ onChange={setEventId}+ />+ <InsightsHostFilter+ value={hostId()}+ options={hostOptions()}+ onChange={setHostId}+ renderAvatar={props.renderHostAvatar}+ />+ <InsightsRangeSelector+ from={props.from}+ to={props.to}+ timeZone={props.timeZone}+ now={now}+ onChange={props.onRangeChange}+ />+ </SchedulingFilters>+ );+ return (+ <>+ <Show when={props.headerTitle}>+ <ListHeader title={props.headerTitle}>+ <HeaderActionGroup label="Insights actions">+ <Button+ size="icon-md"+ label="Download CSV"+ onClick={download}+ disabled={!canDownload()}+ >+ <DownloadIcon />+ </Button>+ {filters()}+ </HeaderActionGroup>+ </ListHeader>+ </Show>+ <div+ class={cn(+ '@container/insights flex w-full min-w-0 flex-col gap-5',+ props.headerTitle && 'px-4 pt-3'+ )}+ aria-busy={props.loading}+ >+ <Show when={!props.headerTitle}>+ <div class="flex min-w-0 flex-wrap items-center gap-2">+ {props.scopeSelector}+ <div class="ml-auto flex min-w-0 items-center gap-2">+ <Button+ variant="outline"+ onClick={download}+ disabled={!canDownload()}+ >+ <DownloadIcon class="size-4" />+ Download+ </Button>+ {filters()}+ </div>+ </div></Show>- </div>- <Show when={props.error}>- <div- role="alert"- class="flex flex-wrap items-center justify-between gap-4 rounded-xl border border-edge-muted p-5"- >- <p class="text-sm">{props.error}</p>- <Button variant="outline" onClick={props.onRetry}>- Try again- </Button>+ <div class="flex flex-wrap items-center justify-between gap-2 text-xs text-ink-muted">+ <p>+ {formatDate(props.from)} – {formatDate(props.to)} ·{' '}+ {props.timeZone.replaceAll('_', ' ')}+ </p>+ <Show when={eventId() !== 'all' || hostId() !== 'all'}>+ <button+ type="button"+ class="underline underline-offset-2"+ onClick={() => {+ setEventId('all');+ setHostId('all');+ }}+ >+ Clear filters+ </button>+ </Show></div>- </Show>- <Show when={props.loading}>- <p role="status" class="text-sm text-ink-muted">- Loading booking insights…- </p>- </Show>- <Show when={!props.error}>- <div- class="grid min-w-0 grid-cols-1 items-start gap-5 @min-[1000px]/insights:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]"- classList={{ 'opacity-50': props.loading }}- >- <div class="@container/insight-main flex min-w-0 flex-col gap-5">- <InsightSection title="Events">- <EventOutcomesChart rows={outcomes()} />- <div class="grid grid-cols-1 divide-y divide-edge-muted @sm/insight-main:grid-cols-2 @3xl/insight-main:grid-cols-4 @3xl/insight-main:divide-x @3xl/insight-main:divide-y-0">- <Metric- label="Total events"- definition="Bookings starting in this period, including pending and cancelled bookings. Failed and processing requests are excluded."- value={current().counts.total}- previous={previous().counts.total}- />- <Metric- label="Events completed"- definition="Confirmed bookings that have ended, excluding marked no-shows. This does not imply attendance was recorded."- value={current().counts.completed}- previous={previous().counts.completed}- />- <Metric- label="Events rescheduled"- definition="Bookings starting in this period with at least one recorded reschedule. Each booking is counted once."- value={current().counts.rescheduled}- previous={previous().counts.rescheduled}- />- <Metric- label="Events cancelled"- definition="Cancelled bookings with a scheduled start in this period."- value={current().counts.cancelled}- previous={previous().counts.cancelled}- lowerIsBetter- />- </div>- </InsightSection>- <InsightSection title="Performance">- <div class="grid grid-cols-1 divide-y divide-edge-muted @sm/insight-main:grid-cols-2 @3xl/insight-main:grid-cols-4 @3xl/insight-main:divide-x @3xl/insight-main:divide-y-0">- <Metric- label="Hours in meetings"- definition="Total scheduled duration of completed events. Actual call duration is not tracked."- value={current().meetingMinutes / 60}- previous={previous().meetingMinutes / 60}- unit="hrs"- />- <Metric- label="Average duration"- definition="Average scheduled duration of confirmed bookings starting in this period, in minutes."- value={current().averageMinutes}- previous={previous().averageMinutes}- unit="min"- />- <Metric- label="No-show (host)"- definition="Bookings explicitly marked as a host no-show. Unrecorded attendance is not treated as a no-show."- value={current().counts.hostNoShow}- previous={previous().counts.hostNoShow}- lowerIsBetter- />- <Metric- label="No-show (guest)"- definition="Bookings explicitly marked as a guest no-show. Unrecorded attendance is not treated as a no-show."- value={current().counts.guestNoShow}- previous={previous().counts.guestNoShow}- lowerIsBetter- />- </div>- </InsightSection>- <Show when={!props.loading && !current().bookings.length}>- <p class="rounded-lg border border-dashed border-edge-muted px-5 py-4 text-sm text-ink-muted">- No bookings match this period and these filters. Try another- date range or clear the filters.- </p>- </Show>- <TrendChart days={current().days} />+ <Show when={props.error}>+ <div+ role="alert"+ class="flex flex-wrap items-center justify-between gap-4 rounded-xl border border-edge-muted p-5"+ >+ <p class="text-sm">{props.error}</p>+ <Button variant="outline" onClick={props.onRetry}>+ Try again+ </Button></div>- <div class="flex min-w-0 flex-col gap-5">- <RankedList- title="Popular event types"- description="Number of bookings by event type"- rows={current().eventCounts.map((row) => ({- ...row,- name:- props.events.find((event) => event.id === row.id)?.title ??- row.name,- }))}- empty="No event types booked in this period."- />- <HourChart hours={current().hours} />- <Show when={hostOptions().length > 2}>+ </Show>+ <Show when={props.loading}>+ <p role="status" class="text-sm text-ink-muted">+ Loading booking insights…+ </p>+ </Show>+ <Show when={!props.error}>+ <div+ class="grid min-w-0 grid-cols-1 items-start gap-5 @min-[1000px]/insights:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]"+ classList={{ 'opacity-50': props.loading }}+ >+ <div class="@container/insight-main flex min-w-0 flex-col gap-5">+ <InsightSection title="Events">+ <EventOutcomesChart rows={outcomes()} />+ <div class="grid grid-cols-1 divide-y divide-edge-muted @sm/insight-main:grid-cols-2 @3xl/insight-main:grid-cols-4 @3xl/insight-main:divide-x @3xl/insight-main:divide-y-0">+ <Metric+ label="Total events"+ definition="Bookings starting in this period, including pending and cancelled bookings. Failed and processing requests are excluded."+ value={current().counts.total}+ previous={previous().counts.total}+ />+ <Metric+ label="Events completed"+ definition="Confirmed bookings that have ended, excluding marked no-shows. This does not imply attendance was recorded."+ value={current().counts.completed}+ previous={previous().counts.completed}+ />+ <Metric+ label="Events rescheduled"+ definition="Bookings starting in this period with at least one recorded reschedule. Each booking is counted once."+ value={current().counts.rescheduled}+ previous={previous().counts.rescheduled}+ />+ <Metric+ label="Events cancelled"+ definition="Cancelled bookings with a scheduled start in this period."+ value={current().counts.cancelled}+ previous={previous().counts.cancelled}+ lowerIsBetter+ />+ </div>+ </InsightSection>+ <InsightSection title="Performance">+ <div class="grid grid-cols-1 divide-y divide-edge-muted @sm/insight-main:grid-cols-2 @3xl/insight-main:grid-cols-4 @3xl/insight-main:divide-x @3xl/insight-main:divide-y-0">+ <Metric+ label="Hours in meetings"+ definition="Total scheduled duration of completed events. Actual call duration is not tracked."+ value={current().meetingMinutes / 60}+ previous={previous().meetingMinutes / 60}+ unit="hrs"+ />+ <Metric+ label="Average duration"+ definition="Average scheduled duration of confirmed bookings starting in this period, in minutes."+ value={current().averageMinutes}+ previous={previous().averageMinutes}+ unit="min"+ />+ <Metric+ label="No-show (host)"+ definition="Bookings explicitly marked as a host no-show. Unrecorded attendance is not treated as a no-show."+ value={current().counts.hostNoShow}+ previous={previous().counts.hostNoShow}+ lowerIsBetter+ />+ <Metric+ label="No-show (guest)"+ definition="Bookings explicitly marked as a guest no-show. Unrecorded attendance is not treated as a no-show."+ value={current().counts.guestNoShow}+ previous={previous().counts.guestNoShow}+ lowerIsBetter+ />+ </div>+ </InsightSection>+ <Show when={!props.loading && !current().bookings.length}>+ <p class="rounded-lg border border-dashed border-edge-muted px-5 py-4 text-sm text-ink-muted">+ No bookings match this period and these filters. Try another+ date range or clear the filters.+ </p>+ </Show>+ <TrendChart days={current().days} />+ </div>+ <div class="flex min-w-0 flex-col gap-5"><RankedList- title="Bookings by host"- description="Collective bookings count toward each participating host"- rows={current().hostCounts.map((row) => ({+ title="Popular event types"+ description="Number of bookings by event type"+ rows={current().eventCounts.map((row) => ({...row,name:- props.members.find((member) => member.id === row.id)- ?.name ?? 'Former member',+ props.events.find((event) => event.id === row.id)?.title ??+ row.name,}))}- empty="No hosts with bookings in this period."+ empty="No event types booked in this period."/>- </Show>+ <HourChart hours={current().hours} />+ <Show when={hostOptions().length > 2}>+ <RankedList+ title="Bookings by host"+ description="Collective bookings count toward each participating host"+ rows={current().hostCounts.map((row) => ({+ ...row,+ name:+ props.members.find((member) => member.id === row.id)+ ?.name ?? 'Former member',+ }))}+ empty="No hosts with bookings in this period."+ />+ </Show>+ </div>+ <p class="col-span-full text-xs leading-relaxed text-ink-muted">+ Compared with{' '}+ {formatDate(+ previousInsightRange({ from: props.from, to: props.to }).from+ )}{' '}+ –{' '}+ {formatDate(+ previousInsightRange({ from: props.from, to: props.to }).to+ )}+ . All charts use the booking’s current start date in{' '}+ {props.timeZone.replaceAll('_', ' ')}. A booking can be both+ rescheduled and completed or cancelled.+ </p></div>- <p class="col-span-full text-xs leading-relaxed text-ink-muted">- Compared with{' '}- {formatDate(- previousInsightRange({ from: props.from, to: props.to }).from- )}{' '}- –{' '}- {formatDate(- previousInsightRange({ from: props.from, to: props.to }).to- )}- . All charts use the booking’s current start date in{' '}- {props.timeZone.replaceAll('_', ' ')}. A booking can be both- rescheduled and completed or cancelled.- </p>- </div>- </Show>- </div>+ </Show>+ </div>+ </>);}diff --git a/apps/web/src/features/scheduling/components/owner-badge.tsx b/apps/web/src/features/scheduling/components/owner-badge.tsxindex bbc4c00f6e..53d5a99d12 100644--- a/apps/web/src/features/scheduling/components/owner-badge.tsx+++ b/apps/web/src/features/scheduling/components/owner-badge.tsx@@ -1,12 +1,15 @@import User from '@phosphor/user.svg';import Users from '@phosphor/users.svg';+import { Badge } from '@ui';import { Show } from 'solid-js';import type { SchedulingScope } from '../core/types';export function OwnerBadge(props: { scope: SchedulingScope }) {return (- <span- class="inline-flex max-w-full items-center gap-1.5 rounded-md bg-ink/5 px-2 py-1 text-xs font-normal text-ink-muted"+ <Badge+ variant="outline"+ size="sm"+ class="max-w-full font-normal"title={props.scope.teamId ? `Team · ${props.scope.name}` : 'Personal'}><Show@@ -18,6 +21,6 @@ export function OwnerBadge(props: { scope: SchedulingScope }) {<span class="truncate">{props.scope.teamId ? `Team · ${props.scope.name}` : 'Personal'}</span>- </span>+ </Badge>);}diff --git a/apps/web/src/features/scheduling/components/scheduling-filters.tsx b/apps/web/src/features/scheduling/components/scheduling-filters.tsxindex 0f098d207a..c8482d7a06 100644--- a/apps/web/src/features/scheduling/components/scheduling-filters.tsx+++ b/apps/web/src/features/scheduling/components/scheduling-filters.tsx@@ -2,7 +2,7 @@ import { MobileFilterDrawer } from '@app/components/view-shell/MobileFilterDraweimport { isTouchDevice } from '@core/mobile/isTouchDevice';import { Accordion } from '@kobalte/core/accordion';import { Popover } from '@kobalte/core/popover';-import Funnel from '@phosphor/funnel.svg';+import Funnel from '@phosphor/funnel-simple.svg';import { Button } from '@ui';import { createSignal, type JSX, Show } from 'solid-js';@@ -24,11 +24,16 @@ export function SchedulingFilters(props: {as={Button}ref={setTrigger}type="button"- variant="outline"- size="md"+ variant="ghost"+ size={props.activeCount > 0 ? 'md' : 'icon-md'}+ label={props.title}>- <Funnel aria-hidden="true" class="size-4" />- Filters+ <Funnel aria-hidden="true" />+ <Show when={props.activeCount > 0}>+ <span class="flex h-4 min-w-4 items-center justify-center rounded-full bg-accent px-1 text-xxs font-medium leading-none text-surface">+ {props.activeCount}+ </span>+ </Show></Popover.Trigger><Popover.Portalmount={diff --git a/apps/web/src/features/scheduling/scheduling.tsx b/apps/web/src/features/scheduling/scheduling.tsxindex ea7eb7a46f..543325c3d6 100644--- a/apps/web/src/features/scheduling/scheduling.tsx+++ b/apps/web/src/features/scheduling/scheduling.tsx@@ -1,12 +1,17 @@+import { useViewControlHotkeys } from '@app/components/view-shell';import { openChatWithInput } from '@app/features/chat/ChatWithAgentButton';import { useFeatureFlag } from '@app/lib/analytics/posthog';import { createSearchParams, useBeforeLeave } from '@app/lib/split-router';-import { useSplitDisplayName } from '@components/app/split-layout/layoutUtils';+import {+ useSplitDisplayName,+ useSplitPanelOrThrow,+} from '@components/app/split-layout/layoutUtils';import { SplitPanel } from '@components/app/split-panel';import { toast } from '@core/component/Toast/Toast';import { enableCalendarScheduling } from '@core/constant/featureFlags';import { useSettingsState } from '@core/constant/SettingsState';import { useUserContext } from '@core/context/user';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { getDisplayName, macroIdToEmail, tryMacroId } from '@core/user';import { writeClipboardData } from '@core/util/dataTransfer';import { getWebOrigin } from '@core/util/webOrigin';@@ -119,6 +124,16 @@ function SchedulingHost(props: ParentProps) {}export function BookingLinksWorkspace() {+ const panel = useSplitPanelOrThrow();+ let focusSearch: (() => boolean) | undefined;+ useViewControlHotkeys({+ scopeId: panel.splitHotkeyScope,+ enabled: () => panel.isPanelActive() && !isTouchDevice(),+ search: {+ description: 'Search scheduling',+ run: () => focusSearch?.() ?? false,+ },+ });const flag = useFeatureFlag(enableCalendarScheduling);const [search, setSearch] = createSearchParams(bookingLinksSearch);useSplitDisplayName(() => 'Scheduling');@@ -148,6 +163,7 @@ export function BookingLinksWorkspace() {><SchedulingHost><BookingWorkspaceView+ registerSearchFocus={(focus) => (focusSearch = focus)}search={search}onSearchChange={(patch) => setSearch(patch)}registerBeforeLeave={(guard) => {diff --git a/apps/web/src/features/scheduling/views/booking-workspace-view.tsx b/apps/web/src/features/scheduling/views/booking-workspace-view.tsxindex 3402961969..ae0e2df43a 100644--- a/apps/web/src/features/scheduling/views/booking-workspace-view.tsx+++ b/apps/web/src/features/scheduling/views/booking-workspace-view.tsx@@ -1,4 +1,10 @@import { SearchBar, ViewShell, ViewSidebar } from '@app/components/view-shell';+import {+ ListHeader,+ ListHeaderSearch,+} from '@app/components/view-shell/ListHeader';+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { fireAndForget } from '@core/util/fireAndForget';import PageIcon from '@phosphor/browser.svg';@@ -19,6 +25,7 @@ import {createMemo,createSignal,For,+ type JSX,mapArray,on,onCleanup,@@ -78,6 +85,7 @@ export function BookingWorkspaceView(props: {registerBeforeLeave?: (guard: (signal: AbortSignal) => boolean | Promise<boolean>) => void | (() => void);+ registerSearchFocus?: (focus: (() => boolean) | undefined) => void;}) {const capabilities = useScheduling();const search = props.search;@@ -122,6 +130,18 @@ export function BookingWorkspaceView(props: {const tab = () => TABS.find((item) => item.value === search.tab) ?? TABS[0];const editingSchedule = () =>search.tab === 'availability' && !!owner()?.schedule();+ const hasListHeader = () =>+ !isTouchDevice() &&+ (search.tab === 'links' ||+ search.tab === 'bookings' ||+ (search.tab === 'availability' && !editingSchedule()));+ let focusSearch: (() => void) | undefined;+ props.registerSearchFocus?.(() => {+ if (!hasListHeader() || !focusSearch) return false;+ focusSearch();+ return true;+ });+ onCleanup(() => props.registerSearchFocus?.(undefined));const isSaving = () => owners().some((item) => item.source.saving());const discardEditors = () => {for (const current of owners()) current.discardEditors();@@ -368,25 +388,117 @@ export function BookingWorkspaceView(props: {onCreate={(opener) => fireAndForget(create(opener), 'scheduling')}/></Show>- <ViewShell.TopBar>- <Show- when={search.tab === 'availability'}- fallback={- <div class="flex min-w-0 flex-1 items-center gap-2">- <div class="flex min-w-0 items-center gap-1">- <h1 class="min-w-0 truncate pl-2 text-sm font-semibold">- {tab().label}- </h1>- <Button- variant="ghost"- size="icon-sm"- label={`About ${tab().label.toLowerCase()}`}- tooltip={tab().description}- >- <InfoIcon class="size-4 text-ink-muted" />- </Button>+ <Show+ when={+ isTouchDevice() ||+ (search.tab !== 'bookings' &&+ search.tab !== 'page' &&+ search.tab !== 'insights')+ }+ >+ <SchedulingHeader+ list={hasListHeader()}+ actions={+ <>+ <Show when={owner()?.scope().canEdit}>+ <Show when={search.tab === 'links'}>+ <HeaderActionGroup label="Booking link tools">+ <Button+ label="Create with agent"+ variant="ghost"+ size="icon-md"+ disabled={+ !owner()?.source.profile() ||+ isSaving() ||+ startingAgent()+ }+ onClick={() =>+ fireAndForget(createWithAgent(), 'scheduling')+ }+ >+ <SparkleIcon class="size-4" />+ </Button>+ </HeaderActionGroup>+ </Show>+ <ViewCreateButton+ presentation="toolbar"+ aria-label={+ search.tab === 'availability'+ ? 'New schedule'+ : 'New booking link'+ }+ disabled={+ !owner()?.source.profile() ||+ isSaving() ||+ startingAgent()+ }+ onClick={(event) =>+ fireAndForget(create(event.currentTarget), 'scheduling')+ }+ />+ </Show>+ <ListHeaderSearch+ label={+ search.tab === 'availability'+ ? 'Search schedules'+ : 'Search booking links'+ }+ value={+ search.tab === 'availability'+ ? availabilitySearch()+ : query()+ }+ onValueChange={(value) =>+ search.tab === 'availability'+ ? setAvailabilitySearch(value)+ : setQuery(value)+ }+ registerFocus={(focus) => (focusSearch = focus)}+ />+ </>+ }+ >+ <Show+ when={search.tab === 'availability'}+ fallback={+ <div class="flex min-w-0 flex-1 items-center gap-2">+ <div class="flex min-w-0 items-center gap-1">+ <h1 class="min-w-0 truncate pl-2 text-sm font-semibold">+ {tab().label}+ </h1>+ <Button+ variant="ghost"+ size="icon-sm"+ label={`About ${tab().label.toLowerCase()}`}+ tooltip={tab().description}+ >+ <InfoIcon class="size-4 text-ink-muted" />+ </Button>+ </div>+ <Show when={owner()}>+ {(current) => (+ <div class="hidden min-w-0 sm:block">+ <OwnerBadge scope={current().scope()} />+ </div>+ )}+ </Show></div>- <Show when={owner()}>+ }+ >+ <div class="flex min-w-0 flex-1 items-center gap-2">+ <AvailabilityTopBar+ editing={editingSchedule()}+ creating={+ !owner()+ ?.source.profile()+ ?.schedules.some(+ (schedule) => schedule.id === owner()?.schedule()?.id+ )+ }+ disabled={isSaving() || !owner()?.source.profile()}+ onBack={() => owner()?.closeScheduleEditor()}+ />+ <Show when={!editingSchedule() && owner()}>{(current) => (<div class="hidden min-w-0 sm:block"><OwnerBadge scope={current().scope()} />@@ -394,35 +506,14 @@ export function BookingWorkspaceView(props: {)}</Show></div>- }- >- <div class="flex min-w-0 flex-1 items-center gap-2">- <AvailabilityTopBar- editing={editingSchedule()}- creating={- !owner()- ?.source.profile()- ?.schedules.some(- (schedule) => schedule.id === owner()?.schedule()?.id- )- }- disabled={isSaving() || !owner()?.source.profile()}- onBack={() => owner()?.closeScheduleEditor()}- />- <Show when={!editingSchedule() && owner()}>- {(current) => (- <div class="hidden min-w-0 sm:block">- <OwnerBadge scope={current().scope()} />- </div>- )}- </Show>- </div>- </Show>- </ViewShell.TopBar>+ </Show>+ </SchedulingHeader>+ </Show><Showwhen={- search.tab === 'links' ||- (search.tab === 'availability' && !editingSchedule())+ isTouchDevice() &&+ (search.tab === 'links' ||+ (search.tab === 'availability' && !editingSchedule()))}><ViewShell.Header class="touch:pt-0">@@ -505,6 +596,10 @@ export function BookingWorkspaceView(props: {</Show><ViewShell.Contentclass={cn('px-4', {+ 'not-touch:px-0':+ search.tab === 'bookings' ||+ search.tab === 'page' ||+ search.tab === 'insights','flex min-h-0 flex-col overflow-hidden':editingSchedule() || search.tab === 'page','overflow-auto pb-8': !editingSchedule() && search.tab !== 'page',@@ -567,6 +662,19 @@ export function BookingWorkspaceView(props: {<Show when={search.tab === 'bookings' && owner() === current}><OwnerSettingsSectionkind="bookings"+ registerSearchFocus={(focus) => (focusSearch = focus)}+ bookingsTitle={+ !isTouchDevice() ? (+ <div class="flex items-center gap-2">+ <h1 class="text-sm font-semibold text-ink">+ Bookings+ </h1>+ <div class="hidden @min-[900px]/split-header:flex">+ <OwnerBadge scope={current.scope()} />+ </div>+ </div>+ ) : undefined+ }owner={current}search={bookingsSearch()}onSearchChange={setBookingsSearch}@@ -586,10 +694,35 @@ export function BookingWorkspaceView(props: {/></Show><Show when={search.tab === 'insights' && owner() === current}>- <OwnerSettingsSection kind="insights" owner={current} />+ <OwnerSettingsSection+ kind="insights"+ owner={current}+ insightsTitle={+ !isTouchDevice() ? (+ <div class="flex items-center gap-2">+ <h1 class="text-sm font-semibold text-ink">+ Insights+ </h1>+ <div class="hidden @min-[900px]/split-header:flex">+ <OwnerBadge scope={current.scope()} />+ </div>+ </div>+ ) : undefined+ }+ /></Show><Show when={search.tab === 'page' && owner() === current}>- <OwnerSettingsSection kind="page" owner={current} />+ <OwnerSettingsSection+ kind="page"+ owner={current}+ pageTitle={+ !isTouchDevice() ? (+ <h1 class="text-sm font-semibold text-ink">+ Booking page+ </h1>+ ) : undefined+ }+ /></Show></div>)}@@ -599,3 +732,18 @@ export function BookingWorkspaceView(props: {</ViewShell.Root>);}++function SchedulingHeader(props: {+ list: boolean;+ children: JSX.Element;+ actions: JSX.Element;+}) {+ return (+ <Show+ when={props.list}+ fallback={<ViewShell.TopBar>{props.children}</ViewShell.TopBar>}+ >+ <ListHeader title={props.children}>{props.actions}</ListHeader>+ </Show>+ );+}diff --git a/apps/web/src/features/scheduling/views/bookings-view.tsx b/apps/web/src/features/scheduling/views/bookings-view.tsxindex 3bbac94deb..313c5c9975 100644--- a/apps/web/src/features/scheduling/views/bookings-view.tsx+++ b/apps/web/src/features/scheduling/views/bookings-view.tsx@@ -1,8 +1,13 @@import { SearchBar } from '@app/components/view-shell';+import {+ ListHeader,+ ListHeaderSearch,+} from '@app/components/view-shell/ListHeader';import { MobileFilterDrawer } from '@app/components/view-shell/MobileFilterDrawer';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { type JSX, Show } from 'solid-js';import { BookingDetailsDialog } from '../components/booking-details-dialog';-import { BookingsPanel } from '../components/bookings-panel';+import { BookingStatusTabs, BookingsPanel } from '../components/bookings-panel';import { SelectInput } from '../components/fields';import { SchedulingFilterSection } from '../components/scheduling-filter-section';import { SchedulingFilters } from '../components/scheduling-filters';@@ -16,6 +21,8 @@ const TIME_ZONES = Intl.supportedValuesOf('timeZone').map((value) => ({}));export function BookingsView(props: {+ headerTitle?: JSX.Element;+ registerSearchFocus?: (focus: () => void) => void;bookings: Booking[];events: EventType[];members: SchedulingMember[];@@ -39,6 +46,67 @@ export function BookingsView(props: {onSearchChange: (value) => props.onSearchChange?.(value),});let panel: HTMLDivElement | undefined;+ const filters = () => (+ <SchedulingFilters+ title="Booking filters"+ activeCount={state.eventId() === 'all' ? 0 : 1}+ onClear={state.clearFilters}+ mobileChildren={+ <>+ <SchedulingFilterSection+ value="booking-links"+ label="Booking links"+ selected={state.eventId()}+ options={state.eventOptions()}+ onChange={state.setEventId}+ />+ <SchedulingFilterSection+ value="time-zone"+ label="Time zone"+ selected={state.timeZone()}+ options={+ TIME_ZONES.some((option) => option.value === state.timeZone())+ ? TIME_ZONES+ : [+ {+ value: state.timeZone(),+ label: state.timeZone().replaceAll('_', ' '),+ },+ ...TIME_ZONES,+ ]+ }+ onChange={state.setTimeZone}+ activeCount={0}+ />+ <MobileFilterDrawer.Section+ value="date-range"+ label="Date range"+ activeCount={0}+ >+ {props.dateRange}+ </MobileFilterDrawer.Section>+ </>+ }+ >+ <div class="min-w-0">+ <SelectInput+ label="Filter bookings by event type"+ value={state.eventId()}+ options={state.eventOptions()}+ onChange={state.setEventId}+ class="w-full text-sm touch:h-9"+ />+ </div>+ <TimezoneSelect+ value={state.timeZone()}+ onChange={state.setTimeZone}+ options={TIME_ZONES}+ class="w-full"+ portalScope="local"+ />+ {props.dateRange}+ </SchedulingFilters>+ );return (<divref={panel}@@ -46,94 +114,67 @@ export function BookingsView(props: {class="min-w-0 outline-none"aria-label="Bookings list">- <div class="mb-5 flex min-w-0 items-center gap-2">- <SearchBar- label="Search bookings"- placeholder="Search bookings…"- value={state.search()}- onValueChange={state.setSearch}- class="max-w-md min-w-0 flex-1"- />- <SchedulingFilters- title="Booking filters"- activeCount={state.eventId() === 'all' ? 0 : 1}- onClear={state.clearFilters}- mobileChildren={- <>- <SchedulingFilterSection- value="booking-links"- label="Booking links"- selected={state.eventId()}- options={state.eventOptions()}- onChange={state.setEventId}- />- <SchedulingFilterSection- value="time-zone"- label="Time zone"- selected={state.timeZone()}- options={- TIME_ZONES.some((option) => option.value === state.timeZone())- ? TIME_ZONES- : [- {- value: state.timeZone(),- label: state.timeZone().replaceAll('_', ' '),- },- ...TIME_ZONES,- ]- }- onChange={state.setTimeZone}- activeCount={0}+ <Show+ when={props.headerTitle}+ fallback={+ <div class="mb-5 flex min-w-0 items-center gap-2">+ <SearchBar+ label="Search bookings"+ placeholder="Search bookings…"+ value={state.search()}+ onValueChange={state.setSearch}+ class="max-w-md min-w-0 flex-1"+ />+ {filters()}+ </div>+ }+ >+ <ListHeader+ title={+ <div class="flex min-w-0 items-center gap-3">+ {props.headerTitle}+ <BookingStatusTabs+ tabs={state.tabs()}+ tab={state.tab()}+ onTab={state.setTab}/>- <MobileFilterDrawer.Section- value="date-range"- label="Date range"- activeCount={0}- >- {props.dateRange}- </MobileFilterDrawer.Section>- </>+ </div>}>- <div class="min-w-0">- <SelectInput- label="Filter bookings by event type"- value={state.eventId()}- options={state.eventOptions()}- onChange={state.setEventId}- class="w-full text-sm touch:h-9"- />- </div>- <TimezoneSelect- value={state.timeZone()}- onChange={state.setTimeZone}- options={TIME_ZONES}- class="w-full"- portalScope="local"+ <HeaderActionGroup label="Booking filters">+ {filters()}+ </HeaderActionGroup>+ <ListHeaderSearch+ label="Search bookings"+ value={state.search()}+ onValueChange={state.setSearch}+ registerFocus={(focus) => props.registerSearchFocus?.(focus)}/>- {props.dateRange}- </SchedulingFilters>+ </ListHeader>+ </Show>+ <div class={props.headerTitle ? 'px-4 pt-3' : undefined}>+ <BookingsPanel+ hideTabs={!!props.headerTitle}+ members={props.members}+ groups={state.groups()}+ tabs={state.tabs()}+ tab={state.tab()}+ search={state.search()}+ eventId={state.eventId()}+ timeZone={state.timeZone()}+ count={state.visible().length}+ loading={props.loading}+ error={props.error}+ canManageBookings={props.canManageBookings}+ currentUserId={props.currentUserId}+ busyId={props.busyId}+ onTab={state.setTab}+ onClear={state.clearFilters}+ onView={state.openDetails}+ onApprove={props.onApprove}+ onManage={props.onManage}+ /></div>- <BookingsPanel- members={props.members}- groups={state.groups()}- tabs={state.tabs()}- tab={state.tab()}- search={state.search()}- eventId={state.eventId()}- timeZone={state.timeZone()}- count={state.visible().length}- loading={props.loading}- error={props.error}- canManageBookings={props.canManageBookings}- currentUserId={props.currentUserId}- busyId={props.busyId}- onTab={state.setTab}- onClear={state.clearFilters}- onView={state.openDetails}- onApprove={props.onApprove}- onManage={props.onManage}- /><Show when={state.selection()} keyed>{(selection) => (<Show when={state.selected()}>diff --git a/apps/web/src/features/scheduling/views/insights-view.tsx b/apps/web/src/features/scheduling/views/insights-view.tsxindex eadfa80b7c..d13c3dab14 100644--- a/apps/web/src/features/scheduling/views/insights-view.tsx+++ b/apps/web/src/features/scheduling/views/insights-view.tsx@@ -12,11 +12,13 @@ export function InsightsView(props: {members: SchedulingMember[];timeZone: string;scopeSelector?: JSX.Element;+ headerTitle?: JSX.Element;}) {const state = createInsightsState(props.source, props.timeZone);onMount(() => fireAndForget(state.load(), 'scheduling'));return (<InsightsPanel+ headerTitle={props.headerTitle}scopeSelector={props.scopeSelector}bookings={state.bookings()}events={props.events}diff --git a/apps/web/src/features/scheduling/views/owner-settings-section.tsx b/apps/web/src/features/scheduling/views/owner-settings-section.tsxindex 39f6b3d184..40776c9456 100644--- a/apps/web/src/features/scheduling/views/owner-settings-section.tsx+++ b/apps/web/src/features/scheduling/views/owner-settings-section.tsx@@ -27,6 +27,10 @@ export function OwnerSettingsSection(props: {onSearchChange?: (value: string) => void;dateRange?: JSX.Element;scheduleTopBarOwned?: boolean;+ bookingsTitle?: JSX.Element;+ pageTitle?: JSX.Element;+ insightsTitle?: JSX.Element;+ registerSearchFocus?: (focus: () => void) => void;}) {const capabilities = useScheduling();const owner = props.owner;@@ -63,6 +67,23 @@ export function OwnerSettingsSection(props: {});return copied;}+ const pageShare = () => (+ <CopyButton+ variant="outline"+ size="md"+ label="Copy link"+ tooltip={+ source.profile()?.revision+ ? undefined+ : 'Save your booking page before sharing'+ }+ disabled={!source.profile()?.revision}+ onClick={copyPageLink}+ >+ <Copy aria-hidden="true" class="size-4" />+ Copy link+ </CopyButton>+ );return (<Show when={source.profile()}>{(p) => (@@ -271,24 +292,14 @@ export function OwnerSettingsSection(props: {role="group"aria-label={`${scope().name} ${props.kind === 'page' ? 'booking page' : props.kind}`}>- <div class="mb-4 flex shrink-0 flex-wrap items-center justify-end gap-3">- <CopyButton- variant="outline"- size="md"- label="Copy link"- tooltip={- p().revision- ? undefined- : 'Save your booking page before sharing'- }- disabled={!p().revision}- onClick={copyPageLink}- >- <Copy aria-hidden="true" class="size-4" />- Copy link- </CopyButton>- </div>+ <Show when={!props.pageTitle}>+ <div class="mb-4 flex shrink-0 flex-wrap items-center justify-end gap-3">+ {pageShare()}+ </div>+ </Show><BookingPageEditor+ headerTitle={props.pageTitle}+ shareAction={props.pageTitle ? pageShare() : undefined}profile={{id: p().id,name: profileDraft()?.name ?? p().name,@@ -324,6 +335,8 @@ export function OwnerSettingsSection(props: {aria-label={`${scope().name} ${props.kind === 'page' ? 'booking page' : props.kind}`}><BookingsView+ headerTitle={props.bookingsTitle}+ registerSearchFocus={props.registerSearchFocus}search={props.search}onSearchChange={props.onSearchChange}dateRange={props.dateRange}@@ -373,6 +386,7 @@ export function OwnerSettingsSection(props: {<Show when={scope().id} keyed>{(_scopeId) => (<InsightsView+ headerTitle={props.insightsTitle}source={source}events={p().eventTypes}members={capabilities.members()}diff --git a/apps/web/src/features/scheduling/views/schedule-fields-view.tsx b/apps/web/src/features/scheduling/views/schedule-fields-view.tsxindex 8596a19465..5ffa325778 100644--- a/apps/web/src/features/scheduling/views/schedule-fields-view.tsx+++ b/apps/web/src/features/scheduling/views/schedule-fields-view.tsx@@ -204,14 +204,12 @@ export function ScheduleFields(props: {</div><Tabsaria-label="Time format"- list={[+ options={[{ value: '12h', label: '12h' },{ value: '24h', label: '24h' },]}value={timeFormat()}- onChange={(value) => {- if (value === '12h' || value === '24h') setTimeFormat(value);- }}+ onChange={setTimeFormat}/></div></header>diff --git a/apps/web/src/features/scheduling/views/settings-view.test.tsx b/apps/web/src/features/scheduling/views/settings-view.test.tsxindex b0b18d8671..1ac9c23283 100644--- a/apps/web/src/features/scheduling/views/settings-view.test.tsx+++ b/apps/web/src/features/scheduling/views/settings-view.test.tsx@@ -94,6 +94,19 @@ vi.mock('@app/components/view-shell', async () => {};});+vi.mock('@app/components/view-shell/ViewShell', () => ({+ ViewShell: {+ TopBar: (props: ParentProps) => <div>{props.children}</div>,+ },+}));++vi.mock('@app/components/view-shell/ViewSidebar', () => ({+ ViewSidebar: {+ Icon: (props: ParentProps) => <span>{props.children}</span>,+ Trailing: (props: ParentProps) => <span>{props.children}</span>,+ },+}));+beforeEach(() => {vi.spyOn(window, 'scrollTo').mockImplementation(() => {});vi.stubGlobal('CSS', { escape: (value: string) => value });@@ -516,6 +529,7 @@ it('searches the selected owner and preserves read-only team access', async () =within(team).getByRole('button', { name: 'Team planning' }));});+ fireEvent.click(screen.getByRole('button', { name: 'Search booking links' }));const search = screen.getByRole('searchbox', {name: 'Search booking links',});diff --git a/apps/web/src/features/settings/Account.tsx b/apps/web/src/features/settings/Account.tsxindex 05127b71e1..9d7e0f29e1 100644--- a/apps/web/src/features/settings/Account.tsx+++ b/apps/web/src/features/settings/Account.tsx@@ -503,7 +503,12 @@ export function Account() {label="Log out"description="Sign out of Macro on this device.">- <Button variant="outline" depth={3} onClick={() => logout()}>+ <Button+ variant="outline"+ size="sm"+ depth={3}+ onClick={() => logout()}+ ><SignOutIcon class="size-4" />Log out</Button>@@ -771,10 +776,10 @@ function NameInput(props: {// Pull the box out by its padding and border (12px + 1px) so the text, not the// border, lines up with the other values in the column.return (- <div class="ph-no-capture group relative -ml-[13px] flex w-[calc(100%+13px)] items-center gap-1.5 rounded-lg h-9 px-3 border text-sm bg-transparent text-ink-muted border-edge-muted hover:text-ink focus-within:text-ink focus-within:border-accent">+ <div class="ph-no-capture group settings-input relative -ml-[13px] flex w-[calc(100%+13px)] items-center gap-1.5 focus-within:ring-2 focus-within:ring-edge-muted"><inputtype="text"- class="flex-1 min-w-0 bg-transparent outline-none border-0 p-0 text-sm placeholder:text-ink-placeholder"+ class="flex-1 min-w-0 bg-transparent outline-none border-0 p-0 placeholder:text-ink-placeholder"value={inputValue()}onInput={(e) => setInputValue(e.currentTarget.value)}onFocus={() => {diff --git a/apps/web/src/features/settings/ApiKeys.tsx b/apps/web/src/features/settings/ApiKeys.tsxindex d0b56b07a3..7865b5878e 100644--- a/apps/web/src/features/settings/ApiKeys.tsx+++ b/apps/web/src/features/settings/ApiKeys.tsx@@ -202,19 +202,21 @@ function ApiKeyRow(props: {Created {formatRelativeTimestamp(props.keyInfo.createdAt)}</div></div>- <Tooltip label="Delete key">- <button- type="button"- aria-label={`Delete ${props.keyInfo.name}`}- class="flex size-7 shrink-0 items-center justify-center rounded-md text-ink-extra-muted outline-none hover:bg-failure/10 hover:text-failure focus-visible:border focus-visible:border-failure disabled:opacity-30"- disabled={props.deleting}- onClick={props.onDelete}+ <Button+ variant="ghost"+ size="icon-sm"+ label={`Delete ${props.keyInfo.name}`}+ tooltip="Delete key"+ disabled={props.deleting}+ onClick={props.onDelete}+ >+ <Show+ when={props.deleting}+ fallback={<TrashIcon class="size-3.5 touch:size-4" />}>- <Show when={props.deleting} fallback={<TrashIcon class="size-4" />}>- <SpinnerIcon class="size-4 animate-spin" />- </Show>- </button>- </Tooltip>+ <SpinnerIcon class="animate-spin" />+ </Show>+ </Button></div>);}diff --git a/apps/web/src/features/settings/Appearance.tsx b/apps/web/src/features/settings/Appearance.tsxindex 9c6fdc81bd..0bbd7b5868 100644--- a/apps/web/src/features/settings/Appearance.tsx+++ b/apps/web/src/features/settings/Appearance.tsx@@ -35,7 +35,7 @@ import {saveTheme,updateTheme,} from '@theme/utils/themeUtils';-import { Dropdown, Layer, ToggleSwitch, Tooltip } from '@ui';+import { Button, cn, Dropdown, Layer, ToggleSwitch } from '@ui';import {monochromeIcons,setMonochromeIcons,@@ -52,44 +52,51 @@ import {} from './primitives';/** Copies a theme's JSON to the clipboard (for sharing / importing elsewhere). */-function CopyThemeButton(props: { themeId: string; name: string }) {+function CopyThemeButton(props: {+ themeId: string;+ name: string;+ size: 'icon-xs' | 'icon-md';+}) {return (- <Tooltip as="span" label="Copy theme">- <button- type="button"- aria-label={`Copy ${props.name}`}- class="inline-flex items-center justify-center rounded-lg p-0.5 hover:bg-ink/5 hover:text-ink focus-visible:outline-2 focus-visible:outline-accent touch:p-1.5"- onPointerDown={(e) => e.stopPropagation()}- onPointerUp={(e) => e.stopPropagation()}- onClick={(e) => {- e.preventDefault();- e.stopPropagation();- fireAndForget(exportTheme(props.themeId), 'theme-export');- }}- >- <ClipboardIcon class="size-3.5 mobile:size-5" />- </button>- </Tooltip>+ <Button+ variant="ghost"+ size={props.size}+ label={`Copy ${props.name}`}+ tooltip="Copy theme"+ onPointerDown={(e) => e.stopPropagation()}+ onPointerUp={(e) => e.stopPropagation()}+ onClick={(e) => {+ e.preventDefault();+ e.stopPropagation();+ fireAndForget(exportTheme(props.themeId), 'theme-export');+ }}+ >+ <ClipboardIcon+ class={cn(+ props.size === 'icon-xs' ? 'size-3' : 'size-4',+ 'touch:size-4'+ )}+ />+ </Button>);}/** Edits a theme in the inline editor (custom → in place, default → forked). */function EditThemeButton(props: { name: string; onEdit: () => void }) {return (- <Tooltip as="span" label="Edit theme">- <button- type="button"- aria-label={`Edit ${props.name}`}- class="inline-flex items-center justify-center rounded-lg p-0.5 hover:bg-ink/5 hover:text-ink focus-visible:outline-2 focus-visible:outline-accent touch:p-1.5"- onClick={(e) => {- e.preventDefault();- e.stopPropagation();- props.onEdit();- }}- >- <PencilIcon class="size-3.5 mobile:size-5" />- </button>- </Tooltip>+ <Button+ variant="ghost"+ size="icon-md"+ label={`Edit ${props.name}`}+ tooltip="Edit theme"+ onClick={(e) => {+ e.preventDefault();+ e.stopPropagation();+ props.onEdit();+ }}+ >+ <PencilIcon class="size-4" />+ </Button>);}@@ -104,9 +111,13 @@ function ThemePillActions(props: {onEdit: () => void;}) {return (- <span class="flex shrink-0 items-center text-ink/50 [&_button]:size-8 [&_svg]:size-4">+ <span class="flex shrink-0 items-center"><EditThemeButton name={props.name} onEdit={props.onEdit} />- <CopyThemeButton themeId={props.themeId} name={props.name} />+ <CopyThemeButton+ themeId={props.themeId}+ name={props.name}+ size="icon-md"+ /></span>);}@@ -309,12 +320,12 @@ function InterfaceThemeSelect(props: {<span class="truncate">{theme.name}</span></span><span class="ml-2 flex shrink-0 items-center gap-0.5 text-ink-extra-muted opacity-0 group-hover:opacity-100 touch:opacity-100">- <CopyThemeButton themeId={theme.id} name={theme.name} />+ <CopyThemeButton themeId={theme.id} name={theme.name} size="icon-xs" /><Show when={editable}>- <button- type="button"- aria-label={`Edit ${theme.name}`}- class="rounded p-0.5 hover:text-ink"+ <Button+ variant="ghost"+ size="icon-xs"+ label={`Edit ${theme.name}`}onPointerDown={(e) => e.stopPropagation()}onPointerUp={(e) => e.stopPropagation()}onClick={(e) => {@@ -324,12 +335,12 @@ function InterfaceThemeSelect(props: {props.onEdit(theme.id);}}>- <PencilIcon class="size-3.5" />- </button>- <button- type="button"- aria-label={`Delete ${theme.name}`}- class="rounded p-0.5 hover:text-failure"+ <PencilIcon class="size-3 touch:size-3.5" />+ </Button>+ <Button+ variant="ghost"+ size="icon-xs"+ label={`Delete ${theme.name}`}onPointerDown={(e) => e.stopPropagation()}onPointerUp={(e) => e.stopPropagation()}onClick={(e) => {@@ -339,8 +350,8 @@ function InterfaceThemeSelect(props: {props.onDelete(theme);}}>- <TrashIcon class="size-3.5" />- </button>+ <TrashIcon class="size-3 touch:size-3.5" />+ </Button></Show></span></Dropdown.Item>@@ -372,7 +383,7 @@ function InterfaceThemeSelect(props: {// Render as a plain div (not Surface) so the edge is a faint ink// hairline like the settings cards, rather than the heavier b4 border.as="div"- class="w-60 overflow-hidden border border-ink/[0.05] bg-surface shadow-menu"+ class="w-60 overflow-hidden"onMouseLeave={clearThemePreview}onOpenAutoFocus={(e: Event) => {// Focus the filter input instead of the first item.diff --git a/apps/web/src/features/settings/Tags.tsx b/apps/web/src/features/settings/Tags.tsxindex 93d516cbf0..706ecbccd4 100644--- a/apps/web/src/features/settings/Tags.tsx+++ b/apps/web/src/features/settings/Tags.tsx@@ -22,7 +22,7 @@ import { parseTagNameConflict } from '@service-properties/client';import type { PropertyOptionResponse } from '@service-properties/generated/schemas/propertyOptionResponse';import type { TagScope } from '@service-properties/generated/schemas/tagScope';import type { TagSetResponse } from '@service-properties/generated/schemas/tagSetResponse';-import { Button, Dialog, Panel, Tooltip } from '@ui';+import { Button, Dialog, Panel } from '@ui';import { createMemo, createSignal, For, type JSX, Show } from 'solid-js';import { SettingsCard, SettingsPage, SettingsSection } from './primitives';@@ -114,49 +114,46 @@ function TagListSection(props: {<div class="flex shrink-0 items-center gap-1"><Show when={props.onShare}>{(onShare) => (- <Tooltip label="Share with team">- <button- type="button"- aria-label={`Share ${optionLabel(option)} with team`}- class="flex size-7 shrink-0 items-center justify-center rounded-md text-ink-extra-muted outline-none hover:bg-hover hover:text-ink focus-visible:border focus-visible:border-accent disabled:opacity-30"- disabled={- props.deleting ||- props.sharingOptionId !== undefined- }- onClick={() => onShare()(tag())}+ <Button+ variant="ghost"+ size="icon-sm"+ label={`Share ${optionLabel(option)} with team`}+ tooltip="Share with team"+ disabled={+ props.deleting ||+ props.sharingOptionId !== undefined+ }+ onClick={() => onShare()(tag())}+ >+ <Show+ when={props.sharingOptionId === option.id}+ fallback={<UsersIcon class="size-4" />}>- <Show- when={props.sharingOptionId === option.id}- fallback={<UsersIcon class="size-4" />}- >- <SpinnerIcon class="size-4 animate-spin" />- </Show>- </button>- </Tooltip>+ <SpinnerIcon class="size-4 animate-spin" />+ </Show>+ </Button>)}</Show>- <Tooltip label="Edit tag">- <button- type="button"- aria-label={`Edit ${optionLabel(option)}`}- class="flex size-7 shrink-0 items-center justify-center rounded-md text-ink-extra-muted outline-none hover:bg-hover hover:text-ink focus-visible:border focus-visible:border-accent"- disabled={props.deleting}- onClick={() => props.onEdit(tag())}- >- <PencilIcon class="size-4" />- </button>- </Tooltip>- <Tooltip label="Delete tag">- <button- type="button"- aria-label={`Delete ${optionLabel(option)}`}- class="flex size-7 shrink-0 items-center justify-center rounded-md text-ink-extra-muted outline-none hover:bg-failure/10 hover:text-failure focus-visible:border focus-visible:border-failure disabled:opacity-30"- disabled={props.deleting}- onClick={() => props.onDelete(tag())}- >- <TrashIcon class="size-4" />- </button>- </Tooltip>+ <Button+ variant="ghost"+ size="icon-sm"+ label={`Edit ${optionLabel(option)}`}+ tooltip="Edit tag"+ disabled={props.deleting}+ onClick={() => props.onEdit(tag())}+ >+ <PencilIcon class="size-3.5 touch:size-4" />+ </Button>+ <Button+ variant="ghost"+ size="icon-sm"+ label={`Delete ${optionLabel(option)}`}+ tooltip="Delete tag"+ disabled={props.deleting}+ onClick={() => props.onDelete(tag())}+ >+ <TrashIcon class="size-3.5 touch:size-4" />+ </Button></div>);}}diff --git a/apps/web/src/features/settings/Team.tsx b/apps/web/src/features/settings/Team.tsxindex 19b24c0d7d..df444fbe45 100644--- a/apps/web/src/features/settings/Team.tsx+++ b/apps/web/src/features/settings/Team.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import { useUserId } from '@core/context/user';import { getDisplayName, tryMacroId } from '@core/user';import EnvelopeIcon from '@phosphor/envelope.svg';@@ -649,9 +650,7 @@ export function TeamPage(props: {return (// Each state renders its own SettingsPage (scrolling, centered column) so// Team matches the Account/Appearance layout.- <Suspense- fallback={<div class="animate-pulse bg-skeleton rounded h-4 w-32 m-6" />}- >+ <Suspense fallback={<ListSkeleton.Bar class="m-6 h-4 w-32" />}><TeamContent>{props.children}</TeamContent></Suspense>);diff --git a/apps/web/src/features/settings/TeamGeneral.tsx b/apps/web/src/features/settings/TeamGeneral.tsxindex cbe852f11d..1a11c00778 100644--- a/apps/web/src/features/settings/TeamGeneral.tsx+++ b/apps/web/src/features/settings/TeamGeneral.tsx@@ -16,7 +16,7 @@ import {usePatchTeamMutation,} from '@queries/team/teams';import type { Team as TeamSummary } from '@service-auth/generated/schemas/team';-import { Button, Dialog, Panel, SegmentedControl, Tooltip } from '@ui';+import { Button, Dialog, Panel, Tabs, Tooltip } from '@ui';import { createSignal, Show } from 'solid-js';import {SettingsCard,@@ -396,7 +396,8 @@ export function TeamGeneral(props: { team: TeamSummary }) {description="The link-sharing scope newly shared items start with. None means link sharing starts off."hideDescriptionOnMobile>- <SegmentedControl+ <Tabs+ touch="segmented"aria-label="Default link sharing scope"size="sm"value={defaultLinkShare()}diff --git a/apps/web/src/features/settings/TeamMembers.tsx b/apps/web/src/features/settings/TeamMembers.tsxindex 5873c66fef..cb1f15664b 100644--- a/apps/web/src/features/settings/TeamMembers.tsx+++ b/apps/web/src/features/settings/TeamMembers.tsx@@ -1,3 +1,5 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';+import { SearchBar } from '@app/components/view-shell/SearchBar';import { useFeatureFlag } from '@app/lib/analytics/posthog';import { UserIcon } from '@core/component/UserIcon';import { enableAiUsageBilling } from '@core/constant/featureFlags';@@ -13,7 +15,6 @@ import CaretDownIcon from '@phosphor/caret-down.svg';import CheckIcon from '@phosphor/check.svg';import EnvelopeIcon from '@phosphor/envelope.svg';import LinkIcon from '@phosphor/link.svg';-import MagnifyingGlassIcon from '@phosphor/magnifying-glass.svg';import PlusIcon from '@phosphor/plus.svg';import TrashIcon from '@phosphor/trash.svg';import XIcon from '@phosphor/x.svg';@@ -465,26 +466,14 @@ export function TeamMembers(props: { team: TeamSummary }) {><SettingsSection><Show when={showMemberSearch()}>- <label class="flex items-center gap-2 h-9 px-3 rounded-lg border border-edge-muted text-ink-muted focus-within:border-accent focus-within:text-ink">- <MagnifyingGlassIcon class="size-4 shrink-0" />- <input- type="text"- value={memberQuery()}- onInput={(e) => setMemberQuery(e.currentTarget.value)}- placeholder="Filter members"- class="flex-1 min-w-0 bg-transparent text-sm text-ink outline-none placeholder:text-ink-placeholder"- />- <Show when={memberQuery()}>- <button- type="button"- class="shrink-0 text-ink-muted hover:text-ink"- aria-label="Clear filter"- onClick={() => setMemberQuery('')}- >- <XIcon class="size-4" />- </button>- </Show>- </label>+ <SearchBar+ size="sm"+ label="Filter members"+ placeholder="Filter members"+ value={memberQuery()}+ onValueChange={setMemberQuery}+ onEscape={() => setMemberQuery('')}+ /></Show><Show@@ -516,7 +505,7 @@ export function TeamMembers(props: { team: TeamSummary }) {when={!teamQuery.isLoading}fallback={<SettingsCard>- <div class="animate-pulse bg-skeleton rounded h-16 m-4" />+ <ListSkeleton.Bar class="m-4 h-16 rounded-xl" /></SettingsCard>}>diff --git a/apps/web/src/features/settings/components/settings-sidebar.tsx b/apps/web/src/features/settings/components/settings-sidebar.tsxindex 691ee58d08..6c61431d8b 100644--- a/apps/web/src/features/settings/components/settings-sidebar.tsx+++ b/apps/web/src/features/settings/components/settings-sidebar.tsx@@ -41,7 +41,7 @@ export function SettingsSidebar(props: {autocomplete="off"value={props.searchQuery}onValueChange={props.onSearchQueryChange}- class="border-0 bg-ink/5 shadow-none"+ size="sm"onEscape={() => props.onSearchQueryChange('')}onKeyDown={(event) => {if (event.key === 'ArrowDown') {diff --git a/apps/web/src/features/settings/components/signature-form.tsx b/apps/web/src/features/settings/components/signature-form.tsxindex e55bc79714..8f6716d5f8 100644--- a/apps/web/src/features/settings/components/signature-form.tsx+++ b/apps/web/src/features/settings/components/signature-form.tsx@@ -1,9 +1,10 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import DownloadIcon from '@phosphor-icons/core/regular/download-simple.svg?component-solid';import SignatureIcon from '@phosphor-icons/core/regular/signature.svg?component-solid';import { ToggleSwitch } from '@ui';import { lazy, Show, Suspense } from 'solid-js';-import { SettingsButton as Button, SettingsSurface } from '../primitives';+import { SettingsButton as Button } from '../primitives';const SignatureEditor = lazy(() => import('../SignatureEditor'));@@ -26,7 +27,9 @@ export function SignatureForm(props: {mobile: boolean;}) {return (- <SettingsSurface class="@container/signature flex flex-col gap-4 rounded-2xl border border-edge-muted p-4">+ // A row of the Signatures card on desktop, divided like the card's other+ // lists; touch keeps its boxed signatures.+ <div class="@container/signature flex flex-col gap-4 touch:rounded-2xl touch:border touch:border-edge-muted touch:p-4 not-touch:not-first:border-t not-touch:not-first:border-edge-divider not-touch:not-first:pt-4 not-touch:not-last:pb-2"><div class="flex items-start justify-between gap-3"><div class="min-w-0"><h3 class="text-base font-medium break-all">{props.email}</h3>@@ -64,9 +67,7 @@ export function SignatureForm(props: {}><Suspense- fallback={- <div class="h-44 animate-pulse rounded-lg border-1 border-ink/10" />- }+ fallback={<ListSkeleton.Bar class="h-44 w-full rounded-xl" />}><SignatureEditorlabel={`Signature for ${props.email}`}@@ -116,6 +117,6 @@ export function SignatureForm(props: {<Show when={props.error}>{(msg) => <p class="text-right text-sm text-failure-ink">{msg()}</p>}</Show>- </SettingsSurface>+ </div>);}diff --git a/apps/web/src/features/settings/connections/ConnectedView.tsx b/apps/web/src/features/settings/connections/ConnectedView.tsxindex 02f5a2b32d..430313841f 100644--- a/apps/web/src/features/settings/connections/ConnectedView.tsx+++ b/apps/web/src/features/settings/connections/ConnectedView.tsx@@ -31,7 +31,7 @@ export function ConnectedView(props: { model: ConnectionsModel }) {<SettingsSurface class="overflow-hidden"><buttontype="button"- class="h-full w-full text-left outline-none hover:bg-ink/6 focus-visible:bg-ink/6"+ class="h-full w-full text-left outline-none not-touch:hover:overlay-hover focus-visible:overlay-hover"onClick={() => view.openProvider(provider.id)}><IntegrationRowdiff --git a/apps/web/src/features/settings/connections/DiscoverView.tsx b/apps/web/src/features/settings/connections/DiscoverView.tsxindex a5602ee332..b63f5c0208 100644--- a/apps/web/src/features/settings/connections/DiscoverView.tsx+++ b/apps/web/src/features/settings/connections/DiscoverView.tsx@@ -92,7 +92,7 @@ export function DiscoverView(props: { model: ConnectionsModel }) {<SettingsSurface class="@container overflow-hidden"><buttontype="button"- class="flex h-full w-full flex-col items-stretch text-left outline-none hover:bg-ink/4 focus-visible:bg-ink/6"+ class="flex h-full w-full flex-col items-stretch text-left outline-none not-touch:hover:overlay-hover focus-visible:overlay-hover"onClick={() => view.openProvider(item.id)}><IntegrationRow@@ -118,9 +118,8 @@ export function DiscoverView(props: { model: ConnectionsModel }) {<div class="mb-3 flex items-center justify-between gap-3"><h3 class="text-base font-medium text-ink">All apps</h3><Button- variant="ghost"+ variant="outline"size="md"- class="h-10 bg-ink/4 px-4"onClick={() => setAddingCustom(true)}><PlusIcon class="size-4" /> Add Custom@@ -129,10 +128,7 @@ export function DiscoverView(props: { model: ConnectionsModel }) {<div class="mb-5 grid grid-cols-1 items-end gap-3 @[560px]/catalog:grid-cols-[minmax(0,1fr)_14rem]"><div class="flex min-w-0 flex-col gap-1.5"><span class="text-xs font-medium text-ink-muted">Search apps</span>- <InputGroup- size="lg"- class="h-11 rounded-xl border-edge-muted bg-input"- >+ <InputGroup size="md"><InputGroup.Addon><MagnifyingGlassIcon class="size-4" aria-hidden="true" /></InputGroup.Addon>@@ -145,7 +141,6 @@ export function DiscoverView(props: { model: ConnectionsModel }) {catalog.onSearchInput(event.currentTarget.value);}}placeholder="Search by name or description"- class="text-sm touch:text-base"/><InputGroup.Addon align="inline-end"><InputGroup.ClearButton />@@ -160,7 +155,6 @@ export function DiscoverView(props: { model: ConnectionsModel }) {value={activeCategory()}onChange={setSelectedCategory}class="min-w-0 w-full"- triggerClass="h-11 w-full rounded-xl border-edge-muted bg-input px-3 text-sm text-ink not-touch:hover:bg-hover touch:text-base"/></div></div>@@ -331,7 +325,7 @@ function CatalogRow(props: {<Show when={!props.added} fallback={row()}><buttontype="button"- class="h-full w-full text-left outline-none hover:bg-ink/4 focus-visible:bg-ink/6"+ class="h-full w-full text-left outline-none not-touch:hover:overlay-hover focus-visible:overlay-hover"aria-label={busy() ? `Connecting ${name()}` : `Connect ${name()}`}aria-describedby={descriptionId}aria-busy={busy()}diff --git a/apps/web/src/features/settings/connections/integrations-view.test.tsx b/apps/web/src/features/settings/connections/integrations-view.test.tsxindex a6718f6796..2799e8ab43 100644--- a/apps/web/src/features/settings/connections/integrations-view.test.tsx+++ b/apps/web/src/features/settings/connections/integrations-view.test.tsx@@ -33,7 +33,6 @@ vi.mock('@queries/team/teams', () => ({vi.mock('@core/component/Toast/Toast', () => ({toast: { failure: mocks.failure },}));-vi.mock('@core/component/TabsInset', () => ({ TabsInset: () => <div /> }));// The real import module loads websocket infrastructure during initialization.vi.mock('@service-connection/websocket', () => ({createConnectionWebsocketEffect: vi.fn(),@@ -87,7 +86,8 @@ vi.mock('@queries/import', async (importOriginal) => ({isPending: false,}),}));-vi.mock('@ui', () => ({+vi.mock('@ui', async () => ({+ ...(await vi.importActual('@ui')),Button: (props: JSX.ButtonHTMLAttributes<HTMLButtonElement>) => (<button {...props} />),diff --git a/apps/web/src/features/settings/connections/slack-channel-import/SlackChannelImportCard.test.tsx b/apps/web/src/features/settings/connections/slack-channel-import/SlackChannelImportCard.test.tsxindex 4f6fd4c418..95d873bc22 100644--- a/apps/web/src/features/settings/connections/slack-channel-import/SlackChannelImportCard.test.tsx+++ b/apps/web/src/features/settings/connections/slack-channel-import/SlackChannelImportCard.test.tsx@@ -37,7 +37,8 @@ vi.mock('@queries/import', async (importOriginal) => ({}),}));// Test the card's controls without unrelated app theme/layout dependencies.-vi.mock('@ui', () => ({+vi.mock('@ui', async () => ({+ ...(await vi.importActual('@app/components/ui/components/Input')),Button: (props: JSX.ButtonHTMLAttributes<HTMLButtonElement>) => (<button {...props} />),diff --git a/apps/web/src/features/settings/connections/slack-channel-import/SlackChannelImportCard.tsx b/apps/web/src/features/settings/connections/slack-channel-import/SlackChannelImportCard.tsxindex 1e6fff8ecc..d9725a01ff 100644--- a/apps/web/src/features/settings/connections/slack-channel-import/SlackChannelImportCard.tsx+++ b/apps/web/src/features/settings/connections/slack-channel-import/SlackChannelImportCard.tsx@@ -10,7 +10,7 @@ import {useImportQuery,useRunImportMutation,} from '@queries/import';-import { Button } from '@ui';+import { Button, Input } from '@ui';import {createEffect,createMemo,@@ -237,9 +237,8 @@ export function SlackChannelImportCard(</Show><label class="flex flex-col gap-1 text-sm">Search channels- <input+ <Inputtype="search"- class="rounded border border-edge-muted bg-input p-2 text-ink"value={search()}onInput={(event) => setSearch(event.currentTarget.value)}/>diff --git a/apps/web/src/features/tasks-view/components/TasksControls.tsx b/apps/web/src/features/tasks-view/components/TasksControls.tsxindex af5b69c3bf..4ee9817338 100644--- a/apps/web/src/features/tasks-view/components/TasksControls.tsx+++ b/apps/web/src/features/tasks-view/components/TasksControls.tsx@@ -1,13 +1,16 @@import {- ListFilterCountBadge,ListFilterDropdown,ListGroupDropdown,ListSortDropdown,useViewControlHotkeys,- ViewLayoutDropdown,} from '@app/components/view-shell';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { isTouchDevice } from '@core/mobile/isTouchDevice';+import GanttIcon from '@phosphor/chart-bar-horizontal.svg';+import BoardIcon from '@phosphor/kanban.svg';+import ListIcon from '@phosphor/list-bullets.svg';+import { Button } from '@ui';import { tourTarget } from '@ui/components/Tour';import { createSignal, Show } from 'solid-js';import { TASK_GROUP_OPTIONS, TASK_SORT_OPTIONS } from '../constants';@@ -79,59 +82,86 @@ function DesktopTasksControls() {};return (- <div class="flex min-w-0 shrink-0 flex-wrap items-center justify-end gap-2 @max-[720px]/view-shell:gap-1">- <ViewLayoutDropdown- label="Task layout"- value={state.layout}- layouts={- ganttEnabled() ? ['list', 'board', 'gantt'] : ['list', 'board']- }- onChange={(layout) => setState('layout', layout)}- />- <Show- when={!isBoardSearch()}- fallback={- <span- class="text-xs text-ink-muted"- title="Search results are ranked by relevance. Clear search to sort the board."+ <>+ <HeaderActionGroup label="Task filters">+ <div class="shrink-0" ref={tourTarget(TASKS_TOUR.filter)}>+ <ListFilterDropdown+ label="Filter tasks"+ activeCount={filters.activeCount()}+ groups={filters.groups()}+ open={openMenu() === 'filters'}+ onOpenChange={handleMenuOpenChange('filters')}+ triggerRef={(element) => (filterTrigger = element)}+ isSelected={filters.isSelected}+ onSelectionChange={filters.setSelected}+ onClear={filters.clear}+ aiFilter={{+ placeholder: 'Filter with AI…',+ onSubmit: filters.applyDescription,+ }}+ />+ </div>+ </HeaderActionGroup>+ <HeaderActionGroup label="Task layout">+ <Button+ variant="ghost"+ size="icon-md"+ label="List"+ aria-pressed={state.layout === 'list'}+ onClick={() => setState('layout', 'list')}+ >+ <ListIcon class="size-4" />+ </Button>+ <Button+ variant="ghost"+ size="icon-md"+ label="Board"+ aria-pressed={state.layout === 'board'}+ onClick={() => setState('layout', 'board')}+ >+ <BoardIcon class="size-4" />+ </Button>+ <Show when={ganttEnabled()}>+ <Button+ variant="ghost"+ size="icon-md"+ label="Gantt"+ aria-pressed={state.layout === 'gantt'}+ onClick={() => setState('layout', 'gantt')}>- Relevance- </span>- }- >- <ListSortDropdown- label="Sort tasks"- value={primarySort()}- options={TASK_SORT_OPTIONS}- open={openMenu() === 'sort'}- onChange={setPrimarySort}- onOpenChange={handleMenuOpenChange('sort')}- triggerRef={(element) => (sortTrigger = element)}+ <GanttIcon class="size-4" />+ </Button>+ </Show>+ </HeaderActionGroup>+ <HeaderActionGroup label="Task view options">+ <Show+ when={!isBoardSearch()}+ fallback={+ <span+ class="text-xs text-ink-muted"+ title="Search results are ranked by relevance. Clear search to sort the board."+ >+ Relevance+ </span>+ }+ >+ <ListSortDropdown+ label="Sort tasks"+ value={primarySort()}+ options={TASK_SORT_OPTIONS}+ open={openMenu() === 'sort'}+ onChange={setPrimarySort}+ onOpenChange={handleMenuOpenChange('sort')}+ triggerRef={(element) => (sortTrigger = element)}+ />+ </Show>+ <ListGroupDropdown+ label="Group by"+ value={state.groupBy}+ options={groupOptions()}+ onChange={(groupBy) => setState('groupBy', groupBy)}/>- </Show>- <ListGroupDropdown- label="Group by"- value={state.groupBy}- options={groupOptions()}- onChange={(groupBy) => setState('groupBy', groupBy)}- />- <div class="relative shrink-0" ref={tourTarget(TASKS_TOUR.filter)}>- <ListFilterDropdown- label="Filter tasks"- groups={filters.groups()}- open={openMenu() === 'filters'}- onOpenChange={handleMenuOpenChange('filters')}- triggerRef={(element) => (filterTrigger = element)}- isSelected={filters.isSelected}- onSelectionChange={filters.setSelected}- onClear={filters.clear}- aiFilter={{- placeholder: 'Filter with AI…',- onSubmit: filters.applyDescription,- }}- />- <ListFilterCountBadge count={filters.activeCount()} />- </div>- </div>+ </HeaderActionGroup>+ </>);}diff --git a/apps/web/src/features/tasks-view/components/TasksCreateMenu.tsx b/apps/web/src/features/tasks-view/components/TasksCreateMenu.tsxnew file mode 100644index 0000000000..cf35a72069--- /dev/null+++ b/apps/web/src/features/tasks-view/components/TasksCreateMenu.tsx@@ -0,0 +1,71 @@+import { ViewCreateButton } from '@app/components/view-shell/ViewCreateButton';+import CheckSquareIcon from '@phosphor/check-square.svg';+import StackIcon from '@phosphor/stack.svg';+import TagIcon from '@phosphor/tag.svg';+import { Dropdown } from '@ui';+import { Show } from 'solid-js';++export function TasksCreateMenu(props: {+ presentation: 'sidebar' | 'toolbar';+ onCreateTask: () => void;+ onCreateProject?: () => void;+ onCreateTag: () => void;+}) {+ let selectedAction: (() => void) | undefined;+ return (+ <Dropdown+ placement={+ props.presentation === 'sidebar' ? 'bottom-start' : 'bottom-end'+ }+ >+ <Dropdown.Trigger+ as={ViewCreateButton}+ presentation={props.presentation}+ aria-label={+ props.onCreateProject+ ? 'New task, project, or tag'+ : 'New task or tag'+ }+ menu+ />+ <Dropdown.Content+ class="min-w-48"+ onCloseAutoFocus={(event) => {+ if (!selectedAction) return;+ event.preventDefault();+ queueMicrotask(selectedAction);+ selectedAction = undefined;+ }}+ >+ <Dropdown.Item+ onSelect={() => {+ selectedAction = props.onCreateTask;+ }}+ >+ <CheckSquareIcon class="size-4" />+ <span>Task</span>+ </Dropdown.Item>+ <Show when={props.onCreateProject}>+ {(createProject) => (+ <Dropdown.Item+ onSelect={() => {+ selectedAction = createProject();+ }}+ >+ <StackIcon class="size-4" />+ <span>Project</span>+ </Dropdown.Item>+ )}+ </Show>+ <Dropdown.Item+ onSelect={() => {+ selectedAction = props.onCreateTag;+ }}+ >+ <TagIcon class="size-4" />+ <span>Tag</span>+ </Dropdown.Item>+ </Dropdown.Content>+ </Dropdown>+ );+}diff --git a/apps/web/src/features/tasks-view/components/TasksHeader.tsx b/apps/web/src/features/tasks-view/components/TasksHeader.tsxindex 987fd38ccf..0cbc780eb6 100644--- a/apps/web/src/features/tasks-view/components/TasksHeader.tsx+++ b/apps/web/src/features/tasks-view/components/TasksHeader.tsx@@ -1,15 +1,17 @@import {- SearchBar,useViewControlHotkeys,ViewBreadcrumbs,ViewShell,} from '@app/components/view-shell';-import { SidebarCreateButton } from '@app/components/view-shell/SidebarCreateButton';-import { useSplitLayout } from '@components/app/split-layout/layout';+import {+ ListHeader,+ ListHeaderSearch,+} from '@app/components/view-shell/ListHeader';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { Show } from 'solid-js';import { TASK_TABS } from '../constants';+import { TasksCreateAction } from '../tasks-create-action';import { useTasksView } from '../tasks-view-context';import { TasksControls } from './TasksControls';import { TasksMobileTabs } from './TasksMobileTabs';@@ -43,78 +45,51 @@ export function TaskViewBreadcrumbItem() {);}-export function TasksTopBar() {- return (- <ViewShell.TopBar>- <h1 class="hidden min-w-0 truncate text-sm font-semibold tracking-[-0.03em] text-ink @max-[720px]/view-shell:block">- Tasks- </h1>- <ViewBreadcrumbs.Outlet- class="@max-[720px]/view-shell:hidden"- aria-label="Task location"- />- </ViewShell.TopBar>- );-}-export function TasksHeader(props: TasksHeaderProps) {const panel = useSplitPanelOrThrow();- const layout = useSplitLayout();- const { state, setState } = useTasksView();- let searchInput: HTMLInputElement | undefined;- const selectedTabLabel = () =>- TASK_TABS.find((tab) => tab.id === state.tab)?.label ?? 'Tasks';-+ const { state, setState, projectsEnabled } = useTasksView();+ let focusSearch: (() => void) | undefined;useViewControlHotkeys({scopeId: panel.splitHotkeyScope,enabled: () => panel.isPanelActive() && !isTouchDevice(),search: {description: 'Search tasks',run: () => {- searchInput?.focus();- searchInput?.select();+ focusSearch?.();return true;},},});- const createTask = () => {- layout.popoverSplit({ type: 'component', id: 'task-compose' });- };-return (- <div class="flex min-w-0 flex-col @max-[720px]/view-shell:gap-3">- <Show- when={isTouchDevice()}- fallback={- <>- <div class="hidden h-8 min-w-0 items-center @max-[720px]/view-shell:flex">- <h1 class="min-w-0 truncate text-xl font-semibold tracking-[-0.03em] text-ink">- {selectedTabLabel()}- </h1>- <div class="ml-auto shrink-0">- <SidebarCreateButton label="New" onCreate={createTask} />- </div>- </div>-- <div class="flex min-w-0 items-center justify-between gap-3">- <SearchBar- ref={(element) => (searchInput = element)}- label="Search tasks"- value={state.search}- hotkey="cmd+f"- onValueChange={(search) => setState('search', search)}- onEscape={props.onSearchEscape}- placeholder="Search tasks"- class="max-w-md flex-1"- />- <TasksControls />- </div>- </>- }- >- <TasksMobileTabs />- </Show>- </div>+ <Show+ when={isTouchDevice()}+ fallback={+ <ListHeader+ title={<ViewBreadcrumbs.Outlet aria-label="Task location" />}+ >+ <TasksControls />+ <TasksCreateAction+ presentation="toolbar"+ projectsEnabled={projectsEnabled()}+ />+ <ListHeaderSearch+ label="Search tasks"+ value={state.search}+ onValueChange={(search) => setState('search', search)}+ onEscape={props.onSearchEscape}+ registerFocus={(focus) => {+ focusSearch = focus;+ }}+ />+ </ListHeader>+ }+ >+ <ViewShell.Header>+ <div class="flex min-w-0 flex-col @max-[720px]/view-shell:gap-3">+ <TasksMobileTabs />+ </div>+ </ViewShell.Header>+ </Show>);}diff --git a/apps/web/src/features/tasks-view/components/TasksSidebar.tsx b/apps/web/src/features/tasks-view/components/TasksSidebar.tsxindex 4e94613ed8..e9965e7218 100644--- a/apps/web/src/features/tasks-view/components/TasksSidebar.tsx+++ b/apps/web/src/features/tasks-view/components/TasksSidebar.tsx@@ -1,5 +1,6 @@import {CollapsibleSection,+ SearchBar,useViewTabHotkeys,ViewSidebar,} from '@app/components/view-shell';@@ -18,6 +19,7 @@ import {import { useSplitLayout } from '@components/app/split-layout/layout';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { toast } from '@core/component/Toast/Toast';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { fireAndForget } from '@core/util/fireAndForget';import CheckSquareIcon from '@phosphor/check-square.svg';import ListChecksIcon from '@phosphor/list-checks.svg';@@ -27,6 +29,7 @@ import { useFavoritesData } from '@queries/favorites/favorites';import type { Favorite } from '@service-storage/generated/schemas/favorite';import { createMemo, For, Show } from 'solid-js';import { Dynamic } from 'solid-js/web';+import { TasksCreateAction } from '../tasks-create-action';import { useTasksView } from '../tasks-view-context';import type { TasksTab } from '../types';@@ -150,6 +153,7 @@ export function TasksSidebar() {const panel = useSplitPanelOrThrow();const {state,+ setState,projectsEnabled,setTab,isSidebarSectionOpen,@@ -171,6 +175,23 @@ export function TasksSidebar() {<ViewSidebar.Root aria-label="Tasks navigation"><SidebarCreateHeadertitle="Tasks"+ searchLabel="Search tasks"+ search={() => (+ <SearchBar+ label="Search tasks"+ placeholder="Search tasks"+ value={state.search}+ onValueChange={(search) => setState('search', search)}+ />+ )}+ createAction={+ !isTouchDevice() ? (+ <TasksCreateAction+ presentation="sidebar"+ projectsEnabled={projectsEnabled()}+ />+ ) : undefined+ }label={state.tab === 'projects' ? 'New project' : 'New task'}onCreate={() =>layout.popoverSplit({diff --git a/apps/web/src/features/tasks-view/components/task-list/TaskList.tsx b/apps/web/src/features/tasks-view/components/task-list/TaskList.tsxindex 0807902a85..cf63542fd4 100644--- a/apps/web/src/features/tasks-view/components/task-list/TaskList.tsx+++ b/apps/web/src/features/tasks-view/components/task-list/TaskList.tsx@@ -22,6 +22,7 @@ import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { HotkeyTags } from '@core/hotkey/constants';import { registerHotkey } from '@core/hotkey/hotkeys';import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { createScrollTopFade } from '@core/util/createScrollTopFade';import {type EntityData,EntitySelectionToolbar,@@ -195,6 +196,7 @@ export function TaskList(props: TaskListProps) {activeTab: state.tab,});const [viewport, setViewport] = createSignal<HTMLDivElement>();+ createScrollTopFade(viewport);const [grid, setGrid] = createSignal<HTMLDivElement>();const [virtualizer, setVirtualizer] = createSignal<VirtualizerHandle>();diff --git a/apps/web/src/features/tasks-view/tasks-create-action.test.tsx b/apps/web/src/features/tasks-view/tasks-create-action.test.tsxnew file mode 100644index 0000000000..d32fb413e7--- /dev/null+++ b/apps/web/src/features/tasks-view/tasks-create-action.test.tsx@@ -0,0 +1,106 @@+import {+ cleanup,+ fireEvent,+ render,+ screen,+ waitFor,+} from '@solidjs/testing-library';+import { Show } from 'solid-js';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import { TasksCreateAction } from './tasks-create-action';++const mocks = vi.hoisted(() => ({ popoverSplit: vi.fn() }));++vi.mock('@components/app/split-layout/layout', () => ({+ useSplitLayout: () => ({ popoverSplit: mocks.popoverSplit }),+}));+vi.mock('@queries/team/teams', () => ({+ useCurrentTeamQuery: () => ({+ isSuccess: true,+ data: { team: { id: 'team' } },+ }),+}));+vi.mock('@app/features/property/tags/TagEditorDialog', () => ({+ TagEditorDialog: (props: { open: boolean; onClose: () => void }) => (+ <Show when={props.open}>+ <div role="dialog" aria-label="New tag">+ <button type="button" onClick={props.onClose}>+ Cancel+ </button>+ </div>+ </Show>+ ),+}));++let motionStyles: HTMLStyleElement;+beforeEach(() => {+ motionStyles = document.createElement('style');+ motionStyles.textContent =+ '[role="menu"] { animation-name: none; transition-duration: 0s; }';+ document.head.append(motionStyles);+ vi.stubGlobal('scrollTo', vi.fn());+});+afterEach(() => {+ cleanup();+ motionStyles.remove();+ vi.clearAllMocks();+ vi.unstubAllGlobals();+});++describe.each(['sidebar', 'toolbar'] as const)(+ '%s New menu',+ (presentation) => {+ it.each([+ ['Task', 'task-compose'],+ ['Project', 'project-compose'],+ ])('opens the %s composer', async (label, id) => {+ render(() => (+ <TasksCreateAction presentation={presentation} projectsEnabled />+ ));+ fireEvent.keyDown(+ screen.getByRole('button', { name: 'New task, project, or tag' }),+ { key: 'Enter' }+ );+ fireEvent.keyDown(await screen.findByRole('menuitem', { name: label }), {+ key: 'Enter',+ });+ await waitFor(() =>+ expect(mocks.popoverSplit).toHaveBeenCalledExactlyOnceWith({+ type: 'component',+ id,+ })+ );+ expect(screen.queryByRole('dialog')).toBeNull();+ });++ it('opens and closes the tag editor without creating a task or project', async () => {+ render(() => (+ <TasksCreateAction presentation={presentation} projectsEnabled />+ ));+ fireEvent.keyDown(+ screen.getByRole('button', { name: 'New task, project, or tag' }),+ { key: 'Enter' }+ );+ fireEvent.keyDown(await screen.findByRole('menuitem', { name: 'Tag' }), {+ key: 'Enter',+ });+ await screen.findByRole('dialog', { name: 'New tag' });+ expect(screen.queryByRole('menu')).toBeNull();+ expect(mocks.popoverSplit).not.toHaveBeenCalled();+ fireEvent.click(screen.getByRole('button', { name: 'Cancel' }));+ expect(screen.queryByRole('dialog')).toBeNull();+ });+ }+);++it('keeps project creation behind the existing Projects gate', async () => {+ render(() => (+ <TasksCreateAction presentation="sidebar" projectsEnabled={false} />+ ));+ fireEvent.keyDown(screen.getByRole('button', { name: 'New task or tag' }), {+ key: 'Enter',+ });+ await screen.findByRole('menuitem', { name: 'Task' });+ expect(screen.queryByRole('menuitem', { name: 'Project' })).toBeNull();+ expect(screen.getByRole('menuitem', { name: 'Tag' })).toBeDefined();+});diff --git a/apps/web/src/features/tasks-view/tasks-create-action.tsx b/apps/web/src/features/tasks-view/tasks-create-action.tsxnew file mode 100644index 0000000000..12a1b12aab--- /dev/null+++ b/apps/web/src/features/tasks-view/tasks-create-action.tsx@@ -0,0 +1,42 @@+import { TagEditorDialog } from '@app/features/property/tags/TagEditorDialog';+import { useSplitLayout } from '@components/app/split-layout/layout';+import { useCurrentTeamQuery } from '@queries/team/teams';+import { createSignal } from 'solid-js';+import { TasksCreateMenu } from './components/TasksCreateMenu';++/** Task and project composers plus the shared tag editor, owned by this view. */+export function TasksCreateAction(props: {+ presentation: 'sidebar' | 'toolbar';+ projectsEnabled: boolean;+}) {+ const layout = useSplitLayout();+ const team = useCurrentTeamQuery();+ const [creatingTag, setCreatingTag] = createSignal(false);++ return (+ <>+ <TasksCreateMenu+ presentation={props.presentation}+ onCreateTask={() =>+ layout.popoverSplit({ type: 'component', id: 'task-compose' })+ }+ onCreateProject={+ props.projectsEnabled+ ? () =>+ layout.popoverSplit({+ type: 'component',+ id: 'project-compose',+ })+ : undefined+ }+ onCreateTag={() => setCreatingTag(true)}+ />+ <TagEditorDialog+ open={creatingTag()}+ mode={{ type: 'create', initialScope: 'user' }}+ teamAvailable={team.isSuccess && Boolean(team.data?.team)}+ onClose={() => setCreatingTag(false)}+ />+ </>+ );+}diff --git a/apps/web/src/features/tasks-view/tasks-view-skeleton.tsx b/apps/web/src/features/tasks-view/tasks-view-skeleton.tsxindex 172a0ce71e..cc546390fc 100644--- a/apps/web/src/features/tasks-view/tasks-view-skeleton.tsx+++ b/apps/web/src/features/tasks-view/tasks-view-skeleton.tsx@@ -5,7 +5,11 @@ export function TasksViewSkeleton() {return (<ViewSkeleton.Root asidePreferenceKey="tasks"><ViewSkeleton.Sidebar title="Tasks" createLabel="New task" />- <ViewSkeleton.Main title="Tasks" searchPlaceholder="Search tasks" />+ <ViewSkeleton.Main+ title="My tasks"+ controls={[1, 3, 2, '+ New ⌄', 1]}+ searchPlaceholder="Search tasks"+ /></ViewSkeleton.Root>);}diff --git a/apps/web/src/features/tasks-view/tasks-view.tsx b/apps/web/src/features/tasks-view/tasks-view.tsxindex 6667b36729..10c79ca17e 100644--- a/apps/web/src/features/tasks-view/tasks-view.tsx+++ b/apps/web/src/features/tasks-view/tasks-view.tsx@@ -7,6 +7,7 @@ import { projectDetailRoute } from '@app/routes/routes';import { useSplitLayout } from '@components/app/split-layout/layout';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';import { SplitPanel } from '@components/app/split-panel';+import { isTouchDevice } from '@core/mobile/isTouchDevice';import { fireAndForget } from '@core/util/fireAndForget';import { ListEntityMetadataQueryProvider } from '@entity';import {@@ -16,11 +17,7 @@ import {Show,Suspense,} from 'solid-js';-import {- TasksHeader,- TasksTopBar,- TaskViewBreadcrumbItem,-} from './components/TasksHeader';+import { TasksHeader, TaskViewBreadcrumbItem } from './components/TasksHeader';import { TasksMobileTabs } from './components/TasksMobileTabs';import { TasksSidebar } from './components/TasksSidebar';import { TasksContent, TasksLoading } from './tasks-content';@@ -87,7 +84,7 @@ function ImportLinearAction() {function TasksViewRoot() {const panel = useSplitPanelOrThrow();- const { state, projectsEnabled } = useTasksView();+ const { state, setState, projectsEnabled } = useTasksView();const navigate = useNavigate();const layout = useSplitLayout();const [listElement, setListElement] = createSignal<HTMLDivElement>();@@ -96,10 +93,7 @@ function TasksViewRoot() {const taskList = () => (<>- <TasksTopBar />- <ViewShell.Header>- <TasksHeader onSearchEscape={() => listElement()?.focus()} />- </ViewShell.Header>+ <TasksHeader onSearchEscape={() => listElement()?.focus()} /><ViewTour tour={tasksTour} actions={<ImportLinearAction />} /><ViewShell.Content><TasksContent ref={setListElement} />@@ -127,11 +121,16 @@ function TasksViewRoot() {when={state.tab === 'projects' && projectsEnabled()}fallback={taskList()}>- <TasksTopBar />- <div class="hidden @max-[720px]/view-shell:block">- <TasksMobileTabs />- </div>+ <Show when={isTouchDevice()}>+ <div class="hidden @max-[720px]/view-shell:block">+ <TasksMobileTabs />+ </div>+ </Show><ProjectsTab+ search={{+ value: () => state.search,+ onChange: (search) => setState('search', search),+ }}onOpen={(id, event, newSplit) => {if (newSplit ||diff --git a/apps/web/src/features/team-invitations/invite-modal.tsx b/apps/web/src/features/team-invitations/invite-modal.tsxindex 317a022be4..8f68839562 100644--- a/apps/web/src/features/team-invitations/invite-modal.tsx+++ b/apps/web/src/features/team-invitations/invite-modal.tsx@@ -7,7 +7,7 @@ import ClipboardIcon from '@phosphor/clipboard.svg';import CloseIcon from '@phosphor/x.svg';import { authServiceClient } from '@service-auth/client';import { contactsClient } from '@service-contacts/client';-import { Button, Dialog, Panel } from '@ui';+import { Button, Dialog, Input, Panel } from '@ui';import { createSignal, Show } from 'solid-js';function parseEmails(raw: string): string[] {@@ -135,11 +135,12 @@ export const InviteModal = () => {Or share your personal referral link:</p><div class="flex items-stretch gap-2">- <input+ <Input+ size="sm"type="text"readOnlyvalue={url()}- class="flex-1 px-3 py-1.5 text-xs border border-edge-muted rounded-xs bg-surface text-ink/70 outline-none select-all"+ class="flex-1 select-all text-ink-muted"onClick={(e) => e.currentTarget.select()}/><Buttondiff --git a/apps/web/src/features/theme/components/ColorPickerPopover.tsx b/apps/web/src/features/theme/components/ColorPickerPopover.tsxindex 42b298b727..f9237ba1ef 100644--- a/apps/web/src/features/theme/components/ColorPickerPopover.tsx+++ b/apps/web/src/features/theme/components/ColorPickerPopover.tsx@@ -392,7 +392,7 @@ export function ColorPickerPopover(props: {<Popover.Arrow class="fill-surface" /><divclass={cn(- 'flex max-h-[min(calc(100vh-2rem),var(--kb-popper-content-available-height))] w-[34rem] max-w-[calc(100vw-2rem)] flex-col overflow-y-auto gap-4 rounded-xl border border-edge glass bg-menu-glass p-4',+ 'flex max-h-[min(calc(100vh-2rem),var(--kb-popper-content-available-height))] w-[34rem] max-w-[calc(100vw-2rem)] flex-col overflow-y-auto gap-4 menu-surface p-4',props.class)}role="dialog"diff --git a/apps/web/src/features/theme/themes/macro-dark.ts b/apps/web/src/features/theme/themes/macro-dark.tsindex acf869244b..0b19f195ef 100644--- a/apps/web/src/features/theme/themes/macro-dark.ts+++ b/apps/web/src/features/theme/themes/macro-dark.ts@@ -1,15 +1,14 @@import type { ThemeV3 } from '../types/themeTypes';-/** Near-black neutral gray surfaces with a restrained depth ramp and muted blue accent. */+/** Neutral outer background and inset content surfaces with a muted blue accent. */export const macroDarkTheme = {id: 'Macro Dark',name: 'Macro Dark',version: 3,mode: 'dark',colorTokens: {- 'surface-0': 'oklch(0.17 0 0deg)',- 'surface-1':- 'color-mix(in oklch, var(--color-surface-0) 97%, var(--color-content-0))',+ 'surface-0': '#0e0e0e',+ 'surface-1': '#121212','surface-2':'color-mix(in oklch, var(--color-surface-0) 95%, var(--color-content-0))','surface-3':@@ -47,7 +46,7 @@ export const macroDarkTheme = {'link-hover': 'var(--color-accent)','link-visited': 'var(--color-accent)',page: 'var(--color-surface-0)',- panel: 'var(--color-surface-0)',+ panel: 'var(--color-surface-1)',dialog: 'var(--color-surface-2)',menu: 'var(--color-surface-2)',tooltip: 'var(--color-surface-2)',diff --git a/apps/web/src/features/theme/themes/macro-light.ts b/apps/web/src/features/theme/themes/macro-light.tsindex 5e43e8860d..6c78a14dfb 100644--- a/apps/web/src/features/theme/themes/macro-light.ts+++ b/apps/web/src/features/theme/themes/macro-light.ts@@ -1,27 +1,27 @@import type { ThemeV3 } from '../types/themeTypes';+/** Neutral light surfaces with white controls and the shared Macro blue accent. */export const macroLightTheme = {id: 'Macro Light',name: 'Macro Light',version: 3,mode: 'light',colorTokens: {- 'surface-0': 'oklch(0.964 0 59deg)',- 'surface-1':- 'color-mix(in srgb, var(--color-surface-0) 30%, var(--color-surface-4))',- 'surface-2':- 'color-mix(in srgb, var(--color-surface-0) 15%, var(--color-surface-4))',- 'surface-3':- 'color-mix(in srgb, var(--color-surface-0) 7%, var(--color-surface-4))',- 'surface-4': 'oklch(1 0 59deg)',+ 'surface-0': '#f5f5f5',+ 'surface-1': '#fcfcfc',+ 'surface-2': '#ffffff',+ 'surface-3': '#ffffff',+ 'surface-4': '#ffffff','content-0': 'oklch(0.16 0 59deg)',- 'content-1': 'oklch(0.4 0 59deg)',+ 'content-1': '#2e2e2e','content-2': 'oklch(0.45 0 59deg)','content-3': 'oklch(0.55 0 59deg)','content-4': 'oklch(0.7 0 59deg)',- edge: 'oklch(0.91 0 59deg)',- 'edge-muted': 'oklch(0.92 0 59deg)',- accent: 'oklch(0.65 0.2 59deg)',+ edge: '#e4e4e4',+ 'edge-muted': '#ededed',+ 'edge-frame': 'var(--color-edge)',+ 'edge-button': 'var(--color-edge-muted)',+ accent: 'oklch(0.7 0.12 250deg)',red: 'oklch(63.7% 0.237 25.331)',orange: 'oklch(70.5% 0.213 47.604)',amber: 'oklch(76.9% 0.188 70.08)',@@ -45,13 +45,13 @@ export const macroLightTheme = {'link-hover': 'var(--color-accent)','link-visited': 'var(--color-accent)',page: 'var(--color-surface-0)',- panel: 'var(--color-surface-4)',- dialog: 'var(--color-surface-3)',- menu: 'var(--color-surface-3)',+ panel: 'var(--color-surface-1)',+ dialog: 'var(--color-surface-2)',+ menu: 'var(--color-surface-2)',tooltip: 'var(--color-surface-2)',toast: 'var(--color-surface-2)',- input: 'transparent',- 'input-focus': 'var(--color-surface-1)',+ input: 'var(--color-control)',+ 'input-focus': 'var(--color-control)',message: 'var(--color-surface-1)',hover: 'color-mix(in oklch, var(--color-content-0) 3%, transparent)',active: 'color-mix(in oklch, var(--color-content-0) 6%, transparent)',diff --git a/apps/web/src/features/theme/utils/__tests__/resolvedThemeColors.test.ts b/apps/web/src/features/theme/utils/__tests__/resolvedThemeColors.test.tsindex 03fdbd0441..9da3c12fb4 100644--- a/apps/web/src/features/theme/utils/__tests__/resolvedThemeColors.test.ts+++ b/apps/web/src/features/theme/utils/__tests__/resolvedThemeColors.test.ts@@ -27,12 +27,8 @@ describe('resolved theme colors', () => {'uses the %s theme panel assignment for first paint',(mode) => {const colors = resolveThemeColors({}, mode);- expect(colors.panel.l).toBeCloseTo(mode === 'dark' ? 0.17 : 1);- if (mode === 'dark') {- expect(colors.input).toEqual(colors['surface-2']);- } else {- expect(colors.input.alpha).toBe(0);- }+ expect(colors.panel.l).toBeCloseTo(mode === 'dark' ? 0.1822037 : 0.991);+ expect(colors.input).toEqual(colors['surface-2']);});diff --git a/apps/web/src/features/tutorial/InteractiveOnboardingModal.tsx b/apps/web/src/features/tutorial/InteractiveOnboardingModal.tsxindex c32010d343..38cf992250 100644--- a/apps/web/src/features/tutorial/InteractiveOnboardingModal.tsx+++ b/apps/web/src/features/tutorial/InteractiveOnboardingModal.tsx@@ -322,9 +322,9 @@ export function InteractiveOnboardingModal(e.preventDefault();globalSplitManager()?.returnFocus();}}- class="w-[min(1600px,calc(100vw-32px))] h-[min(900px,calc(100vh-32px))] max-w-none rounded-xl bg-surface shadow-2xl"+ class="w-[min(1600px,calc(100vw-32px))] h-[min(900px,calc(100vh-32px))] max-w-none">- <div class="relative size-full overflow-hidden rounded-xl flex flex-col">+ <div class="relative size-full overflow-hidden rounded-[inherit] flex flex-col"><Show when={open()}><InteractiveOnboardingonDismiss={() => setOpen(false)}diff --git a/apps/web/src/features/tutorial/lessons/command-k.tsx b/apps/web/src/features/tutorial/lessons/command-k.tsxindex 6cec093c49..d306f98e3a 100644--- a/apps/web/src/features/tutorial/lessons/command-k.tsx+++ b/apps/web/src/features/tutorial/lessons/command-k.tsx@@ -145,7 +145,7 @@ function CommandKDemo(props: LessonContentProps) {<div class="z-modal fixed inset-0 flex items-start justify-center pt-[15vh]"><Dialog.Contentref={contentEl}- class="max-w-[calc(100vw-16px)] overflow-hidden rounded-xl bg-dialog portal-scope"+ class="elevated-surface max-w-[calc(100vw-16px)] overflow-hidden portal-scope"style={{ width: '800px' }}><CommandMenuInnerdiff --git a/apps/web/src/index.css b/apps/web/src/index.cssindex 90e2cce0fe..41fdd3f481 100644--- a/apps/web/src/index.css+++ b/apps/web/src/index.css@@ -104,6 +104,12 @@--glass-rim-soft-base: 9%;--glass-rim-shade-base: 0%;--glass-rim-gap-ratio: 0;+ --glass-desktop-outline: rgb(0 0 0 / 0.4);+ --glass-desktop-inner-edge: rgb(255 255 255 / 0.08);+ --glass-desktop-top-edge: rgb(255 255 255 / 0.12);+ /* Dark desktop glass separates by its outline; light adds a cast shadow. */+ --glass-desktop-cast-alpha: 0;+ --elevated-control-scale: 0.4;/* Mobile chrome has two diagonal reflections with quiet opposing corners. */--island-rim-strong: 28%;--island-rim-soft: 12%;@@ -136,6 +142,13 @@ html[data-theme-light='true'] {--glass-rim-shade-base: 7%;/* Keep quiet corners close to the highlight instead of exposing a dark rim. */--glass-rim-gap-ratio: 0.85;+ --glass-desktop-outline: var(--color-edge-frame);+ --glass-desktop-inner-edge: rgb(255 255 255 / 0.6);+ --glass-desktop-top-edge: rgb(255 255 255 / 0.9);+ /* A fine outline alone vanishes on near-white content: keep the glass cast+ shadow, and give controls a full 1px edge like a bordered input. */+ --glass-desktop-cast-alpha: var(--glass-shadow-alpha);+ --elevated-control-scale: 1;--island-rim-strong: 75%;--island-rim-soft: 40%;}@@ -392,11 +405,11 @@ body.tauri-ios {--default-ring-width: var(--app-ring-width);/* Input tokens: the only raw colors stored by a VNext theme. */- --color-surface-0: oklch(0.17 0 0);- --color-surface-1: oklch(0.1949 0 0);- --color-surface-2: oklch(0.2115 0 0);- --color-surface-3: oklch(0.2281 0 0);- --color-surface-4: oklch(0.2447 0 0);+ --color-surface-0: #0e0e0e;+ --color-surface-1: #121212;+ --color-surface-2: color-mix(in oklch, var(--color-surface-0) 95%, var(--color-content-0));+ --color-surface-3: color-mix(in oklch, var(--color-surface-0) 93%, var(--color-content-0));+ --color-surface-4: color-mix(in oklch, var(--color-surface-0) 91%, var(--color-content-0));--color-content-0: oklch(1 0 0);--color-content-1: oklch(0.83 0 0);--color-content-2: oklch(0.75 0 0);@@ -435,6 +448,7 @@ body.tauri-ios {--color-page: var(--color-surface-0);--color-panel: var(--theme-panel, var(--color-surface-1));--color-control: var(--color-surface-2);+ --color-control-raised: color-mix(in oklch, var(--color-surface-2) 95%, var(--color-content-0));--color-edge-frame: color-mix(in oklch, var(--color-content-0) 8%, transparent);--color-edge-button: color-mix(in oklch, var(--color-content-0) 5%, transparent);--color-edge-divider: color-mix(in oklch, var(--color-content-0) 4%, transparent);@@ -672,6 +686,7 @@ body.tauri-ios {/* Soft drop shadow for floating menus/popovers (use the `shadow-menu` utility). */--shadow-menu: 0 8px 24px -16px rgb(0 0 0 / 0.24), 0 2px 8px -6px rgb(0 0 0 / 0.18);+ --shadow-control: 0 1px 2px rgb(0 0 0 / 0.12);/* Shared label column width for side-panel two-column grids so labels lineup across sub-panels (Details, Properties, ...). Consumers should use@@ -733,6 +748,17 @@ html[data-theme-light='false'] {--color-composer: var(--color-surface-4);}+/* Desktop floating surfaces use a close contact shadow rather than the longer+ touch shadow. */+html:not([data-touch-device='true']) {+ --shadow-menu: 0 2px 6px -3px rgb(0 0 0 / 0.12), 0 1px 2px -1px rgb(0 0 0 / 0.08);+ --shadow-control: 0 1px 2px rgb(0 0 0 / 0.06);+}++html[data-theme-light='true']:not([data-touch-device='true']) {+ --color-control-raised: color-mix(in oklch, var(--color-surface-2) 98%, var(--color-content-0));+}+/* Right-side header actions share a quiet, hover-only background. Touch headerislands own their controls' chrome (the compose island's filled send button,say), so the flattening stops at an island boundary. */@@ -782,9 +808,9 @@ html[data-theme-light='false'] {length). Shape and background come from the consumer, so this composes withany radius — the rim inherits it — and with variants (`mobile:glass`).- Glass shares a corner-relative diagonal rim. Consumers can- override --glass-rim-background to customize the rim without owning its- pseudo-element. The palette stays in :root; the gradient reads those tokens. */+ Desktop surfaces use a fine dark outline, a faint inner edge, and a brighter+ top edge with the small ambient shadow. Touch keeps its specular treatment.+ Consumers can override the rim without owning its pseudo-element. */@utility glass {--glass-rim-background: linear-gradient(to bottom right,@@ -806,9 +832,6 @@ html[data-theme-light='false'] {which Chrome ignores: the glass loses its blur in production builds whilestill looking right in dev. */--glass-backdrop: blur(var(--glass-blur)) saturate(var(--glass-saturate));- &:where(html:not([data-touch-device="true"]) *) {- --glass-backdrop: none;- }--glass-shadow:inset 0 1px 0 color-mix(in oklch, var(--glass-tint) calc(var(--glass-highlight-base) * var(--glass-scale)), transparent),inset 0 -1px 0 color-mix(in oklch, var(--glass-shade-color) calc(var(--glass-shade-base) * var(--glass-scale)), transparent),@@ -847,29 +870,50 @@ html[data-theme-light='false'] {--glass-shadow-y: 14px;--glass-shadow-blur: 32px;--glass-shadow-spread: -22px;++ &:where(html:not([data-touch-device="true"]) *) {+ @apply elevation-shadow;+ --elevation-scale: 0.6;+ --elevation-ambient-shadow: var(--shadow-menu),+ 0 var(--glass-shadow-y) var(--glass-shadow-blur) var(--glass-shadow-spread)+ oklch(0 0 0 / calc(var(--glass-desktop-cast-alpha) * var(--glass-shadow-scale, var(--glass-scale))));+ --glass-backdrop: none;+ --glass-rim-background: none;+ --glass-rim-shade-base: 0%;+ --glass-shadow: var(--shadow-elevated);+ }+}++/* Resolve the shared material on its host so local scale changes affect every+ edge together. Compact controls use a gentler edge in dark mode only. */+@utility elevation-shadow {+ --shadow-elevated:+ 0 0 0 calc(1px * var(--elevation-scale, 1)) color-mix(in srgb, var(--glass-desktop-outline) calc(100% * var(--elevation-scale, 1)), transparent),+ inset 0 calc(1px * var(--elevation-scale, 1)) 0 color-mix(in srgb, var(--glass-desktop-top-edge) calc(100% * var(--elevation-scale, 1)), transparent),+ inset 0 0 0 calc(1px * var(--elevation-scale, 1)) color-mix(in srgb, var(--glass-desktop-inner-edge) calc(100% * var(--elevation-scale, 1)), transparent),+ var(--elevation-ambient-shadow, var(--shadow-menu));+}++/* One frame for elevated controls; geometry and fill stay with the component.+ Use the not-touch variant so mobile keeps its existing surface treatment.+ Tailwind's shadow utility composes this with focus and validation rings. */+@utility elevated {+ @apply elevation-shadow border-transparent shadow-(--shadow-elevated);+ --elevation-scale: var(--elevated-control-scale);+ --elevation-ambient-shadow: var(--shadow-control);}/* Strip the glass under a variant (e.g. a container query collapsing a pillto a bare icon, where a rim would chip it). Variant-prefixed utilities sortafter plain ones, so `@max-2xl/u-list:glass-none` beats a plain `glass`. */-/* The scrim behind floating dialogs (cmd+k, create, task compose, confirm).- Three quiet layers instead of one flat dim: a tenth of black so the page- steps back; a wide top-lit wash that mixes the theme accent in at- single-digit strength, so the dimmed page warms toward the brand instead of- going gray — like room light through tinted glass; and a whisper of- backdrop blur with a nudge of saturation, so what's behind reads as depth- rather than as competing detail. The accent wash lives in background-image- so a heavier coat (bg-modal-overlay) can replace the base color while- keeping the sheen. Standard backdrop-filter only — Lightning CSS adds the- -webkit- prefix itself (see the note in `glass`). */+/* The scrim behind floating dialogs (cmd+k, create, task compose, confirm):+ a tenth of black so the page steps back, and a whisper of backdrop blur with+ a nudge of saturation so what's behind reads as depth rather than competing+ detail. No accent tint; a heavier coat (bg-modal-overlay) replaces the base+ color. Standard backdrop-filter only — Lightning CSS adds the -webkit-+ prefix itself (see the note in `glass`). */@utility scrim-glass {background-color: oklch(0 0 0 / 0.1);- background-image: radial-gradient(- 120% 90% at 50% -12%,- color-mix(in oklch, var(--color-accent) 6%, transparent) 0%,- color-mix(in oklch, var(--color-accent) 2%, transparent) 40%,- transparent 68%- );backdrop-filter: blur(2px) saturate(1.05);}@@ -912,25 +956,33 @@ html[data-theme-light='false'] {}}-/* The channel/compose input: the same glass, but the tight menu shadow- swaps for a wide, faint ambient one (a la the ChatGPT composer) so the- input reads as floating over the conversation rather than popped out of it.- Light themes keep the same geometry at a much lower scale so the halo- doesn't dominate pale surfaces. */+/* Touch composers retain their wider ambient shadow. Desktop shares the+ restrained frame and shadow of other floating surfaces. */@utility glass-input {@apply glass;--glass-shadow-y: 10px;--glass-shadow-blur: 40px;--glass-shadow-spread: -8px;--glass-shadow-scale: 0.5;++ @variant not-touch {+ --color-control: var(--color-control-raised);+ --color-input: var(--color-control-raised);+ --color-input-focus: var(--color-control-raised);+ }}-/* Shared menu appearance: an opaque menu fill with the glass rim, inset- diagonal highlights, and cast shadow, so menus read as raised in both- themes. */+/* Shared menu appearance: a fine beveled edge and compact shadow on desktop,+ with the existing glass treatment on touch. */@utility menu-surface {@apply glass relative min-h-0 rounded-xl bg-menu text-ink;--color-surface: var(--color-menu);++ @variant not-touch {+ --color-control: var(--color-control-raised);+ --color-input: var(--color-control-raised);+ --color-input-focus: var(--color-control-raised);+ }}/* Shared light-surface edge and ambient shadow from the homepage composer. */@@ -1233,9 +1285,12 @@ html[data-platform='ios'][data-touch-device='true'] :is(}}-.skeleton-shimmer {- position: relative;- overflow: hidden;+/* Components layer, so placement utilities such as `absolute` still win. */+@layer components {+ .skeleton-shimmer {+ position: relative;+ overflow: hidden;+ }}.skeleton-shimmer::after {@@ -1483,7 +1538,8 @@ a {/* Shared text-field styling so inputs look the same across every settings tab.Apply to an <input>; pair with a width utility (e.g. `w-full`) as needed. */@utility settings-input {- @apply h-9 px-3 rounded-full border border-edge-frame bg-control text-base text-ink outline-none transition-colors duration-120 motion-reduce:transition-none;+ /* Matches a md `Input` on desktop; touch keeps its taller field. */+ @apply h-9 not-touch:h-8 px-3 rounded-full border border-edge-frame bg-control not-touch:elevated text-base text-ink outline-none transition-colors duration-120 motion-reduce:transition-none;&:is(textarea) {@apply rounded-xl;}diff --git a/apps/web/src/lib/core/collab-surface/CollabMarkdownEditor.tsx b/apps/web/src/lib/core/collab-surface/CollabMarkdownEditor.tsxindex 244ead5ba6..2cd5722750 100644--- a/apps/web/src/lib/core/collab-surface/CollabMarkdownEditor.tsx+++ b/apps/web/src/lib/core/collab-surface/CollabMarkdownEditor.tsx@@ -1,3 +1,4 @@+import { ListSkeleton } from '@app/components/view-shell/ListSkeleton';import { CollabProvider } from '@core/component/LexicalMarkdown/collaboration/CollabProvider';import {getErrorDescription,@@ -245,8 +246,8 @@ export function CollabMarkdownEditor(props: CollabMarkdownEditorProps) {<div class="absolute inset-0 flex flex-col gap-2 pointer-events-none">{props.loadingFallback ?? (<>- <div class="h-4 w-2/3 animate-pulse rounded bg-ink/10" />- <div class="h-4 w-1/2 animate-pulse rounded bg-ink/10" />+ <ListSkeleton.Bar class="h-3 w-2/3" />+ <ListSkeleton.Bar class="h-3 w-1/2" /></>)}</div>diff --git a/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.tsx b/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.tsxindex 3ef08d8695..60f4416943 100644--- a/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.tsx+++ b/apps/web/src/lib/core/component/AI/component/tool/calendar/DraftComposer.tsx@@ -67,30 +67,30 @@ function CalendarDraftComposerFallback() {role="status"aria-label="Loading calendar editor"aria-busy="true"- class="flex min-h-64 animate-pulse flex-col gap-6 rounded-xl border border-edge-muted bg-surface p-4 shadow-sm"+ class="flex min-h-64 flex-col gap-6 rounded-xl border border-edge-muted bg-surface p-4 shadow-sm"><span class="sr-only">Loading calendar editor</span><div class="flex flex-col gap-4"><div class="flex items-center gap-2">- <div class="h-7 w-28 rounded-lg bg-skeleton" />- <div class="h-7 w-28 rounded-lg bg-skeleton" />- <div class="h-7 w-16 rounded-lg bg-skeleton" />+ <div class="skeleton-shimmer h-8 w-28 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-8 w-28 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-8 w-16 rounded-full bg-skeleton" /></div>- <div class="h-6 w-2/5 rounded-md bg-skeleton" />- <div class="h-3 w-3/4 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-6 w-2/5 rounded-md bg-skeleton" />+ <div class="skeleton-shimmer h-3 w-3/4 rounded-full bg-skeleton" /></div><div class="flex flex-wrap gap-2">- <div class="h-7 w-24 rounded-full bg-skeleton" />- <div class="h-7 w-28 rounded-full bg-skeleton" />- <div class="h-7 w-20 rounded-full bg-skeleton" />- <div class="h-7 w-24 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-7 w-24 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-7 w-28 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-7 w-20 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-7 w-24 rounded-full bg-skeleton" /></div><div class="mt-auto flex justify-end gap-3">- <div class="h-8 w-16 rounded-lg bg-skeleton" />- <div class="h-8 w-28 rounded-lg bg-skeleton" />+ <div class="skeleton-shimmer h-8 w-16 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-8 w-28 rounded-full bg-skeleton" /></div></div></Layer>diff --git a/apps/web/src/lib/core/component/DocumentPreviewSkeleton.tsx b/apps/web/src/lib/core/component/DocumentPreviewSkeleton.tsxindex 7a05b9f6c3..6465454e7e 100644--- a/apps/web/src/lib/core/component/DocumentPreviewSkeleton.tsx+++ b/apps/web/src/lib/core/component/DocumentPreviewSkeleton.tsx@@ -5,7 +5,7 @@ export function DocumentPreviewIconSkeleton(props: { label?: string }) {role={props.label ? 'img' : undefined}aria-label={props.label}aria-hidden={props.label ? undefined : true}- class="block size-4 shrink-0 rounded-full bg-skeleton motion-safe:animate-pulse"+ class="skeleton-shimmer block size-4 shrink-0 rounded-full bg-skeleton"/>);}@@ -24,9 +24,9 @@ export function DocumentPreviewSkeleton() {<div class="pt-0.5"><DocumentPreviewIconSkeleton /></div>- <div class="flex min-w-0 flex-col gap-2 py-1 motion-safe:animate-pulse">- <div class="h-3.5 w-3/4 rounded bg-skeleton" />- <div class="h-3.5 w-1/2 rounded bg-skeleton" />+ <div class="flex min-w-0 flex-col gap-2 py-1">+ <div class="skeleton-shimmer h-3 w-3/4 rounded-full bg-skeleton" />+ <div class="skeleton-shimmer h-3 w-1/2 rounded-full bg-skeleton" /></div></div></div>diff --git a/apps/web/src/lib/core/component/FindBar.tsx b/apps/web/src/lib/core/component/FindBar.tsxindex f217320770..fe109f88e2 100644--- a/apps/web/src/lib/core/component/FindBar.tsx+++ b/apps/web/src/lib/core/component/FindBar.tsx@@ -56,12 +56,7 @@ export function FindBar(props: FindBarProps) {<FindBarContext.Providervalue={{ controller: props.controller, direction }}>- <div- class={cn(- 'flex items-center gap-1 rounded-md border border-edge bg-surface p-1 shadow-md focus-within:border-accent',- props.class- )}- >+ <div class={cn('menu-surface flex items-center gap-1 p-1', props.class)}><Showwhen={props.children}fallback={diff --git a/apps/web/src/lib/core/component/GeneralizedPopup/Popup.tsx b/apps/web/src/lib/core/component/GeneralizedPopup/Popup.tsxindex 986c770c86..0247b806e0 100644--- a/apps/web/src/lib/core/component/GeneralizedPopup/Popup.tsx+++ b/apps/web/src/lib/core/component/GeneralizedPopup/Popup.tsx@@ -29,7 +29,7 @@ export function GeneralizedPopup(props: GeneralizedPopupProps) {<divref={props.ref}id="generalized-popup"- class="border border-edge bg-surface shadow-xl rounded-lg inline-flex items-start flex-col p-1"+ class="menu-surface inline-flex items-start flex-col p-1">{props.children}</div>diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/BookingLinkMention.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/BookingLinkMention.tsxindex 5c288fd2bf..a966f3a37e 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/BookingLinkMention.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/BookingLinkMention.tsx@@ -42,7 +42,7 @@ function BookingLinkPreviewCard(props: {}) {return (<div class="select-none w-72 text-ink">- <Surface depth={3} class="glass bg-menu-glass rounded-xl">+ <Surface depth={3} hideBorder class="menu-surface rounded-xl"><div class="w-full flex flex-col"><div class="flex items-center justify-between gap-2 p-2"><div class="flex items-center gap-2 min-w-0">diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/PullRequestMention.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/PullRequestMention.tsxindex c084b86381..00d580978f 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/PullRequestMention.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/PullRequestMention.tsx@@ -394,7 +394,7 @@ export function PullRequestPreviewCard(props: {}) {return (<div class="select-none w-80 text-ink">- <Surface depth={3} class="glass bg-menu-glass rounded-xl">+ <Surface depth={3} hideBorder class="menu-surface rounded-xl"><Suspensefallback={<div class="p-3 flex items-center justify-center text-sm text-ink-muted">@@ -449,7 +449,7 @@ function UnsyncedPullRequestPreviewCard(props: {}) {return (<div class="select-none w-80 text-ink">- <Surface depth={3} class="glass bg-menu-glass rounded-xl">+ <Surface depth={3} hideBorder class="menu-surface rounded-xl"><div class="flex items-center justify-between gap-2 p-2"><div class="flex items-center gap-2 min-w-0"><span class="relative size-4 shrink-0 inline-flex">diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/paste/PasteTextViewer.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/paste/PasteTextViewer.tsxindex 16554b944c..3688551fff 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/paste/PasteTextViewer.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/paste/PasteTextViewer.tsx@@ -52,7 +52,6 @@ export function PasteTextViewer(props: {open={props.open}onOpenChange={props.onOpenChange}position="center"- class="rounded-lg border border-edge bg-surface shadow-lg"><div class="flex items-center justify-between px-4 py-2 border-b border-edge text-xs text-ink-muted">{header()}diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsxindex 86ec2b5bca..123cea4289 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsx@@ -331,7 +331,7 @@ export function ActionMenu(props: {on:touchstart={(e) => e.stopPropagation()}ref={menuRef}>- <Surface depth={2} class="py-1.5 glass bg-menu-glass rounded-xl">+ <Surface depth={2} hideBorder class="menu-surface rounded-xl py-1.5"><divclass="overflow-y-auto scrollbar-hidden"style={{diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsxindex 65830ad5a3..cf444f49b1 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx@@ -274,7 +274,7 @@ export function EmojiMenu(props: EmojiMenuProps) {on:touchstart={(e) => e.stopPropagation()}ref={menuRef}>- <Surface depth={2} class="py-1.5 glass bg-menu-glass rounded-xl">+ <Surface depth={2} hideBorder class="menu-surface rounded-xl py-1.5"><div class="flex flex-col px-1.5 w-full"><Showwhen={emojiOptions().length > 0}diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingEquationMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingEquationMenu.tsxindex b1e4cb73de..5088dd992f 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingEquationMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingEquationMenu.tsx@@ -222,7 +222,7 @@ export function FloatingEquationMenu(return (<Show when={menuOpen()}><div- class="p-4 fixed border border-edge bg-surface top-0 left-0 z-action-menu rounded-lg shadow-lg w-96"+ class="menu-surface p-4 fixed top-0 left-0 z-action-menu w-96"use:floatWithElement={{ element: getElement }}use:floatWithSelection={{selection: untrack(getSelection),diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingGifMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingGifMenu.tsxindex 6e41a8cfc5..55e163baec 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingGifMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingGifMenu.tsx@@ -174,10 +174,7 @@ export function FloatingGifMenu(if (event.target !== inputRef) event.preventDefault();}}>- <Surface- depth={2}- class="flex flex-col gap-1.5 p-1.5 glass bg-menu-glass rounded-xl"- >+ <Surface depth={2} class="menu-surface flex flex-col gap-1.5 p-1.5"><InputGroup size="sm"><InputGroup.Inputref={inputRef}diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingLinkMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingLinkMenu.tsxindex d9e9aecb21..855f179fc5 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingLinkMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingLinkMenu.tsx@@ -381,11 +381,7 @@ export function FloatingLinkMenu(props: {}}ref={menuRef}>- <Surface- depth={2}- hideBorder- class="rounded-xl glass bg-menu-glass p-1.5"- >+ <Surface depth={2} hideBorder class="menu-surface p-1.5">{props.children}</Surface></div>diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingTableMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingTableMenu.tsxindex af4f7c4b9a..14c3149e03 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingTableMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/FloatingTableMenu.tsx@@ -125,7 +125,7 @@ export function FloatingTableMenu(props: { canEdit?: Accessor<boolean> } = {}) {{/* Same elevated surface as the other floating bars. */}<Layer depth={2}><div- class="p-2 fixed bg-surface top-0 left-0 z-action-menu rounded-lg shadow-lg ring-1 ring-edge cursor-default select-none"+ class="menu-surface p-2 fixed top-0 left-0 z-action-menu cursor-default select-none"use:floatWithSelection={{selection: untrack(() => window.getSelection()),reactiveOnContainer: editor()?.getRootElement(),diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsxindex 59af80d978..59b2247328 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsx@@ -99,7 +99,7 @@ function GenerateActionMenu(props: GenerateMenuProps) {});return (- <div class="w-fit flex flex-col border border-edge rounded-md p-1 bg-surface shadow-md space-y-1">+ <div class="menu-surface w-fit flex flex-col p-1 space-y-1"><MenuItemonClick={() => {props.editor.dispatchCommand(ACCEPT_COMPLETION, undefined);diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/InlineFollowupMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/InlineFollowupMenu.tsxindex a4c3a1bed7..a689c2f8e5 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/InlineFollowupMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/InlineFollowupMenu.tsx@@ -120,7 +120,7 @@ export function InlineFollowupMenu(props: {clickOutside(el, () => () => props.onClose());}}>- <Surface depth={2} class="py-1.5 glass bg-menu-glass rounded-xl">+ <Surface depth={2} hideBorder class="menu-surface rounded-xl py-1.5"><For each={props.options}>{(option, index) => (<buttondiff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsxindex 8cb4703c9c..9cd1ab7cfd 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsx@@ -734,7 +734,11 @@ function MentionsMenuInner(props: MentionsMenuProps) {clickOutside(el, () => clickOutsideHandler);}}>- <Surface depth={2} class="pt-2 pb-1.5 glass bg-menu-glass rounded-xl">+ <Surface+ depth={2}+ hideBorder+ class="menu-surface rounded-xl pt-2 pb-1.5"+ ><Showwhen={controller.viewAllMode()}fallback={diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/browser-test/item-bin.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/browser-test/item-bin.tsxindex 78dc72ac36..6c124a8e5b 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/browser-test/item-bin.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/MentionsMenu/browser-test/item-bin.tsx@@ -26,10 +26,7 @@ function Fixture() {value={search()}onInput={(event) => setSearch(event.currentTarget.value)}/>- <Surface- depth={2}- class="w-96 pt-2 pb-1.5 glass bg-menu-glass rounded-xl"- >+ <Surface depth={2} class="menu-surface w-96 pt-2 pb-1.5"><ItemBinlabel="People"binType="users"diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SkillsMenu/SkillsMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SkillsMenu/SkillsMenu.tsxindex 0ad0512a4d..c3d9260b65 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SkillsMenu/SkillsMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SkillsMenu/SkillsMenu.tsx@@ -352,7 +352,11 @@ function SkillsMenuInner(props: SkillsMenuProps) {}}on:touchstart={(e) => e.stopPropagation()}>- <Surface depth={2} class="pt-2 pb-1.5 glass bg-menu-glass rounded-xl">+ <Surface+ depth={2}+ hideBorder+ class="menu-surface rounded-xl pt-2 pb-1.5"+ ><divclass="overflow-y-auto scrollbar-hidden"style={{ 'max-height': `${contentMaxHeight()}px` }}diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SnippetsMenu/SnippetsMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SnippetsMenu/SnippetsMenu.tsxindex 1f0dda8b43..f872b90987 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SnippetsMenu/SnippetsMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/SnippetsMenu/SnippetsMenu.tsx@@ -202,7 +202,11 @@ function SnippetsMenuInner(props: SnippetsMenuProps) {}}on:touchstart={(e) => e.stopPropagation()}>- <Surface depth={2} class="pt-2 pb-1.5 glass bg-menu-glass rounded-xl">+ <Surface+ depth={2}+ hideBorder+ class="menu-surface rounded-xl pt-2 pb-1.5"+ ><div class="px-3.5 pb-1 text-xs font-medium text-ink-muted">Snippets</div>diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/TagsMenu.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/TagsMenu.tsxindex 246cbd4405..0d22aac7e0 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/TagsMenu.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/menu/TagsMenu.tsx@@ -407,7 +407,11 @@ export function TagsMenu(props: {clickOutside(el, () => () => closeMenu());}}>- <Surface depth={2} class="py-1.5 glass bg-menu-glass rounded-xl">+ <Surface+ depth={2}+ hideBorder+ class="menu-surface rounded-xl py-1.5"+ ><Showwhen={createStep()}fallback={diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/misc/TableMoveHandle.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/misc/TableMoveHandle.tsxindex ed6547598e..50c1027303 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/misc/TableMoveHandle.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/misc/TableMoveHandle.tsx@@ -576,7 +576,7 @@ export function TableMoveHandle() {</Show><Show when={menuOpen()}><div- class="z-30 grid grid-cols-2 gap-1 overflow-y-auto rounded-lg bg-surface p-1.5 shadow-lg ring-1 ring-edge"+ class="menu-surface z-30 grid grid-cols-2 gap-1 overflow-y-auto p-1.5"style={{width: `${MENU_WIDTH_PX}px`,'max-height': `${MENU_MAX_HEIGHT_PX}px`,diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/misc/TableSelectionActionBar.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/misc/TableSelectionActionBar.tsxindex ea8a7f8bf1..2d32fd8a2a 100644--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/misc/TableSelectionActionBar.tsx+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/misc/TableSelectionActionBar.tsx@@ -276,7 +276,7 @@ export function TableSelectionActionBar() {}}/><div- class="z-30 flex items-center gap-0.5 rounded-lg bg-surface p-1 shadow-lg ring-1 ring-edge"+ class="menu-surface z-30 flex items-center gap-0.5 p-1"use:floatWithElement={{element: anchorElem,floatingOptions: { placement: 'top' },diff --git a/apps/web/src/lib/core/component/Link.tsx b/apps/web/src/lib/core/component/Link.tsxindex 98ef4bb622..0cdcc92a93 100644--- a/apps/web/src/lib/core/component/Link.tsx+++ b/apps/web/src/lib/core/component/Link.tsx@@ -31,7 +31,7 @@ type LinkHoverCardProps = {*/function VideoEmbed(props: { embedUrl: string; title: string }) {return (- <div class="w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl glass bg-menu-glass">+ <div class="menu-surface w-80 max-w-[calc(100vw-1rem)] overflow-hidden"><div class="relative aspect-video w-full"><iframesrc={props.embedUrl}@@ -63,7 +63,7 @@ export function LinkHoverCard(props: LinkHoverCardProps) {props.unfurled.embed_url}fallback={- <div class="flex w-80 max-w-[calc(100vw-1rem)] items-start gap-1 rounded-xl glass bg-menu-glass p-2 text-left">+ <div class="menu-surface flex w-80 max-w-[calc(100vw-1rem)] items-start gap-1 p-2 text-left"><div class="flex size-6 shrink-0 items-center justify-center"><Showwhen={props.unfurled.favicon_url}diff --git a/apps/web/src/lib/core/component/RecipientSelector.tsx b/apps/web/src/lib/core/component/RecipientSelector.tsxindex 2d916042db..5edc956983 100644--- a/apps/web/src/lib/core/component/RecipientSelector.tsx+++ b/apps/web/src/lib/core/component/RecipientSelector.tsx@@ -978,7 +978,7 @@ export function RecipientSelector<K extends CombinedRecipientKind>(inputRef()?.focus({ preventScroll: true });}}}- class="z-modal-content translate-y-1 rounded-xl p-1.5 glass bg-menu-glass menu-open-animation text-sm [--color-surface:var(--color-menu)]"+ class="menu-surface z-modal-content translate-y-1 p-1.5 menu-open-animation text-sm"><Combobox.Listboxref={setListboxRef}diff --git a/apps/web/src/lib/core/component/TabsInset.tsx b/apps/web/src/lib/core/component/TabsInset.tsxdeleted file mode 100644index 6f7cb84d62..0000000000--- a/apps/web/src/lib/core/component/TabsInset.tsx+++ /dev/null@@ -1,96 +0,0 @@-import { isTouchDevice } from '@core/mobile/isTouchDevice';-import {- SegmentedControl as KSegmentedControl,- type SegmentedControlRootProps,-} from '@kobalte/core/segmented-control';-import { cn, Layer } from '@ui';-import { For, type JSX, splitProps } from 'solid-js';--type TabItem = {- value: string;- label: string | JSX.Element;-};--type TabsInsetProps = {- list: TabItem[];- value?: string;- defaultValue?: string;- class?: string;- trackClass?: string;- itemClass?: string;- labelClass?: string;- depth?: 0 | 1 | 2 | 3 | 4;- fullWidth?: boolean;-} & Omit<SegmentedControlRootProps, 'defaultValue'>;--export const TabsInset = (props: TabsInsetProps) => {- const [local, rootProps] = splitProps(props, [- 'list',- 'value',- 'defaultValue',- 'disabled',- 'class',- 'trackClass',- 'itemClass',- 'labelClass',- 'depth',- 'fullWidth',- ]);-- // The track sits at the control's depth (matching the panel it's on); the- // checked item is elevated two steps above it so the active pill still reads- // as raised regardless of the panel depth.- const trackDepth = () => local.depth ?? 0;- const itemDepth = () => Math.min(4, trackDepth() + 2) as 0 | 1 | 2 | 3 | 4;-- return (- <KSegmentedControl- value={local.value}- defaultValue={local.defaultValue ?? local.list[0]?.value}- disabled={local.disabled}- {...rootProps}- class={cn(- 'h-full flex items-center',- local.fullWidth && 'w-full',- local.class- )}- >- <Layer depth={trackDepth()}>- <div- class={cn(- 'relative flex items-center border border-edge-muted bg-surface rounded-full p-0.5 has-focus-visible:ring-2 has-focus-visible:ring-accent/20',- local.fullWidth && 'w-full',- local.trackClass- )}- >- <For each={local.list}>- {(item) => (- <Layer depth={itemDepth()}>- <KSegmentedControl.Item- value={item.value}- disabled={local.disabled}- class={cn(local.fullWidth && 'flex-1', local.itemClass)}- >- <KSegmentedControl.ItemInput class="absolute inset-0 pointer-events-none" />- <KSegmentedControl.ItemLabel- class={cn(- 'flex items-center px-3 py-1 text-xs font-medium data-checked:ring data-checked:ring-edge-muted ring-inset rounded-full text-ink-extra-muted hover:text-ink data-checked:bg-surface data-checked:text-ink data-checked:shadow-[0_1px_2px_rgba(0,0,0,0.06)]',- local.fullWidth && 'w-full justify-center',- local.labelClass- )}- onPointerDown={(e) => {- if (isTouchDevice()) e.preventDefault();- }}- onClick={() => rootProps.onChange?.(item.value)}- >- {item.label}- </KSegmentedControl.ItemLabel>- </KSegmentedControl.Item>- </Layer>- )}- </For>- </div>- </Layer>- </KSegmentedControl>- );-};diff --git a/apps/web/src/lib/core/component/TabsInsetDropdown.tsx b/apps/web/src/lib/core/component/TabsInsetDropdown.tsxdeleted file mode 100644index f2f5f4ed68..0000000000--- a/apps/web/src/lib/core/component/TabsInsetDropdown.tsx+++ /dev/null@@ -1,81 +0,0 @@-import CaretDown from '@phosphor/caret-down.svg';-import CheckIcon from '@phosphor/check.svg';-import { cn, Dropdown, Layer } from '@ui';-import { createMemo, For, type JSX, Show, splitProps } from 'solid-js';--export type TabItem = {- label: string | JSX.Element;- value: string;-};--export type TabsInsetDropdownProps = {- placeholder?: string | JSX.Element;- onChange?: (value: string) => void;- depth?: 0 | 1 | 2 | 3 | 4;- defaultValue?: string;- disabled?: boolean;- list: TabItem[];- class?: string;- value?: string;-};--export const TabsInsetDropdown = (props: TabsInsetDropdownProps) => {- const [local] = splitProps(props, [- 'defaultValue',- 'placeholder',- 'onChange',- 'disabled',- 'class',- 'depth',- 'value',- 'list',- ]);-- const current = createMemo(() => {- const v = local.value ?? local.defaultValue ?? local.list[0]?.value;- return local.list.find((item) => item.value === v) ?? local.list[0];- });-- return (- <Dropdown placement="bottom-start">- <Dropdown.Trigger- class={cn(- 'not-disabled:hover:bg-surface active:bg-surface focus-visible:bg-surface',- 'h-auto p-0.5 rounded-lg border border-edge-muted bg-surface',- local.class- )}- disabled={local.disabled}- depth={local.depth ?? 0}- >- <Layer depth={2}>- <span class="flex items-center px-2.5 py-1 text-xs font-medium ring ring-edge-muted ring-inset rounded-md bg-surface text-ink shadow-sm">- {current()?.label ?? local.placeholder ?? ''}- </span>- </Layer>- <span class="flex items-center justify-center px-1.5 text-ink-extra-muted">- <CaretDown class="size-3" />- </span>- </Dropdown.Trigger>- <Dropdown.Content depth={local.depth ?? 2}>- <Dropdown.Group>- <For each={local.list}>- {(item) => {- const isActive = () => current()?.value === item.value;- return (- <Dropdown.Item- class={cn(isActive() && 'text-ink font-semibold')}- onSelect={() => local.onChange?.(item.value)}- >- <span class="flex-1 truncate">{item.label}</span>- <Show when={isActive()}>- <CheckIcon class="size-3.5 text-accent" />- </Show>- </Dropdown.Item>- );- }}- </For>- </Dropdown.Group>- </Dropdown.Content>- </Dropdown>- );-};diff --git a/apps/web/src/lib/core/component/TopBar/ShareButton.test.tsx b/apps/web/src/lib/core/component/TopBar/ShareButton.test.tsxindex 56b36fb8b5..f5413602d9 100644--- a/apps/web/src/lib/core/component/TopBar/ShareButton.test.tsx+++ b/apps/web/src/lib/core/component/TopBar/ShareButton.test.tsx@@ -198,8 +198,8 @@ vi.mock('@channel/use-channel-participants', () => ({}));vi.mock('@core/component/EntityIcon', () => ({ EntityIcon: () => null }));vi.mock('@core/component/UserIcon', () => ({ UserIcon: () => null }));-vi.mock('@core/component/Tabs', () => ({- Tabs: (props: {+vi.mock('@core/component/UnderlineTabs', () => ({+ UnderlineTabs: (props: {list: { value: string; label: string }[];value?: string;onChange?: (value: string) => void;@@ -365,7 +365,7 @@ vi.mock('@ui', async () => {Group: Container,}),ButtonGroup: Object.assign(Container, { Divider: () => null }),- SegmentedControl: (props: {+ Tabs: (props: {'aria-label'?: string;onChange?: (value: string) => void;}) => (diff --git a/apps/web/src/lib/core/component/TopBar/ShareButton.tsx b/apps/web/src/lib/core/component/TopBar/ShareButton.tsxindex 6c1f021a72..19ee0a52f1 100644--- a/apps/web/src/lib/core/component/TopBar/ShareButton.tsx+++ b/apps/web/src/lib/core/component/TopBar/ShareButton.tsx@@ -20,6 +20,7 @@ import { projectRouteId } from '@app/features/projects/core/route';import { useAnalytics } from '@app/lib/analytics/analytics-context';import { useChannelParticipants } from '@channel/use-channel-participants';import { HeaderActionButton } from '@components/app/HeaderActionButton';+import { HeaderActionGroup } from '@components/app/HeaderActionGroup';import { MobileDrawer } from '@components/app/mobile/MobileDrawer';import { useSplitPanel } from '@components/app/split-layout/layoutUtils';import { useIsAuthenticated } from '@core/auth';@@ -36,7 +37,10 @@ import {useMaybeBlockId,} from '@core/block';import { EntityIcon } from '@core/component/EntityIcon';-import { type TabItem, Tabs } from '@core/component/Tabs';+import {+ type UnderlineTabItem,+ UnderlineTabs,+} from '@core/component/UnderlineTabs';import { UserIcon } from '@core/component/UserIcon';import {ENABLE_MARKDOWN_COMMENTS,@@ -111,7 +115,7 @@ import {Dropdown,type ManagedDialogProps,Panel,- SegmentedControl,+ Tabs,Tooltip,} from '@ui';import type { Result } from 'neverthrow';@@ -509,7 +513,8 @@ function LinkSharingControls(props: LinkSharingControlsProps) {</div></Tooltip></div>- <SegmentedControl+ <Tabs+ touch="segmented"aria-label="Link sharing scope"size="sm"value={scope()}@@ -589,8 +594,8 @@ function MobileShareDrawer(props: MobileShareDrawerProps) {}};- const mobileTabs = createMemo((): TabItem[] => {- const tabs: TabItem[] = [{ value: 'share', label: 'Share' }];+ const mobileTabs = createMemo((): UnderlineTabItem[] => {+ const tabs: UnderlineTabItem[] = [{ value: 'share', label: 'Share' }];if ((props.recipients?.length ?? 0) > 0 || props.owner)tabs.push({value: 'people',@@ -662,7 +667,7 @@ function MobileShareDrawer(props: MobileShareDrawerProps) {</Show></div><div class="shrink-0 h-9 border-b border-edge-muted px-3 mb-2">- <Tabs+ <UnderlineTabslist={mobileTabs()}value={effectiveActiveTab()}onChange={setActiveTab}@@ -1564,7 +1569,11 @@ export function ShareModal(props: ShareModalProps) {style={{ width: '800px' }}>{/* Card 1: Share form — gradient border */}- <Panel depth={2} class="rounded-xl bg-dialog">+ <Panel+ depth={2}+ hideBorder+ class="elevated-surface rounded-[24px] bg-dialog"+ ><Panel.Header class="px-4"><Dialog.Title class="flex items-center gap-1.5 min-w-0 overflow-hidden whitespace-nowrap w-full text-sm font-medium"><span class="shrink-0">Share:</span>@@ -1625,7 +1634,11 @@ export function ShareModal(props: ShareModalProps) {(requests.state()?.pendingCount ?? 0) > 0}>- <Panel depth={2} class="rounded-xl bg-dialog">+ <Panel+ depth={2}+ hideBorder+ class="elevated-surface rounded-[24px] bg-dialog"+ ><Panel.Body><PermissionRequestsView source={requests} /></Panel.Body>@@ -1639,7 +1652,11 @@ export function ShareModal(props: ShareModalProps) {!!(props.owner ?? requests.state()?.owner)}>- <Panel depth={2} class="rounded-xl bg-dialog">+ <Panel+ depth={2}+ hideBorder+ class="elevated-surface rounded-[24px] bg-dialog"+ ><Panel.Header class="px-4"><span class="text-sm font-medium"><Show when={!ownerOnlyRoster()} fallback="Owner">@@ -1802,7 +1819,11 @@ export function ShareModal(props: ShareModalProps) {!isLinkSharingDisabledForItem(props.itemType))}>- <Panel depth={2} class="rounded-xl bg-dialog">+ <Panel+ depth={2}+ hideBorder+ class="elevated-surface rounded-[24px] bg-dialog"+ ><Panel.Body><Showwhen={props.linkSharing}@@ -1834,7 +1855,11 @@ export function ShareModal(props: ShareModalProps) {when={teamShareOnOwnCard(props.itemType, teamShareControls())}>{(teamShare) => (- <Panel depth={2} class="rounded-xl bg-dialog">+ <Panel+ depth={2}+ hideBorder+ class="elevated-surface rounded-[24px] bg-dialog"+ ><Panel.Body><div class="p-4 text-sm text-ink"><TeamAccessSection teamShare={teamShare()} />@@ -1958,46 +1983,48 @@ export function ShareTrigger(props: {});return (- <div ref={requests.ref} class="flex items-center gap-1">- <Tooltip- label={- shareStatus()?.tooltip ??- (blockType() === 'agent'- ? 'Share agent session'- : blockType() === 'initiative'- ? 'Share project'- : inBlock- ? 'This item has been shared with you.'- : `Share ${blockType()}`)- }- >- <HeaderActionButton- label="Share"- icon={- <ShareRequestIcon count={requests.count()}>- <IconShared />- </ShareRequestIcon>+ <HeaderActionGroup label="Sharing">+ <div ref={requests.ref} class="flex items-center touch:gap-1">+ <Tooltip+ label={+ shareStatus()?.tooltip ??+ (blockType() === 'agent'+ ? 'Share agent session'+ : blockType() === 'initiative'+ ? 'Share project'+ : inBlock+ ? 'This item has been shared with you.'+ : `Share ${blockType()}`)}- onClick={() => {- if (!isAuthenticated()) {- openLoginModal();- } else {- analytics.track('share_menu_open', { blockType: blockType() });- requests.open();+ >+ <HeaderActionButton+ label="Share"+ icon={+ <ShareRequestIcon count={requests.count()}>+ <IconShared class="size-4" />+ </ShareRequestIcon>}- }}- />- </Tooltip>-- <CopyButton- variant="ghost"- tooltip="Copy Share Link"- size="icon-md"- onClick={ShareLinkAction().action}- >- <Dynamic component={ShareLinkAction().icon} class="size-3.5!" />- </CopyButton>- </div>+ onClick={() => {+ if (!isAuthenticated()) {+ openLoginModal();+ } else {+ analytics.track('share_menu_open', { blockType: blockType() });+ requests.open();+ }+ }}+ />+ </Tooltip>++ <CopyButton+ variant="ghost"+ tooltip="Copy Share Link"+ size="icon-md"+ onClick={ShareLinkAction().action}+ >+ <Dynamic component={ShareLinkAction().icon} class="size-3.5!" />+ </CopyButton>+ </div>+ </HeaderActionGroup>);}diff --git a/apps/web/src/lib/core/component/Tabs.tsx b/apps/web/src/lib/core/component/UnderlineTabs.tsxsimilarity index 95%rename from apps/web/src/lib/core/component/Tabs.tsxrename to apps/web/src/lib/core/component/UnderlineTabs.tsxindex 789a63ccad..e0b6588584 100644--- a/apps/web/src/lib/core/component/Tabs.tsx+++ b/apps/web/src/lib/core/component/UnderlineTabs.tsx@@ -17,14 +17,15 @@ import {splitProps,} from 'solid-js';-export type TabItem = {+export type UnderlineTabItem = {value: string;label: string | JSX.Element;};-export const Tabs = (+/** The mobile share sheet's tab bar; everything else uses `Tabs` from `@ui`. */+export const UnderlineTabs = (props: {- list: TabItem[];+ list: UnderlineTabItem[];value?: string;defaultValue?: string;indicatorPosition?: 'top' | 'bottom';diff --git a/apps/web/src/lib/core/component/UserTooltip.tsx b/apps/web/src/lib/core/component/UserTooltip.tsxindex b73458e6b1..14476b8b03 100644--- a/apps/web/src/lib/core/component/UserTooltip.tsx+++ b/apps/web/src/lib/core/component/UserTooltip.tsx@@ -34,7 +34,7 @@ export function UserTooltip(props: UserTooltipProps) {};return (- <Surface depth={2} class="glass bg-menu-glass rounded-xl">+ <Surface depth={2} hideBorder class="menu-surface rounded-xl"><div class="text-ink max-w-lg"><div class="flex items-center gap-2 p-2"><UserIcondiff --git a/apps/web/src/lib/core/util/createScrollTopFade.ts b/apps/web/src/lib/core/util/createScrollTopFade.tsnew file mode 100644index 0000000000..12a9207fc6--- /dev/null+++ b/apps/web/src/lib/core/util/createScrollTopFade.ts@@ -0,0 +1,28 @@+import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { type Accessor, createEffect, onCleanup } from 'solid-js';++/** A compact linear top-edge falloff that leaves content clear at rest. */+export function createScrollTopFade(+ scrollRef: Accessor<HTMLElement | undefined>+) {+ createEffect(() => {+ const element = scrollRef();+ if (!element || isTouchDevice()) return;++ const previousMask = element.style.maskImage;+ const update = () => {+ const height = Math.min(32, Math.max(0, element.scrollTop));+ element.style.maskImage =+ height > 0+ ? `linear-gradient(to bottom, transparent, black ${height}px)`+ : previousMask;+ };++ element.addEventListener('scroll', update, { passive: true });+ update();+ onCleanup(() => {+ element.removeEventListener('scroll', update);+ element.style.maskImage = previousMask;+ });+ });+}diff --git a/docs/agent-guide/ai-chat.md b/docs/agent-guide/ai-chat.mdindex 4e6f38463b..a449b0f55d 100644--- a/docs/agent-guide/ai-chat.md+++ b/docs/agent-guide/ai-chat.md@@ -332,8 +332,8 @@ the shimmer.first; `slack_v2` remains a separate row in Connections where it can be disabledor disconnected.- Start a conversation with **Create → Agent**. The sidebar has no New conversation- button, and the empty composer has no New conversation heading.+ Start a conversation with the desktop sidebar's **New** button or **Create → Agent**.+ The empty composer has no New conversation heading.**Conversations** is a mixed listof chats and coding sessions, with one search across both. **Group conversations**switches between Status (the default), Type, and None, preserving newest-firstdiff --git a/docs/agent-guide/calendar.md b/docs/agent-guide/calendar.mdindex a9962747c0..7a72772d5a 100644--- a/docs/agent-guide/calendar.md+++ b/docs/agent-guide/calendar.md@@ -253,9 +253,12 @@ titles or private event metadata.The in-view desktop Calendar header uses one responsive top bar. The viewedmonth and year stay on the left in a heading that scales from 16px in narrow-splits to a maximum of 24px, with a compact `New` menu when the sidebar is closed.-An icon-only ghost `Search events` button sits on the right, before a slightly-larger gap and the `Today`, period selector, and previous/next controls.+splits to a maximum of 24px, with a compact `New` menu at the right end of the controls.+An outlined `Search events` icon button sits before the other controls. All+desktop controls are 32px tall and use the shared button surface: Today and the+previous/next arrows share a navigation group, the period selector has its own+view group, and Booking links and New have separate outlined buttons. Adjacent+controls and groups have a uniform 8px gap, with matching text-button padding.Click Search or press Cmd/Ctrl+F to expand and focus the wider inline search field.The field slides out with a short width transition and focuses immediately.The results popup stays hidden until the field contains non-whitespace text,@@ -288,19 +291,21 @@ occurrence details before showing Join. Selecting a result preserves the searchtext. Availability lives in the desktop sidebar's Upcoming events section andin the mobile header.-The period controls move into a separate row below 600px of calendar-pane width,-with `New` on the left and navigation on the right. With a docked sidebar, the-header needs fewer controls and stays inline down to 480px. This avoids wrapping+The period controls move into a separate row below 600px of calendar-pane width.+The shared outlined `New` menu remains at the right end, even with the sidebar+open; the sidebar places its full-width version below the title. With a docked+sidebar, the header stays inline down to 580px. This avoids wrappingand immediately unwrapping when the sidebar hides. Expanded search does notforce early wrapping; its results popup stays directly below the search field.Below 1040px, search slides over the month title without moving any controls orchanging the header height. `New` stays outside the search overlay. Resizing thepane keeps the search field mounted and preserves its query and focus. Today-and New retain their text labels until the controls row runs out of room, then-become icon buttons.+retains its text label until the controls row runs out of room, then becomes an+icon button. Desktop `New` keeps its label.Touch devices keep the month selector and header controls without separatecreate or call buttons in the right island. Mobile header islands omit Search.-The desktop sidebar's mini calendar remains navigable by date and month.+The desktop sidebar's Search icon sits left of collapse and reveals event search+above New. Its mini calendar remains navigable by date and month.Active Quick Calls you created, participated in, or were invited to appear above yournext five events (including ones in progress), whether or not they have call links.@@ -575,10 +580,11 @@ row has a checkmark; the list scrolls when more teams are present. Selectinga row switches the owner for the entire workspace; ownership badges appear onlyin the top header, not on cards or tab content. Owner changes discard link/schedule drafts and stay disabled during saves.Each tab's heading appears in the main topbar, with its description available-through an info tooltip rather than a separate large header. Booking links uses the-shared ViewShell search bar below the topbar, with **New** on the same-row at the far right. New opens the manual editor; a separate **Create with-agent** button sits beside it. On touch devices, the header has separate+through an info tooltip rather than a separate large header. Desktop Booking links+uses one header row: title and owner, a grouped **Create with agent** icon,+outlined **New**, and expandable Search. Command-F expands and focuses the+search field; Close or Escape clears it and returns to the icon. New opens the+manual editor. On touch devices, the header has separatesparkle and plus buttons for agent and manual creation. Create with agent opens an editable,unsent request in an agent conversation and carries the selected Personal/teamowner privately. The agent reads current settings and asks for approval before@@ -676,10 +682,11 @@ updates only the selected owner, and failed saves retain edits for retry. Thereis no separate Booking settings shortcut or Settings → Booking links page.Public booking URLs remain unchanged. Calendar connections and integrationshortcuts continue to open Settings → Calendar.-Booking status filters use the same segmented control as the CRM sidebar.+On desktop, Bookings puts its title, filter island, status tabs, and expandable Search in one top row. Booking-page Edit/Preview tabs and Save/Revert actions use the same rounded control surfaces. Touch layouts retain their existing controls.In Availability, the topbar reads **Availability** and shows the selected owner.-The shared toolbar contains **Search schedules** (name or time zone) and **New**-(**New schedule**); on touch devices, New moves into the header island.+The same desktop header row contains **New** (**New schedule**) and an expandable+**Search schedules** icon (name or time zone); on touch devices, New moves into+the header island and search keeps its existing full field.Schedule cards show the default badge, time zone, a Monday-firstweek preview, grouped hours, and booking-link/date-exception counts. **Preview**uses an eye icon and opens all weekly hours and date exceptions without editing,diff --git a/docs/agent-guide/calls.md b/docs/agent-guide/calls.mdindex e7dd78081f..baaad00794 100644--- a/docs/agent-guide/calls.md+++ b/docs/agent-guide/calls.md@@ -1,14 +1,18 @@# Calls-## Calls — `/app/component/calls`+## Calls — `/app/calls`-On desktop a collapsible sidebar holds the search field (`Search calls`, `⌘F`),+On desktop a collapsible sidebar starts with the shared outlined `New` button,+with `Search calls` immediately left of collapse. Search reveals its field above+New. The sidebar also holdsthe views `All` / `Missed` / `Unattended`, a `Type` section (`Internal` /`External`; External means at least one guest without a Macro account joined),a `Channels` section listing channels seen in loaded calls, and `Tags`. Choosinga type, channel, or tag shows only that one; choosing it again clears it. These-refinements carry across the three views. Sort, group, filter, and `New call`-sit in the list's top bar. Phones keep pill tabs and the header search.+refinements carry across the three views. The desktop header uses one row:+title, an outlined filter group, a view-options group, `New`, and an expandable+Search icon. Command-F expands and focuses search; Close or Escape clears it+and restores the icon. Phones keep pill tabs and the header search.With `enable-quick-calls` enabled, `New call` opens a menu with `Start an instantcall`, `Call a channel or contact`, and `Manage call links`; without the flag itopens the recipient picker directly. `Start an instant call` opens `/app/meet/new`diff --git a/docs/agent-guide/channels.md b/docs/agent-guide/channels.mdindex cab721548f..b19c5f6141 100644--- a/docs/agent-guide/channels.md+++ b/docs/agent-guide/channels.md@@ -747,8 +747,11 @@ with the same full sidebar contents. With no conversation selected, theslide-over opens on its own and closes once a conversation is picked; thebackdrop or `Escape` still dismisses it. There is no separate skinny sidebar mode.-On desktop, the Chat rail has `All` and `Recent` tabs. All contains an-optional `Favorites` section and the+On desktop, the Chat rail has `All` and `Recent` tabs in a flat, shared track+aligned with New. Choices use equal widths, a transparent outlined track with+1px padding, and fully rounded pill shapes. The 32px selected state matches+New's fill and border without an extra shadow. All contains an optional+`Favorites` section and theindependently paginated `Channels` and `DMs` sections. Favorites appears whenthe user has channel favorites and only lists channels. Channel favorites openin the shared channel detail. Shift-clicking a favorite, channel, or DM opens thatdiff --git a/docs/agent-guide/crm.md b/docs/agent-guide/crm.mdindex 0a484961ea..be51039d94 100644--- a/docs/agent-guide/crm.md+++ b/docs/agent-guide/crm.md@@ -57,9 +57,10 @@ Record-level **New task** also prefills the current record.Companies lists every visible company, grouped by Stage by default, with Owner,Revenue and Last Interaction columns. A Stage column is off by default; turn it-on, or hide Owner or Revenue, under **Display options**. Its toolbar holds-sort, group, filter, display options, saved views, and **New company** at the-right end.+on, or hide Owner or Revenue, under **Display options**. Its single-row desktop+header matches Tasks: title, filter group, view-options group (sort, group,+display options, and saved views), then the shared **New** menu and expandable+Search. New has the same options as the sidebar.People lists contacts across every CRM-enabled team the viewer belongs to, fromthe same Soup query with only CRM contacts opted in (`crmf`). The server collapses@@ -67,16 +68,18 @@ duplicate full email addresses (case-insensitive) to one contact. Hidden contactand contacts under hidden companies are excluded. Columns are Person (name andemail), Company and Last contacted (sortable). `Search people` matches name oremail on the server after a short typing pause, so results include contacts not-yet scrolled into view. **New contact** sits at the right end of the toolbar. Its-dialog asks for a company through a **Choose a company** pill (searchable by name+yet scrolled into view. The desktop header has the title, shared **New** menu,+and expandable Search; choose **Contact** from New. On touch, **New contact**+is unchanged. The contact dialog asks for a company through a **Choose a company** pill (searchable by nameor domain, from the up to 500 most relevant companies with a domain) and fixesthe email to that company's primary domain; **Add contact** on a company's Teamtab skips the company pill. The company, contact and pipeline dialogs share thetask/project composer layout: name on the first row beside **Close**, detailsbelow, and a **Create …** button that also submits on Command-Enter.-`Search companies` and `Search people` use the shared Email/Tasks search bar.-Command-F focuses it, `Clear search` resets it, and Escape leaves the field.+Desktop `Search companies` and `Search people` start as outlined icon buttons+and expand into the shared Email/Tasks search bar. Command-F expands and focuses+the field; Close or Escape clears the query and returns to the icon.On touch devices, CRM uses the same scrollable pill tabs as Tasks in the topheader: Companies, People, Tasks, Email, Notes, Calls, available pipelines, and@@ -132,7 +135,7 @@ already in the trail (such as the contact's own company from `Companies ><company> > <contact>`) returns to it instead of adding a duplicate. Back andForward restore the trail; a reloaded or shared record URL shows only `<list> ><record>`. The CRM sidebar stays visible throughout.-Company and contact headers have `Copy link` beside the side-panel toggle.+Company and contact headers group `Copy link` separately from the side-panel toggle. Desktop section tabs collapse to icons in narrow panes; each icon keeps a tooltip.Their information panel starts closed and opens as a floating bubble at everywidth, without shrinking the record content. Click outside the bubble or usethe toggle to dismiss it; the open state is not restored on a later visit.@@ -155,7 +158,7 @@ Emails, Files, Calls, and References rows open their items without selectioncheckboxes, including on touch devices.A company is laid out like a project. Its split header or embedded breadcrumb-header shows inset `Overview`, `Team`, `Emails`, `Files`, `Tasks`, and `Calls`+header shows rounded view tabs for `Overview`, `Team`, `Emails`, `Files`, `Tasks`, and `Calls`tabs, collapsing to icons when narrow. Overview shows the name, pillsfor each domain and `Last interacted`, the generated description, a**Pipelines** section and the Discussion. Pipelines stacks one full-width card@@ -338,7 +341,7 @@ picker. Checking or unchecking saves immediately and refreshes the CRM sidebar'smembership counts. Changes are disabled while saving; failures show an inline retrymessage and keep the last saved membership. With no lists, create one in the CRM sidebar.-`New company` uses the existing creation dialog. `Import` previews a CSV with a+Desktop `New` → `Company` uses the existing creation dialog. `Import` previews a CSV with a`Domain` (or `Domains`, `Website`) column and an optional `Name` or `Company`column, such as a Companies export (up to 10,000 rows, at most 5 MB). Each rowtakes its first valid domain; rows without one or repeating an earlier domain arediff --git a/docs/agent-guide/email.md b/docs/agent-guide/email.mdindex b498ba6b86..4ded416a46 100644--- a/docs/agent-guide/email.md+++ b/docs/agent-guide/email.md@@ -28,8 +28,17 @@ and switch the mailbox to All. Parent selection does not include descendant tagsUnlike Calls, it lists only personal tags; team-shared tags are hidden,and its `New tag` action creates a personal tag with no Team sharing option.-Full email client. Tabs: `Signal` / `Noise` / `Favorites` / `Sent` / `Scheduled` / `Calendar` / `Drafts` / `Shared` /-`Archived` / `All`, plus `Reminders` when reminders are enabled. Compose via the `Email` button (or `Create` → `Email E`). On a fresh local user it+Full email client. Desktop groups `Signal` and `Noise` under one `Inbox` sidebar+item, with pill tabs beside the Inbox title in the content header, matching the+Chat sidebar tabs. Selecting Inbox+from another mailbox opens Signal; selecting it while in Noise keeps Noise.+The desktop sidebar continues with `Favorites`, `Drafts`, `Sent`, `Scheduled`,+and `Reminders` (when reminders are enabled), followed by a **Library** section containing `All mail`,+`Archived`, and `Shared`, then **Tags**. Sidebar number and sequential shortcuts+follow that order. Calendar mail remains available through the calendar filter+and existing Calendar route. Mobile keeps its original tabs and order, including+separate Signal, Noise, and Calendar tabs.+Compose via the `Email` button (or `Create` → `Email E`). On a fresh local user itshows `Connect your email`; Gmail/Google Workspace and enabled Outlook connectionsuse provider consent. Most functionality needs a connected account. Search is `Ctrl+F` or `/` within the surface.@@ -91,8 +100,8 @@ query: load more threads from the same address, then check that existing rownames and their hover cards do not change. Repeat with a text query to exercisethe search-service results.-`Favorites`, directly below Noise, lists starred Macro emails across Signal,-Noise, and archived mail. It respects the selected inboxes and filters; search+`Favorites`, directly below Inbox on desktop, lists starred Macro emails across+Signal, Noise, and archived mail. It respects the selected inboxes and filters; searchwithin the tab is also restricted to favorites. Removing a star removes the rowfrom this view. The tab persists across reloads. With `enable-graphql-soup` on,the paginated GraphQL Soup query uses `favoritesOnly: true`. With the flag off,@@ -100,7 +109,8 @@ REST Soup uses `favorites_only: true`. Starring changes membership withoutchanging the list query. Text search still resolves favorite IDs for the searchservice. An empty favorites list shows `No favorite emails`.-`Archived`, directly before All, lists your own archived (Mail Done) threads: the+`Archived`, between All mail and Shared in the desktop Library section, lists+your own archived (Mail Done) threads: theAll mailbox with Done applied, excluding threads teammates shared with you. Itrespects the selected inboxes and filters. The search service cannot filterarchive state, so search within the tab keeps only archived hits on the client.@@ -355,14 +365,17 @@ not replace it), and that after j/k the grid still has focus: the next Entermoves into the reader without opening a reply.In the new Email view, ordinary row activation opens the thread inside-`/app/component/mail`; the view breadcrumb (for example Signal) has a hover+`/app/component/mail`; the view breadcrumb (for example Inbox) has a hoverbackground and returns to the filtered list. Pressing `Escape` in the open threadwith focus outside any input does the same once there is nothing left to unwind(an open reply, an expanded body, or a focused message each take one `Escape`first); the list keeps the row you came from focused. The inline header uses the existingemail title menu: open the menu button beside the subject for **Ask AI**, **Create aTask**, and the other thread actions. On desktop, **Mark as unread**, **Mark done**,-and **Previous item** / **Next item** sit at the right of that header. The arrows+and reminders share one outlined group at the right of that header. Separate+groups contain **Previous item** / **Next item**, icon-only **Ask Macro** / **Create+task**, and the **Share** icon and label / copy-link icon. Mobile keeps its existing+controls. The arrowsfollow the current filtered list and disable at its ends. When the open threadleaves the list while it stays open (a reply in Signal marks it done, or anotherdevice archives it), they step from its former neighbours. Mark done advances in@@ -937,10 +950,19 @@ and swiping left to mark emails done in Signal and Noise. The filter button openglass bottom sheet for status, done, attachment, calendar and tag filters, plus an `Inbox`section when the user can pick one: `All inboxes` or a single address, never several.`Clear all` resets those filters and the inbox selection. Desktop keeps its sidebar,-search field, filter menu and preview control. The sidebar lists the inboxes above the-`New email` button and tabs as plain rows; clicking one shows only that inbox.-`Connect another account` starts the add-inbox flow from its own row below the-scrolling list. `New email` prefills From with the selected inbox, or the primary+single-row header: title (with Signal/Noise tabs beside Inbox), inbox/filter+controls, reading-pane option, New, and an expandable Search icon. At 640px or+narrower, the list header shows Signal/Noise, the reading-pane toggle, and Search;+outside Inbox, the mailbox title replaces those tabs. Its outlined+`New` button also sits directly+below the sidebar title, above a flat, outlined **Accounts** group with the same+control background. Its selector shows+the current account or `All inboxes` and opens a single-select dropdown of linked+accounts and aliases. `Connect another account` starts the add-inbox flow from+the group's separated footer. On desktop, `All inboxes` uses the shared avatar+group to overlap the first two account portraits with a separator ring; aliases+do not repeat a portrait. A single selected inbox shows its own portrait.+`New email` prefills From with the selected inbox, or the primaryinbox when All inboxes is selected; reopening a draft keeps its saved sender.The From menu groups each connected inbox with its verified Gmail send-as aliases.Replies default to an address on the thread's own inbox: preserve an outgoing@@ -982,12 +1004,12 @@ to choose the sender. Selecting an available inbox clears the error and allowssending; the picker never displays another inbox as selected before that choice.With no explicit selection, an unavailable primary still falls back tothe first linked inbox.-Sidebar rows, including `All inboxes`, replace their icon with an accent-colored checkmark when-selected. With exactly one connected inbox and no aliases, only its address appears as the selected-row, followed by `Connect another account`; there is no `All inboxes` row, title-inbox dropdown, or inbox section in the mobile filter drawer. The inbox section shows up to four rows (including `All inboxes`), then-scrolls independently without overscroll so the email tabs stay in place. With many-accounts, scroll to the last inbox and check that selecting it updates the header filter.+The desktop account dropdown marks the selected inbox with a checkmark. With+exactly one connected inbox and no aliases, the selector displays its address+and omits `All inboxes`; the mobile filter drawer has no inbox section. The+touch sidebar keeps its existing account rows and shows up to four before+scrolling independently. With many accounts, scroll to the last inbox in the+dropdown and check that selecting it updates the selector and header filter.Selecting one inbox also shows `from [email address]` beside the list title.The address is a borderless ghost dropdown with the title's font weight and aconsistent 14px font size at all widths; `from` is 12px. Both align to the title's baseline, withoutdiff --git a/docs/agent-guide/files.md b/docs/agent-guide/files.mdindex 2067ebec9a..e98b5c2c69 100644--- a/docs/agent-guide/files.md+++ b/docs/agent-guide/files.md@@ -50,8 +50,9 @@ starts on **Recent**; explicit tab and folder links keep their destination. Thefirst pill is Recent. The drawer holds Sort (hidden on Recent, where the viewer's ownedit order applies) and, on tab locations only, the same filter groups as thedesktop **Filter** menu; active selections show a count badge on the trigger-and a `Clear all` action in the drawer. The in-view `Search Drive` field, the-Sort/Filter dropdowns, and the header New menu are desktop-only — search on+and a `Clear all` action in the drawer. The single-row desktop list header orders the title, Filter, Sort, New, and an+expandable Search icon. `Cmd/Ctrl+F` opens the search field. These list-header+controls are desktop-only — search ontouch uses the global search overlay and creation uses the dock's New button.The **Folders** pill opens the folder overview and stays highlighted insideany folder; tapping it from inside a folder returns to the overview, anddiff --git a/docs/agent-guide/home.md b/docs/agent-guide/home.mdindex cc42cbeb38..d7852ead2a 100644--- a/docs/agent-guide/home.md+++ b/docs/agent-guide/home.md@@ -66,9 +66,10 @@ both read states again. A badge counts hidden types plus an active status filterRead status and type selections persist.There are no desktop Signal/Noise tabs. A **Home** headinglabels the top left of the block, matching the **Email**, **Tasks**, **Chat**, and-**Agents** sidebar headings. The full-width **New chat** plus pill below the heading clears the preview and returns to the Home-starting pane; it does not create a chat. Email and Tasks have matching top pills-for **New email** and **New task**.+**Agents** sidebar headings. The full-width **New** plus pill below the heading+clears the preview and returns to the Home starting pane; it does not create a+chat. It uses the shared desktop creation styling described in+[navigation](navigation.md).The Home provider honors an explicit initial tab, search, grouping, and facetselection. Filters persist per user across reloads and fresh Home navigation;@@ -151,6 +152,11 @@ arrow-key browsing keeps it open. Preview headers start with **Home >**. Clickinsidebar visibility. Use the hamburger to reopen the feed. Mobile continues toshow the activity list alone.+Desktop previews use the same header controls as their standalone views, with+the **Home >** return breadcrumb added. Calendar shares its date, search,+navigation, view, and New controls; email shares its action, navigation, AI/task,+and Share groups. Touch previews retain their existing compact headers.+Document previews opened from Home expose **Share** and **Copy Share Link** beforethe details toggle, including tasks, snippets, skills, canvases, PDFs, images,code, and videos. Share uses the selected item's permissions and updates whendiff --git a/docs/agent-guide/navigation.md b/docs/agent-guide/navigation.mdindex 41fb18cb3f..3ab059dc8b 100644--- a/docs/agent-guide/navigation.md+++ b/docs/agent-guide/navigation.md@@ -5,9 +5,8 @@ title bar's traffic-light controls. Drag this top strip to move the window, ordouble-click it to toggle zoom. The loading shell uses the same inset; browser,Windows, Linux, and mobile layouts do not add this space.-Native desktop content keeps its rounded split frame even with only one split,-and the app icon rail has no right divider. On macOS, Back and Forward arrows-beside the traffic lights navigate the active split's history. Each arrow is+On macOS, Back and Forward arrows beside the traffic lights navigate the active+split's history. Each arrow isdisabled when its direction has no entry. Sidebar controls remain inside eachworkspace. The top-right split icon opens another Home split, evenwhen Home is already open, and is disabled when there is no room for a new split.@@ -322,10 +321,10 @@ its existing navigation controls. Block detail panels (including Calendar) have**Hide side panel** in their own header and a hamburger **Show side panel** besidethe main title when hidden, with separate preferences per block type.-Multiple desktop splits appear as individually bordered, medium-rounded panels with-6px top, right, and bottom insets and 6px resizable gaps.-The leftmost panel sits flush against the app rail, whose divider is hidden while-multiple splits are open. A single split stays edge to edge. Touch layouts keep their existing presentation.+Desktop splits, including a single split in the browser or native app, appear as+individually bordered panels with 8px corners and 6px top, right, and bottom+insets and 6px resizable gaps. The leftmost panel sits flush against the app rail,+which has no right divider. Touch layouts keep their existing presentation.Split focus mode (`Shift+Esc`) floats the active split in a rounded, borderedpanel over the same glass scrim as dialogs. Click the scrim or use the shortcut@@ -433,7 +432,8 @@ is unread, and that completing the last one clears it. Query bounds andpagination are unchanged.The Agents sidebar opens with a **Work** / **Code** switch (radio group-"Agents mode") under its title; Work is the default and the choice is remembered+"Agents mode") under New, using the shared pill tabs on desktop; touch keeps+its existing tabs. Work is the default and the choice is rememberedper user across reloads. Work lists chat sessions and legacy chats; Code listscoding sessions only, newest first. Each mode's empty state is its own ("Noconversations yet." / "No coding conversations yet."). Opening a session of the@@ -450,7 +450,8 @@ unsynced PR shows its number without an assumed status. Missing metadata is omit"Coding agent" is never substituted for a branch. There is no right-side dot inAgents; Home keeps its sparkle and trailing unread dot. Only the selected row hasthe selected background. Legacy chat rows keep their chat icon.-Use **Search conversations** beside the Conversations heading to filter by title.+Use **Search conversations** beside the sidebar collapse icon to open a search+field above New and filter by title.Results stay packed at the top with compact spacing, even with only a few matches;clearing the search restores the list.Its **New conversation** button opens the composer for the current mode with one@@ -463,11 +464,26 @@ offers both kinds. Opening an existing row restores its own kind and URL.Right-click a conversation for Rename, Favorite, Copy link, Share, Delete, andthe other entity actions used on Home.-Home's inner rail starts with a full-width **New chat** plus button that returns-to Home's starting pane without creating a chat. Email and Tasks use the same-pill styling and top placement for **New email** and **New task**, replacing-the sidebar title bars. When multiple desktop splits are open, a **Close** (X)-button appears beside each sidebar's New button and closes that split, including+Desktop inner sidebars place the same full-width, outlined **New** pill directly+below the title. List toolbars use its compact version, including when the+sidebar is hidden. Email, Drive, Tasks, and the Projects list use one desktop+row: title, filter controls, view options, New, and Search. Filter and view+controls use the rounded, bordered button groups from the email thread toolbar;+New and Search have their own rounded, bordered backgrounds. Search starts as an+icon and expands into a compact field when clicked or opened with Cmd/Ctrl+F.+Closing it clears the query and returns to the icon. The action stays specific to+the view: Home returns to its starting pane, Email composes mail, Chat offers a+channel or direct message, and Calendar offers an event or call. Tasks offers+**Task**, **Project** (when enabled), and **Tag** in both the Tasks and Projects+lists. Customers offers Company, Contact, and enabled Pipeline creation. Reviews+uses the general creation menu. Agents keeps New above its Chat/Code mode tabs.+Each desktop sidebar puts its Search icon immediately left of the collapse+control. Click it to reveal the view's search field between the title and New,+at the same height as the New button; click again to hide it. The field focuses when opened. Existing list-toolbar+search remains available and shares its query where the view filters a list.+Mobile creation controls, search controls, and placement are unchanged.+When multiple desktop splits are open, a **Close** (X) button appears in the+sidebar title bar and closes that split, includingwhen the sidebar is an overlay in a narrow split. Verify with three splits:open **Show navigation**, then use the sidebar's **Close** button without firsthiding navigation; only its owning split closes. The last logical split has nodiff --git a/docs/agent-guide/settings.md b/docs/agent-guide/settings.mdindex 883c5548dc..1724a57439 100644--- a/docs/agent-guide/settings.md+++ b/docs/agent-guide/settings.md@@ -191,11 +191,13 @@ settings split that shares the layout, or steps back to the previous view whenit is the only split (Home when there is none). Leave settings by picking anyother rail item; there is no separate back or fullscreen control.-Settings pages use raised composer cards with glass in dark mode, soft shadows-in light mode, and subtle row separators. Integrations uses the same content-width and side padding as the other settings pages. Section-headings sit above the cards, with more space between major sections and compact-spacing within each group. Controls share rounded shapes. Nested rows share one surface instead of adding another box or shadow.+Settings cards use the email composer's raised surface (`SettingsSurface`) with+subtle row separators: a fine beveled edge and small ambient shadow on desktop,+the composer card on touch. Integrations uses the same content width and side+padding as the other settings pages. Section headings sit above the cards, with+more space between major sections and compact spacing within each group.+Controls share rounded shapes. Nested rows share one surface instead of adding+another box or shadow; never hand-build a flat card.The compact sidebar uses the shared workspace width.When a newer version is ready, an **Update available** button (a download icon@@ -268,6 +270,15 @@ per-mode theme selectors. Light or Dark shows its own theme selector. Each selecretains theme search, editing, copying, custom theme creation, and importingthemes from the clipboard.+The default Macro Dark theme uses a neutral `#0E0E0E` outer background and+`#121212` inset content panels. The app rail follows the outer background;+text and accent colors retain their existing palette.++Macro Light uses `#F5F5F5` outside `#FCFCFC` content panels, white controls,+`#E4E4E4` frame borders, and `#EDEDED` button borders. Its controls use+`#2E2E2E` ink. Macro Light and Macro Dark share the same muted blue accent+(`oklch(0.7 0.12 250deg)`); light mode does not switch the accent to orange.+### Theme mentionsAgent replies can include clickable theme mentions that let users apply a themediff --git a/docs/agent-guide/tasks.md b/docs/agent-guide/tasks.mdindex 0147efe315..0d001f1c85 100644--- a/docs/agent-guide/tasks.md+++ b/docs/agent-guide/tasks.md@@ -3,7 +3,11 @@## Surface`Go to Tasks` → `/app/component/tasks`. Tabs: `My tasks`, `Created by me`, `Team tasks`, and `Projects`.-The desktop toolbar contains search (`Ctrl+F`), an icon-only `Task layout` dropdown, `Sort`, `Group`, and `Filter`;+The single-row desktop header contains the title, `Filter`, a separate+`Task layout` single-select icon group for `List`, `Board`, and enabled `Gantt`,+`Sort`, `Group`, `New`, and an expandable Search icon+(`Ctrl+F` opens it). The active-filter count sits beside the filter icon inside+its button, without overlapping the icon or the group border;the filter uses the legacy compact option rows and searchable Assignee, Created by,and Tags submenus. Multi-select choices keep the menu open; Escape dismisses it.The top of the `Filter` menu is a `Filter with AI…` textbox, focused when the menu opens: type a plain-English@@ -17,8 +21,14 @@ off-topic text) keep the typed text and show a red error there instead. The boxfocus while you type even if the pointer drifts over the rows; ArrowDown moves intothe rows and hovering a submenu hands focus to it as usual. The mobile drawer has noAI box.-Task creation is available from the `New` button in the Tasks sidebar. With Projects-enabled, `My projects` appears below the tabs and favorites. It lists+The desktop sidebar's Search icon, immediately left of collapse, opens the+search field above New. It shares the current Tasks or Projects list query.+The desktop sidebar and toolbar `New` menus offer `Task`, `Project` (when+Projects is enabled), and `Tag`. Task and Project open their existing composers;+Tag opens the tag editor, with personal scope selected and team sharing available+when the user has a team. The Projects list uses the same menu. Mobile creation+controls are unchanged. With Projects enabled, `My projects` appears below the+tabs and favorites. It listsaccessible projects by most recently updated, with a capped height and its own scrollarea. Click a project to open its overview within the current Tasks view, keepingthe sidebar mounted, or Shift-click to open it in a new split.@@ -99,7 +109,7 @@ the optimistic tag. Repeat with an existing assignment and with removal.## Gantt layout-Choose **Gantt** from the **Task layout** dropdown to see task timelines.+Choose **Gantt** in the **Task layout** group to see task timelines.The same option is available in a project's Tasks section. The timeline usesCreated at as the start and Due date as the end; no separate Start date iscreated or saved. Bars without a due date fade to transparent at the right edge.@@ -237,8 +247,9 @@ Gantt persists in `tasks.layout` or `projectTasks.layout`, just like List and Bo## Board layout-Open the icon-only **Task layout** dropdown in the toolbar and choose **Board**-(or **List** to switch back). Its icon reflects the current layout. **Group by**+Choose **Board** in the **Task layout** group in the toolbar+(or **List** to switch back). One icon is selected at a time; hover or focus shows+its label. **Group by**offers Status, Priority, Assignee, and (when Projects is enabled) Project.Both layouts share one grouping, which restores with the Tasks navigation entry.List-only None and Date groupings display Status columns in Board; switching@@ -362,14 +373,17 @@ review requests.`Authored by me`, `Assigned to me`, and `Review requests` match the linkedGitHub user ID. If the link-status endpoint has no identity, the list explainswhy the tab is unavailable.-The sidebar starts with a **Search reviews** field (styled like Settings' search)-and, on pointer devices, a **Board**/**List** toggle (`aria-label="Pull request-layout"`); List is the default and the choice is remembered. When the sidebar is-collapsed or narrow, the search moves above the list under the scope heading.-Filter and sort controls appear above the list. Below the layout toggle, an+The sidebar offers **Search reviews** above its navigation. On desktop the+**List**/**Board** icon group lives in the header; List is the default and the+choice is remembered. The desktop header always offers an expandable Search icon; Command-F expands and+focuses it. The single row contains the selected scope, status tabs, grouped+filter and sort controls, New, and Search. Active-filter counts sit beside the+filter icon inside its button. A separate**Open** / **Closed** / **All** toggle with icons (`aria-label="Pull request-status"`) picks the status; it moves above the list on touch devices or when the-sidebar is hidden, and the board hides it. Open is the default; Closed includes+status"`) picks the status in the desktop header and above the list on touch+devices, and the board hides it. The desktop sidebar has no layout or status+switches. Status tabs size to their labels with even horizontal padding and use+the shared fully rounded segmented style. Open is the default; Closed includesboth closed and merged PRs, and All shows every status. The filter dropdown and mobile drawer alsooffer independent Open, Closed, and Merged selections. Custom multi-statusselections hide the toggle, except the combined Closed preset keeps it visible.@@ -378,9 +392,8 @@ Status combines with other filters, counts toward filter badges, and appliesbefore pagination. Clearing filters resets to Open. Other filters coverpriority, linked work, started from, repository, author, assignee, label, and,when a GitHub identity is linked, reviews (Reviewed by you, Not reviewed by you,-and Awaiting review from you). The list topbar says-Reviews when narrow or when the sidebar is collapsed; the selected scope stays-visible as a heading above search.+and Awaiting review from you). The selected scope remains in the desktop header+when the sidebar is collapsed; there is no separate title or search row.Saved review selections stay inactive, including their filter badge and empty-statecopy, while the GitHub identity is unavailable; they resume when it returns.Sort offers Priority, Recently updated, Least recently updated, Newest, and Oldest;@@ -710,7 +723,7 @@ tasks whose Project property names the project.The project's Tasks tab starts with task search, controls, and the selected List orBoard layout; the project title and property pills appear only on Overview.-Use the same icon-only **Task layout** dropdown to choose a layout. Both layouts+Use the same **Task layout** group to choose a layout. Both layoutsshow only tasks linked to the current project and use the same filters and editors.Layout, sort direction, and grouping use `projectTasks.layout`, `projectTasks.sort`,`projectTasks.sortReversed`, and `projectTasks.groupBy` URL parameters, independent@@ -888,7 +901,7 @@ tags start expanded. Filter-menu options continue to show full tag names.## Tasks — `/app/component/tasks`Task navigation uses `My Tasks`, `All Tasks`, and `Created by me`. The desktop-sidebar has a full-width `New task` action and a collapsible list of task favorites;+sidebar has the full-width `New` menu and a collapsible list of task favorites;tag filtering lives in the `Filter` menu. Favorite rows open their tasks.Normal row and favorite activation replaces the list with the editable taskdocument; its originating-tab breadcrumb returns to the list and itsdiff --git a/docs/agent-guide/ui-conventions.md b/docs/agent-guide/ui-conventions.mdindex d8df5df81f..935226238f 100644--- a/docs/agent-guide/ui-conventions.md+++ b/docs/agent-guide/ui-conventions.md@@ -16,17 +16,76 @@ Reviews. Native project detail navigation also clears the safe area, with itscontent directly below it. Content nested below an in-flow header must not addthe same inset again. See the [mobile layout rule](../../.agents/rules/web/mobile.md#layout-and-chrome).-Low-emphasis right-aligned split-header actions (including Calendar's touch/preview-New event and Channel's idle Call and Ask Macro) are borderless with a rounded-xl-background on hover. Emphasized variants retain their treatment, including an-active call's green ink and outline frame. Channel, company, contact, and project-content tabs use inset controls in the top bar. Button sizes do not change variant colors or framing; individual-framed 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-actions remove the transparent border to keep their text alignment.--Glass rims stay highlighted around most of the perimeter, with short soft gaps+Use one desktop header row: title or breadcrumbs, then view tabs, on the left;+semantic control islands on the right. Collection headers use `ListHeader`:+filters, view options, New, then expandable Search. Related detail actions share+a `HeaderActionGroup`; keep sharing, item navigation, and detail/view toggles in+separate groups. View tabs (channel, CRM record, and project sections, Signal and+Noise) are `Tabs`: separate 32px pills, never inside a group. Groups use the+canonical elevated surface, fully rounded ends, 32px controls, and 8px gaps.+A group owns its frame; its child buttons stay flat and do not get extra borders+or shadows. Nested shared actions reuse the containing group rather than adding+another frame, and a group with no visible actions renders nothing. Keep+tooltips on icon-only controls and collapse labels as a pane narrows (`Tabs+iconOnly`, then a menu). Preserve specialized editor toolbars and touch+layouts. Recent, Folders, and Agents lists use the same islands (filters,+view options, New, expandable Search) with active filter chips below; Search+keeps its full-width field with facet chips under it. Inputs, search fields,+and filter chips are pills on the control frame. The [design system rule](../../.agents/rules/web/design-system.md)+lists which control to use for each role.++On touch devices, low-emphasis header actions remain borderless with their+existing hover and pressed states. Emphasized variants retain their treatment,+including an active call's green ink. Button size does not change variant colors+or framing. Use `glass={false}` for an explicitly flat frame. Inline+calendar-invitation text actions remove the transparent border to keep alignment.++## Canonical desktop surfaces++Use `not-touch:elevated` for desktop control surfaces. Buttons, button groups,+inputs, and unselected tab pills share the same `shadow-elevated` treatment as+composers, menus, settings cards, and dialogs: a fine outer outline, faint inner+edge, brighter top edge, and compact shadow. Keep semantic fills and component+geometry; a button group owns the frame so its child buttons remain flat.+In dark mode, compact controls use thinner, lower-opacity edges than composers+and floating panels. Keep desktop shadows close and faint, with only a slight top+highlight, and define the border with subtle edge contrast.+Inside composers, dialogs, and menus, controls use `control-raised`: a lighter+fill in dark mode and a faint neutral tint in light mode. Keep the container's+base fill and border treatment; nested controls separate by fill rather than+stronger outlines or shadows.+In light mode a fine outline vanishes against near-white content, so controls+draw a full 1px frame edge, menus keep the glass cast shadow, and+`ComposerSurface` (composers and settings cards) keeps the wide `composer-shadow`+halo. Touch surfaces retain their existing shadows.++Tabs are separate pills, like Linear's view tabs: unselected pills use the+outline Button frame, and the selected pill takes the pressed fill, flat, the+same state as a pressed (`aria-pressed`) Button. There is no track and no+separate active tint, except the agent composer's Chat/Code switch+(`variant="track"`). Touch keeps each surface's existing tab treatment.++Reuse `Button`, `Input`, `InputGroup`, `Tabs`, `ComposerSurface`, `menu-surface`, and+`elevated-surface` instead of introducing one-off surface styling. Every menu,+popover, floating toolbar, and editor panel (including the Figma, PowerPoint,+and Photoshop editors) floats on `menu-surface`; dialogs open through `Dialog`.+Loading states use the shared shimmer, and each view's skeleton shows the same+one-row header as the loaded view, with its tabs and controls as placeholders.+Settings+cards inherit `ComposerSurface` through `SettingsSurface`. Use the shared surface; do not+add diagonal reflections, dark inset shading, or custom shadows.+Touch retains its existing glass treatment.+The agent composer's tray sits below that surface with its own fill, and holds+the Chat/Code switch; the open tray gives the input its multiline layout.++## Scrolling content++Desktop Email, Drive, and Tasks lists, email threads, and the Channels thread feed+and navigation lists use a linear 32px top fade as content scrolls+beneath the header. The fade grows with the scroll+offset and clears at the top; it does not blur content or change mobile fades.++On touch, glass rims stay highlighted around most of the perimeter, with short soft gapsat the top-right and bottom-left corners. Light themes keep a soft highlightthrough those corners so they are only slightly dimmer. The iOS app also uses shared[glass press feedback](navigation.md#mobile-glass-feedback).diff --git a/docs/agent-guide/view-tours.md b/docs/agent-guide/view-tours.mdindex e2103585ca..f90e7548fa 100644--- a/docs/agent-guide/view-tours.md+++ b/docs/agent-guide/view-tours.md@@ -40,7 +40,8 @@ and highlights.Agents), then Create for automations.- **Channels:** channels and DMs, creation, then threads, @mentions, and calls,which wait on the channel list until a conversation is open. No Slack action.-- **Email:** Signal/Noise, tags, then keyboard shortcuts.+- **Email:** Signal/Noise tabs beside the Inbox title (beacon on Inbox when+ another mailbox is open), tags, then keyboard shortcuts.- **Customers:** Companies and People records, relationship details, then the**New** menu.- **Calendar:** calendar sources and copy availability (beacon on the sidebardiff --git a/docs/development/style-guide.md b/docs/development/style-guide.mdindex 7458128dbe..75d13f17ab 100644--- a/docs/development/style-guide.md+++ b/docs/development/style-guide.md@@ -34,6 +34,7 @@ ID; deletions leave gaps and new rules take the next free number. A rule line re| [`web/architecture.md`](../../.agents/rules/web/architecture.md) | FE | `apps/web`, `packages` || [`web/libraries.md`](../../.agents/rules/web/libraries.md) | FE 35–46 | `apps/web`, `packages` || [`web/ui.md`](../../.agents/rules/web/ui.md) | FE | `.tsx` |+| [`web/design-system.md`](../../.agents/rules/web/design-system.md) | FE 60–68 | `apps/web` `.tsx`: control roles, header layout, selected state, overlay surfaces, loading skeletons || [`web/mobile.md`](../../.agents/rules/web/mobile.md) | | `apps/web` UI and CSS on touch and phones || [`web/ui-primitives.md`](../../.agents/rules/web/ui-primitives.md) | | `apps/web/src/components/ui` || [`web/startup-bundle.md`](../../.agents/rules/web/startup-bundle.md) | | `apps/web/src` |diff --git a/rules/ast-grep/tsx-no-button-as-tab.yml b/rules/ast-grep/tsx-no-button-as-tab.ymlnew file mode 100644index 0000000000..34ddbf0272--- /dev/null+++ b/rules/ast-grep/tsx-no-button-as-tab.yml@@ -0,0 +1,20 @@+id: tsx-no-button-as-tab+language: tsx+severity: error+message: Don't render a tab as a Button; use `Tabs` or `TabSelector.Tab`.+note: |-+ Rule FE-61 in .agents/rules/web/design-system.md. A Button inside a tab list+ draws the action frame instead of the selected pill.+files:+ - apps/web/src/**+rule:+ any:+ - kind: jsx_opening_element+ - kind: jsx_self_closing_element+ all:+ - has:+ field: name+ regex: ^(Tabs\.Trigger|TabSelector\.Tab)$+ - has:+ kind: jsx_attribute+ regex: ^as=\{Button\}$diff --git a/rules/ast-grep/tsx-no-descendant-button-styles.yml b/rules/ast-grep/tsx-no-descendant-button-styles.ymlnew file mode 100644index 0000000000..e08da4de01--- /dev/null+++ b/rules/ast-grep/tsx-no-descendant-button-styles.yml@@ -0,0 +1,14 @@+id: tsx-no-descendant-button-styles+language: tsx+severity: warning+message: Don't restyle buttons from a wrapper (`[&_button]:...`); give the Button the right size or variant.+note: |-+ Rule FE-63 in .agents/rules/web/design-system.md. Descendant overrides hide+ a control that ignores the size system and drift from every other bar.+files:+ - apps/web/**+ignores:+ - apps/web/src/components/ui/**+rule:+ kind: string_fragment+ regex: '\[&_button[^\]]*\]:'diff --git a/rules/ast-grep/tsx-overlay-canonical-surface.yml b/rules/ast-grep/tsx-overlay-canonical-surface.ymlnew file mode 100644index 0000000000..aa0989e098--- /dev/null+++ b/rules/ast-grep/tsx-overlay-canonical-surface.yml@@ -0,0 +1,43 @@+id: tsx-overlay-canonical-surface+language: tsx+severity: error+message: Overlays use the canonical surface, `menu-surface` for menus and popovers or `@ui` Dialog (`elevated-surface`) for dialogs, never a hand-built fill or shadow.+note: |-+ Rule FE-67 in .agents/rules/web/design-system.md. Overlay content that+ paints its own background or shadow drifts from every other menu. Drop the+ fill and shadow and add `menu-surface`, or render the dialog with `Dialog`.+ `bg-menu-glass` is the retired menu recipe; the reply composer, mobile+ drawer, and call controls keep it deliberately, and fullscreen media viewers+ paint their own backdrop. Tooltips keep the tooltip surface.+files:+ - apps/web/src/**+ignores:+ - apps/web/src/components/ui/**+ - apps/web/src/features/email-compose/views/reply-input.tsx+ - apps/web/src/components/app/mobile/MobileDrawer.tsx+ - apps/web/src/features/channel/Call/CallControls/CallControlBar.tsx+ - apps/web/src/features/channel/Media/MediaViewerDialog.tsx+ - apps/web/src/lib/core/component/Lightbox/Lightbox.tsx+rule:+ kind: string_fragment+ any:+ - regex: (^|\s)bg-menu-glass(\s|$)+ - all:+ - regex: (^|\s)(bg-(menu|surface|panel|dialog)|shadow-(sm|md|lg|xl|2xl))(\s|$)+ - inside:+ kind: jsx_attribute+ stopBy: end+ has:+ kind: property_identifier+ regex: ^class$+ inside:+ any:+ - kind: jsx_opening_element+ - kind: jsx_self_closing_element+ has:+ field: name+ regex: \.(Content|SubContent)$+ not:+ has:+ field: name+ regex: ^Tooltip\.diff --git a/rules/ast-grep/tsx-skeleton-shimmer.yml b/rules/ast-grep/tsx-skeleton-shimmer.ymlnew file mode 100644index 0000000000..ab11239866--- /dev/null+++ b/rules/ast-grep/tsx-skeleton-shimmer.yml@@ -0,0 +1,16 @@+id: tsx-skeleton-shimmer+language: tsx+severity: error+message: Loading placeholders use the shared shimmer (`ListSkeleton.Bar`, or `skeleton-shimmer bg-skeleton`), never a pulsing box with its own fill.+note: |-+ Rule FE-68 in .agents/rules/web/design-system.md. Pulsing `bg-hover`,+ `bg-ink/*`, or `bg-surface` boxes drift from every other loader. Use+ `ListSkeleton.Bar` (pill by default; pass a size and radius), and build view+ skeletons from `ViewSkeleton` so they mirror the view's header.+files:+ - apps/web/src/**+rule:+ kind: string_fragment+ all:+ - regex: (^|\s)(motion-safe:)?animate-pulse(\s|$)+ - regex: (^|\s)bg-(hover|skeleton|surface|ink-placeholder|ink/\S+)(\s|$)diff --git a/rules/ast-grep/tsx-tabs-from-ui.yml b/rules/ast-grep/tsx-tabs-from-ui.ymlnew file mode 100644index 0000000000..25353ca2d2--- /dev/null+++ b/rules/ast-grep/tsx-tabs-from-ui.yml@@ -0,0 +1,22 @@+id: tsx-tabs-from-ui+language: tsx+severity: error+message: Build tabs and segmented choices from @ui `Tabs` or `TabSelector`, not Kobalte directly.+note: |-+ Rule FE-60 in .agents/rules/web/design-system.md. `Tabs` is the one inline+ single choice and `TabSelector` owns tabs with panels or a dynamic+ collection; both carry the desktop pill treatment and the touch fallbacks.+ The Fig editor keeps its editor-native panel tabs, and the mobile share+ sheet keeps its underline tab bar.+files:+ - apps/web/src/**+ignores:+ - apps/web/src/components/ui/**+ - apps/web/src/features/block-fig/**+ - apps/web/src/lib/core/component/UnderlineTabs.tsx+rule:+ kind: string_fragment+ regex: ^@kobalte/core/(tabs|segmented-control|toggle-group)$+ inside:+ kind: import_statement+ stopBy: enddiff --git a/rules/ast-grep/tsx-tabs-not-in-action-group.yml b/rules/ast-grep/tsx-tabs-not-in-action-group.ymlnew file mode 100644index 0000000000..f371d122c7--- /dev/null+++ b/rules/ast-grep/tsx-tabs-not-in-action-group.yml@@ -0,0 +1,24 @@+id: tsx-tabs-not-in-action-group+language: tsx+severity: error+message: Tabs never sit inside a HeaderActionGroup or ButtonGroup; islands hold actions.+note: |-+ Rule FE-61 in .agents/rules/web/design-system.md. View tabs go left of the+ header controls as their own pills. An island frames related actions only.+files:+ - apps/web/src/**+rule:+ any:+ - kind: jsx_opening_element+ - kind: jsx_self_closing_element+ has:+ field: name+ regex: ^(Tabs|TabSelector)(\.|$)+ inside:+ kind: jsx_element+ stopBy: end+ has:+ kind: jsx_opening_element+ has:+ field: name+ regex: ^(HeaderActionGroup|ButtonGroup)$