Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(desktop): align macOS chrome and sidebar divider (#3099)
Max44fa939d7de2
diff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.jsonindex 49855fe90..6ff838a3c 100644--- a/desktop/src-tauri/tauri.conf.json+++ b/desktop/src-tauri/tauri.conf.json@@ -24,7 +24,7 @@"resizable": true,"dragDropEnabled": false,"titleBarStyle": "Overlay",- "trafficLightPosition": { "x": 12, "y": 14 },+ "trafficLightPosition": { "x": 12, "y": 24 },"hiddenTitle": true}],diff --git a/desktop/src-tauri/tests/shell_boundaries.rs b/desktop/src-tauri/tests/shell_boundaries.rsindex db4a8b0ce..c7adf991a 100644--- a/desktop/src-tauri/tests/shell_boundaries.rs+++ b/desktop/src-tauri/tests/shell_boundaries.rs@@ -868,7 +868,7 @@ fn the_macos_overlay_title_bar_keeps_its_layout_and_defaults_to_no_inset() {assert_eq!(window["titleBarStyle"], "Overlay");assert_eq!(window["hiddenTitle"], true);assert_eq!(window["trafficLightPosition"]["x"], 12);- assert_eq!(window["trafficLightPosition"]["y"], 14);+ assert_eq!(window["trafficLightPosition"]["y"], 24);// Bootstrap management and window gestures have separate capability grants.assert!(!read_to_string(&crate_dir().join("capabilities/bootstrap.json")).contains("start-dragging"));let css = read_to_string(&crate_dir().join("../../ui/src/index.css"));diff --git a/ui/e2e/workbench-general/desktop-window-chrome.spec.ts b/ui/e2e/workbench-general/desktop-window-chrome.spec.tsindex 3ff8049cb..f780113d1 100644--- a/ui/e2e/workbench-general/desktop-window-chrome.spec.ts+++ b/ui/e2e/workbench-general/desktop-window-chrome.spec.ts@@ -1,6 +1,144 @@import { expect, test, type Page } from '@playwright/test';import { open, serveProduct } from './support';+// The neutral overlay and the aside's resizer used to paint two lines at+// different stacking levels. Unit gesture tests cannot detect chrome covering+// the top hit area or hiding the active border.+for (const theme of ['light', 'dark'] as const) {+test(`native sidebar divider owns full-height hit testing and all visual states (${theme})`, async ({ page }) => {+ const denied = await serveChat(page);+ await page.addInitScript(() => {+ Object.defineProperty(window, '__AVIBE_DESKTOP_SHELL__', { value: true });+ Object.defineProperty(window, '__AVIBE_DESKTOP_DRAG__', { value: true });+ document.addEventListener('DOMContentLoaded', () => document.documentElement.style.setProperty('--shell-titlebar-inset', '28px'));+ });+ await page.setViewportSize({ width: 1200, height: 800 });+ await open(page, '/agents', { theme });+ const agents = page.getByRole('link', { name: 'Agents', exact: true });+ await expect(agents).toBeVisible();+ const agentsBorder = await agents.evaluate((element) => getComputedStyle(element).borderRightColor);+ await open(page, '/chat/chrome-fixture', { theme });+ const edge = page.getByRole('separator', { name: 'Resize sidebar' });+ const contentEdge = page.locator('[data-sidebar-resizer-content]');+ await expect(edge).toBeVisible();+ const sidebar = page.locator('aside').filter({ has: page.locator('#workbench-capability-nav') });+ const verifyEdge = async () => {+ const side = (await sidebar.boundingBox())!;+ const bounds = (await edge.boundingBox())!;+ expect(bounds.y).toBe(0);+ expect(bounds.height).toBe(28);+ expect(bounds.width).toBe(8);+ expect(await edge.evaluate((element) => {+ const r = element.getBoundingClientRect();+ return [1, 27].map(y => document.elementFromPoint(r.right - 0.5, y) === element);+ })).toEqual([true, true]);+ const lower = (await contentEdge.boundingBox())!;+ expect(lower.y).toBe(28);+ expect(lower.height).toBe(772);+ expect(lower.width).toBe(8);+ expect(await contentEdge.evaluate((element) => {+ const r = element.getBoundingClientRect();+ return [28, 29, innerHeight - 1].map(y => document.elementFromPoint(r.right - 0.5, y) === element);+ })).toEqual([true, true, true]);+ expect(lower.x + lower.width).toBe(side.x + side.width);+ expect(bounds.x + bounds.width).toBe(side.x + side.width);+ return bounds;+ };+ let bounds = await verifyEdge();+ await expect(sidebar).toHaveCSS('border-right-width', '0px');+ await expect(page.locator('[data-sidebar-divider]')).toHaveCount(0);+ await expect(edge).toHaveCSS('border-right-width', '1px');+ await expect(contentEdge).toHaveCSS('border-right-width', '1px');+ const neutral = await edge.evaluate(el => getComputedStyle(el).borderRightColor);+ expect(neutral).not.toBe(agentsBorder);+ await page.mouse.move(bounds.x + 4, 400);+ await expect(edge).toHaveCSS('border-right-color', agentsBorder);+ await expect(contentEdge).toHaveCSS('border-right-color', agentsBorder);+ await verifyEdge();+ await page.screenshot({ path: 'e2e/.artifacts/workbench-general/shots/divider-hover.png' });+ await page.mouse.move(bounds.x + 4, 1);+ await expect(edge).toHaveCSS('border-right-color', agentsBorder);+ await expect(contentEdge).toHaveCSS('border-right-color', agentsBorder);+ await page.mouse.move(1000, 400);+ await expect(edge).toHaveCSS('border-right-color', neutral);+ await expect(contentEdge).toHaveCSS('border-right-color', neutral);++ // Keyboard focus colors the same border; blur restores it.+ await page.keyboard.press('Tab');+ await edge.focus();+ expect(await edge.evaluate(el => el.matches(':focus-visible'))).toBe(true);+ await expect(edge).toHaveCSS('border-right-color', agentsBorder);+ await expect(contentEdge).toHaveCSS('border-right-color', agentsBorder);+ await page.keyboard.press('ArrowRight');+ bounds = await verifyEdge();+ await page.getByRole('button', { name: 'Back', exact: true }).focus();+ await expect(edge).toHaveCSS('border-right-color', neutral);+ await expect(contentEdge).toHaveCSS('border-right-color', neutral);++ // Start at the top chrome, then move beyond the width clamp: captured input+ // keeps the entire edge active even while the pointer is far outside it.+ await page.mouse.move(bounds.x + 4, 1);+ await page.mouse.down();+ await expect(edge).toHaveAttribute('data-dragging', 'true');+ await page.mouse.move(1000, 400);+ await expect(edge).toHaveCSS('border-right-color', agentsBorder);+ await expect(contentEdge).toHaveCSS('border-right-color', agentsBorder);+ bounds = await verifyEdge();+ expect(bounds.x + bounds.width).toBe(496);+ await page.mouse.up();+ await expect(edge).not.toHaveAttribute('data-dragging');+ await expect(edge).toHaveCSS('border-right-color', neutral);+ await expect(contentEdge).toHaveCSS('border-right-color', neutral);++ // Cancellation uses existing gesture cleanup, not another hover-state writer.+ await page.mouse.move(bounds.x + 4, 400);+ await page.mouse.down();+ await page.mouse.move(1000, 400);+ await edge.dispatchEvent('pointercancel', { pointerId: 1 });+ await expect(edge).not.toHaveAttribute('data-dragging');+ await page.mouse.up();+ await page.mouse.move(1001, 400);+ await expect(edge).toHaveCSS('border-right-color', neutral);+ await expect(contentEdge).toHaveCSS('border-right-color', neutral);+ await page.screenshot({ path: 'e2e/.artifacts/workbench-general/shots/divider-neutral.png' });++ // Only the narrow resize strip sits above chrome, not controls or empty drag.+ expect(await page.evaluate(() => document.elementFromPoint(140, 1)?.hasAttribute('data-tauri-drag-region'))).toBe(true);+ for (const name of ['Back', 'Visualize']) {+ const button = page.getByRole('button', { name, exact: true });+ expect(await button.evaluate(el => {+ const r = el.getBoundingClientRect();+ return el.contains(document.elementFromPoint(r.x + r.width / 2, r.y + r.height / 2));+ })).toBe(true);+ }+ await page.evaluate(() => {+ localStorage.setItem('avibe.settings.menu-placement.v1', 'inline');+ window.dispatchEvent(new Event('avibe:settings-menu-placement-changed'));+ });+ await page.locator('[data-settings-toggle]').click();+ await expect(page.locator('nav[aria-label="Settings sections"]')).toBeVisible();+ await page.mouse.move(bounds.x + 4, 1);+ await page.mouse.down();+ await page.mouse.move(bounds.x - 12, 100);+ await page.mouse.up();+ await expect(page.locator('nav[aria-label="Settings sections"]')).toBeVisible();+ await verifyEdge();+ await page.keyboard.press('Escape');+ await sidebar.locator('a[href="/"]').click();+ await expect(page.locator('[data-chat-header]')).toHaveCount(0);+ bounds = await verifyEdge();+ await page.mouse.move(bounds.x + 4, 1);+ await expect(edge).toHaveCSS('border-right-color', agentsBorder);+ await page.setViewportSize({ width: 700, height: 800 });+ await expect(edge).toHaveCount(0);+ await page.setViewportSize({ width: 1200, height: 800 });+ await page.evaluate(() => localStorage.setItem('avibe.settings.menu-placement.v1', 'standalone'));+ await open(page, '/settings/general', { theme: 'light' });+ await expect(page.locator('[data-sidebar-resizer]')).toBeHidden();+ expect(denied).toEqual([]);+});+}+async function serveChat(page: Page) {const denied = await serveProduct(page);const session = {@@ -67,17 +205,70 @@ for (const desktop of [false, true]) {await expect(page.locator('[data-desktop-window-chrome] [data-chat-header]')).toHaveCount(1);await expect(page.locator('main [data-chat-header]')).toHaveCount(0);const bounds = await page.locator('[data-desktop-window-chrome]').boundingBox();- expect(bounds).toEqual({ x: 0, y: 0, width: 1200, height: 28 });- // Every rendered drag surface is confined to the same top row, including- // the sidebar clearance. The transcript and composer never join it.+ expect(bounds).toEqual({ x: 0, y: 0, width: 1200, height: 48 });+ // Native clearance remains 28px; toolbar empty surfaces use its independent+ // 48px height. The transcript and composer never join either drag region.for (const region of await page.locator('[data-tauri-drag-region]').all()) {const rect = await region.boundingBox();if (rect) {expect(rect.y).toBeGreaterThanOrEqual(0);- expect(rect.y + rect.height).toBeLessThanOrEqual(28);+ expect(rect.y + rect.height).toBeLessThanOrEqual(48);}await expect(region).toHaveAttribute('data-tauri-drag-region', '');}++ // Keep the chat toolbar mounted while a real floating app is opened. Hn+ // is the only overlap boundary: the safe strip may receive y=Hn-1,+ // while an AppWindow owns every covered point at and below Hn, including+ // the titlebar controls. Ht remains a 48px layout surface.+ const launcher = page.locator('[data-show-page-dock-drop-target] > button');+ await launcher.hover();+ const library = page.getByRole('menu').getByRole('button', { name: 'App Library', exact: true });+ await expect(library).toBeVisible();+ await library.click();+ const appWindow = page.locator('[data-window-id][aria-label="App Library"]');+ await expect(appWindow).toBeVisible();++ const centerHitBelongsToWindow = async (buttonName: string) => {+ const button = appWindow.getByRole('button', { name: buttonName, exact: true });+ const box = (await button.boundingBox())!;+ return page.evaluate(({ x, y }) => (+ document.elementFromPoint(x, y)?.closest('[data-window-id]') !== null+ ), { x: box.x + box.width / 2, y: box.y + box.height / 2 });+ };+ for (const buttonName of ['Close', 'Minimize', 'Maximize']) {+ expect(await centerHitBelongsToWindow(buttonName)).toBe(true);+ }++ const maximize = appWindow.getByRole('button', { name: 'Maximize', exact: true });+ const maximizeBox = (await maximize.boundingBox())!;+ await page.mouse.click(maximizeBox.x + maximizeBox.width / 2, maximizeBox.y + maximizeBox.height / 2);+ await expect(appWindow).toHaveCSS('border-radius', '0px');+ await expect.poll(async () => {+ const box = (await appWindow.boundingBox())!;+ return {+ x: Math.round(box.x),+ y: Math.round(box.y),+ width: Math.round(box.width),+ height: Math.round(box.height),+ };+ }).toEqual({ x: 0, y: 28, width: 1200, height: 772 });+ const edgeX = (await page.getByRole('separator', { name: 'Resize sidebar' }).boundingBox())!.x + 7.5;+ expect(await page.evaluate((x) => [27, 28, 40, 47, 49].map(y => ({+ y,+ resizer: document.elementFromPoint(x, y)?.closest('[data-sidebar-resizer]') !== null,+ window: document.elementFromPoint(x, y)?.closest('[data-window-id]') !== null,+ })), edgeX)).toEqual([+ { y: 27, resizer: true, window: false },+ { y: 28, resizer: false, window: true },+ { y: 40, resizer: false, window: true },+ { y: 47, resizer: false, window: true },+ { y: 49, resizer: false, window: true },+ ]);+ const close = appWindow.getByRole('button', { name: 'Close', exact: true });+ const closeBox = (await close.boundingBox())!;+ await page.mouse.click(closeBox.x + closeBox.width / 2, closeBox.y + closeBox.height / 2);+ await expect(appWindow).toHaveCount(0);} else {await expect(page.locator('[data-desktop-window-chrome]')).toHaveCount(0);await expect(page.locator('main [data-chat-header]')).toHaveCount(1);@@ -145,13 +336,44 @@ for (const desktop of [false, true]) {expect(topBounds?.height).toBe(28);expect(topBounds?.width).toBe((await sidebar.boundingBox())?.width);await expect(topRow).toHaveCSS('border-bottom-width', '0px');- await expect(sidebar).toHaveCSS('border-right-width', '1px');+ await expect(sidebar).toHaveCSS('border-right-width', '0px');+ await expect(page.getByRole('separator', { name: 'Resize sidebar' })).toHaveCSS('border-right-width', '1px');const brandMark = brand.locator('img');const brandMarkBounds = await brandMark.boundingBox();expect(brandMarkBounds?.x).toBeCloseTo((await sidebar.boundingBox())!.x + 16, 0);expect(brandMarkBounds?.y).toBeCloseTo(topBounds!.y + topBounds!.height + 16, 0);// There is no whole-window empty chrome added to the home page.await expect(page.locator('[data-desktop-window-chrome]')).toHaveCount(0);++ // A maximized floating app starts below the native clearance. The edge+ // remains above the native safe strip, but the WindowLayer owns the same+ // x-coordinate from Hn downward and receives the hit there.+ const launcher = page.locator('[data-show-page-dock-drop-target] > button');+ await launcher.hover();+ const library = page.getByRole('menu').getByRole('button', { name: 'App Library', exact: true });+ await expect(library).toBeVisible();+ await library.click();+ const appWindow = page.locator('[data-window-id][aria-label="App Library"]');+ await expect(appWindow).toBeVisible();+ await appWindow.getByRole('button', { name: 'Maximize', exact: true }).click();+ await expect(appWindow).toHaveCSS('border-radius', '0px');+ await expect.poll(async () => {+ const box = (await appWindow.boundingBox())!;+ return {+ x: Math.round(box.x),+ y: Math.round(box.y),+ width: Math.round(box.width),+ height: Math.round(box.height),+ };+ }).toEqual({ x: 0, y: 28, width: 1200, height: 772 });+ const edgeX = (await page.getByRole('separator', { name: 'Resize sidebar' }).boundingBox())!.x + 7.5;+ expect(await page.evaluate((x) => ({+ nativeChrome: document.elementFromPoint(x, 20)?.closest('[data-sidebar-resizer]') !== null,+ workbench: document.elementFromPoint(x, 40)?.closest('[data-window-id]') !== null,+ appWindow: document.elementFromPoint(x, 60)?.closest('[data-window-id]') !== null,+ }), edgeX)).toEqual({ nativeChrome: true, workbench: true, appWindow: true });+ await appWindow.getByRole('button', { name: 'Close', exact: true }).click();+ await expect(appWindow).toHaveCount(0);} else {await expect(sidebar.locator('[data-tauri-drag-region]')).toHaveCount(0);expect(chatSidebar.brand!.y).toBe(10);diff --git a/ui/e2e/workbench-general/sidebar-resize.spec.ts b/ui/e2e/workbench-general/sidebar-resize.spec.tsindex 65a6d2a68..50d65cd1f 100644--- a/ui/e2e/workbench-general/sidebar-resize.spec.ts+++ b/ui/e2e/workbench-general/sidebar-resize.spec.ts@@ -48,16 +48,6 @@ const dragEdge = async (page: Page, ...offsets: number[]) => {await page.mouse.up();};-/** What `var(--cyan)` actually computes to in this theme. */-const cyanOf = (page: Page) => page.evaluate(() => {- const probe = document.createElement('span');- probe.style.color = 'var(--cyan)';- document.body.append(probe);- const value = getComputedStyle(probe).color;- probe.remove();- return value;-});-const TRANSPARENT = 'rgba(0, 0, 0, 0)';/** The line's colour once its own transition has settled on it. */@@ -121,13 +111,17 @@ test.describe('sidebar resizing', () => {expect(denied).toEqual([]);});- test('recolors the divider and nothing else', async ({ page }) => {+ for (const theme of ['light', 'dark'] as const) {+ test(`recolors the divider and nothing else (${theme})`, async ({ page }) => {const denied = await serveProduct(page);await page.setViewportSize(DESKTOP);- await open(page, '/');+ await open(page, '/agents', { theme });+ const agents = page.getByRole('link', { name: 'Agents', exact: true });+ await expect(agents).toBeVisible();+ const agentsBorder = await agents.evaluate((element) => getComputedStyle(element).borderRightColor);+ await open(page, '/', { theme });await expect(page.locator(SIDEBAR)).toBeVisible();- const cyan = await cyanOf(page);const sidebarBorder = () => page.locator(SIDEBAR).evaluate((node) => getComputedStyle(node).borderRightColor,);@@ -150,7 +144,7 @@ test.describe('sidebar resizing', () => {expect(strip.x + strip.width).toBe(MIN);await page.locator(SEPARATOR).hover();- await expectEdgeLine(page, cyan);+ await expectEdgeLine(page, agentsBorder);// Still only a line: no box, no ornament, no width change.expect(await edgeStyle(page)).toMatchObject({cursor: 'col-resize',@@ -171,7 +165,7 @@ test.describe('sidebar resizing', () => {await page.mouse.move(startX, startY);await page.mouse.down();await page.mouse.move(startX + 500, startY + 300, { steps: 8 });- await expectEdgeLine(page, cyan);+ await expectEdgeLine(page, agentsBorder);await page.mouse.up();await page.mouse.move(startX + 500, startY + 300);await expectEdgeLine(page, TRANSPARENT);@@ -187,10 +181,11 @@ test.describe('sidebar resizing', () => {expect(await page.locator(SEPARATOR).evaluate((node) => [node === document.activeElement, node.matches(':focus-visible'),])).toEqual([true, true]);- await expectEdgeLine(page, cyan);+ await expectEdgeLine(page, agentsBorder);expect(denied).toEqual([]);});+ }test('adjusts the real layout from the keyboard within the same bounds', async ({ page }) => {const denied = await serveProduct(page);diff --git a/ui/src/components/AppShell.tsx b/ui/src/components/AppShell.tsxindex 48a5db304..87ffe8ebf 100644--- a/ui/src/components/AppShell.tsx+++ b/ui/src/components/AppShell.tsx@@ -534,14 +534,15 @@ export const AppShell: React.FC = () => {aria-hidden={settingsCoversSidebar || undefined}inert={settingsCoversSidebar || undefined}className={clsx(- 'fixed inset-y-0 left-0 z-10 hidden w-[var(--app-sidebar-w)] flex-col justify-between gap-6 border-r border-border bg-[var(--sidebar-background)] px-4 pb-4 md:flex',+ 'fixed inset-y-0 left-0 z-10 hidden w-[var(--app-sidebar-w)] flex-col justify-between gap-6 bg-[var(--sidebar-background)] px-4 pb-4 md:flex',+ desktopDragRegion() === undefined && 'border-r border-border',desktopDragRegion() !== undefined? 'pt-[calc(1rem+var(--shell-titlebar-inset))]': 'pt-[calc(0.625rem+var(--shell-titlebar-inset))]',settingsCoversSidebar && 'invisible pointer-events-none',)}>- <DesktopDragRegion className="absolute left-0 -right-px top-0 bg-[var(--sidebar-background)]" />+ <DesktopDragRegion className="absolute inset-x-0 top-0 bg-[var(--sidebar-background)]" /><div className="flex min-h-0 flex-1 flex-col">{isDesktop && (<RouteSurfaceActivityBoundary active={!settingsCoversSidebar}>@@ -617,9 +618,14 @@ export const AppShell: React.FC = () => {Desktop-only like the tree above it: below md the shell has no sidebaredge to drag, and unmounting here is what ends a gesture that was livewhen the viewport crossed the breakpoint. */}- {isDesktop && <SidebarResizer />}+ {isDesktop && desktopDragRegion() === undefined && <SidebarResizer />}</aside>)}+ {/* One native resize edge owns both neutral and active paint above chrome.+ Keep it mounted while Settings hides the sidebar to retain its width. */}+ {!chromeless && isDesktop && desktopDragRegion() !== undefined && (+ <SidebarResizer nativeChrome hidden={settingsCoversSidebar} elevated={settingsOpen} />+ )}{/* Chat and Search are fixed full-screen surfaces with their own headerbars, so the brand header is hidden there (otherwise it would sitdiff --git a/ui/src/components/DesktopWindowChrome.tsx b/ui/src/components/DesktopWindowChrome.tsxindex 25e0ef5dc..eb0d97db8 100644--- a/ui/src/components/DesktopWindowChrome.tsx+++ b/ui/src/components/DesktopWindowChrome.tsx@@ -2,7 +2,18 @@ import { useState, type ReactNode } from 'react';import { DesktopWindowChromeContext } from '../context/DesktopWindowChromeContext';import { desktopDragRegion } from '../lib/desktopShell';-/** A window-level home for the existing chat toolbar, beside native traffic lights. */+/**+ * A window-level home for the existing chat toolbar, beside native traffic lights.+ *+ * Native chrome stacking contract:+ *+ * | region | boundary | precedence |+ * | safe strip | y < Hn (`--shell-titlebar-inset`) | native chrome / resizer |+ * | workbench | y >= Hn | WindowLayer (z-20) > toolbar (z-18) |+ *+ * Ht (`--desktop-chat-toolbar-h`, 48px) remains the toolbar's layout height.+ * It must not become the WindowLayer safety boundary.+ */export function DesktopWindowChrome({ enabled, hidden, children }: {enabled: boolean;hidden: boolean;@@ -16,7 +27,7 @@ export function DesktopWindowChrome({ enabled, hidden, children }: {data-desktop-window-chrome=""hidden={hidden}inert={hidden || undefined}- className="fixed inset-x-0 top-0 z-30 h-[var(--shell-titlebar-inset)]"+ className="fixed inset-x-0 top-0 z-[18] h-[var(--desktop-chat-toolbar-h)]">{/* Native traffic lights occupy the left of the sidebar; its remainingwidth is a drag target. No transparent overlay covers controls. */}diff --git a/ui/src/components/SidebarResizer.tsx b/ui/src/components/SidebarResizer.tsxindex e006856b4..a30b34b8b 100644--- a/ui/src/components/SidebarResizer.tsx+++ b/ui/src/components/SidebarResizer.tsx@@ -37,17 +37,27 @@ type Gesture = {};/**- * The sidebar's right divider, made draggable. It draws no handle of its own:- * the strip is an invisible grab area whose right border lands on the sidebar's- * own 1px divider, so hover, keyboard focus and an active drag recolor that one- * line and nothing else.+ * The sidebar's right divider, made draggable. On native macOS the strip owns+ * the neutral line too and sits outside the aside's stacking context. Its+ * existing hover/focus/gesture states color one border from top to bottom.+ * The native strip is split at the native safe boundary so floating app windows+ * stay above the resize edge in the workbench while the edge still clears the+ * native chrome above it. Both segments share this component's gesture and+ * visual state; Web keeps one strip over the aside's own divider.*/-export const SidebarResizer = () => {+export const SidebarResizer = ({ nativeChrome = false, hidden = false, elevated = false }: {+ nativeChrome?: boolean;+ hidden?: boolean;+ elevated?: boolean;+}) => {const { t } = useTranslation();const [width, setWidth] = useState(readWidth);const [maxWidth, setMaxWidth] = useState(() => maxSidebarWidth(currentViewportWidth()));const [dragging, setDragging] = useState(false);+ const [hovered, setHovered] = useState(false);+ const [focused, setFocused] = useState(false);const gesture = useRef<Gesture | null>(null);+ const highlighted = dragging || hovered || focused;const apply = useCallback((next: number) => {const clamped = clampWidth(next);@@ -112,6 +122,15 @@ export const SidebarResizer = () => {document.body.style.userSelect = 'none';};+ const onPointerEnter = () => setHovered(true);++ const onPointerLeave = () => {+ if (!gesture.current) setHovered(false);+ };++ const onFocus = () => setFocused(true);+ const onBlur = () => setFocused(false);+const onPointerMove = (event: React.PointerEvent<HTMLDivElement>) => {const active = gesture.current;if (!active || active.pointerId !== event.pointerId) return;@@ -131,35 +150,82 @@ export const SidebarResizer = () => {apply(next);};+ const commonProps = {+ hidden,+ 'aria-valuenow': width,+ 'aria-valuemin': MIN_SIDEBAR_WIDTH,+ 'aria-valuemax': maxWidth,+ 'data-dragging': dragging || undefined,+ 'data-settings-interaction-owner': nativeChrome || undefined,+ onPointerDown,+ onPointerMove,+ onPointerUp: endGesture,+ onPointerCancel: endGesture,+ onLostPointerCapture: endGesture,+ onPointerEnter,+ onPointerLeave,+ onFocus,+ onBlur,+ onKeyDown,+ };++ const commonClass = clsx(+ 'w-2 cursor-col-resize touch-none border-r outline-none transition-colors',+ 'hover:border-mint/30 focus-visible:border-mint/30',+ highlighted && 'border-mint/30',+ );++ if (!nativeChrome) {+ return (+ <div+ {...commonProps}+ role="separator"+ aria-orientation="vertical"+ aria-label={t('appShell.resizeSidebar')}+ tabIndex={0}+ // Read by the Settings overlay, which is dismissed by an interaction+ // outside itself and would otherwise close the moment this edge — which+ // its own left edge follows — was grabbed.+ data-sidebar-resizer="true"+ // `touch-none` is load-bearing wherever a touchscreen reports the desktop+ // breakpoint — a tablet in landscape, a convertible laptop. Pointer capture+ // does not win the browser's touch-action negotiation, so with the default+ // the native pan claims the finger and cancels the drag part-way.+ className={clsx(commonClass, 'absolute inset-y-0 -right-px z-10 border-transparent')}+ />+ );+ }++ // The top segment clears the native chrome through Hn. The lower segment+ // normally stays below WindowLayer (z-20), so a floating app window can cover+ // both its paint and its hit strip once it crosses the sidebar boundary.+ // Settings raises it temporarily while the WindowLayer is hidden, preserving+ // the existing inline-settings resize interaction.return (- <div- role="separator"- aria-orientation="vertical"- aria-label={t('appShell.resizeSidebar')}- aria-valuenow={width}- aria-valuemin={MIN_SIDEBAR_WIDTH}- aria-valuemax={maxWidth}- tabIndex={0}- // Read by the Settings overlay, which is dismissed by an interaction- // outside itself and would otherwise close the moment this edge — which- // its own left edge follows — was grabbed.- data-sidebar-resizer="true"- data-dragging={dragging || undefined}- onPointerDown={onPointerDown}- onPointerMove={onPointerMove}- onPointerUp={endGesture}- onPointerCancel={endGesture}- onLostPointerCapture={endGesture}- onKeyDown={onKeyDown}- // `touch-none` is load-bearing wherever a touchscreen reports the desktop- // breakpoint — a tablet in landscape, a convertible laptop. Pointer capture- // does not win the browser's touch-action negotiation, so with the default- // the native pan claims the finger and cancels the drag part-way.- className={clsx(- 'absolute inset-y-0 -right-px z-10 w-2 cursor-col-resize touch-none border-r border-transparent outline-none transition-colors',- 'hover:border-cyan focus-visible:border-cyan',- dragging && 'border-cyan',- )}- />+ <>+ <div+ {...commonProps}+ role="separator"+ aria-orientation="vertical"+ aria-label={t('appShell.resizeSidebar')}+ tabIndex={0}+ data-sidebar-resizer="true"+ className={clsx(+ commonClass,+ 'fixed left-[calc(var(--app-sidebar-w)-8px)] top-0 z-[31] h-[var(--shell-titlebar-inset)] border-border',+ )}+ />+ <div+ {...commonProps}+ aria-hidden="true"+ data-sidebar-resizer-content="true"+ tabIndex={-1}+ className={clsx(+ commonClass,+ 'fixed bottom-0 left-[calc(var(--app-sidebar-w)-8px)] top-[var(--shell-titlebar-inset)] border-border',+ elevated ? 'z-[31]' : 'z-[19]',+ )}+ />+ </>);};diff --git a/ui/src/components/workbench/ChatPage.tsx b/ui/src/components/workbench/ChatPage.tsxindex c0bbd6fc5..c4f13b665 100644--- a/ui/src/components/workbench/ChatPage.tsx+++ b/ui/src/components/workbench/ChatPage.tsx@@ -2911,7 +2911,7 @@ export const ChatPage: React.FC = () => {there). */}<divref={chatSurfaceRef}- style={windowChrome ? { paddingTop: 'var(--shell-titlebar-inset)' } : undefined}+ style={windowChrome ? { paddingTop: 'var(--desktop-chat-toolbar-h)' } : undefined}className="fixed inset-x-0 bottom-0 top-[var(--macos-stale-login-session-notice-h,0px)] z-40 flex flex-col bg-background pt-[env(safe-area-inset-top)] md:relative md:inset-auto md:z-auto md:-mx-10 md:-my-8 md:h-[var(--app-vvh)] md:bg-transparent md:pt-0"onKeyDown={annotation.handleShortcutKeyDown}onPointerDownCapture={focusCanvas}@@ -3808,7 +3808,8 @@ export const ChatHeaderBar: React.FC<ChatHeaderBarProps> = ({ session, agents, d// flagged (regression feedback #1/#3).<div data-chat-header="" data-tauri-drag-region={desktopDragRegion()} className={clsx('shrink-0 px-4 md:px-8',- windowChrome ? 'h-full' : 'border-b border-border bg-surface/70 py-2.5 backdrop-blur',+ 'border-b border-border bg-surface/70 py-2.5 backdrop-blur',+ windowChrome && 'h-full',)}><div data-tauri-drag-region={desktopDragRegion()} className={clsx('mx-auto flex w-full max-w-[1080px] items-center gap-3',diff --git a/ui/src/index.css b/ui/src/index.cssindex 5c8bf72ca..132acde7f 100644--- a/ui/src/index.css+++ b/ui/src/index.css@@ -44,6 +44,9 @@viewport pads its own top by this, so nothing interactive sits in the strip. */:root {--shell-titlebar-inset: 0px;+ /* macOS chat keeps the established 48px toolbar while the native shell+ clearance stays independently controlled by --shell-titlebar-inset. */+ --desktop-chat-toolbar-h: 48px;}/* Width of the desktop shell sidebar. The sidebar itself, every md+ content