Skip to content

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

feat(settings): wrap provider sections and groups in Card component

Steven Enamakelf01d331c9bd4
diff --git a/app/src/components/settings/panels/ai/ProviderAuthSection.tsx b/app/src/components/settings/panels/ai/ProviderAuthSection.tsx
index 6270215ebc..999844112c 100644
--- a/app/src/components/settings/panels/ai/ProviderAuthSection.tsx
+++ b/app/src/components/settings/panels/ai/ProviderAuthSection.tsx
@@ -24,6 +24,7 @@ import type { ProviderAuthError } from '../../../../services/api/aiSettingsApi';
import Alert from '../../../ui/Alert';
import Badge from '../../../ui/Badge';
import Button from '../../../ui/Button';
+import Card from '../../../ui/Card';
import StatusLine from '../../../ui/StatusLine';
import Switch from '../../../ui/Switch';
import { routingWithProviderRemoved } from '../aiRouting';
@@ -237,20 +238,19 @@ export const ProviderAuthSection = ({
{loading && <div className="text-xs text-content-muted">{t('common.loading')}</div>}
{error && <StatusLine saving={false} error={error} savedNote={null} savingLabel="" />}
- <div className="flex items-center justify-between gap-3">
- <p className="min-w-0 text-xs text-content-muted">
- {t('settings.ai.llmProvidersDesc')}
- </p>
- <Button
- type="button"
- variant="primary"
- size="xs"
- leadingIcon={<LuPlus className="h-3.5 w-3.5" />}
- onClick={() => setAddOpen(true)}
- data-testid="add-provider-open">
- {t('settings.ai.providers.addProvider')}
- </Button>
- </div>
+ <Card title={t('settings.ai.llmProviders')} description={t('settings.ai.llmProvidersDesc')}>
+ <div className="flex justify-end px-4 py-3">
+ <Button
+ type="button"
+ variant="primary"
+ size="xs"
+ leadingIcon={<LuPlus className="h-3.5 w-3.5" />}
+ onClick={() => setAddOpen(true)}
+ data-testid="add-provider-open">
+ {t('settings.ai.providers.addProvider')}
+ </Button>
+ </div>
+ </Card>
</div>
{/* ─── Connected ────────────────────────────────────────────────────
@@ -259,6 +259,7 @@ export const ProviderAuthSection = ({
invites a fight the user cannot win. */}
<ProviderGroup
title={t('settings.ai.providers.groupConnected')}
+ card
data-testid="provider-group-connected">
<ProviderListRow
slug="openhuman"
@@ -384,6 +385,7 @@ export const ProviderAuthSection = ({
{claudeCodeConnected && (
<ProviderGroup
title={t('settings.ai.providers.groupCli')}
+ card
data-testid="provider-group-cli">
<ProviderListRow
slug="claude-code"
diff --git a/app/src/components/settings/panels/ai/ProviderListRow.tsx b/app/src/components/settings/panels/ai/ProviderListRow.tsx
index b9a92d2a35..3c44b57031 100644
--- a/app/src/components/settings/panels/ai/ProviderListRow.tsx
+++ b/app/src/components/settings/panels/ai/ProviderListRow.tsx
@@ -26,6 +26,7 @@ import { LuEllipsisVertical } from 'react-icons/lu';
import { cn } from '../../../../lib/cn';
import { useT } from '../../../../lib/i18n/I18nContext';
import Button from '../../../ui/Button';
+import Card from '../../../ui/Card';
import {
DropdownMenuContent,
DropdownMenuItem,
@@ -39,21 +40,30 @@ import { providerIcon } from './providerIcons';
export const ProviderGroup = ({
title,
children,
+ card = false,
'data-testid': testId,
}: {
title: string;
children: ReactNode;
+ /** Use the shared Card primitive when this group is a top-level section. */
+ card?: boolean;
'data-testid'?: string;
-}) => (
- <section className="flex w-full flex-col" data-testid={testId}>
- <h4 className="px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wide text-content-faint">
- {title}
- </h4>
- <ul className="flex w-full flex-col divide-y divide-line-subtle border-y border-line-subtle">
- {children}
- </ul>
- </section>
-);
+}) => {
+ const list = <ul className="flex w-full flex-col divide-y divide-line-subtle">{children}</ul>;
+
+ return card ? (
+ <Card title={title} data-testid={testId} className="w-full">
+ {list}
+ </Card>
+ ) : (
+ <section className="flex w-full flex-col" data-testid={testId}>
+ <h4 className="px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wide text-content-faint">
+ {title}
+ </h4>
+ <div className="border-y border-line-subtle">{list}</div>
+ </section>
+ );
+};
export interface ProviderRowAction {
label: string;