diff --git a/frontend/src/components/assistant/TaskLane.tsx b/frontend/src/components/assistant/TaskLane.tsx index 80314e3b..e9972ca6 100644 --- a/frontend/src/components/assistant/TaskLane.tsx +++ b/frontend/src/components/assistant/TaskLane.tsx @@ -50,7 +50,6 @@ export function TaskLane({ questions, actions, onSubmit, onClose, loading }: Tas })), ]) const [submitting, setSubmitting] = useState(false) - const [submitted, setSubmitted] = useState(false) const [showRunAll, setShowRunAll] = useState(false) const [showPreview, setShowPreview] = useState(false) @@ -112,7 +111,6 @@ export function TaskLane({ questions, actions, onSubmit, onClose, loading }: Tas type: 'action', label: a.label, command: a.command, description: a.description, state: 'pending', value: '', })), ]) - setSubmitted(false) }, [questions, actions]) const updateTask = (idx: number, updates: Partial) => { @@ -164,12 +162,12 @@ export function TaskLane({ questions, actions, onSubmit, onClose, loading }: Tas const handleSubmit = () => { setSubmitting(true) onSubmit(tasks) - setSubmitted(true) + // Don't self-hide — parent controls visibility via showTaskLane. + // The AI response will either send updated tasks (replacing these) + // or send none (parent hides the lane). setSubmitting(false) } - if (submitted) return null - return (
0 const hasActions = response.actions && response.actions.length > 0 if (hasQuestions || hasActions) { setActiveQuestions(response.questions || []) setActiveActions(response.actions || []) setShowTaskLane(true) + } else { + // AI sent no new tasks — clear the lane + setShowTaskLane(false) + setActiveQuestions([]) + setActiveActions([]) } } catch { setMessages(prev => [