Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(desktop): custom topbar and desktop layout (#7630)

Eric Hayesa93fa70db726
diff --git a/apps/web/index.html b/apps/web/index.html
index a8b7707a68..11813a7bf9 100644
--- a/apps/web/index.html
+++ b/apps/web/index.html
@@ -250,6 +250,21 @@
flex: 1;
flex-direction: column;
}
+ .bs-desktop-content {
+ display: flex;
+ flex: 1;
+ min-width: 0;
+ margin: 6px 6px 6px 0;
+ overflow: hidden;
+ border: 1px solid var(--bs-edge);
+ border-radius: 6px;
+ }
+ #boot-shell[data-desktop] .bs-rail {
+ border-right: 0;
+ }
+ #boot-shell[data-macos] .bs-head > :last-child {
+ display: none;
+ }
/* Home's composer: the Agents new-chat grid, under the 48px top bar. */
.bs-newchat {
display: grid;
@@ -419,6 +434,14 @@
// colors; everything degrades to Home's default layout without them.
try {
const shell = document.getElementById("boot-shell");
+ const nativeOs = window.__TAURI_OS_PLUGIN_INTERNALS__?.os_type;
+ const nativeDesktop = nativeOs && nativeOs !== "ios" && nativeOs !== "android";
+ if (nativeDesktop) shell.dataset.desktop = "";
+ // Match Layout's native macOS overlay-titlebar clearance before JS loads.
+ if (nativeOs === "macos") {
+ shell.dataset.macos = "";
+ shell.style.paddingTop = "40px";
+ }
const read = (key) => {
try {
return JSON.parse(localStorage.getItem(key) || "null");
@@ -493,7 +516,8 @@
</div></div>`
: `<div class="bs-page">${bar("160px")}${["92%", "86%", "95%", "70%", "88%", "80%", "60%"].map((w) => bar(w)).join("")}</div>`;
- shell.innerHTML = `${rail}${showAside ? aside : ""}<div class="bs-main">${main}</div>
+ const content = `${showAside ? aside : ""}<div class="bs-main">${main}</div>`;
+ shell.innerHTML = `${rail}${nativeDesktop ? `<div class="bs-desktop-content">${content}</div>` : content}
<div class="bs-dock">${bar("24px") + bar("24px") + bar("24px") + bar("24px") + bar("24px")}</div>`;
if (!showAside && matchMedia("(pointer: coarse)").matches) shell.insertAdjacentHTML("afterbegin", aside);
}
diff --git a/apps/web/src/components/app/DesktopTitleBar.tsx b/apps/web/src/components/app/DesktopTitleBar.tsx
new file mode 100644
index 0000000000..248dec138b
--- /dev/null
+++ b/apps/web/src/components/app/DesktopTitleBar.tsx
@@ -0,0 +1,48 @@
+import { LIST_VIEW_ID } from '@app/constants/list-views';
+import { globalSplitManager } from '@app/signal/splitLayout';
+import { TOKENS } from '@core/hotkey/tokens';
+import ColumnsPlusIcon from '@phosphor/columns-plus-right.svg';
+import { Button } from '@ui';
+import { Show } from 'solid-js';
+
+export function DesktopTitleBar(props: {
+ navigationRef: (element: HTMLDivElement) => void;
+}) {
+ return (
+ <div
+ data-tauri-drag-region
+ class="absolute inset-x-0 top-0 flex h-[40px] items-center justify-between pl-[88px] pr-3 select-none"
+ >
+ {/* The portal wrapper must use flex layout so inline tooltip triggers
+ cannot add text-baseline space below the navigation button. */}
+ <div
+ ref={props.navigationRef}
+ class="flex items-center [&>div]:flex [&>div]:items-center"
+ />
+ <Show when={globalSplitManager()}>
+ {(manager) => (
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ label="New Split"
+ hotkey={TOKENS.global.createNewSplit}
+ disabled={!manager().canAppendSplit()}
+ onClick={() =>
+ manager().openWithSplit(
+ { type: 'component', id: LIST_VIEW_ID.home },
+ {
+ preferNewSplit: true,
+ allowDuplicate: true,
+ replaceWhenFull: false,
+ activate: true,
+ }
+ )
+ }
+ >
+ <ColumnsPlusIcon class="size-4" />
+ </Button>
+ )}
+ </Show>
+ </div>
+ );
+}
diff --git a/apps/web/src/components/app/Layout.tsx b/apps/web/src/components/app/Layout.tsx
index ca23d6e5c5..1bfa8d5b65 100644
--- a/apps/web/src/components/app/Layout.tsx
+++ b/apps/web/src/components/app/Layout.tsx
@@ -49,6 +49,7 @@ import { isTouchDevice } from '@core/mobile/isTouchDevice';
import { virtualKeyboardVisible } from '@core/mobile/virtualKeyboard';
import { updateCookie } from '@core/util/cookies';
import { lazyNamed } from '@core/util/lazyNamed';
+import { isPlatform } from '@core/util/platform';
import { useUserInfoQuery } from '@queries/auth/user-info';
import { queryClient } from '@queries/client';
import {
@@ -56,18 +57,22 @@ import {
useLocation,
useNavigate,
} from '@solidjs/router';
+import { type as osType } from '@tauri-apps/plugin-os';
import { cn, ImperativeDialogHost } from '@ui';
import {
createEffect,
createMemo,
+ createSignal,
lazy,
onCleanup,
onMount,
Show,
Suspense,
} from 'solid-js';
+import { ViewNavigationSlotContext } from '../view-shell/navigation-slot';
import { BundleUpdateProgressBar } from './BundleUpdateProgressBar';
import { ContentLoading } from './ContentLoading';
+import { DesktopTitleBar } from './DesktopTitleBar';
import GlobalShortcuts from './GlobalHotkeys';
import { ItemDndProvider } from './ItemDragAndDrop';
import { FloatRegion } from './mobile/float-regions/FloatRegion';
@@ -176,6 +181,8 @@ function NewOnboardingRedirect() {
}
function LayoutInner(props: RouteSectionProps) {
+ const hasOverlayTitleBar = isPlatform('desktop') && osType() === 'macos';
+ const [navigationSlot, setNavigationSlot] = createSignal<HTMLElement>();
const isAuthenticated = useIsAuthenticated();
const { paywallOpen, showPaywall } = usePaywallState();
const { usageLimitOpen } = useAiUsageLimitState();
@@ -217,108 +224,119 @@ function LayoutInner(props: RouteSectionProps) {
attachGlobalDOMScope(document.body);
return (
- <div
- class={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)'
- )}
- >
- <ImperativeDialogHost />
- <BundleUpdateProgressBar />
- <Suspense>
- <Show when={isAuthenticated()}>
- <NewOnboardingRedirect />
- <Show when={!AUTH_URLS.includes(location.pathname)}>
- <GithubReauthenticationPrompt />
- <GmailReauthenticationPrompt />
- <CalendarPermissionPrompt />
- </Show>
- <GlobalShortcuts />
- <Show when={!isTouchDevice()}>
- <GoToHotkeys />
+ <ViewNavigationSlotContext.Provider value={navigationSlot}>
+ <div
+ class={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)',
+ hasOverlayTitleBar && 'pt-[40px]'
+ )}
+ >
+ <Show when={hasOverlayTitleBar}>
+ <DesktopTitleBar navigationRef={setNavigationSlot} />
+ </Show>
+ <ImperativeDialogHost />
+ <BundleUpdateProgressBar />
+ <Suspense>
+ <Show when={isAuthenticated()}>
+ <NewOnboardingRedirect />
+ <Show when={!AUTH_URLS.includes(location.pathname)}>
+ <GithubReauthenticationPrompt />
+ <GmailReauthenticationPrompt />
+ <CalendarPermissionPrompt />
+ </Show>
+ <GlobalShortcuts />
+ <Show when={!isTouchDevice()}>
+ <GoToHotkeys />
+ <Suspense>
+ <FavoritesCommands />
+ <CommandMenu />
+ </Suspense>
+ </Show>
<Suspense>
- <FavoritesCommands />
- <CommandMenu />
+ <PropertyEditorModal />
</Suspense>
+ <GlobalBulkEditEntityModal />
+ <NativeShareSheet />
+ <MacroMcpSetupModal />
+ <CreateChannelModal />
+ <CreateCompanyModal />
+ <CreateContactModal />
+ <Show when={isAddInboxDialogOpen()}>
+ <AddInboxDialog />
+ </Show>
+ </Show>
+ <Show
+ when={
+ isAuthenticated() === false &&
+ !AUTH_URLS.includes(location.pathname)
+ }
+ >
+ <Banner />
</Show>
+ </Suspense>
+ {/* <Show when={isAuthenticated() && isTutorialCompleted() === false}>
+ <Onboarding />
+ </Show> */}
+
+ <Show when={paywallOpen()}>
<Suspense>
- <PropertyEditorModal />
+ <Paywall />
</Suspense>
- <GlobalBulkEditEntityModal />
- <NativeShareSheet />
- <MacroMcpSetupModal />
- <CreateChannelModal />
- <CreateCompanyModal />
- <CreateContactModal />
- <Show when={isAddInboxDialogOpen()}>
- <AddInboxDialog />
- </Show>
</Show>
+ <Show when={usageLimitOpen()}>
+ <AiUsageLimitDialog />
+ </Show>
+ <div class="min-h-0 flex-1 flex">
+ <ItemDndProvider>
+ <Show when={isSidebarVisible()}>
+ <SidebarRail />
+ </Show>
+
+ <div class="flex-1 w-full min-h-0 font-sans text-ink caret-current">
+ {/* Route loading must not detach the shell or mobile navigation. */}
+ <Suspense fallback={<ContentLoading />}>
+ {props.children}
+ </Suspense>
+ </div>
+ </ItemDndProvider>
+ </div>
<Show
when={
- isAuthenticated() === false &&
+ isTouchDevice() &&
+ isAuthenticated() &&
!AUTH_URLS.includes(location.pathname)
}
>
- <Banner />
+ <FloatRegionHost />
+ <Suspense>
+ <UserCardDrawer />
+ </Suspense>
+ <Show when={isMobile()}>
+ <Suspense>
+ <MobileSettings />
+ </Suspense>
+ </Show>
+ <MobileViewsRow />
+ <FloatRegion
+ region="dock"
+ active={() => !virtualKeyboardVisible() || SearchState.isOpen()}
+ >
+ <MobileDockRow />
+ </FloatRegion>
</Show>
- </Suspense>
- {/* <Show when={isAuthenticated() && isTutorialCompleted() === false}>
- <Onboarding />
- </Show> */}
-
- <Show when={paywallOpen()}>
+ <SwipeDownDismissKeyboard />
<Suspense>
- <Paywall />
- </Suspense>
- </Show>
- <Show when={usageLimitOpen()}>
- <AiUsageLimitDialog />
- </Show>
- <div class="max-h-full grow flex">
- <ItemDndProvider>
- <Show when={isSidebarVisible()}>
- <SidebarRail />
+ <Show
+ when={isAuthenticated() && !AUTH_URLS.includes(location.pathname)}
+ >
+ <Launcher
+ open={createMenuOpen()}
+ onOpenChange={setCreateMenuOpen}
+ />
</Show>
-
- <div class="flex-1 w-full min-h-0 font-sans text-ink caret-current">
- {/* Route loading must not detach the shell or mobile navigation. */}
- <Suspense fallback={<ContentLoading />}>{props.children}</Suspense>
- </div>
- </ItemDndProvider>
- </div>
- <Show
- when={
- isTouchDevice() &&
- isAuthenticated() &&
- !AUTH_URLS.includes(location.pathname)
- }
- >
- <FloatRegionHost />
- <Suspense>
- <UserCardDrawer />
</Suspense>
- <Show when={isMobile()}>
- <Suspense>
- <MobileSettings />
- </Suspense>
- </Show>
- <MobileViewsRow />
- <FloatRegion
- region="dock"
- active={() => !virtualKeyboardVisible() || SearchState.isOpen()}
- >
- <MobileDockRow />
- </FloatRegion>
- </Show>
- <SwipeDownDismissKeyboard />
- <Suspense>
- <Show
- when={isAuthenticated() && !AUTH_URLS.includes(location.pathname)}
- >
- <Launcher open={createMenuOpen()} onOpenChange={setCreateMenuOpen} />
- </Show>
- </Suspense>
- <DevStatusBar />
- </div>
+ <DevStatusBar />
+ </div>
+ </ViewNavigationSlotContext.Provider>
);
}
diff --git a/apps/web/src/components/app/sidebar-next/sidebar-rail.tsx b/apps/web/src/components/app/sidebar-next/sidebar-rail.tsx
index acb042f663..08a62d1d4c 100644
--- a/apps/web/src/components/app/sidebar-next/sidebar-rail.tsx
+++ b/apps/web/src/components/app/sidebar-next/sidebar-rail.tsx
@@ -5,6 +5,7 @@ import { navigateToSidebarView } from '@components/app/app-sidebar/sidebar';
import { rememberBootShell } from '@components/app/boot-shell';
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 { createEffect, For, Show, Suspense } from 'solid-js';
import { SidebarRailCreateButton } from './create-button';
@@ -68,7 +69,9 @@ const SidebarRailContent = () => {
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',
- (globalSplitManager()?.splits().length ?? 1) <= 1 && 'border-r'
+ !isPlatform('desktop') &&
+ (globalSplitManager()?.splits().length ?? 1) <= 1 &&
+ 'border-r'
)}
>
<SidebarRailCreateButton />
diff --git a/apps/web/src/components/app/split-layout/SplitLayout.tsx b/apps/web/src/components/app/split-layout/SplitLayout.tsx
index 112bb7b4de..525dbdd582 100644
--- a/apps/web/src/components/app/split-layout/SplitLayout.tsx
+++ b/apps/web/src/components/app/split-layout/SplitLayout.tsx
@@ -5,6 +5,7 @@ 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,
@@ -47,7 +48,8 @@ export function SplitLayout() {
const panelRefs = new Map<SplitId, HTMLDivElement>();
const splits = createMemo(splitManager.splits);
- const useBentoLayout = () => !isTouchDevice() && splits().length > 1;
+ const useBentoLayout = () =>
+ !isTouchDevice() && (isPlatform('desktop') || splits().length > 1);
// Drop refs for departed splits by reconciling against the live list:
// batched mutations can remove several splits in one flush (e.g. closing
diff --git a/apps/web/src/components/app/split-layout/components/SplitPanel.tsx b/apps/web/src/components/app/split-layout/components/SplitPanel.tsx
index 3f480a4d01..3fd25b1f56 100644
--- a/apps/web/src/components/app/split-layout/components/SplitPanel.tsx
+++ b/apps/web/src/components/app/split-layout/components/SplitPanel.tsx
@@ -13,6 +13,7 @@ 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';
@@ -270,7 +271,7 @@ export function SplitPanel(props: SplitPanelProps) {
'touch:rounded-none touch:after:hidden touch:border-0! bg-panel transition-none',
props.handle.isSpotLight()
? 'rounded-xl'
- : multipleSplits()
+ : isPlatform('desktop') || multipleSplits()
? 'rounded-md'
: 'rounded-none',
splitUnfocusedStyling() && 'split-panel-inactive',
@@ -280,7 +281,11 @@ export function SplitPanel(props: SplitPanelProps) {
}
)}
depth={isTouchDevice() ? 0 : 1}
- hideBorder={!props.handle.isSpotLight() && !multipleSplits()}
+ hideBorder={
+ !props.handle.isSpotLight() &&
+ !isPlatform('desktop') &&
+ !multipleSplits()
+ }
>
<Show when={!usesComposableLayout()}>
<Panel.Header
diff --git a/apps/web/src/components/view-shell/ViewShell.test.tsx b/apps/web/src/components/view-shell/ViewShell.test.tsx
index 1d3291418f..676a1de663 100644
--- a/apps/web/src/components/view-shell/ViewShell.test.tsx
+++ b/apps/web/src/components/view-shell/ViewShell.test.tsx
@@ -1,3 +1,7 @@
+import {
+ SplitPanelContext,
+ type SplitPanelContextType,
+} from '@components/app/split-layout/context';
import {
cleanup,
fireEvent,
@@ -7,7 +11,8 @@ import {
} from '@solidjs/testing-library';
import { createSignal, type JSX, onMount } from 'solid-js';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
-import { useViewShell, ViewShell } from './ViewShell';
+import { ViewNavigationSlotContext } from './navigation-slot';
+import { useViewShell, ViewShell, ViewSidebarToggle } from './ViewShell';
import { ViewSidebar } from './ViewSidebar';
const measurement = vi.hoisted(() => ({ width: (): number => 1200 }));
@@ -53,6 +58,59 @@ afterEach(() => {
vi.unstubAllGlobals();
});
+it('moves navigation into the host and follows the active split', () => {
+ const [active, setActive] = createSignal('home');
+ const [host, setHost] = createSignal<HTMLDivElement>();
+ const collapsed = new Map<string, () => boolean>();
+ function Workspace(props: { id: string }) {
+ function Controls() {
+ collapsed.set(props.id, useViewShell().aside.isCollapsed);
+ return (
+ <>
+ <ViewSidebarToggle action="expand" />
+ <ViewSidebarToggle action="collapse" />
+ </>
+ );
+ }
+ return (
+ <SplitPanelContext.Provider
+ value={
+ {
+ isPanelActive: () => active() === props.id,
+ splitHotkeyScope: props.id,
+ } as SplitPanelContextType
+ }
+ >
+ <ViewShell.Root asidePreferenceKey={props.id}>
+ <Controls />
+ </ViewShell.Root>
+ </SplitPanelContext.Provider>
+ );
+ }
+ const view = render(() => (
+ <ViewNavigationSlotContext.Provider value={host}>
+ <div ref={setHost} data-testid="navigation-host" />
+ <Workspace id="home" />
+ <Workspace id="mail" />
+ </ViewNavigationSlotContext.Provider>
+ ));
+ const toolbar = within(view.getByTestId('navigation-host'));
+ expect(view.getAllByRole('button')).toHaveLength(1);
+ fireEvent.click(toolbar.getByRole('button', { name: 'Hide navigation' }));
+ expect(collapsed.get('home')?.()).toBe(true);
+ expect(collapsed.get('mail')?.()).toBe(false);
+ setActive('mail');
+ expect(view.getAllByRole('button')).toHaveLength(1);
+ fireEvent.click(toolbar.getByRole('button', { name: 'Hide navigation' }));
+ expect(collapsed.get('mail')?.()).toBe(true);
+ setActive('home');
+ fireEvent.click(toolbar.getByRole('button', { name: 'Show navigation' }));
+ expect(collapsed.get('home')?.()).toBe(false);
+ expect(collapsed.get('mail')?.()).toBe(true);
+ view.unmount();
+ expect(document.querySelector('[data-testid="navigation-host"]')).toBeNull();
+});
+
function setup(preserveDuringResize: boolean, persistWidth = false) {
const [width, setWidth] = createSignal(1200);
const [configuredWidth, setConfiguredWidth] = createSignal(256);
diff --git a/apps/web/src/components/view-shell/ViewShell.tsx b/apps/web/src/components/view-shell/ViewShell.tsx
index d322a9dc58..7d088fdc95 100644
--- a/apps/web/src/components/view-shell/ViewShell.tsx
+++ b/apps/web/src/components/view-shell/ViewShell.tsx
@@ -9,7 +9,6 @@ import { SplitPanel } from '@components/app/split-panel';
import { Resize } from '@core/component/Resize';
import { registerHotkey } from '@core/hotkey/hotkeys';
import { TOKENS } from '@core/hotkey/tokens';
-import ListIcon from '@phosphor/list.svg';
import SidebarIcon from '@phosphor/sidebar-simple.svg';
import { createWritableMemo } from '@solid-primitives/memo';
import { mergeRefs } from '@solid-primitives/refs';
@@ -33,7 +32,9 @@ import {
splitProps,
useContext,
} from 'solid-js';
+import { Portal } from 'solid-js/web';
import { createSidebarMotion } from './create-sidebar-motion';
+import { ViewNavigationSlotContext } from './navigation-slot';
import { VIEW_SHELL_TOUR } from './tour';
import {
type AsideLayout,
@@ -325,6 +326,7 @@ function Root(props: ViewShellRootProps) {
};
const panel = useContext(SplitPanelContext);
+ const navigationSlot = useContext(ViewNavigationSlotContext);
if (panel) {
registerHotkey({
hotkey: 'cmd+.',
@@ -342,6 +344,29 @@ function Root(props: ViewShellRootProps) {
return (
<ViewShellContext.Provider value={value}>
+ <Show
+ when={
+ navigationSlot?.() &&
+ panel?.isPanelActive() &&
+ value.aside.canCollapse()
+ }
+ >
+ <Portal mount={navigationSlot?.()}>
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ label={
+ value.aside.isCollapsed() ? 'Show navigation' : 'Hide navigation'
+ }
+ hotkey={TOKENS.workspace.toggleNavigation}
+ aria-expanded={!value.aside.isCollapsed()}
+ ref={tourTarget(VIEW_SHELL_TOUR.sidebarToggle)}
+ onClick={value.aside.toggle}
+ >
+ <SidebarIcon class="size-4" />
+ </Button>
+ </Portal>
+ </Show>
<div
{...rest}
ref={setRoot}
@@ -534,10 +559,13 @@ export function ViewSidebarCloseButton(
/** Safe outside a shell so block preview headers can share this control. */
export function ViewSidebarToggle(props: { action: 'collapse' | 'expand' }) {
const ws = useContext(ViewShellContext);
+ const navigationSlot = useContext(ViewNavigationSlotContext);
+ const panel = useContext(SplitPanelContext);
// A conditional expression as `ref` is dropped by the Solid compiler, so
// only the expand toggle registers, from inside the callback.
const toggleTarget = tourTarget(VIEW_SHELL_TOUR.sidebarToggle);
const visible = () =>
+ !(navigationSlot?.() && panel) &&
ws?.aside.canCollapse() &&
(props.action === 'expand'
? ws.aside.isCollapsed() || ws.aside.isOverlay()
@@ -577,12 +605,7 @@ export function ViewSidebarToggle(props: { action: 'collapse' | 'expand' }) {
);
}}
>
- <Show
- when={props.action === 'expand'}
- fallback={<SidebarIcon class="size-4" />}
- >
- <ListIcon class="size-4" />
- </Show>
+ <SidebarIcon class="size-4" />
</Button>
</Show>
);
diff --git a/apps/web/src/components/view-shell/navigation-slot.ts b/apps/web/src/components/view-shell/navigation-slot.ts
new file mode 100644
index 0000000000..dd969c7633
--- /dev/null
+++ b/apps/web/src/components/view-shell/navigation-slot.ts
@@ -0,0 +1,5 @@
+import { type Accessor, createContext } from 'solid-js';
+
+/** Optional host for the active workspace's navigation control. */
+export const ViewNavigationSlotContext =
+ createContext<Accessor<HTMLElement | undefined>>();
diff --git a/apps/web/tauri/src-tauri/capabilities/macos.json b/apps/web/tauri/src-tauri/capabilities/macos.json
new file mode 100644
index 0000000000..d81b37b47f
--- /dev/null
+++ b/apps/web/tauri/src-tauri/capabilities/macos.json
@@ -0,0 +1,9 @@
+{
+ "identifier": "macos-capability",
+ "platforms": ["macOS"],
+ "windows": ["main"],
+ "permissions": [
+ "core:window:allow-start-dragging",
+ "core:window:allow-internal-toggle-maximize"
+ ]
+}
diff --git a/apps/web/tauri/src-tauri/tauri.conf.json b/apps/web/tauri/src-tauri/tauri.conf.json
index 188279146a..c19fc2c530 100644
--- a/apps/web/tauri/src-tauri/tauri.conf.json
+++ b/apps/web/tauri/src-tauri/tauri.conf.json
@@ -22,6 +22,13 @@
"width": 800,
"height": 600,
"resizable": true,
+ "decorations": true,
+ "titleBarStyle": "Overlay",
+ "trafficLightPosition": {
+ "x": 16,
+ "y": 20
+ },
+ "hiddenTitle": true,
"fullscreen": false,
"backgroundThrottling": "disabled"
}
diff --git a/docs/AGENT_GUIDE/navigation.md b/docs/AGENT_GUIDE/navigation.md
index 61fe5cd525..7aaad05c1b 100644
--- a/docs/AGENT_GUIDE/navigation.md
+++ b/docs/AGENT_GUIDE/navigation.md
@@ -1,5 +1,17 @@
# Navigation and App Structure
+The native macOS app reserves 40 px above the app layout for the inset overlay
+title bar's traffic-light controls. Drag this top strip to move the window, or
+double-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, the sidebar icon beside the
+traffic lights toggles navigation for the active split; it replaces the controls
+inside the workspace. The top-right split icon opens another Home split, even
+when Home is already open, and is disabled when there is no room for a new split.
+Its tooltip is “New Split” and displays the registered new-split shortcut (`\`).
+
## Returning from another page
A browser back/forward-cache restore reconnects the GraphQL cache worker and