From 591bd6bb4610be9bc07cf478774f186434861098 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Tue, 17 Mar 2026 15:09:24 +0530 Subject: [PATCH] feat: enhance TooltipIconButton to conditionally disable tooltips --- surfsense_web/components/assistant-ui/thread.tsx | 1 + .../components/assistant-ui/tooltip-icon-button.tsx | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/surfsense_web/components/assistant-ui/thread.tsx b/surfsense_web/components/assistant-ui/thread.tsx index c0139c1b7..904ee8c8b 100644 --- a/surfsense_web/components/assistant-ui/thread.tsx +++ b/surfsense_web/components/assistant-ui/thread.tsx @@ -713,6 +713,7 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false & { tooltip: ReactNode; side?: "top" | "bottom" | "left" | "right"; + disableTooltip?: boolean; }; export const TooltipIconButton = forwardRef( - ({ children, tooltip, side = "bottom", className, ...rest }, ref) => { + ({ children, tooltip, side = "bottom", className, disableTooltip, ...rest }, ref) => { + const isTouchDevice = useMediaQuery("(pointer: coarse)"); + const suppressTooltip = disableTooltip || isTouchDevice; + return ( - +