From 01fc8fc3e6ed8ee09953c24101dc31bf489c0219 Mon Sep 17 00:00:00 2001 From: ciregenz Date: Fri, 14 Aug 2026 21:06:34 -0700 Subject: [PATCH] [eric] canvas: the space reserved above a collapsed pill stops answering clicks, so empty canvas no longer drags the card --- frontend/src/app/pages/Dashboard/cards/AgentCard.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx b/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx index ac2cbd9c..e4fe1eb9 100644 --- a/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx +++ b/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx @@ -1042,7 +1042,16 @@ const AgentCard: React.FC = ({ onPointerMove={handleDragPointerMove} onPointerUp={handleDragPointerUp} className="osw-pill-host" - sx={{ position: 'relative', touchAction: 'none', userSelect: 'none', pt: '50px', mt: '-50px', '&:hover .osw-pill-lights': { opacity: 1, pointerEvents: 'auto' } }} + // The 50px reserved above the capsule is for the hover chip to live in, NOT a grab zone: + // without pointerEvents none the empty band would answer clicks and drag the pill from + // half a card away. Children opt back in, and their events still bubble to the drag + // handlers here, so grabbing the capsule itself works exactly as before. + sx={{ + position: 'relative', touchAction: 'none', userSelect: 'none', + pt: '50px', mt: '-50px', pointerEvents: 'none', + '& > *': { pointerEvents: 'auto' }, + '&:hover .osw-pill-lights': { opacity: 1, pointerEvents: 'auto' }, + }} > {/* Fully above the capsule: at top -8 the 40px round chip hid behind the ~34px pill and hover revealed only its crown, which read as a deformed corner plus a stray shadow (Eric, 2026-08-14). No osw-card class: wearing it dressed this chip in card selection/shadow chrome. */}