Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(ai): update settings panel components for consistency

Steven Enamakel6d5887da1b0a
diff --git a/app/src/components/settings/panels/ai/BackgroundLoopControls.tsx b/app/src/components/settings/panels/ai/BackgroundLoopControls.tsx
index b7c51a3086..8dd7b5b9a4 100644
--- a/app/src/components/settings/panels/ai/BackgroundLoopControls.tsx
+++ b/app/src/components/settings/panels/ai/BackgroundLoopControls.tsx
@@ -19,7 +19,7 @@ import {
type TeamUsage,
} from '../../../../services/api/creditsApi';
import Button from '../../../ui/Button';
-import { SettingsStatusLine } from '../../controls';
+import StatusLine from '../../../ui/StatusLine';
import type { RoutingMap } from './aiPanelTypes';
import {
activeConnection,
@@ -191,7 +191,7 @@ export const BackgroundLoopControls = ({
</div>
)}
- {error && <SettingsStatusLine saving={false} error={error} savedNote={null} savingLabel="" />}
+ {error && <StatusLine saving={false} error={error} savedNote={null} savingLabel="" />}
<section className={`grid gap-3 ${gridCols}`}>
<div className="overflow-hidden rounded-lg border border-line bg-surface-muted">
diff --git a/app/src/components/settings/panels/ai/CloudProviderEditor.tsx b/app/src/components/settings/panels/ai/CloudProviderEditor.tsx
index 1ec7bc8d12..ddef8c833a 100644
--- a/app/src/components/settings/panels/ai/CloudProviderEditor.tsx
+++ b/app/src/components/settings/panels/ai/CloudProviderEditor.tsx
@@ -7,7 +7,7 @@ import { useState } from 'react';
import { useT } from '../../../../lib/i18n/I18nContext';
import Button from '../../../ui/Button';
import { ModalShell } from '../../../ui/ModalShell';
-import { SettingsTextField } from '../../controls';
+import TextField from '../../../ui/TextField';
import { isAzureFoundryEndpoint, isAzureV1BaseUrl } from '../azureDeployment';
import { presentProviderSetupError, ProviderSetupErrorNotice } from '../ProviderSetupErrorNotice';
import {
@@ -162,7 +162,7 @@ export const CloudProviderEditor = ({
className="text-[10px] font-semibold uppercase tracking-wide text-content-muted">
{t('common.name')}
</label>
- <SettingsTextField
+ <TextField
id="cloud-provider-name"
value={label}
onChange={e => setLabel(e.target.value)}
@@ -185,7 +185,7 @@ export const CloudProviderEditor = ({
className="text-[10px] font-semibold uppercase tracking-wide text-content-muted">
{t('settings.ai.openAiUrlLabel')}
</label>
- <SettingsTextField
+ <TextField
id="cloud-provider-openai-url"
mono
value={endpoint}
@@ -226,7 +226,7 @@ export const CloudProviderEditor = ({
</Button>
)}
</label>
- <SettingsTextField
+ <TextField
aria-label={t('settings.ai.apiKeyFieldLabel')}
type="text"
mono
diff --git a/app/src/components/settings/panels/ai/CustomRoutingDialog.tsx b/app/src/components/settings/panels/ai/CustomRoutingDialog.tsx
index d60e3f5c8b..2a3e039e0c 100644
--- a/app/src/components/settings/panels/ai/CustomRoutingDialog.tsx
+++ b/app/src/components/settings/panels/ai/CustomRoutingDialog.tsx
@@ -16,7 +16,8 @@ import {
import Button from '../../../ui/Button';
import Checkbox from '../../../ui/Checkbox';
import { ModalShell } from '../../../ui/ModalShell';
-import { SettingsSelect, SettingsTextField } from '../../controls';
+import NativeSelect from '../../../ui/NativeSelect';
+import TextField from '../../../ui/TextField';
import {
appendTemperatureToProviderString,
CLAUDE_CODE_DEFAULT_MODEL,
@@ -326,7 +327,7 @@ export const CustomRoutingDialog = ({
<label className="text-xs font-medium text-content-secondary">
{t('settings.ai.providerLabel')}
</label>
- <SettingsSelect
+ <NativeSelect
value={
source ? `${source.kind}:${source.kind === 'cloud' ? source.providerSlug : ''}` : ''
}
@@ -364,7 +365,7 @@ export const CustomRoutingDialog = ({
{(claudeCodeEnabled || source?.kind === 'claude-code') && (
<option value="claude-code:">{t('settings.ai.claudeCode.modalTitle')}</option>
)}
- </SettingsSelect>
+ </NativeSelect>
</div>
{source?.kind === 'local' ? (
@@ -372,7 +373,7 @@ export const CustomRoutingDialog = ({
<label className="text-xs font-medium text-content-secondary">
{t('settings.ai.modelLabel')}
</label>
- <SettingsSelect
+ <NativeSelect
value={model}
onChange={e => {
resetTestState();
@@ -384,14 +385,14 @@ export const CustomRoutingDialog = ({
{m.id}
</option>
))}
- </SettingsSelect>
+ </NativeSelect>
</div>
) : source?.kind === 'claude-code' ? (
<div className="flex flex-col gap-1.5">
<label className="text-xs font-medium text-content-secondary">
{t('settings.ai.modelLabel')}
</label>
- <SettingsTextField
+ <TextField
type="text"
mono
value={model}
diff --git a/app/src/components/settings/panels/ai/GlobalOwnModelSelector.tsx b/app/src/components/settings/panels/ai/GlobalOwnModelSelector.tsx
index 36a7acda6b..f641bbcc07 100644
--- a/app/src/components/settings/panels/ai/GlobalOwnModelSelector.tsx
+++ b/app/src/components/settings/panels/ai/GlobalOwnModelSelector.tsx
@@ -13,7 +13,7 @@ import {
} from '../../../../services/api/aiSettingsApi';
import Button from '../../../ui/Button';
import Checkbox from '../../../ui/Checkbox';
-import { SettingsSelect } from '../../controls';
+import NativeSelect from '../../../ui/NativeSelect';
import { isAzureFoundryEndpoint } from '../azureDeployment';
import {
CLAUDE_CODE_DEFAULT_MODEL,
@@ -211,7 +211,7 @@ export const GlobalOwnModelSelector = ({
<label className="text-xs font-medium text-content-secondary">
{t('settings.ai.globalModel.provider')}
</label>
- <SettingsSelect
+ <NativeSelect
value={
source
? `${source.kind}:${source.kind === 'cloud' ? source.providerSlug : ''}`
@@ -250,7 +250,7 @@ export const GlobalOwnModelSelector = ({
{(claudeCodeEnabled || source?.kind === 'claude-code') && (
<option value="claude-code:">{t('settings.ai.claudeCode.modalTitle')}</option>
)}
- </SettingsSelect>
+ </NativeSelect>
</div>
{source?.kind === 'local' ? (
@@ -258,7 +258,7 @@ export const GlobalOwnModelSelector = ({
<label className="text-xs font-medium text-content-secondary">
{t('settings.ai.globalModel.model')}
</label>
- <SettingsSelect
+ <NativeSelect
value={model}
onChange={e => setModel(e.target.value)}
className="w-full">
@@ -267,7 +267,7 @@ export const GlobalOwnModelSelector = ({
{m.id}
</option>
))}
- </SettingsSelect>
+ </NativeSelect>
</div>
) : (
<ModelEntryField
diff --git a/app/src/components/settings/panels/ai/ModelEntryField.tsx b/app/src/components/settings/panels/ai/ModelEntryField.tsx
index 40b50b371c..5fb5959e9d 100644
--- a/app/src/components/settings/panels/ai/ModelEntryField.tsx
+++ b/app/src/components/settings/panels/ai/ModelEntryField.tsx
@@ -25,7 +25,8 @@ import type { ModelInfo } from '../../../../services/api/aiSettingsApi';
import Alert from '../../../ui/Alert';
import Button from '../../../ui/Button';
import Label from '../../../ui/Label';
-import { SettingsSelect, SettingsTextField } from '../../controls';
+import NativeSelect from '../../../ui/NativeSelect';
+import TextField from '../../../ui/TextField';
import { isAzureFoundryEndpoint, looksLikeAzureBaseModelId } from '../azureDeployment';
/** Resolved entry-mode state for one picker. Produced by {@link useModelEntryMode}. */
@@ -158,11 +159,11 @@ export const ModelEntryField = ({
) : null}
{showLoadingSelect ? (
- <SettingsSelect disabled className="w-full opacity-60 cursor-wait">
+ <NativeSelect disabled className="w-full opacity-60 cursor-wait">
<option>{t('settings.ai.loadingModels')}</option>
- </SettingsSelect>
+ </NativeSelect>
) : useManualEntry ? (
- <SettingsTextField
+ <TextField
type="text"
mono
aria-label={fieldLabel}
@@ -171,7 +172,7 @@ export const ModelEntryField = ({
placeholder={isAzureProvider ? t('settings.ai.deploymentNamePlaceholder') : placeholder}
/>
) : (
- <SettingsSelect
+ <NativeSelect
aria-label={fieldLabel}
value={model}
onChange={e => onModelChange(e.target.value)}
@@ -185,7 +186,7 @@ export const ModelEntryField = ({
{optionLabel ? optionLabel(m) : m.id}
</option>
))}
- </SettingsSelect>
+ </NativeSelect>
)}
{/* Escape hatch out of the catalog: a deployment name (Azure) or any model
diff --git a/app/src/components/settings/panels/ai/ProviderAuthSection.tsx b/app/src/components/settings/panels/ai/ProviderAuthSection.tsx
index 96401a6e8f..19e7708f54 100644
--- a/app/src/components/settings/panels/ai/ProviderAuthSection.tsx
+++ b/app/src/components/settings/panels/ai/ProviderAuthSection.tsx
@@ -8,7 +8,8 @@ import { LuCircleAlert, LuKeyRound, LuPencil } from 'react-icons/lu';
import { useT } from '../../../../lib/i18n/I18nContext';
import type { ProviderAuthError } from '../../../../services/api/aiSettingsApi';
import Button from '../../../ui/Button';
-import { SettingsStatusLine, SettingsSwitch } from '../../controls';
+import StatusLine from '../../../ui/StatusLine';
+import Switch from '../../../ui/Switch';
import { routingWithProviderRemoved } from '../aiRouting';
import { BUILTIN_CLOUD_PROVIDER_SLUGS } from '../builtinCloudProviders';
import { ProviderSetupErrorNotice } from '../ProviderSetupErrorNotice';
@@ -108,7 +109,7 @@ export const ProviderAuthSection = ({
<section className="space-y-3">
{loading && <div className="text-xs text-content-muted">{t('common.loading')}</div>}
{error && (
- <SettingsStatusLine saving={false} error={error} savedNote={null} savingLabel="" />
+ <StatusLine saving={false} error={error} savedNote={null} savingLabel="" />
)}
<div className="flex flex-wrap gap-1.5">
@@ -201,7 +202,7 @@ export const ProviderAuthSection = ({
<LuPencil className="h-3 w-3" />
</Button>
)}
- <SettingsSwitch
+ <Switch
id={`local-runtime-toggle-${localKind}`}
checked={enabled}
onCheckedChange={async () => {
diff --git a/app/src/components/settings/panels/ai/ProviderConnectControls.tsx b/app/src/components/settings/panels/ai/ProviderConnectControls.tsx
index 5259c90334..8ecaa00e56 100644
--- a/app/src/components/settings/panels/ai/ProviderConnectControls.tsx
+++ b/app/src/components/settings/panels/ai/ProviderConnectControls.tsx
@@ -10,7 +10,8 @@ import { useT } from '../../../../lib/i18n/I18nContext';
import { openUrl } from '../../../../utils/openUrl';
import Button from '../../../ui/Button';
import { DialogContent, DialogRoot } from '../../../ui/Dialog';
-import { SettingsSwitch, SettingsTextField } from '../../controls';
+import Switch from '../../../ui/Switch';
+import TextField from '../../../ui/TextField';
import { builtinCloudProvider } from '../builtinCloudProviders';
import { presentProviderSetupError, ProviderSetupErrorNotice } from '../ProviderSetupErrorNotice';
import {
@@ -53,7 +54,7 @@ export const ProviderToggleChip = ({
{t('settings.ai.routing.managedAlwaysOn')}
</span>
) : (
- <SettingsSwitch
+ <Switch
id={`provider-toggle-${slug}`}
checked={enabled}
onCheckedChange={() => onToggle?.()}
@@ -261,7 +262,7 @@ export const ProviderKeyDialog = ({
className="text-xs font-medium text-content-secondary">
{fieldLabel}
</label>
- <SettingsTextField
+ <TextField
id="provider-key-input"
type={isLocalRuntime ? 'url' : 'text'}
mono={isLocalRuntime}
@@ -290,7 +291,7 @@ export const ProviderKeyDialog = ({
className="mt-3 text-xs font-medium text-content-secondary">
{t('settings.ai.apiKeyFieldLabel')}
</label>
- <SettingsTextField
+ <TextField
id="provider-key-input-key"
type="text"
autoComplete="off"