diff --git a/packages/app/src/components/desktop/titlebar-drag-region.tsx b/packages/app/src/components/desktop/titlebar-drag-region.tsx
index d930f7ab3..d51498a4b 100644
--- a/packages/app/src/components/desktop/titlebar-drag-region.tsx
+++ b/packages/app/src/components/desktop/titlebar-drag-region.tsx
@@ -1,228 +1,57 @@
-import type { ReactNode } from "react";
-import { useEffect, useRef, useState } from "react";
import { Platform } from "react-native";
import { getIsElectronRuntime } from "@/constants/layout";
-import { getDesktopWindow, updateDesktopWindowControls } from "@/desktop/electron/window";
-
-const DEFAULT_OVERLAY_HEIGHT = 29;
-const MAX_EFFECTIVE_TITLEBAR_HEIGHT = 48;
/**
- * VS Code-style titlebar drag region for Electron on Windows/Linux.
+ * VS Code-style titlebar drag region for Electron.
*
- * Architecture copied from VS Code at commit daa0a70:
- * - titlebarPart.ts:463-464 → dedicated absolute drag overlay element
- * - titlebarpart.css:57-64 → drag region styles
- * - titlebarpart.css:249-260 → top-edge resizer with no-drag, hidden in fullscreen
- * - electron-browser/titlebarPart.ts:205-206 → resizer appended to root container
+ * Copied from VS Code at commit daa0a70:
+ * - titlebarPart.ts:463-464 → prepend(container, $('div.titlebar-drag-region'))
+ * - titlebarpart.css:57-64 → position: absolute, full size, -webkit-app-region: drag
+ * - titlebarpart.css:249-260 → top-edge resizer, no-drag, 4px
*
- * This component renders two elements:
- * 1. A full-size absolute drag overlay with -webkit-app-region: drag
- * 2. A 4px top-edge resizer with -webkit-app-region: no-drag (hidden in fullscreen)
+ * VS Code's drag region is a static DOM element — no z-index, no pointer-events,
+ * no state, no event listeners. Interactive elements get no-drag from their own
+ * CSS (global backstop in index.html). The drag region never re-renders.
*
- * Both are positioned absolute within the parent container. Interactive children
- * of the parent sit above the drag overlay via normal stacking order.
- * The global no-drag reset in index.html remains only as a defensive backstop.
+ * The resizer is Windows/Linux only (titlebarpart.css:249 scopes to .windows/.linux).
+ * On macOS, Electron handles edge resize natively.
*/
-function useIsFullscreen(): boolean {
- const [isFullscreen, setIsFullscreen] = useState(false);
-
- useEffect(() => {
- if (Platform.OS !== "web" || !getIsElectronRuntime()) return;
-
- let disposed = false;
- let cleanup: (() => void) | undefined;
-
- async function setup() {
- const win = getDesktopWindow();
- if (!win) return;
-
- const fs = typeof win.isFullscreen === "function" ? await win.isFullscreen() : false;
- if (disposed) return;
- setIsFullscreen(fs);
-
- if (typeof win.onResized !== "function") return;
-
- const unlisten = await win.onResized(async () => {
- if (disposed) return;
- const fullscreen = typeof win.isFullscreen === "function" ? await win.isFullscreen() : false;
- if (disposed) return;
- setIsFullscreen(fullscreen);
- });
-
- cleanup = unlisten;
- if (disposed) cleanup?.();
- }
-
- void setup();
- return () => {
- disposed = true;
- cleanup?.();
- };
- }, []);
-
- return isFullscreen;
-}
-
/**
- * Renders the VS Code-style drag overlay and top-edge resizer.
- * Only renders on Electron Windows/Linux (non-mac). Returns null otherwise.
- *
- * Usage: Place as a child of any positioned container that should be draggable.
- * Interactive elements in the same container will sit above the drag overlay
- * via normal DOM stacking order (later siblings paint over earlier ones).
- * Place TitlebarDragRegion BEFORE interactive children in JSX.
+ * Static drag overlay and top-edge resizer. Returns null on non-Electron.
+ * Place as FIRST child of any positioned container that should be draggable.
*/
export function TitlebarDragRegion() {
if (Platform.OS !== "web" || !getIsElectronRuntime()) {
return null;
}
- return ;
-}
-
-/**
- * Explicit no-drag content layer above the drag overlay.
- * Matches VS Code's pattern of z-index: 2500 + -webkit-app-region: no-drag
- * on interactive containers within the titlebar (titlebarpart.css:141-143,
- * 231-233, 264-268, 288-298, 382-401).
- *
- * Wrap interactive children of any TitlebarDragRegion parent in this component
- * so the no-drag layering is structural, not dependent on the global CSS backstop.
- * On non-Electron or mac, renders children directly with no wrapper.
- */
-interface TitlebarNoDragContentProps {
- children: ReactNode;
- /** Layout direction for the no-drag wrapper. Default: "row" for header-style surfaces. */
- direction?: "row" | "column";
-}
-
-export function TitlebarNoDragContent({ children, direction = "row" }: TitlebarNoDragContentProps) {
- if (Platform.OS !== "web" || !getIsElectronRuntime()) {
- return <>{children}>;
- }
-
- return (
-