diff --git a/frontend/src/components/copilot/CopilotPanel.tsx b/frontend/src/components/copilot/CopilotPanel.tsx
index c5848516..0e90a32b 100644
--- a/frontend/src/components/copilot/CopilotPanel.tsx
+++ b/frontend/src/components/copilot/CopilotPanel.tsx
@@ -88,9 +88,9 @@ export function CopilotPanel({ isOpen, onClose, treeId, sessionId, currentNodeId
return (
- {/* Right panel - step detail */}
+ {/* Right panel - step detail + copilot */}
{currentStep && (
)}
+
+ {/* AI Copilot - in-flow panel */}
+ {treeId && copilotOpen && (
+
setCopilotOpen(false)}
+ treeId={treeId}
+ sessionId={session?.id}
+ currentNodeId={runtimeSteps[currentStepIndex]?.id}
+ />
+ )}
{/* CSAT Modal */}
@@ -708,18 +719,9 @@ export function ProceduralNavigationPage() {
/>
)}
- {/* AI Copilot */}
+ {/* AI Copilot toggle button */}
{treeId && (
- <>
- setCopilotOpen(true)} />
- setCopilotOpen(false)}
- treeId={treeId}
- sessionId={session?.id}
- currentNodeId={runtimeSteps[currentStepIndex]?.id}
- />
- >
+ setCopilotOpen(true)} />
)}
)
diff --git a/frontend/src/pages/TreeNavigationPage.tsx b/frontend/src/pages/TreeNavigationPage.tsx
index d71908cc..3b3b1704 100644
--- a/frontend/src/pages/TreeNavigationPage.tsx
+++ b/frontend/src/pages/TreeNavigationPage.tsx
@@ -626,9 +626,9 @@ export function TreeNavigationPage() {
}
return (
-
+
{/* Main Content */}
-
+
{/* Header */}
@@ -1264,6 +1264,17 @@ export function TreeNavigationPage() {
+ {/* AI Copilot - in-flow panel */}
+ {treeId && copilotOpen && (
+
setCopilotOpen(false)}
+ treeId={treeId}
+ sessionId={session?.id}
+ currentNodeId={currentNodeId}
+ />
+ )}
+
{/* Scratchpad Sidebar */}
{session && (
)}
- {/* AI Copilot */}
+ {/* AI Copilot toggle button */}
{treeId && (
- <>
- setCopilotOpen(true)} />
- setCopilotOpen(false)}
- treeId={treeId}
- sessionId={session?.id}
- currentNodeId={currentNodeId}
- />
- >
+ setCopilotOpen(true)} />
)}
)