fix: task lane no longer self-hides on submit

TaskLane had `if (submitted) return null` which immediately hid the
component after submit, before the AI could respond. Now the parent
controls visibility: the lane stays visible during the AI call, then
either updates with new tasks or clears when the AI sends none.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-28 03:05:58 +00:00
parent e8dfc84717
commit 6268aa3520
2 changed files with 9 additions and 6 deletions

View File

@@ -310,13 +310,18 @@ export default function AssistantChatPage() {
if (response.fork && activeChatId) {
branching.loadBranches(activeChatId)
}
// Show task lane again if AI sends more tasks
// Update task lane based on AI response
const hasQuestions = response.questions && response.questions.length > 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 => [