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
fix(new-layout): consistent header height, mobile drive, top bar tweaks (#6507)
Seamus5d937f14e757
diff --git a/apps/web/src/components/app/PreviewPanel.tsx b/apps/web/src/components/app/PreviewPanel.tsxindex 6a2164ab4b..28d38169ba 100644--- a/apps/web/src/components/app/PreviewPanel.tsx+++ b/apps/web/src/components/app/PreviewPanel.tsx@@ -267,7 +267,7 @@ function PreviewPanelContent(><divref={headerCollapseController.setRow}- class="relative flex min-h-10 w-full shrink-0 items-center justify-between bg-surface px-2 not-touch:pl-[13px]"+ class="relative flex h-12 w-full shrink-0 items-center justify-between border-b border-edge-muted px-2 not-touch:pl-[13px]"><Show when={props.headerLeading}><div class="flex shrink-0 items-center">{props.headerLeading}</div>@@ -290,7 +290,7 @@ function PreviewPanelContent(</div><divref={toolbarCollapseController.setRow}- class="relative flex min-h-0 w-full shrink-0 items-center justify-between bg-surface px-2"+ class="relative flex min-h-0 w-full shrink-0 items-center justify-between px-2"><PriorityCollapseOverflowSensorcontroller={toolbarCollapseController}diff --git a/apps/web/src/components/app/split-layout/componentRegistry.tsx b/apps/web/src/components/app/split-layout/componentRegistry.tsxindex 0985a89471..8d766b22b2 100644--- a/apps/web/src/components/app/split-layout/componentRegistry.tsx+++ b/apps/web/src/components/app/split-layout/componentRegistry.tsx@@ -443,7 +443,9 @@ registerComponent('documents',withAuth((params: DocumentsComponentParams = {}) => {usePageViewTracking('documents');- const newAppViews = useNewAppViews();+ const newAppViews = useNewAppViews({+ enabledLayout: () => (isTouchDevice() ? 'legacy' : 'composable'),+ });const user = useUserContext();const preset = getViewPreset('documents', undefined, {userId: user.userId(),@@ -460,7 +462,7 @@ registerComponent(return (<Show when={newAppViews.ready()} fallback={<LoadingBlock />}><Show- when={newAppViews.enabled()}+ when={newAppViews.enabled() && !isTouchDevice()}fallback={<SoupViewviewName="Files"diff --git a/apps/web/src/components/app/split-layout/components/SplitFileMenu.tsx b/apps/web/src/components/app/split-layout/components/SplitFileMenu.tsxindex d47d6f0af8..d036a3eae3 100644--- a/apps/web/src/components/app/split-layout/components/SplitFileMenu.tsx+++ b/apps/web/src/components/app/split-layout/components/SplitFileMenu.tsx@@ -372,6 +372,8 @@ export function SplitFileMenu(props: SplitFileMenuProps) {const addTagAction = makeAddTagAction();const copyLinkAction = makeCopyLinkAction();const copyEntityIdAction = makeCopyEntityIdAction();+ // Read shortcut availability from row getters so focus changes update only+ // the hint, without recreating the action groups and losing menu focus.const activeHotkeyToken = (token: HotkeyToken): HotkeyToken | undefined => {return getActiveCommandByToken(token) ? token : undefined;};@@ -401,7 +403,9 @@ export function SplitFileMenu(props: SplitFileMenuProps) {action: () => {void favoriteAction.execute([entity]);},- hotkeyToken: activeHotkeyToken(TOKENS.entity.action.favorite),+ get hotkeyToken() {+ return activeHotkeyToken(TOKENS.entity.action.favorite);+ },group: 'macro' as const,};};@@ -416,7 +420,9 @@ export function SplitFileMenu(props: SplitFileMenuProps) {action: () => {void muteAction.execute([entity]);},- hotkeyToken: activeHotkeyToken(TOKENS.entity.action.mute),+ get hotkeyToken() {+ return activeHotkeyToken(TOKENS.entity.action.mute);+ },group: 'macro' as const,};};@@ -442,7 +448,9 @@ export function SplitFileMenu(props: SplitFileMenuProps) {setOpen(false);createReminderAction.execute([entity]);},- hotkeyToken: activeHotkeyToken(TOKENS.entity.action.createReminder),+ get hotkeyToken() {+ return activeHotkeyToken(TOKENS.entity.action.createReminder);+ },group: 'macro' as const,};};@@ -458,7 +466,9 @@ export function SplitFileMenu(props: SplitFileMenuProps) {setOpen(false);addTagAction.execute([entity]);},- hotkeyToken: activeHotkeyToken(TOKENS.entity.action.tags),+ get hotkeyToken() {+ return activeHotkeyToken(TOKENS.entity.action.tags);+ },group: 'macro' as const,};};@@ -482,7 +492,9 @@ export function SplitFileMenu(props: SplitFileMenuProps) {void copyLinkAction.executeByBlock(props.id, props.entityKind);}},- hotkeyToken: activeHotkeyToken(TOKENS.entity.action.copyLink),+ get hotkeyToken() {+ return activeHotkeyToken(TOKENS.entity.action.copyLink);+ },group: 'sharing' as const,};};@@ -493,7 +505,9 @@ export function SplitFileMenu(props: SplitFileMenuProps) {action: () => {void copyEntityIdAction.executeById(props.id);},- hotkeyToken: activeHotkeyToken(TOKENS.entity.action.copyEntityId),+ get hotkeyToken() {+ return activeHotkeyToken(TOKENS.entity.action.copyEntityId);+ },group: 'sharing' as const,});@@ -553,7 +567,9 @@ export function SplitFileMenu(props: SplitFileMenuProps) {});},icon: Rename,- hotkeyToken: activeHotkeyToken(TOKENS.entity.action.rename),+ get hotkeyToken() {+ return activeHotkeyToken(TOKENS.entity.action.rename);+ },group: 'file' as const,};})@@ -609,9 +625,9 @@ export function SplitFileMenu(props: SplitFileMenuProps) {});},icon: ArrowRight,- hotkeyToken: activeHotkeyToken(- TOKENS.entity.action.moveToFolder- ),+ get hotkeyToken() {+ return activeHotkeyToken(TOKENS.entity.action.moveToFolder);+ },group: 'file' as const,};})diff --git a/apps/web/src/components/app/split-layout/components/SplitHeader.tsx b/apps/web/src/components/app/split-layout/components/SplitHeader.tsxindex 94be6fd504..2001881de1 100644--- a/apps/web/src/components/app/split-layout/components/SplitHeader.tsx+++ b/apps/web/src/components/app/split-layout/components/SplitHeader.tsx@@ -1,4 +1,7 @@+import { ViewBreadcrumbs } from '@app/components/view-shell';import { isListViewID, LIST_VIEW_ID } from '@app/constants/list-views';+import { driveLocationLabel } from '@app/features/drive-view/core/location-label';+import type { DriveState } from '@app/features/drive-view/core/types';import { useSoup } from '@app/features/next-soup/soup-context';import { openEntityInSplitFromUnifiedList } from '@app/features/next-soup/utils';import { CALENDAR_BLOCK_ID } from '@block-calendar/types';@@ -27,7 +30,6 @@ import CollapseIcon from '@phosphor/arrows-in.svg';import ExpandIcon from '@phosphor/arrows-out.svg';import CaretDown from '@phosphor/caret-down.svg';import CaretLeft from '@phosphor/caret-left.svg';-import CaretRight from '@phosphor/caret-right.svg';import CaretUp from '@phosphor/caret-up.svg';import CopyIcon from '@phosphor/copy.svg';import CloseIcon from '@phosphor/x.svg';@@ -134,24 +136,6 @@ function SplitBackButton() {);}-function SplitForwardButton() {- const context = useContext(SplitPanelContext);- if (!context) return '';- return (- <Button- square- size="sm"- class="p-1 rounded-lg touch:active:bg-transparent"- label="Go Forward"- hotkey={TOKENS.split.go.forward}- disabled={!context.handle.canGoForward()}- onClick={context.handle.goForward}- >- <CaretRight />- </Button>- );-}-function SidebarExpandButton() {const panel = useContext(SplitPanelContext);const layout = useContext(SplitLayoutContext);@@ -244,6 +228,50 @@ function SplitCloseButton() {);}+function SplitDriveReturnButton() {+ const panel = useContext(SplitPanelContext);+ const layout = useContext(SplitLayoutContext);+ if (!panel || !layout) return null;++ const sourceList = createMemo(() =>+ panel.handle+ .history()+ .slice(0, -1)+ .reverse()+ .find(+ (content) => content.type === 'component' && isListViewID(content.id)+ )+ );+ const isDrive = (content: SplitContent) =>+ content.type === 'component' && content.id === LIST_VIEW_ID.documents;+ const sourceLabel = () => {+ const state = sourceList()?.state;+ const label = state?.['drive.returnLabel'];+ if (typeof label === 'string') return label;+ const driveState = state?.['drive.view'] as DriveState | undefined;+ return driveState ? driveLocationLabel(driveState.location) : 'My Files';+ };+ const returnToDrive = () => {+ if (panel.handle.goBackTo(isDrive)) return;+ const driveSplit = layout.manager+ .splits()+ .find((split) => isDrive(split.content));+ if (driveSplit) layout.manager.getSplit(driveSplit.id)?.activate();+ };++ return (+ <Show when={sourceList()?.id === LIST_VIEW_ID.documents}>+ <ViewBreadcrumbs.ReturnButton+ onClick={returnToDrive}+ title={`Back to ${sourceLabel()}`}+ >+ {sourceLabel()}+ </ViewBreadcrumbs.ReturnButton>+ <ViewBreadcrumbs.Separator class="ml-1" />+ </Show>+ );+}+function SoupNavigationButtons() {const context = useContext(SplitPanelContext);const soup = useSoup();@@ -572,14 +600,11 @@ export function SplitHeader(props: {<div class="relative flex items-center pl-2 h-full"><SidebarExpandButton /><SplitCloseButton />- <div class="flex items-center @max-[380px]/split-header:hidden">- <SplitBackButton />- <SplitForwardButton />- </div>+ <SplitDriveReturnButton /></div>}>- {/* Back/forward island. List views never render the back button+ {/* Mobile back island. List views never render the back button(their header hosts the filter pills instead), so the islandhides for them even when history allows going back. */}<HeaderIslanddiff --git a/apps/web/src/components/app/split-layout/components/SplitPanel.tsx b/apps/web/src/components/app/split-layout/components/SplitPanel.tsxindex f408c550ef..9564b20b19 100644--- a/apps/web/src/components/app/split-layout/components/SplitPanel.tsx+++ b/apps/web/src/components/app/split-layout/components/SplitPanel.tsx@@ -319,7 +319,7 @@ export function SplitPanel(props: SplitPanelProps) {<Show when={!usesComposableLayout()}><Panel.Headerclass={cn(- 'relative block min-h-10.25 touch:min-h-11.25 p-0 overflow-visible border-b-0!',+ 'relative block min-h-12 p-0 overflow-visible border-b-0!','z-split-panel-chrome',// On mobile/tablet the header collapses to a zero-height grid row;// SplitHeader overlays the body as floating islands.diff --git a/apps/web/src/components/view-shell/MobileFilterDrawer.tsx b/apps/web/src/components/view-shell/MobileFilterDrawer.tsxindex 2963de8165..9d8386a26f 100644--- a/apps/web/src/components/view-shell/MobileFilterDrawer.tsx+++ b/apps/web/src/components/view-shell/MobileFilterDrawer.tsx@@ -49,13 +49,13 @@ function Root(props: MobileFilterDrawerProps) {size="sm"depth={3}class={cn(- 'island bg-chrome pointer-events-auto relative size-10 shrink-0 rounded-full [&_svg]:size-6',+ 'island bg-chrome pointer-events-auto relative z-10 size-10 shrink-0 rounded-full [&_svg]:size-6',props.class)}><SlidersHorizontalIcon /><Show when={props.activeCount > 0}>- <span class="pointer-events-none absolute -top-0.5 right-0 flex size-4 translate-x-1/2 items-center justify-center rounded-full bg-accent text-xxs font-medium leading-none text-surface">+ <span class="pointer-events-none absolute -top-0.5 right-0 z-10 flex size-4 translate-x-1/2 items-center justify-center rounded-full bg-accent text-xxs font-medium leading-none text-surface">{props.activeCount}</span></Show>diff --git a/apps/web/src/components/view-shell/ViewBreadcrumbs.tsx b/apps/web/src/components/view-shell/ViewBreadcrumbs.tsxindex 821fcc9240..be5e7d018c 100644--- a/apps/web/src/components/view-shell/ViewBreadcrumbs.tsx+++ b/apps/web/src/components/view-shell/ViewBreadcrumbs.tsx@@ -135,6 +135,16 @@ function BreadcrumbButton(props: ViewBreadcrumbsButtonProps) {export type ViewBreadcrumbsSeparatorProps = JSX.SvgSVGAttributes<SVGSVGElement>;+function ReturnButton(props: ViewBreadcrumbsButtonProps) {+ const [local, rest] = splitProps(props, ['children', 'class']);++ return (+ <BreadcrumbButton {...rest} class={cn('shrink-0', local.class)}>+ {local.children}+ </BreadcrumbButton>+ );+}+function Separator(props: ViewBreadcrumbsSeparatorProps) {const [local, rest] = splitProps(props, ['class']);@@ -228,6 +238,7 @@ function Outlet(props: ViewBreadcrumbsOutletProps) {export const ViewBreadcrumbs = Object.assign(Root, {Root,Button: BreadcrumbButton,+ ReturnButton,Item,Separator,Outlet,diff --git a/apps/web/src/features/drive-view/core/location-label.ts b/apps/web/src/features/drive-view/core/location-label.tsnew file mode 100644index 0000000000..5d09be4a04--- /dev/null+++ b/apps/web/src/features/drive-view/core/location-label.ts@@ -0,0 +1,11 @@+import { DRIVE_TABS, type DriveFolder, type DriveLocation } from './types';++export function driveLocationLabel(+ location: DriveLocation,+ folders: readonly DriveFolder[] = []+): string {+ if (location.kind === 'folder') {+ return folders.find((folder) => folder.id === location.id)?.name ?? 'Drive';+ }+ return DRIVE_TABS.find((tab) => tab.id === location.tab)?.label ?? 'My Files';+}diff --git a/apps/web/src/features/drive-view/drive-view.tsx b/apps/web/src/features/drive-view/drive-view.tsxindex 2536c52426..f9dc7cffc0 100644--- a/apps/web/src/features/drive-view/drive-view.tsx+++ b/apps/web/src/features/drive-view/drive-view.tsx@@ -45,8 +45,9 @@ import { useFavoritesData } from '@queries/favorites/favorites';import { useProjectsQuery } from '@queries/storage/projects';import type { Favorite } from '@service-storage/generated/schemas/favorite';import { Dropdown, EmptyStatePanel } from '@ui';-import { createMemo, For, Show, Suspense } from 'solid-js';+import { createMemo, For, onCleanup, Show, Suspense } from 'solid-js';import { Dynamic } from 'solid-js/web';+import { driveLocationLabel } from './core/location-label';import {DRIVE_TABS,type DriveScope,@@ -112,6 +113,11 @@ export function DriveView(props: DriveViewProps) {rootOpen: true,},});+ onCleanup(+ panel.handle.registerEntryStateCaptor('drive.returnLabel', () =>+ driveLocationLabel(state().location, folders())+ )+ );const projectId = () => {const location = state().location;return location.kind === 'folder' ? (location.id ?? undefined) : undefined;diff --git a/apps/web/src/features/drive-view/views/drive-layout.tsx b/apps/web/src/features/drive-view/views/drive-layout.tsxindex f2d63ea74f..d9880a0755 100644--- a/apps/web/src/features/drive-view/views/drive-layout.tsx+++ b/apps/web/src/features/drive-view/views/drive-layout.tsx@@ -18,12 +18,12 @@ import {filterFolderTree,folderAncestors,} from '../core/folder-tree';-import {- DRIVE_TABS,- type DriveFolder,- type DriveSort,- type DriveState,- type DriveTab,+import { driveLocationLabel } from '../core/location-label';+import type {+ DriveFolder,+ DriveSort,+ DriveState,+ DriveTab,} from '../core/types';export function DriveLayout(props: {@@ -61,14 +61,7 @@ export function DriveLayout(props: {const id = selectedFolder();return id ? folderAncestors(props.folders, id) : [];});- const title = () =>- props.state.location.kind === 'folder'- ? (breadcrumbs().at(-1)?.name ?? 'Drive')- : (DRIVE_TABS.find(- (tab) =>- props.state.location.kind === 'tab' &&- tab.id === props.state.location.tab- )?.label ?? 'My Files');+ const title = () => driveLocationLabel(props.state.location, props.folders);const SidebarContent = () => (<>diff --git a/apps/web/src/features/email-view/components/EmailControls.tsx b/apps/web/src/features/email-view/components/EmailControls.tsxindex f80f7ca786..096d0e2e9d 100644--- a/apps/web/src/features/email-view/components/EmailControls.tsx+++ b/apps/web/src/features/email-view/components/EmailControls.tsx@@ -28,7 +28,7 @@ export function EmailControls(props: EmailControlsProps) {onClear={filters.clear}/><Show when={filters.activeCount() > 0}>- <span class="pointer-events-none absolute -top-0.5 right-0 flex size-4 translate-x-1/2 items-center justify-center rounded-full bg-accent text-xxs font-medium leading-none text-surface">+ <span class="pointer-events-none absolute -top-0.5 right-0 z-10 flex size-4 translate-x-1/2 items-center justify-center rounded-full bg-accent text-xxs font-medium leading-none text-surface">{filters.activeCount()}</span></Show>diff --git a/apps/web/src/features/inbox-view/components/InboxFilters.tsx b/apps/web/src/features/inbox-view/components/InboxFilters.tsxindex 38be59a11a..6d52174001 100644--- a/apps/web/src/features/inbox-view/components/InboxFilters.tsx+++ b/apps/web/src/features/inbox-view/components/InboxFilters.tsx@@ -185,7 +185,7 @@ function useInboxFilters() {function FilterCountBadge(props: { count: number }) {return (<Show when={props.count > 0}>- <span class="pointer-events-none absolute -top-0.5 right-0 flex size-3 translate-x-1/2 items-center justify-center rounded-full bg-panel text-[9px] font-medium leading-none text-ink-muted">+ <span class="pointer-events-none absolute -top-0.5 right-0 z-10 flex size-3 translate-x-1/2 items-center justify-center rounded-full bg-panel text-[9px] font-medium leading-none text-ink-muted">{props.count}</span></Show>diff --git a/apps/web/src/features/tasks-view/components/TasksDetailView.tsx b/apps/web/src/features/tasks-view/components/TasksDetailView.tsxindex fdb87d5624..b6105df941 100644--- a/apps/web/src/features/tasks-view/components/TasksDetailView.tsx+++ b/apps/web/src/features/tasks-view/components/TasksDetailView.tsx@@ -13,6 +13,7 @@ import { useMarkdownDocument } from '@block-md/context/markdown-document-contextimport { SidePanel } from '@components/app/side-panel';import { SplitFileMenu } from '@components/app/split-layout/components/SplitFileMenu';import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';+import { SplitPanel } from '@components/app/split-panel';import {EntityIcon,type EntityIconSelector,@@ -54,12 +55,13 @@ function TaskViewBreadcrumbItem() {order={0}>{(item) => (- <ViewBreadcrumbs.Button+ <ViewBreadcrumbs.ReturnButtonisActive={item.isActive()}onClick={item.onSelect}+ title={`Back to ${tabName()}`}><span class="truncate">{tabName()}</span>- </ViewBreadcrumbs.Button>+ </ViewBreadcrumbs.ReturnButton>)}</ViewBreadcrumbs.Item>);@@ -245,6 +247,7 @@ function TaskDetailTopBar(props: {return (<div class="flex h-12 min-w-0 shrink-0 items-center gap-1 border-edge border-b px-3">+ <SplitPanel.CloseButton class="hidden shrink-0 @max-[720px]/view-shell:flex" /><ViewBreadcrumbs.Outletaria-label="Task location"fallback={<TaskBreadcrumbSkeleton />}diff --git a/docs/AGENT_GUIDE/navigation.md b/docs/AGENT_GUIDE/navigation.mdindex 77d03149ed..78125314f0 100644--- a/docs/AGENT_GUIDE/navigation.md+++ b/docs/AGENT_GUIDE/navigation.md@@ -25,7 +25,8 @@| `/app/settings/account` | Settings (also `/app/settings/api-keys`, `/mcp-server`, `/shortcuts`, etc.) |Splits: the app is a tiling window manager. A second pane appends its own segment to the URL-(`/app/<left>/<right>`). Each pane has its own Close / Go Back / Go Forward buttons.+(`/app/<left>/<right>`). Desktop panes expose Close when available and omit+split-history back/forward buttons. Mobile content panes retain their back button.Shift-click on content links requests a new split wherever splits are supported,including mentions, references, folder links, and list rows with a linked preview.@@ -39,6 +40,12 @@ preview item or leave that view before opening the block in a split. Duplicatemounts reached through direct layout paths show the same message instead of asecond block instance.+Desktop inline content previews use a 48px header with a muted bottom divider,+aligned with the adjacent sidebar title bar (such as Home). Standalone block+headers use the same height without a bottom divider. Preview headers and toolbars+are transparent so they blend with the pane's inactive background. Header controls+stay centered and the preview body fills the remaining height below the divider.+## Sidebar (a11y names are load-bearing)- Top: buttons `Search` and `Create`. Clicking sidebar `Search` opens a menudiff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.mdindex 49839cb7ff..d1dc8019d7 100644--- a/docs/AGENT_GUIDE/surfaces.md+++ b/docs/AGENT_GUIDE/surfaces.md@@ -372,9 +372,18 @@ just client-side row filtering. Cached inserts enforce the same rule before arefetch, including expanded groups and inactive cached Shared queries. Untilviewer identity is available, document inserts into Shared are rejected.-With `enable-new-app-views` enabled, Files opens **Drive** using the same-shell as Tasks. The sidebar contains `New file or folder`, `My Files`, `Recent`,+On touch devices (phones and tablets), Files keeps the original tabbed view and+mobile navigation even when `enable-new-app-views` is enabled.++On desktop, with `enable-new-app-views` enabled, Files opens **Drive** using the+same shell as Tasks. The sidebar contains `New file or folder`, `My Files`, `Recent`,`Shared with me`, collapsible Favorites, and a searchable folder hierarchy.+Drive omits split-history back/forward buttons in both wide and narrow layouts;+the split close button remains available when multiple splits are open.+Files opened in place from Drive show a return link labeled with their originating+subview (such as `My Files`, `Recent`, or `Shared with me`) or folder name. The text-only+label's font weight matches the file title. The link+restores the originating Drive view.The `Drive` folder row opens the folder overview. Click a folder name to browseits contents in the main pane; its separate expand/collapse button reveals childfolders without navigating. Folder breadcrumbs in the top bar use `/` separatorsdiff --git a/docs/AGENT_GUIDE/tasks.md b/docs/AGENT_GUIDE/tasks.mdindex 437a21a5d8..5d85be1a11 100644--- a/docs/AGENT_GUIDE/tasks.md+++ b/docs/AGENT_GUIDE/tasks.md@@ -19,9 +19,12 @@ New accounts are seeded with three sample tasks (`Intro to tasks`, `Advanced tas`How we use tasks at Macro`).Click a task row or favorite to replace the list with the editable task document. Its top-bar shows the originating task tab as a breadcrumb, the task name and actions, Share, and-the Details/Properties side-panel toggle. Choose the originating tab breadcrumb, a task tab,-or a tag to return to the list. Shift-click a row or favorite to open it in a new split+bar shows the originating task tab as a text-only return breadcrumb,+followed by the task name and actions, Share, and the Details/Properties side-panel+toggle. The return label matches the task title's font weight in both wide and narrow+layouts. Narrow splits also show a close button when multiple splits are open. Choose+the originating tab breadcrumb, a task tab, or a tag to return to the list.+Shift-click a row or favorite to open it in a new splitinstead. Keyboard list navigation only moves focus; press Enter to open the focused task.## Create a task