fix: clear cockpit state on session switch and add loading placeholders
- Reset triageMeta, psaTicketId, steps, and completedSteps when activeChatId changes (prevents stale triage data from previous session showing while AI processes the new one) - Split the activeChatId and activeActions reset effects so triage only resets on session switch, not on every new action set - Add loading placeholders to cockpit work zone: spinner + "analyzing" text in steps panel, "questions will appear here" in right panel - Add centered "Starting session..." loader to FlowPilot page when loading with no messages yet (prefill creation period) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -149,6 +149,12 @@ export default function FlowPilotPage() {
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
{session.messages.length === 0 && session.loading && (
|
||||
<div className="flex flex-col items-center justify-center h-full text-center gap-3">
|
||||
<Loader2 size={24} className="animate-spin text-primary" />
|
||||
<p className="text-sm text-muted-foreground">Starting session...</p>
|
||||
</div>
|
||||
)}
|
||||
{session.messages.map((msg, i) => (
|
||||
<ChatMessage
|
||||
key={i}
|
||||
|
||||
Reference in New Issue
Block a user