From 08d04d39f3be34407cb2d1698a9db51bc884b254 Mon Sep 17 00:00:00 2001 From: ciregenz Date: Mon, 10 Aug 2026 21:30:48 -0700 Subject: [PATCH] [eric] tool-ui: a press on an ask button in the collapsed pill reaches it, drag-capture no longer eats the click (ENG-232) --- frontend/src/app/pages/Dashboard/cards/AgentCard.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx b/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx index 1be5fb88..0269fd83 100644 --- a/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx +++ b/frontend/src/app/pages/Dashboard/cards/AgentCard.tsx @@ -461,6 +461,15 @@ const AgentCard: React.FC = ({ const handleDragPointerDown = useCallback((e: React.PointerEvent) => { if (e.button !== 0) return; + // A press on an interactive control (an AskUI option/Confirm/Send, a composer field, any + // button/input) must reach that control. Without this the pill-host's pointer capture ate the + // click, so a live question in the collapsed pill looked dead until you expanded the card (ENG-232). + let ctrl = e.target as HTMLElement | null; + while (ctrl && ctrl !== e.currentTarget) { + const tag = ctrl.tagName; + if (tag === 'BUTTON' || tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || ctrl.isContentEditable || ctrl.getAttribute('role') === 'button') return; + ctrl = ctrl.parentElement; + } // A fullscreen window has no drag (macOS rule); arming the machinery here let a title wiggle // untile the card mid-click and a plain click wipe tiledGeometry's camera transform, which is // the "fullscreen shifted left with the traffic lights cut off" bug.