From d5dd15be7202c853e92e5f6848c377038b4c0466 Mon Sep 17 00:00:00 2001 From: elpresidank Date: Sun, 12 Apr 2026 00:59:20 -0500 Subject: [PATCH] feat: MCP Tools management UI with QA accessibility fixes Add dedicated /mcp-tools page for managing MCP servers and tools from the workbench. Includes CRUD dialogs, config API integration, and feature flag gating via mcpTools switch. QA pass also fixes accessibility across existing pages: aria-expanded on chat phase blocks, tabpanel tabindex on prompts, toggle contrast ratio (WCAG 2.1 SC 1.4.11) on settings. Co-Authored-By: Claude Opus 4.6 (1M context) --- ts/packages/workbench/src/App.tsx | 2 + .../src/components/layout/sidebar.tsx | 6 + .../workbench/src/hooks/use-mcp-config.ts | 209 ++++ ts/packages/workbench/src/pages/chat.tsx | 1 + ts/packages/workbench/src/pages/mcp-tools.tsx | 1012 +++++++++++++++++ ts/packages/workbench/src/pages/prompts.tsx | 4 +- ts/packages/workbench/src/pages/settings.tsx | 4 +- 7 files changed, 1234 insertions(+), 4 deletions(-) create mode 100644 ts/packages/workbench/src/hooks/use-mcp-config.ts create mode 100644 ts/packages/workbench/src/pages/mcp-tools.tsx diff --git a/ts/packages/workbench/src/App.tsx b/ts/packages/workbench/src/App.tsx index 950bccba..8035aa8f 100644 --- a/ts/packages/workbench/src/App.tsx +++ b/ts/packages/workbench/src/App.tsx @@ -8,6 +8,7 @@ import PromptsPage from "@/pages/prompts"; import TokenCostPage from "@/pages/token-cost"; import KnowledgeCoresPage from "@/pages/knowledge-cores"; import FlowsPage from "@/pages/flows"; +import McpToolsPage from "@/pages/mcp-tools"; import SettingsPage from "@/pages/settings"; import { NotificationToasts } from "@/components/notification-toasts"; @@ -24,6 +25,7 @@ export default function App() { } /> } /> } /> + } /> } /> } /> diff --git a/ts/packages/workbench/src/components/layout/sidebar.tsx b/ts/packages/workbench/src/components/layout/sidebar.tsx index d82c698c..e6dfea50 100644 --- a/ts/packages/workbench/src/components/layout/sidebar.tsx +++ b/ts/packages/workbench/src/components/layout/sidebar.tsx @@ -7,6 +7,7 @@ import { Coins, BrainCircuit, Workflow, + Plug, Settings, TestTube2, Wifi, @@ -147,6 +148,8 @@ function FlowSelectorDropdown() { // --------------------------------------------------------------------------- export function Sidebar() { + const { featureSwitches } = useSettings((s) => s.settings); + return (