Compare commits

..

1 Commits

Author SHA1 Message Date
Jamison Lahman
583236391f fix(onboarding): disabled button UX and auto_mode nits 2026-04-08 09:00:04 -07:00
3 changed files with 28 additions and 2 deletions

View File

@@ -99,6 +99,7 @@ function ModelConfigurationItem({
/>
<Button
disabled={!canRemove}
tooltip={!canRemove ? "At least one model is required" : undefined}
prominence="tertiary"
icon={SvgMinusCircle}
onClick={onRemove}

View File

@@ -398,6 +398,7 @@ function RefetchButton({ onRefetch }: RefetchButtonProps) {
}
}}
disabled={isFetching}
tooltip={isFetching ? "Fetching models..." : "Refresh models"}
/>
);
}
@@ -468,6 +469,13 @@ export function ModelSelectionField({
const visibleModels = models.filter((m) => m.is_visible);
const selectAllDisabled = isAutoMode || models.length === 0;
const selectAllTooltip = isAutoMode
? "Disable Auto Update to manually select models"
: models.length === 0
? "No models available"
: undefined;
return (
<Card background="light" border="none" padding="sm">
<Section gap={0.5}>
@@ -479,7 +487,8 @@ export function ModelSelectionField({
>
<Section flexDirection="row" gap={0}>
<Button
disabled={isAutoMode || models.length === 0}
disabled={selectAllDisabled}
tooltip={selectAllTooltip}
prominence="tertiary"
size="md"
onClick={handleToggleSelectAll}
@@ -549,6 +558,13 @@ export function ModelSelectionField({
!newModelName.trim() ||
models.some((m) => m.name === newModelName.trim())
}
tooltip={
!newModelName.trim()
? "Enter a model name first"
: models.some((m) => m.name === newModelName.trim())
? "This model already exists"
: undefined
}
onClick={() => {
const trimmed = newModelName.trim();
if (trimmed && !models.some((m) => m.name === trimmed)) {
@@ -683,6 +699,15 @@ function ModalWrapperInner({
</Button>
<Button
disabled={!isValid || !dirty || busy}
tooltip={
busy
? "Testing provider connection..."
: !dirty
? "No changes to save"
: !isValid
? "Please fill in all required fields"
: undefined
}
type="submit"
icon={busy ? SimpleLoader : undefined}
>

View File

@@ -47,7 +47,7 @@ export function useInitialValues(
api_key: existingLlmProvider?.api_key ?? undefined,
api_base: existingLlmProvider?.api_base ?? undefined,
is_public: existingLlmProvider?.is_public ?? true,
is_auto_mode: existingLlmProvider?.is_auto_mode ?? true,
is_auto_mode: existingLlmProvider?.is_auto_mode ?? false,
groups: existingLlmProvider?.groups ?? [],
personas: existingLlmProvider?.personas ?? [],
model_configurations: modelConfigurations,