Skip to content

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

fix(workflow): handle missing embeddings model gracefully

Steven Enamakel1f0f731404e1
diff --git a/app/src/components/intelligence/WorkflowRunDetail.tsx b/app/src/components/intelligence/WorkflowRunDetail.tsx
index f45694d119..f0c3cbeb03 100644
--- a/app/src/components/intelligence/WorkflowRunDetail.tsx
+++ b/app/src/components/intelligence/WorkflowRunDetail.tsx
@@ -182,11 +182,9 @@ const WorkflowRunDetail: React.FC<Props> = ({
<span className="truncate text-sm font-medium text-content">
{phaseDef?.name ?? name}
</span>
- <span
- data-testid={`workflow-phase-status-${name}`}
- className="rounded-md border border-line px-1.5 py-0.5 text-[10px] font-medium text-content-muted">
+ <Badge data-testid={`workflow-phase-status-${name}`} dot={false}>
{t(PHASE_STATUS_KEY[state.status])}
- </span>
+ </Badge>
</span>
<span className="flex flex-none items-center gap-2 text-[11px] text-content-faint">
{hasOutputs && (
diff --git a/app/src/components/settings/panels/EmbeddingsModelSection.tsx b/app/src/components/settings/panels/EmbeddingsModelSection.tsx
index 6a83f7e756..6a2c584504 100644
--- a/app/src/components/settings/panels/EmbeddingsModelSection.tsx
+++ b/app/src/components/settings/panels/EmbeddingsModelSection.tsx
@@ -1,12 +1,13 @@
/**
- * Model + dimensions section for the Embeddings panel (active provider with
- * catalog models). Extracted out of `EmbeddingsPanel.tsx` to keep that file
- * under the repo's file-size convention.
+ * Model + dimensions card for the Embeddings panel (active provider with
+ * catalog models), with the provider's connection test and key removal in the
+ * card footer.
*/
+import { KeyRound, PlugZap } from 'lucide-react';
+
import { useT } from '../../../lib/i18n/I18nContext';
import type { EmbeddingModelPreset } from '../../../services/api/embeddingsApi';
-import { Button } from '../../ui';
-import { SettingsRow, SettingsSection, SettingsSelect } from '../controls';
+import { Button, Card, Field, NativeSelect } from '../../ui';
export interface EmbeddingsModelSectionProps {
currentModels: readonly EmbeddingModelPreset[];
@@ -36,65 +37,71 @@ const EmbeddingsModelSection = ({
const { t } = useT();
return (
- <SettingsSection>
+ <Card title={t('settings.embeddings.model')}>
{currentModels.length > 1 && (
- <SettingsRow
+ <Field
htmlFor="embeddings-model"
label={t('settings.embeddings.model')}
- stacked
control={
- <SettingsSelect
+ <NativeSelect
id="embeddings-model"
value={model}
+ inputSize="sm"
onChange={e => onModelChange(e.target.value)}
- className="w-full">
+ className="w-72">
{currentModels.map(m => (
<option key={m.id} value={m.id}>
{m.label} ({m.id})
</option>
))}
- </SettingsSelect>
+ </NativeSelect>
}
/>
)}
{allowedDims.length > 1 && (
- <SettingsRow
+ <Field
htmlFor="embeddings-dims"
label={t('settings.embeddings.dimensions')}
- stacked
control={
- <SettingsSelect
+ <NativeSelect
id="embeddings-dims"
value={dimensions}
+ inputSize="sm"
onChange={e => onDimsChange(Number(e.target.value))}
- className="w-full">
+ className="w-40">
{allowedDims.map(d => (
<option key={d} value={d}>
{d}
</option>
))}
- </SettingsSelect>
+ </NativeSelect>
}
/>
)}
- {/* Active provider info + actions */}
- <div className="flex items-center gap-2 px-4 py-3">
+ {/* Active provider actions */}
+ <div className="flex items-center justify-end gap-2 px-4 py-3">
{canClearKey && (
- <Button variant="secondary" tone="danger" size="xs" onClick={onClearKey}>
+ <Button
+ variant="secondary"
+ tone="danger"
+ size="sm"
+ leadingIcon={<KeyRound className="h-3.5 w-3.5" aria-hidden />}
+ onClick={onClearKey}>
{t('settings.embeddings.clearKey')}
</Button>
)}
<Button
variant="secondary"
- size="xs"
+ size="sm"
+ leadingIcon={<PlugZap className="h-3.5 w-3.5" aria-hidden />}
onClick={onTestConnection}
disabled={testConnectionDisabled}>
{t('settings.embeddings.testConnection')}
</Button>
</div>
- </SettingsSection>
+ </Card>
);
};