diff --git a/ui/desktop/src/components/settings_v2/extensions/ExtensionsSection.tsx b/ui/desktop/src/components/settings_v2/extensions/ExtensionsSection.tsx index 3eda7950dd..5d47c08b41 100644 --- a/ui/desktop/src/components/settings_v2/extensions/ExtensionsSection.tsx +++ b/ui/desktop/src/components/settings_v2/extensions/ExtensionsSection.tsx @@ -86,8 +86,12 @@ export default function ExtensionsSection() { extensionConfig: extensionConfig, addToConfig: addExtension, }); - handleModalClose(); + + // First refresh the extensions list await fetchExtensions(); + + // Then close the modal after data is refreshed + handleModalClose(); }; const handleDeleteExtension = async (name: string) => { diff --git a/ui/desktop/src/components/settings_v2/extensions/extension-manager.ts b/ui/desktop/src/components/settings_v2/extensions/extension-manager.ts index f025ab24f5..6378a69262 100644 --- a/ui/desktop/src/components/settings_v2/extensions/extension-manager.ts +++ b/ui/desktop/src/components/settings_v2/extensions/extension-manager.ts @@ -1,5 +1,5 @@ import type { ExtensionConfig } from '../../../api/types.gen'; -import { ToastServiceOptions } from '../../../toasts'; +import { toastService, ToastServiceOptions } from '../../../toasts'; import { addToAgent, removeFromAgent } from './agent-api'; interface ActivateExtensionProps { @@ -147,6 +147,11 @@ export async function updateExtension({ console.error('[updateExtension]: Failed to update disabled extension in config:', error); throw error; } + // show a toast that it was successfully updated + toastService.success({ + title: `Update extension`, + msg: `Successfully updated ${extensionConfig.name} extension`, + }); } } diff --git a/ui/desktop/src/components/settings_v2/extensions/modal/EnvVarsSection.tsx b/ui/desktop/src/components/settings_v2/extensions/modal/EnvVarsSection.tsx index ecb565ed23..45380405b8 100644 --- a/ui/desktop/src/components/settings_v2/extensions/modal/EnvVarsSection.tsx +++ b/ui/desktop/src/components/settings_v2/extensions/modal/EnvVarsSection.tsx @@ -17,6 +17,7 @@ export default function EnvVarsSection({ onAdd, onRemove, onChange, + submitAttempted, }: EnvVarsSectionProps) { const [newKey, setNewKey] = React.useState(''); const [newValue, setNewValue] = React.useState(''); @@ -51,12 +52,22 @@ export default function EnvVarsSection({ setInvalidFields({ key: false, value: false }); }; + const isFieldInvalid = (index: number, field: 'key' | 'value') => { + if (!submitAttempted) return false; + const value = envVars[index][field].trim(); + return value === ''; + }; + return (
+ Add key-value pairs for environment variables. Click the "+" button to add after filling + both fields. +