feat: FlowPilot migration — Phase 1-9 + Phase 9 bug fixes + QA fixture harness #147
@@ -272,12 +272,18 @@ export default function AssistantChatPage() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Single source of truth for "wipe every per-session task-lane state field"
|
// Single source of truth for "wipe every per-chat UI state field" before
|
||||||
// before switching to a different chat. Called from selectChat, handleNewChat,
|
// switching to a different chat. Called from selectChat, handleNewChat,
|
||||||
// sendPrefill, and handleResumeNew so adding new lane-scoped state in future
|
// sendPrefill, and handleResumeNew so adding new chat-scoped state in future
|
||||||
// phases only requires touching this one helper. Forgetting to clear a field
|
// phases only requires touching this one helper. Forgetting to clear a field
|
||||||
// leaks the previous session's data into the new one (Phase 5 regression).
|
// leaks the previous chat's data into the new one — first noticed as a task
|
||||||
|
// lane regression (Phase 5), surfaced again as the conversation pane showing
|
||||||
|
// the previous chat's messages while the sidebar entry said "0 messages".
|
||||||
|
// `messages` belongs in here too: selectChat clears it asynchronously when
|
||||||
|
// getSession returns, but the gap between switching and that response is
|
||||||
|
// exactly when the previous chat's content stays visible.
|
||||||
const resetSessionDerivedState = useCallback(() => {
|
const resetSessionDerivedState = useCallback(() => {
|
||||||
|
setMessages([])
|
||||||
setShowTaskLane(false)
|
setShowTaskLane(false)
|
||||||
setActiveQuestions([])
|
setActiveQuestions([])
|
||||||
setActiveActions([])
|
setActiveActions([])
|
||||||
|
|||||||
Reference in New Issue
Block a user