fix: clear stale task lane when starting session from dashboard prefill

The sendPrefill flow (dashboard handoff) did not clear activeQuestions/
activeActions before creating the new session. The task lane initializer
loaded stale data from sessionStorage keyed to the previous session ID,
showing old tasks while the new session was processing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-29 07:28:35 +00:00
parent d6877bb55e
commit a705bd58f9

View File

@@ -120,6 +120,11 @@ export default function AssistantChatPage() {
navigate(location.pathname, { replace: true, state: {} })
const sendPrefill = async () => {
// Clear stale task lane from previous session
setShowTaskLane(false)
setActiveQuestions([])
setActiveActions([])
try {
const session = await aiSessionsApi.createChatSession({
intake_type: 'free_text',