From e89e514fcb3ec0be1f9d512f0dd42dee0e66afa5 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 4 Feb 2026 15:22:32 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=B1=20fix:=20Mention=20Touch=20UX=20an?= =?UTF-8?q?d=20MCP=20Tool=20UI=20Consistency=20(#11627)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: Reorganize imports in MCPTools component - Updated import statements in MCPTools.tsx for improved clarity and maintainability. - Moved `useAgentPanelContext` import above others and adjusted the order of `PermissionTypes` and `Permissions` imports to enhance readability. * chore: imports * refactor: Update MCPToolItem component props and styles - Added new props: onToggleDefer, onToggleSelect, and onToggleProgrammatic for improved functionality. - Adjusted class names for DropdownMenuLabel and text spans to enhance visual consistency and clarity. - Increased width of DropdownMenuContent for better layout. * refactor: Update DropdownMenu styles for improved visual consistency - Changed background color of DropdownMenuContent and DropdownMenuSubContent from secondary to primary for better alignment with design standards. - Updated text color to ensure readability against the new background, enhancing overall user experience. * refactor: Update Mention component styles and interaction handling - Increased ROW_HEIGHT in Mention and PromptsCommand components for improved layout consistency. - Enhanced MentionItem component with touch event handling to improve mobile interaction experience. - Updated button styles to ensure better visual alignment and responsiveness. * refactor: Enhance MentionItem component event handling and button attributes - Updated the onClick prop type in MentionItem to support both mouse and touch events, improving mobile interaction. - Added a button type attribute for better accessibility and compliance with HTML standards. - Refined event handling to ensure consistent behavior across different input methods. * refactor: Add button type attribute to MentionItem for improved accessibility - Added a type="button" attribute to the MentionItem component to enhance accessibility and compliance with HTML standards. - This change ensures better interaction behavior across different input methods. * refactor: Simplify MentionItem event handling for improved clarity - Removed touch event handling from the MentionItem component, streamlining the onClick prop to only accept mouse events. - This change simplifies the interaction logic, enhancing maintainability while retaining functionality for mouse interactions. --- client/src/components/Chat/Input/Mention.tsx | 2 +- client/src/components/Chat/Input/MentionItem.tsx | 7 ++++--- .../src/components/Chat/Input/PromptsCommand.tsx | 4 ++-- .../components/SidePanel/Agents/MCPToolItem.tsx | 14 +++++++------- .../src/components/SidePanel/Agents/MCPTools.tsx | 4 ++-- packages/client/src/components/DropdownMenu.tsx | 4 ++-- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/client/src/components/Chat/Input/Mention.tsx b/client/src/components/Chat/Input/Mention.tsx index 2defcc7623..9e56068def 100644 --- a/client/src/components/Chat/Input/Mention.tsx +++ b/client/src/components/Chat/Input/Mention.tsx @@ -12,7 +12,7 @@ import useMentions from '~/hooks/Input/useMentions'; import { removeCharIfLast } from '~/utils'; import MentionItem from './MentionItem'; -const ROW_HEIGHT = 40; +const ROW_HEIGHT = 44; export default function Mention({ conversation, diff --git a/client/src/components/Chat/Input/MentionItem.tsx b/client/src/components/Chat/Input/MentionItem.tsx index fcfb22c312..6c978240ee 100644 --- a/client/src/components/Chat/Input/MentionItem.tsx +++ b/client/src/components/Chat/Input/MentionItem.tsx @@ -25,15 +25,16 @@ export default function MentionItem({ }: MentionItemProps) { return (