fix: move AI Assist panel to full-height side layout in both editors

The AI panel was nested inside the content area, only spanning the
step list / canvas section. Now it sits at the outermost flex level,
spanning the full page height alongside all content (toolbar,
collapsible sections, steps/canvas). This prevents the panel from
overlapping content and lets the editor area properly shrink.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-07 02:10:12 -05:00
parent 8cd3478bc0
commit 7793da8c5f
2 changed files with 53 additions and 51 deletions

View File

@@ -180,7 +180,9 @@ export function ProceduralEditorPage() {
}
return (
<div className="flex h-full flex-col overflow-hidden">
<div className="flex h-full overflow-hidden">
{/* Main content column */}
<div className="flex flex-1 flex-col overflow-hidden">
{/* Toolbar — sticky */}
<div className="flex shrink-0 items-center justify-between border-b border-border bg-card px-4 py-2">
<div className="flex items-center gap-3">
@@ -315,11 +317,11 @@ export function ProceduralEditorPage() {
)}
</div>
{/* Step List + AI Panel */}
<div className="flex min-h-0 flex-1 overflow-hidden">
<div className="flex-1 overflow-y-auto px-4 py-4">
{/* Step List */}
<div className="min-h-0 flex-1 overflow-y-auto px-4 py-4">
<StepList onStepContextMenu={editorAI.openContextMenu} />
</div>
</div>{/* end main content column */}
<EditorAIPanel
isOpen={editorAI.isOpen}
@@ -335,7 +337,6 @@ export function ProceduralEditorPage() {
isLoading={editorAI.isLoading}
suggestions={editorAI.suggestions}
/>
</div>
{editorAI.contextMenu && (
<ContextMenu

View File

@@ -522,7 +522,9 @@ export function TreeEditorPage() {
}
return (
<div className="flex h-full flex-col overflow-hidden">
<div className="flex h-full overflow-hidden">
{/* Main content column */}
<div className="flex flex-1 flex-col overflow-hidden">
{/* Draft Restore Prompt */}
{showDraftPrompt && (
@@ -837,9 +839,8 @@ export function TreeEditorPage() {
</div>
)}
{/* Main Editor + AI Panel */}
<div className="flex min-h-0 flex-1 overflow-hidden">
<div className="flex-1 overflow-hidden">
{/* Main Editor */}
<div className="min-h-0 flex-1 overflow-hidden">
<TreeEditorLayout
isMobile={isMobile}
isMetadataOpen={isMetadataOpen}
@@ -851,24 +852,6 @@ export function TreeEditorPage() {
/>
</div>
<EditorAIPanel
isOpen={editorAI.isOpen}
onClose={handleAIPanelClose}
focalNode={editorAI.focalNodeId && treeStructure
? findNodeInTree(editorAI.focalNodeId, treeStructure)
: null}
flowName={name}
flowType="troubleshooting"
nodeCount={treeStructure ? getAllNodeIds().length : 0}
messages={editorAI.messages}
input={editorAI.input}
onInputChange={editorAI.setInput}
onSend={editorAI.sendMessage}
isLoading={editorAI.isLoading}
suggestions={editorAI.suggestions}
/>
</div>
{/* Flow Analytics Panel (collapsible) */}
{showAnalytics && id && (
<div className="border-t border-border p-6 overflow-y-auto max-h-[50vh]">
@@ -894,6 +877,24 @@ export function TreeEditorPage() {
onClose={() => setShowExportModal(false)}
/>
)}
</div>{/* end main content column */}
<EditorAIPanel
isOpen={editorAI.isOpen}
onClose={handleAIPanelClose}
focalNode={editorAI.focalNodeId && treeStructure
? findNodeInTree(editorAI.focalNodeId, treeStructure)
: null}
flowName={name}
flowType="troubleshooting"
nodeCount={treeStructure ? getAllNodeIds().length : 0}
messages={editorAI.messages}
input={editorAI.input}
onInputChange={editorAI.setInput}
onSend={editorAI.sendMessage}
isLoading={editorAI.isLoading}
suggestions={editorAI.suggestions}
/>
{/* AI Context Menu */}
{editorAI.contextMenu && (