From f61cc87aa2c3e9b54e07c32a04f503cdfd336ee4 Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Thu, 2 Apr 2026 12:52:17 -0400 Subject: [PATCH] feat(dashboard): show all provider presets by default in Create API Profile modal Remove collapsible "More Presets" toggle. All alternative providers are now always visible in a labeled section below Featured Providers, improving discoverability for users like Minimax, GLM, DeepSeek. Closes #892 --- .../profiles/profile-create-dialog.tsx | 66 +++++-------------- 1 file changed, 15 insertions(+), 51 deletions(-) diff --git a/ui/src/components/profiles/profile-create-dialog.tsx b/ui/src/components/profiles/profile-create-dialog.tsx index cdf8b449..8a67a7cf 100644 --- a/ui/src/components/profiles/profile-create-dialog.tsx +++ b/ui/src/components/profiles/profile-create-dialog.tsx @@ -31,17 +31,7 @@ import { Badge } from '@/components/ui/badge'; import { ProviderLogo } from '@/components/cliproxy/provider-logo'; import { useCreateProfile } from '@/hooks/use-profiles'; import { useOpenRouterCatalog } from '@/hooks/use-openrouter-models'; -import { - Loader2, - Plus, - AlertTriangle, - Info, - Eye, - EyeOff, - Settings2, - Sparkles, - ChevronDown, -} from 'lucide-react'; +import { Loader2, Plus, AlertTriangle, Info, Eye, EyeOff, Settings2, Sparkles } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import { toast } from 'sonner'; import { cn } from '@/lib/utils'; @@ -113,9 +103,6 @@ const RECOMMENDED_PRESETS = getPresetsByCategory('recommended'); const QUICK_TEMPLATE_PRESETS = PROVIDER_PRESETS.filter( (preset) => preset.category !== 'recommended' ); -const QUICK_TEMPLATE_PRESET_IDS = new Set( - QUICK_TEMPLATE_PRESETS.map((preset) => preset.id) -); export function ProfileCreateDialog({ open, @@ -129,7 +116,6 @@ export function ProfileCreateDialog({ const [urlWarning, setUrlWarning] = useState(null); const [showApiKey, setShowApiKey] = useState(false); const [selectedPreset, setSelectedPreset] = useState(DEFAULT_PRESET_ID); - const [showMorePresets, setShowMorePresets] = useState(false); const [modelSearch, setModelSearch] = useState(''); // OpenRouter models for model picker @@ -192,7 +178,6 @@ export function ProfileCreateDialog({ setActiveTab('basic'); setUrlWarning(null); setShowApiKey(false); - setShowMorePresets(false); setModelSearch(''); // Set initial preset based on initialMode @@ -221,13 +206,11 @@ export function ProfileCreateDialog({ if (preset) { setSelectedPreset(preset.id); - setShowMorePresets(QUICK_TEMPLATE_PRESET_IDS.has(preset.id)); applyPresetToForm(preset); return; } setSelectedPreset(CUSTOM_PRESET_ID); - setShowMorePresets(false); applyPresetToForm(null); }; @@ -290,10 +273,7 @@ export function ProfileCreateDialog({ !!errors.model || !!errors.opusModel || !!errors.sonnetModel || !!errors.haikuModel; const isCreating = createMutation.isPending; - const isQuickTemplateSelected = - selectedPreset !== CUSTOM_PRESET_ID && QUICK_TEMPLATE_PRESET_IDS.has(selectedPreset); const isOpenRouter = currentPreset?.id === DEFAULT_PRESET_ID; - const showQuickTemplates = showMorePresets || isQuickTemplateSelected; return ( @@ -353,38 +333,22 @@ export function ProfileCreateDialog({
- - - {showQuickTemplates && ( -
-
- {QUICK_TEMPLATE_PRESETS.map((preset) => ( - handlePresetSelect(preset.id)} - density="compact" - /> - ))} -
+ +
+
+ {QUICK_TEMPLATE_PRESETS.map((preset) => ( + handlePresetSelect(preset.id)} + density="compact" + /> + ))}
- )} +