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) <noreply@anthropic.com>
This commit is contained in:
elpresidank 2026-04-12 00:59:20 -05:00
parent f4d6e49217
commit d5dd15be72
7 changed files with 1234 additions and 4 deletions

View file

@ -78,6 +78,7 @@ function AgentPhaseBlock({
>
<button
onClick={() => setExpanded((p) => !p)}
aria-expanded={expanded}
className="flex w-full items-center gap-2 px-3 py-2 text-left text-xs font-medium text-fg-muted"
>
{expanded ? (

File diff suppressed because it is too large Load diff

View file

@ -111,7 +111,7 @@ export default function PromptsPage() {
{/* Templates tab */}
{activeTab === "templates" && (
<div id="panel-templates" role="tabpanel" aria-labelledby="tab-templates" className="flex flex-1 flex-col gap-4 overflow-hidden">
<div id="panel-templates" role="tabpanel" aria-labelledby="tab-templates" tabIndex={0} className="flex flex-1 flex-col gap-4 overflow-hidden">
{loading && prompts.length === 0 && (
<div className="flex items-center justify-center py-12">
<Loader2 className="mr-2 h-5 w-5 animate-spin text-fg-subtle" />
@ -201,7 +201,7 @@ export default function PromptsPage() {
{/* System Prompt tab */}
{activeTab === "system" && (
<div id="panel-system" role="tabpanel" aria-labelledby="tab-system" className="flex flex-1 flex-col overflow-hidden rounded-lg border border-border">
<div id="panel-system" role="tabpanel" aria-labelledby="tab-system" tabIndex={0} className="flex flex-1 flex-col overflow-hidden rounded-lg border border-border">
<div className="border-b border-border bg-surface-100 px-4 py-3">
<h2 className="text-xs font-medium uppercase tracking-wider text-fg-muted">
System Prompt

View file

@ -342,7 +342,7 @@ export default function SettingsPage() {
onClick={toggleTheme}
className={cn(
"relative inline-flex h-6 w-11 items-center rounded-full transition-colors",
isDark ? "bg-brand-600" : "bg-surface-400",
isDark ? "bg-brand-600" : "bg-fg-subtle",
)}
>
<span
@ -372,7 +372,7 @@ export default function SettingsPage() {
onClick={() => updateFeatureSwitches({ [key]: !enabled })}
className={cn(
"relative inline-flex h-6 w-11 items-center rounded-full transition-colors",
enabled ? "bg-brand-600" : "bg-surface-400",
enabled ? "bg-brand-600" : "bg-fg-subtle",
)}
>
<span className={cn(