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:
@@ -180,7 +180,9 @@ export function ProceduralEditorPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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 */}
|
{/* Toolbar — sticky */}
|
||||||
<div className="flex shrink-0 items-center justify-between border-b border-border bg-card px-4 py-2">
|
<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">
|
<div className="flex items-center gap-3">
|
||||||
@@ -315,27 +317,26 @@ export function ProceduralEditorPage() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Step List + AI Panel */}
|
{/* Step List */}
|
||||||
<div className="flex min-h-0 flex-1 overflow-hidden">
|
<div className="min-h-0 flex-1 overflow-y-auto px-4 py-4">
|
||||||
<div className="flex-1 overflow-y-auto px-4 py-4">
|
<StepList onStepContextMenu={editorAI.openContextMenu} />
|
||||||
<StepList onStepContextMenu={editorAI.openContextMenu} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<EditorAIPanel
|
|
||||||
isOpen={editorAI.isOpen}
|
|
||||||
onClose={editorAI.closePanel}
|
|
||||||
focalNode={null}
|
|
||||||
flowName={name}
|
|
||||||
flowType={isMaintenance ? 'maintenance' : 'procedural'}
|
|
||||||
nodeCount={steps.length}
|
|
||||||
messages={editorAI.messages}
|
|
||||||
input={editorAI.input}
|
|
||||||
onInputChange={editorAI.setInput}
|
|
||||||
onSend={editorAI.sendMessage}
|
|
||||||
isLoading={editorAI.isLoading}
|
|
||||||
suggestions={editorAI.suggestions}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>{/* end main content column */}
|
||||||
|
|
||||||
|
<EditorAIPanel
|
||||||
|
isOpen={editorAI.isOpen}
|
||||||
|
onClose={editorAI.closePanel}
|
||||||
|
focalNode={null}
|
||||||
|
flowName={name}
|
||||||
|
flowType={isMaintenance ? 'maintenance' : 'procedural'}
|
||||||
|
nodeCount={steps.length}
|
||||||
|
messages={editorAI.messages}
|
||||||
|
input={editorAI.input}
|
||||||
|
onInputChange={editorAI.setInput}
|
||||||
|
onSend={editorAI.sendMessage}
|
||||||
|
isLoading={editorAI.isLoading}
|
||||||
|
suggestions={editorAI.suggestions}
|
||||||
|
/>
|
||||||
|
|
||||||
{editorAI.contextMenu && (
|
{editorAI.contextMenu && (
|
||||||
<ContextMenu
|
<ContextMenu
|
||||||
|
|||||||
@@ -522,7 +522,9 @@ export function TreeEditorPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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 */}
|
{/* Draft Restore Prompt */}
|
||||||
{showDraftPrompt && (
|
{showDraftPrompt && (
|
||||||
@@ -837,35 +839,16 @@ export function TreeEditorPage() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Main Editor + AI Panel */}
|
{/* Main Editor */}
|
||||||
<div className="flex min-h-0 flex-1 overflow-hidden">
|
<div className="min-h-0 flex-1 overflow-hidden">
|
||||||
<div className="flex-1 overflow-hidden">
|
<TreeEditorLayout
|
||||||
<TreeEditorLayout
|
isMobile={isMobile}
|
||||||
isMobile={isMobile}
|
isMetadataOpen={isMetadataOpen}
|
||||||
isMetadataOpen={isMetadataOpen}
|
onCloseMetadata={() => setIsMetadataOpen(false)}
|
||||||
onCloseMetadata={() => setIsMetadataOpen(false)}
|
editingNodeId={editorAI.isOpen ? null : editingNodeId}
|
||||||
editingNodeId={editorAI.isOpen ? null : editingNodeId}
|
onNodeSelect={handleNodeSelect}
|
||||||
onNodeSelect={handleNodeSelect}
|
onSelectAnswerType={handleSelectAnswerType}
|
||||||
onSelectAnswerType={handleSelectAnswerType}
|
onNodeContextMenu={editorAI.openContextMenu}
|
||||||
onNodeContextMenu={editorAI.openContextMenu}
|
|
||||||
/>
|
|
||||||
</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>
|
</div>
|
||||||
|
|
||||||
@@ -894,6 +877,24 @@ export function TreeEditorPage() {
|
|||||||
onClose={() => setShowExportModal(false)}
|
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 */}
|
{/* AI Context Menu */}
|
||||||
{editorAI.contextMenu && (
|
{editorAI.contextMenu && (
|
||||||
|
|||||||
Reference in New Issue
Block a user