From a7b455aeac7562cf3ddc9e225bd33cc3db245b7a Mon Sep 17 00:00:00 2001 From: Haileyesus <118998054+blackmammoth@users.noreply.github.com> Date: Tue, 30 Jun 2026 00:13:02 +0300 Subject: [PATCH] style(mcp): remove purple accents and portal the server form modal - Replace the purple provider-button colors, heading icon, and form submit button with the primary token (no purple in the MCP UI) - Portal the add/edit MCP server modal to document.body so its fixed overlay covers the full viewport, fixing the white band at the top caused by the Settings dialog's transformed tab content becoming the containing block --- src/components/mcp/constants.ts | 10 +++++----- src/components/mcp/view/McpServers.tsx | 2 +- src/components/mcp/view/modals/McpServerFormModal.tsx | 10 ++++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/components/mcp/constants.ts b/src/components/mcp/constants.ts index ab6396ff..2e23c5cb 100644 --- a/src/components/mcp/constants.ts +++ b/src/components/mcp/constants.ts @@ -29,11 +29,11 @@ export const MCP_GLOBAL_SUPPORTED_SCOPES: McpScope[] = ['user', 'project']; export const MCP_GLOBAL_SUPPORTED_TRANSPORTS: McpTransport[] = ['stdio', 'http']; export const MCP_PROVIDER_BUTTON_CLASSES: Record = { - claude: 'bg-purple-600 text-white hover:bg-purple-700', - cursor: 'bg-purple-600 text-white hover:bg-purple-700', - codex: 'bg-gray-800 text-white hover:bg-gray-900 dark:bg-gray-700 dark:hover:bg-gray-600', - gemini: 'bg-blue-600 text-white hover:bg-blue-700', - opencode: 'bg-zinc-900 text-white hover:bg-zinc-800 dark:bg-zinc-700 dark:hover:bg-zinc-600', + claude: 'bg-primary text-primary-foreground hover:bg-primary/90', + cursor: 'bg-primary text-primary-foreground hover:bg-primary/90', + codex: 'bg-primary text-primary-foreground hover:bg-primary/90', + gemini: 'bg-primary text-primary-foreground hover:bg-primary/90', + opencode: 'bg-primary text-primary-foreground hover:bg-primary/90', }; export const MCP_SUPPORTS_WORKING_DIRECTORY: Record = { diff --git a/src/components/mcp/view/McpServers.tsx b/src/components/mcp/view/McpServers.tsx index a77117fe..9e15deeb 100644 --- a/src/components/mcp/view/McpServers.tsx +++ b/src/components/mcp/view/McpServers.tsx @@ -135,7 +135,7 @@ export default function McpServers({ selectedProvider, currentProjects }: McpSer return (
- +

{t('mcpServers.title')}

{description}

diff --git a/src/components/mcp/view/modals/McpServerFormModal.tsx b/src/components/mcp/view/modals/McpServerFormModal.tsx index afffa512..8ce76e9d 100644 --- a/src/components/mcp/view/modals/McpServerFormModal.tsx +++ b/src/components/mcp/view/modals/McpServerFormModal.tsx @@ -1,4 +1,5 @@ import { FolderOpen, Globe, X } from 'lucide-react'; +import { createPortal } from 'react-dom'; import { useTranslation } from 'react-i18next'; import { Button, Input } from '../../../../shared/view/ui'; @@ -119,8 +120,8 @@ export default function McpServerFormModal({ const supportsWorkingDirectory = !isGlobalMode && MCP_SUPPORTS_WORKING_DIRECTORY[provider]; const showCodexOnlyFields = provider === 'codex' && !isGlobalMode; - return ( -
+ return createPortal( +

{modalTitle}

@@ -418,7 +419,7 @@ export default function McpServerFormModal({
-
+
, + document.body, ); }