feat: FlowPilot migration — Phase 1-9 + Phase 9 bug fixes + QA fixture harness #147

Merged
chihlasm merged 85 commits from feat/flowpilot-migration into main 2026-04-25 06:02:14 +00:00
Showing only changes of commit ddae171a37 - Show all commits

View File

@@ -272,12 +272,18 @@ export default function AssistantChatPage() {
}
}
// Single source of truth for "wipe every per-session task-lane state field"
// before switching to a different chat. Called from selectChat, handleNewChat,
// sendPrefill, and handleResumeNew so adding new lane-scoped state in future
// Single source of truth for "wipe every per-chat UI state field" before
// switching to a different chat. Called from selectChat, handleNewChat,
// sendPrefill, and handleResumeNew so adding new chat-scoped state in future
// 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(() => {
setMessages([])
setShowTaskLane(false)
setActiveQuestions([])
setActiveActions([])