From b6252df401b8da30a80d7cc632f17d8f09092b64 Mon Sep 17 00:00:00 2001 From: abccodes Date: Tue, 16 Jun 2026 17:41:32 -0700 Subject: [PATCH] [aidan] bug: fix schedule button --- frontend/src/app/pages/Dashboard/DashboardToolbar.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/pages/Dashboard/DashboardToolbar.tsx b/frontend/src/app/pages/Dashboard/DashboardToolbar.tsx index a1ec9173..b6a5a30d 100644 --- a/frontend/src/app/pages/Dashboard/DashboardToolbar.tsx +++ b/frontend/src/app/pages/Dashboard/DashboardToolbar.tsx @@ -343,7 +343,12 @@ const DashboardToolbar = React.forwardRef( if (Math.abs(dx) > DRAG_THRESHOLD || Math.abs(dy) > DRAG_THRESHOLD) return; const el = target instanceof Element ? target : (target as Node).parentElement; - if (el?.closest('[role="dialog"], [role="presentation"], .MuiModal-root, .MuiPopover-root')) { + // The New Chat / Schedule pill row renders OUTSIDE containerRef, so a + // pill click counts as "outside" and used to fire handleDismiss on + // mouseup. That closed the composer (inputOpen=false), which unmounted + // the pill row before its click landed, so Schedule's onClick never ran + // ("Schedule does nothing"). Exempt the pills; they own their own onClick. + if (el?.closest('[role="dialog"], [role="presentation"], .MuiModal-root, .MuiPopover-root, [data-toolbar-pills]')) { return; } if (elementSelection?.selectMode && el?.closest('[data-select-type]')) { @@ -418,7 +423,7 @@ const DashboardToolbar = React.forwardRef( // Image #54: paired mode pills above the composer/popover. // The two states are mutually exclusive: opening one closes the // other so the body underneath only renders one thing at a time. - + { if (historyOpen) {