fix: resolve task lane stale state, partial submit, and closure bugs
- Import and call clearTaskState before updating questions/actions in handleSend and handleTaskSubmit so new AI tasks always replace stale sessionStorage cache instead of being overridden by it - Include pending (not yet completed) tasks in the AI message on partial submit so the AI knows which tasks were left unanswered - Fix stale closure in TaskLane saveTaskLane useEffect — use refs for questions/actions so the debounced backend save always uses current values - Add responses field to pending_task_lane TypeScript type, removing the unsafe double-cast in selectChat - Instruct the AI to re-surface incomplete tasks unless ≥75% confident the information is no longer needed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -196,7 +196,7 @@ export interface AISessionDetail extends AISessionSummary {
|
||||
ticket_data: Record<string, unknown> | null
|
||||
steps: AISessionStepResponse[]
|
||||
conversation_messages: Array<{ role: string; content: string }>
|
||||
pending_task_lane: { questions: QuestionItem[]; actions: ActionItem[] } | null
|
||||
pending_task_lane: { questions: QuestionItem[]; actions: ActionItem[]; responses?: Array<Record<string, unknown>> } | null
|
||||
is_branching: boolean
|
||||
active_branch_id: string | null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user