From 69e534c45724df4e4496a599b05d921f616a3547 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Tue, 16 Jun 2026 14:46:55 +0300 Subject: [PATCH] refactor: fixed mobile session button for android Replaces custom pointer-capture touch logic with touch-action: manipulation Aligns with the pattern used across other mobile surfaces --- .../components/chat/MobileSessionStatusBar.tsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/ui/src/components/chat/MobileSessionStatusBar.tsx b/packages/ui/src/components/chat/MobileSessionStatusBar.tsx index b910d0d6..32baad4a 100644 --- a/packages/ui/src/components/chat/MobileSessionStatusBar.tsx +++ b/packages/ui/src/components/chat/MobileSessionStatusBar.tsx @@ -418,7 +418,6 @@ export const MobileSessionPanelTrigger: React.FC const isMobile = useUIStore((state) => state.isMobile); const open = useUIStore((state) => state.mobileSessionPanelOpen); const setOpen = useUIStore((state) => state.setMobileSessionPanelOpen); - const handledTouchRef = React.useRef(false); // Ensure the cross-project session list is loaded once, so the panel reflects // every project, not just the active directory. @@ -440,21 +439,8 @@ export const MobileSessionPanelTrigger: React.FC 'rounded-md relative hover:bg-[var(--interactive-hover)]', open && 'text-[var(--primary-base)]' )} - onPointerDownCapture={(event) => { - if (event.pointerType === 'touch') { - event.preventDefault(); - event.stopPropagation(); - handledTouchRef.current = true; - setOpen(!open); - } - }} - onClick={() => { - if (handledTouchRef.current) { - handledTouchRef.current = false; - return; - } - setOpen(!open); - }} + style={{ touchAction: 'manipulation' }} + onClick={() => setOpen(!open)} title={t('mobile.sessions.search.section.sessions')} aria-label={t('mobile.sessions.search.section.sessions')} aria-expanded={open}