Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix([issue-1776]): reset stale provider pin when filtered out of task form

Adam Eivy339df658a348
diff --git a/client/src/components/cos/TaskAddForm.jsx b/client/src/components/cos/TaskAddForm.jsx
index a07be8cd34..9de7e6a772 100644
--- a/client/src/components/cos/TaskAddForm.jsx
+++ b/client/src/components/cos/TaskAddForm.jsx
@@ -87,6 +87,15 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fa
return enabled.length > 0 && enabledProviders.length === 0;
}, [providers, enabledProviders]);
+ // If the pinned provider isn't a valid coding option (e.g. a saved template
+ // pinned an `api` provider that's now filtered out of the dropdown), reset to
+ // "Auto" so the visible select and the submitted value can't diverge.
+ useEffect(() => {
+ if (newTask.provider && !enabledProviders.some(p => p.id === newTask.provider)) {
+ setNewTask(t => ({ ...t, provider: '', model: '' }));
+ }
+ }, [enabledProviders, newTask.provider]);
+
// Check if selected app has JIRA configured
const selectedApp = useMemo(() =>
apps?.find(a => a.id === newTask.app),