feat: redesign settings pages to match canonical flat UI patterns (#493)

* refactor(settings): new IA shell + projects section + skills catalog discoverability

* chore(settings): split providers list by scope; show user before project

* fix: navigation flow in mobile Settings

* feat: redesign settings pages to use modern elevated surface patterns

* feat: replace helper text with tooltips in settings

* ui: redesign update dialog and fix external link routing

- Restructures UpdateDialog to focus on changelog readability with a wider max-w-4xl canvas
- Highlights @username contributor mentions with theme primary color
- Strips excessive vertical padding and right-aligns compact action buttons
- Disables streamdown's internal link safety dialog in favor of direct Tauri shell routing

* feat: refactor Git identities into dedicated Git settings page

* feat: unify sidebar background styling across VS Code and web/mobile

* fix: adjust button styling and layout for mobile settings pages

* feat: add MCP settings page and sidebar

* feat: hide models in provider view (thanks to @nguyenngothuong)

* feat: add "Add new provider" option to model selector dropdown

* fix: local evroc logo + provider dropdown icons

* fix: increase width of provider menu

* fix: dark theme background color for better contrast

* feat: update @opencode-ai/sdk dependency to v1.2.10

* fix: restore session sorting to only use updated time

* fix: added settings for sessions deletion dialog

* fix: adjust padding on settings pages for better layout

* fix: standardize select dropdown height across UI

* fix: agent selector UI and notification settings

* fix: remove redundant helper text from settings pages

* fix: update UI layout for description fields

* fix: remove border-none and shadow-none from textarea classes

* fix: enable context menu on sidebar items

* feat: refactor UI controls and layout patterns across settings pages

* fix: use headerless blocks when page title already provides context

* fix: remove subtask option from command settings

* fix: refactor mcp page settings

* fix: reduce spacing in skills configuration pages

* feat: refactor voice settings

* feat: refactor settings sidebar sections
This commit is contained in:
Bohdan Triapitsyn
2026-02-24 03:28:30 +02:00
committed by GitHub
parent d2d39c48ac
commit d2358c2c03
90 changed files with 8062 additions and 7128 deletions
+3 -2
View File
@@ -15,7 +15,7 @@ import {
} from '@/components/ui/dropdown-menu';
import { AnimatedTabs } from '@/components/ui/animated-tabs';
import { RiArrowLeftSLine, RiChat4Line, RiCheckLine, RiCloseLine, RiCommandLine, RiFileTextLine, RiFolder6Line, RiFolderAddLine, RiGitBranchLine, RiGithubFill, RiLayoutLeftLine, RiLayoutRightLine, RiMore2Fill, RiPencilLine, RiPlayListAddLine, RiRefreshLine, RiServerLine, RiSettings3Line, RiStackLine, RiTerminalBoxLine, RiTimerLine, type RemixiconComponentType } from '@remixicon/react';
import { RiArrowLeftSLine, RiChat4Line, RiCheckLine, RiCloseLine, RiFileTextLine, RiFolder6Line, RiFolderAddLine, RiGitBranchLine, RiGithubFill, RiLayoutLeftLine, RiLayoutRightLine, RiMore2Fill, RiPencilLine, RiPlayListAddLine, RiRefreshLine, RiServerLine, RiSettings3Line, RiStackLine, RiTerminalBoxLine, RiTimerLine, type RemixiconComponentType } from '@remixicon/react';
import { DiffIcon } from '@/components/icons/DiffIcon';
import { useUIStore, type MainTab } from '@/stores/useUIStore';
import { useUpdateStore } from '@/stores/useUpdateStore';
@@ -31,6 +31,7 @@ import { useDeviceInfo } from '@/lib/device';
import { cn, hasModifier, formatDirectoryName } from '@/lib/utils';
import { useDiffFileCount } from '@/components/views/DiffView';
import { McpDropdown, McpDropdownContent } from '@/components/mcp/McpDropdown';
import { McpIcon } from '@/components/icons/McpIcon';
import { ProviderLogo } from '@/components/ui/ProviderLogo';
import { formatPercent, formatWindowLabel, QUOTA_PROVIDERS, calculatePace, calculateExpectedUsagePercent } from '@/lib/quota';
import { UsageProgressBar } from '@/components/sections/usage/UsageProgressBar';
@@ -1058,7 +1059,7 @@ export const Header: React.FC = () => {
}
base.push(
{ value: 'usage', label: 'Usage', icon: RiTimerLine },
{ value: 'mcp', label: 'MCP', icon: RiCommandLine }
{ value: 'mcp', label: 'MCP', icon: McpIcon as unknown as RemixiconComponentType }
);
return base;
}, [isDesktopApp]);
@@ -1,167 +0,0 @@
import React from 'react';
import { cn } from '@/lib/utils';
import { SIDEBAR_SECTIONS } from '@/constants/sidebar';
import type { SidebarSection } from '@/constants/sidebar';
import { RiArrowLeftSLine } from '@remixicon/react';
import { Button } from '@/components/ui/button';
import { AgentsSidebar } from '@/components/sections/agents/AgentsSidebar';
import { AgentsPage } from '@/components/sections/agents/AgentsPage';
import { CommandsSidebar } from '@/components/sections/commands/CommandsSidebar';
import { CommandsPage } from '@/components/sections/commands/CommandsPage';
import { ProvidersSidebar } from '@/components/sections/providers/ProvidersSidebar';
import { ProvidersPage } from '@/components/sections/providers/ProvidersPage';
import { GitIdentitiesSidebar } from '@/components/sections/git-identities/GitIdentitiesSidebar';
import { GitIdentitiesPage } from '@/components/sections/git-identities/GitIdentitiesPage';
import { OpenChamberPage } from '@/components/sections/openchamber/OpenChamberPage';
import { ErrorBoundary } from '@/components/ui/ErrorBoundary';
import { MobileOverlayPanel } from '@/components/ui/MobileOverlayPanel';
interface SettingsDialogProps {
isOpen: boolean;
onClose: () => void;
}
const SETTINGS_SECTIONS = (() => {
const filtered = SIDEBAR_SECTIONS.filter(section => section.id !== 'sessions');
const settingsSection = filtered.find(s => s.id === 'settings');
const otherSections = filtered.filter(s => s.id !== 'settings');
return settingsSection ? [settingsSection, ...otherSections] : filtered;
})();
/**
* Mobile-only settings dialog using MobileOverlayPanel.
* Desktop uses SettingsView rendered inline in MainLayout.
*/
export const SettingsDialog: React.FC<SettingsDialogProps> = ({ isOpen, onClose }) => {
const [activeTab, setActiveTab] = React.useState<SidebarSection>('settings');
const [showPageContent, setShowPageContent] = React.useState(false);
React.useEffect(() => {
if (isOpen) {
setActiveTab('settings');
setShowPageContent(false);
}
}, [isOpen]);
const handleTabChange = React.useCallback((tab: SidebarSection) => {
setActiveTab(tab);
setShowPageContent(false);
}, []);
const handleItemSelect = React.useCallback(() => {
setShowPageContent(true);
}, []);
const renderSidebarContent = () => {
if (activeTab === 'settings') {
return null;
}
const content = (() => {
switch (activeTab) {
case 'agents':
return <AgentsSidebar />;
case 'commands':
return <CommandsSidebar />;
case 'providers':
return <ProvidersSidebar />;
case 'git-identities':
return <GitIdentitiesSidebar />;
default:
return null;
}
})();
return <div onClick={handleItemSelect}>{content}</div>;
};
const renderPageContent = () => {
switch (activeTab) {
case 'agents':
return <AgentsPage />;
case 'commands':
return <CommandsPage />;
case 'providers':
return <ProvidersPage />;
case 'git-identities':
return <GitIdentitiesPage />;
case 'settings':
return <OpenChamberPage />;
default:
return null;
}
};
const mainContent = (
<div className="flex flex-col h-full overflow-hidden">
{/* Tab bar */}
<div className="flex flex-wrap items-center gap-1 border-b border-border/40 bg-background/95 px-3 py-1.5">
{SETTINGS_SECTIONS.map(({ id, label, icon: Icon }) => {
const isActive = activeTab === id;
const PhosphorIcon = Icon as React.ComponentType<{ className?: string; weight?: string }>;
return (
<button
key={id}
onClick={() => handleTabChange(id)}
className={cn(
'flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs font-medium whitespace-nowrap',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary',
isActive ? 'text-primary' : 'text-muted-foreground hover:text-foreground'
)}
aria-pressed={isActive}
aria-label={label}
>
<PhosphorIcon className="h-5 w-5" weight="regular" />
</button>
);
})}
</div>
{/* Content area - mobile drill-down pattern */}
<div className="flex flex-1 overflow-hidden">
{activeTab !== 'settings' && !showPageContent && (
<div className="w-full overflow-hidden bg-sidebar">
<ErrorBoundary>{renderSidebarContent()}</ErrorBoundary>
</div>
)}
{(activeTab === 'settings' || showPageContent) && (
<div className="w-full flex-1 overflow-hidden bg-background">
<ErrorBoundary>{renderPageContent()}</ErrorBoundary>
</div>
)}
</div>
</div>
);
return (
<MobileOverlayPanel
open={isOpen}
onClose={onClose}
title="Settings"
className="max-w-full"
contentMaxHeightClassName="h-[min(80dvh,720px)]"
renderHeader={(closeButton) => (
<div className="flex items-center justify-between px-3 py-2 border-b border-border/40">
<div className="relative flex flex-1 items-center justify-center">
{showPageContent && (
<Button
variant="ghost"
size="icon"
onClick={() => setShowPageContent(false)}
className="absolute left-0 h-6 w-6 flex-shrink-0"
>
<RiArrowLeftSLine className="h-5 w-5" />
<span className="sr-only">Back to sidebar</span>
</Button>
)}
<span className="typography-ui-header">Settings</span>
</div>
{closeButton}
</div>
)}
>
{mainContent}
</MobileOverlayPanel>
);
};