From 4804e232d9a3ab3d66c8ef049e03b4f5438f8388 Mon Sep 17 00:00:00 2001 From: ciregenz Date: Sun, 9 Aug 2026 14:47:31 -0700 Subject: [PATCH] [eric] canvas: NOTHING drags in fullscreen (untileForDrag chokepoint + guards on app and window cards; exit is the pill, green dot, or Escape) --- frontend/src/app/pages/Dashboard/cards/CanvasWindowCard.tsx | 2 ++ frontend/src/app/pages/Dashboard/cards/DashboardViewCard.tsx | 2 ++ frontend/src/app/pages/Dashboard/cards/useCardTiling.ts | 2 ++ 3 files changed, 6 insertions(+) diff --git a/frontend/src/app/pages/Dashboard/cards/CanvasWindowCard.tsx b/frontend/src/app/pages/Dashboard/cards/CanvasWindowCard.tsx index 20e32341..f55f0260 100644 --- a/frontend/src/app/pages/Dashboard/cards/CanvasWindowCard.tsx +++ b/frontend/src/app/pages/Dashboard/cards/CanvasWindowCard.tsx @@ -85,6 +85,8 @@ const CanvasWindowCard: React.FC = ({ const onHeaderPointerDown = useCallback((e: React.PointerEvent) => { if (e.button !== 0) return; + // Fullscreen has no drag (macOS rule); same guard as AgentCard/BrowserCard. + if (tiling.zone === 'fullscreen') return; const target = e.target as HTMLElement; if (target.closest('[data-no-drag], button, [role="button"], input, textarea, select')) return; e.preventDefault(); diff --git a/frontend/src/app/pages/Dashboard/cards/DashboardViewCard.tsx b/frontend/src/app/pages/Dashboard/cards/DashboardViewCard.tsx index a3b39b2c..0057300e 100644 --- a/frontend/src/app/pages/Dashboard/cards/DashboardViewCard.tsx +++ b/frontend/src/app/pages/Dashboard/cards/DashboardViewCard.tsx @@ -396,6 +396,8 @@ const DashboardViewCard: React.FC = ({ const handleDragPointerDown = useCallback((e: React.PointerEvent) => { if (e.button !== 0) return; + // Fullscreen has no drag (macOS rule); same guard as AgentCard/BrowserCard. + if (tiling.zone === 'fullscreen') return; e.preventDefault(); e.stopPropagation(); const cs = getCanvasState(); diff --git a/frontend/src/app/pages/Dashboard/cards/useCardTiling.ts b/frontend/src/app/pages/Dashboard/cards/useCardTiling.ts index 705d3158..7bc3b6c6 100644 --- a/frontend/src/app/pages/Dashboard/cards/useCardTiling.ts +++ b/frontend/src/app/pages/Dashboard/cards/useCardTiling.ts @@ -70,6 +70,8 @@ export function useCardTiling({ cardId, getCanvasState, commitPosition }: CardTi }, [tiledFrame, dispatch, cardId]); const untileForDrag = useCallback((clientX: number, clientY: number, preTileWidth: number): { x: number; y: number } | null => { + // Fullscreen never drag-untiles (macOS rule; also every card's own drag guard): exiting is the pill/green dot/Escape, never a stray header wiggle. + if (zone === 'fullscreen') return null; const frame = tiledFrame(); if (!frame) return null; const cam = getCanvasState();