Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

Fix: 86eunexpr: Agent Settings/Security Tab – Auth Method Not Persisting After Save and Refresh

samme-abdulaedcc6899872
diff --git a/packages/app/src/react/features/builder/components/VariablesWidget.tsx b/packages/app/src/react/features/builder/components/VariablesWidget.tsx
index ac9a7f1d..bd9ebab1 100644
--- a/packages/app/src/react/features/builder/components/VariablesWidget.tsx
+++ b/packages/app/src/react/features/builder/components/VariablesWidget.tsx
@@ -230,18 +230,25 @@ const VariablesWidget = ({ agentId, workspace }: { agentId: string; workspace: W
setShowVaultKeys(null);
};
- const handleAddKeyClick = () => {
+ const handleAddKeyClick = (e?: React.MouseEvent) => {
+ e?.preventDefault();
+ e?.stopPropagation();
+
setShowAddKeyModal(true);
setNewKey({ name: '', key: '' });
setKeyErrors({});
setShowVaultKeys(null);
+ // Focus on the first input field instead of scrolling the modal into view
const timeout = setTimeout(() => {
- if (addKeyModalRef.current)
- addKeyModalRef.current?.scrollIntoView({ behavior: 'smooth', block: 'center' });
-
+ if (addKeyModalRef.current) {
+ const firstInput = addKeyModalRef.current.querySelector('input') as HTMLInputElement;
+ if (firstInput) {
+ firstInput.focus();
+ }
+ }
clearTimeout(timeout);
- }, 0);
+ }, 100);
};
const validateNewKey = (): boolean => {