From 9c22ac14758ad0f307c553dee91979c4892d0d4e Mon Sep 17 00:00:00 2001 From: David Kaya Date: Mon, 23 Mar 2026 23:03:42 +0100 Subject: [PATCH] refactor: polish MCP/LSP settings and activity panel UI - Use indigo accent consistently instead of blue for toggle states - Replace bulky toggle cards with compact toggle switches in Activity panel - Fix input focus states to use app-standard indigo glow - Use semantic nav icons: Server for MCP, Code for LSP - Style Save button with indigo primary, Delete with subtle destructive hover - Add Info icon to callout hints - Center empty states, clean up list item detail text - Fix indentation in App.tsx settings overlay wiring Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/renderer/App.tsx | 10 +- src/renderer/components/ActivityPanel.tsx | 200 ++++++++++------------ src/renderer/components/SettingsPanel.tsx | 31 ++-- 3 files changed, 110 insertions(+), 131 deletions(-) diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index 1f01e20..5556275 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -269,11 +269,11 @@ export default function App() { onNewPattern={() => { const defaultModel = availableModels[0] ?? findModel('gpt-5.4', availableModels) ?? findModel('gpt-5.4'); - return createDraftPattern( - defaultModel?.id ?? 'gpt-5.4', - resolveReasoningEffort(defaultModel, 'high'), - ); - }} + return createDraftPattern( + defaultModel?.id ?? 'gpt-5.4', + resolveReasoningEffort(defaultModel, 'high'), + ); + }} onRefreshCapabilities={refreshCapabilities} onSaveLspProfile={async (profile) => { await api.saveLspProfile({ profile }); diff --git a/src/renderer/components/ActivityPanel.tsx b/src/renderer/components/ActivityPanel.tsx index 773e201..eafc39b 100644 --- a/src/renderer/components/ActivityPanel.tsx +++ b/src/renderer/components/ActivityPanel.tsx @@ -1,5 +1,5 @@ -import { useMemo } from 'react'; -import { Activity, Bot, Sparkles } from 'lucide-react'; +import { useMemo, type ReactNode } from 'react'; +import { Activity, Bot, Server, Code, Sparkles } from 'lucide-react'; import { buildAgentActivityRows, @@ -80,66 +80,60 @@ export function ActivityPanel({ {/* Agent cards */}
-
+
-
-

Session tools

-

- Enable globally configured MCPs and LSPs for this session. -

-
+

+ Session tools +

{toolsDisabled && ( - - {projectIsScratchpad ? 'Scratchpad disabled' : 'Locked while running'} + + {projectIsScratchpad ? 'Scratchpad' : 'Running'} )}
{projectIsScratchpad ? ( -

- Scratchpad stays tool-free. Start a project-backed session to use MCPs or LSPs. +

+ Start a project-backed session to use MCPs or LSPs. +

+ ) : mcpServers.length === 0 && lspProfiles.length === 0 ? ( +

+ Add MCP servers or LSP profiles in Settings to enable them here.

) : ( -
- ({ - id: server.id, - label: server.name, - detail: - server.transport === 'local' - ? server.command - : server.url, - }))} - onToggle={(id) => - onUpdateSessionTooling({ - ...selection, - enabledMcpServerIds: toggleId(selection.enabledMcpServerIds, id), - }) - } - title="MCP servers" - disabled={toolsDisabled} - /> - ({ - id: profile.id, - label: profile.name, - detail: `${profile.languageId} · ${profile.command}`, - }))} - onToggle={(id) => - onUpdateSessionTooling({ - ...selection, - enabledLspProfileIds: toggleId(selection.enabledLspProfileIds, id), - }) - } - title="LSP profiles" - disabled={toolsDisabled} - /> +
+ {mcpServers.map((server) => ( + } + key={server.id} + label={server.name} + onToggle={() => + onUpdateSessionTooling({ + ...selection, + enabledMcpServerIds: toggleId(selection.enabledMcpServerIds, server.id), + }) + } + /> + ))} + {lspProfiles.map((profile) => ( + } + key={profile.id} + label={profile.name} + onToggle={() => + onUpdateSessionTooling({ + ...selection, + enabledLspProfileIds: toggleId(selection.enabledLspProfileIds, profile.id), + }) + } + /> + ))}
)}
@@ -235,71 +229,55 @@ export function ActivityPanel({ ); } -function ToolToggleGroup({ - title, - description, - items, - enabledIds, - onToggle, - emptyMessage, +function ToolToggleRow({ + label, + detail, + icon, + enabled, disabled, + onToggle, }: { - title: string; - description: string; - items: Array<{ id: string; label: string; detail?: string }>; - enabledIds: string[]; - onToggle: (id: string) => void; - emptyMessage: string; + label: string; + detail?: string; + icon: ReactNode; + enabled: boolean; disabled: boolean; + onToggle: () => void; }) { return ( -
-
-

- {title} -

-

{description}

+ + ); +} - {items.length === 0 ? ( -

{emptyMessage}

- ) : ( -
- {items.map((item) => { - const enabled = enabledIds.includes(item.id); - return ( - - ); - })} -
- )} -
+function ToggleSwitch({ enabled }: { enabled: boolean }) { + return ( + + + ); } diff --git a/src/renderer/components/SettingsPanel.tsx b/src/renderer/components/SettingsPanel.tsx index db66f0e..2716d23 100644 --- a/src/renderer/components/SettingsPanel.tsx +++ b/src/renderer/components/SettingsPanel.tsx @@ -1,5 +1,5 @@ import { useState, type HTMLAttributes, type ReactNode } from 'react'; -import { ChevronLeft, ChevronRight, Cpu, Layers, Plus, Workflow } from 'lucide-react'; +import { ChevronLeft, ChevronRight, Code, Cpu, Info, Plus, Server, Workflow } from 'lucide-react'; import { CopilotStatusCard } from '@renderer/components/CopilotStatusCard'; import { PatternEditor } from '@renderer/components/PatternEditor'; @@ -65,8 +65,8 @@ const navGroups: NavGroup[] = [ { label: 'Tooling', items: [ - { id: 'mcp-servers', label: 'MCP Servers', icon: }, - { id: 'lsp-profiles', label: 'LSP Profiles', icon: }, + { id: 'mcp-servers', label: 'MCP Servers', icon: }, + { id: 'lsp-profiles', label: 'LSP Profiles', icon: }, ], }, ]; @@ -367,8 +367,8 @@ function McpServersSection({ ( onEditProfile(profile)} /> ))} @@ -672,7 +672,7 @@ function ToolingListButton({ function EmptyState({ children }: { children: ReactNode }) { return ( -
+
{children}
); @@ -716,7 +716,7 @@ function ToolingEditorShell({
{onDelete && ( )}