Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(shell): make WindowDragBar absolutely positioned to avoid content inset

Steven Enamakel3006f2688542
diff --git a/app/src/components/layout/shell/RootShellLayout.tsx b/app/src/components/layout/shell/RootShellLayout.tsx
index a381db4ca1..733ebfe651 100644
--- a/app/src/components/layout/shell/RootShellLayout.tsx
+++ b/app/src/components/layout/shell/RootShellLayout.tsx
@@ -254,10 +254,9 @@ export default function RootShellLayout({ sidebar, children, unframed }: RootShe
<div
className="relative flex min-w-0 flex-1 flex-col overflow-hidden"
data-testid="root-shell-content">
- {/* macOS overlay-title-bar band, in flow ABOVE the content card so the
- traffic lights land on bare chrome instead of on the card. No-op off
- macOS / outside Tauri, where the native title bar already owns that
- band and reserving one would just waste 28px. */}
+ {/* macOS overlay-title-bar drag region. It is absolutely positioned, so
+ the routed surface keeps its full height. No-op off macOS / outside
+ Tauri, where the native title bar already owns this area. */}
<WindowDragBar />
<ContentSurface unframed={unframed}>{children}</ContentSurface>
</div>
diff --git a/app/src/components/layout/shell/WindowDragBar.test.tsx b/app/src/components/layout/shell/WindowDragBar.test.tsx
index b779c1b2a8..d2da4ee104 100644
--- a/app/src/components/layout/shell/WindowDragBar.test.tsx
+++ b/app/src/components/layout/shell/WindowDragBar.test.tsx
@@ -23,6 +23,7 @@ describe('WindowDragBar', () => {
const bar = container.querySelector('[data-tauri-drag-region]');
expect(bar).not.toBeNull();
expect((bar as HTMLElement).style.height).toBe(`${WINDOW_DRAG_BAR_HEIGHT}px`);
+ expect((bar as HTMLElement).className).toContain('absolute');
});
it('renders nothing on macOS outside Tauri (plain browser)', () => {
diff --git a/app/src/components/layout/shell/WindowDragBar.tsx b/app/src/components/layout/shell/WindowDragBar.tsx
index 951090b4af..39c1b5e6f7 100644
--- a/app/src/components/layout/shell/WindowDragBar.tsx
+++ b/app/src/components/layout/shell/WindowDragBar.tsx
@@ -16,18 +16,9 @@ export const WINDOW_DRAG_BAR_HEIGHT = 28;
* webview captures the pointer events. We opt back in with a `data-tauri-drag-
* region` band.
*
- * Rendered **in flow** at the top of the content column ({@link
- * RootShellLayout}), above the inset {@link ContentSurface}. It reserves the
- * band the traffic lights occupy so they sit on bare window chrome rather than
- * on the content card.
- *
- * It used to be an absolutely-positioned overlay painted on top of the routed
- * view, because the content pane was edge-to-edge and any reserved inset would
- * have pushed full-bleed surfaces (the Tiny Place world canvas, the Chat
- * backdrop) down and revealed the app background above them. The two-layer
- * shell makes that moot: the card is inset by design, so an in-flow band is now
- * both simpler and correct — and it no longer steals pointer events from the
- * top ~28px of page content.
+ * Positioned over the top of the content column ({@link RootShellLayout}), so
+ * it does not reserve vertical space or add an inherited top inset to routed
+ * pages. The window controls overlay this same title-bar region.
*
* Native CEF provider webviews composite above all HTML and so can't be dragged
* through; that's a platform limit, not this band. The sidebar is intentionally
@@ -44,7 +35,7 @@ export default function WindowDragBar() {
<div
data-tauri-drag-region
aria-hidden="true"
- className="flex-none"
+ className="absolute inset-x-0 top-0 z-10"
style={{ height: WINDOW_DRAG_BAR_HEIGHT }}
/>
);