diff --git a/components/AgentDashboard.tsx b/components/AgentDashboard.tsx index 0af9cc0..c26ab43 100644 --- a/components/AgentDashboard.tsx +++ b/components/AgentDashboard.tsx @@ -274,9 +274,13 @@ export const AgentDashboard: React.FC = ({ const [newQueueForm, setNewQueueForm] = useState>({ name: '', description: '' }); const [tempSettings, setTempSettings] = useState(settings); + // Sync tempSettings with settings prop ONLY if NOT in settings view + // This prevents background polling from resetting form data while the user is typing useEffect(() => { - setTempSettings(settings); - }, [settings]); + if (view !== 'settings') { + setTempSettings(settings); + } + }, [settings, view]); const [isTestingSmtp, setIsTestingSmtp] = useState(false);