@@ -3770,175 +3770,178 @@ const WorkflowContent = React.memo(() => {
37703770 ] )
37713771
37723772 return (
3773- < div className = 'flex h-full w-full flex-col overflow-hidden' >
3774- < div className = 'relative h-full w-full flex-1' >
3775- { ! isWorkflowReady && (
3776- < div className = 'absolute inset-0 z-[5] flex items-center justify-center bg-[var(--bg)]' >
3777- < div
3778- className = 'h-[18px] w-[18px] animate-spin rounded-full'
3779- style = { {
3780- background :
3781- 'conic-gradient(from 0deg, hsl(var(--muted-foreground)) 0deg 120deg, transparent 120deg 180deg, hsl(var(--muted-foreground)) 180deg 300deg, transparent 300deg 360deg)' ,
3782- mask : 'radial-gradient(farthest-side, transparent calc(100% - 1.5px), black calc(100% - 1.5px))' ,
3783- WebkitMask :
3784- 'radial-gradient(farthest-side, transparent calc(100% - 1.5px), black calc(100% - 1.5px))' ,
3785- } }
3786- />
3787- </ div >
3788- ) }
3789-
3790- { isWorkflowReady && (
3791- < >
3792- { showTrainingModal && < TrainingModal /> }
3793-
3794- < ReactFlow
3795- nodes = { displayNodes }
3796- edges = { edgesWithSelection }
3797- onNodesChange = { onNodesChange }
3798- onEdgesChange = { onEdgesChange }
3799- onConnect = { effectivePermissions . canEdit ? onConnect : undefined }
3800- onConnectStart = { effectivePermissions . canEdit ? onConnectStart : undefined }
3801- onConnectEnd = { effectivePermissions . canEdit ? onConnectEnd : undefined }
3802- nodeTypes = { nodeTypes }
3803- edgeTypes = { edgeTypes }
3804- onMouseDown = { handleCanvasMouseDown }
3805- onDrop = { effectivePermissions . canEdit ? onDrop : undefined }
3806- onDragOver = { effectivePermissions . canEdit ? onDragOver : undefined }
3807- onInit = { ( instance ) => {
3808- requestAnimationFrame ( ( ) => {
3809- instance . fitView ( reactFlowFitViewOptions )
3810- setIsCanvasReady ( true )
3811- } )
3812- } }
3813- fitViewOptions = { reactFlowFitViewOptions }
3814- minZoom = { 0.1 }
3815- maxZoom = { 1.3 }
3816- panOnScroll
3817- defaultEdgeOptions = { defaultEdgeOptions }
3818- proOptions = { reactFlowProOptions }
3819- connectionLineStyle = { connectionLineStyle }
3820- connectionLineType = { ConnectionLineType . SmoothStep }
3821- onPaneClick = { onPaneClick }
3822- onEdgeClick = { onEdgeClick }
3823- onNodeClick = { handleNodeClick }
3824- onPaneContextMenu = { handlePaneContextMenu }
3825- onNodeContextMenu = { handleNodeContextMenu }
3826- onSelectionContextMenu = { handleSelectionContextMenu }
3827- onPointerMove = { handleCanvasPointerMove }
3828- onPointerLeave = { handleCanvasPointerLeave }
3829- elementsSelectable = { true }
3830- selectionOnDrag = { selectionProps . selectionOnDrag }
3831- selectionMode = { SelectionMode . Partial }
3832- panOnDrag = { selectionProps . panOnDrag }
3833- selectionKeyCode = { selectionProps . selectionKeyCode }
3834- multiSelectionKeyCode = { [ 'Meta' , 'Control' , 'Shift' ] }
3835- nodesConnectable = { effectivePermissions . canEdit }
3836- nodesDraggable = { effectivePermissions . canEdit }
3837- draggable = { false }
3838- noWheelClassName = 'allow-scroll'
3839- edgesFocusable = { true }
3840- edgesUpdatable = { effectivePermissions . canEdit }
3841- className = { `workflow-container h-full bg-[var(--bg)] transition-opacity duration-150 ${ reactFlowStyles } ${ isCanvasReady ? 'opacity-100' : 'opacity-0' } ${ isHandMode ? 'canvas-mode-hand' : 'canvas-mode-cursor' } ` }
3842- onNodeDrag = { effectivePermissions . canEdit ? onNodeDrag : undefined }
3843- onNodeDragStop = { effectivePermissions . canEdit ? onNodeDragStop : undefined }
3844- onSelectionDragStart = { effectivePermissions . canEdit ? onSelectionDragStart : undefined }
3845- onSelectionDrag = { effectivePermissions . canEdit ? onSelectionDrag : undefined }
3846- onSelectionDragStop = { effectivePermissions . canEdit ? onSelectionDragStop : undefined }
3847- onNodeDragStart = { effectivePermissions . canEdit ? onNodeDragStart : undefined }
3848- snapToGrid = { snapToGrid }
3849- snapGrid = { snapGrid }
3850- elevateEdgesOnSelect = { true }
3851- onlyRenderVisibleElements = { false }
3852- deleteKeyCode = { null }
3853- elevateNodesOnSelect = { false }
3854- autoPanOnConnect = { effectivePermissions . canEdit }
3855- autoPanOnNodeDrag = { effectivePermissions . canEdit }
3856- />
3857-
3858- < Cursors />
3859-
3860- < WorkflowControls />
3861-
3862- < Suspense fallback = { null } >
3863- < LazyChat />
3864- </ Suspense >
3865-
3866- { /* Context Menus */ }
3867- < BlockMenu
3868- isOpen = { isBlockMenuOpen }
3869- position = { contextMenuPosition }
3870- menuRef = { contextMenuRef }
3871- onClose = { closeContextMenu }
3872- selectedBlocks = { contextMenuBlocks }
3873- onCopy = { handleContextCopy }
3874- onPaste = { handleContextPaste }
3875- onDuplicate = { handleContextDuplicate }
3876- onDelete = { handleContextDelete }
3877- onToggleEnabled = { handleContextToggleEnabled }
3878- onToggleHandles = { handleContextToggleHandles }
3879- onRemoveFromSubflow = { handleContextRemoveFromSubflow }
3880- onOpenEditor = { handleContextOpenEditor }
3881- onRename = { handleContextRename }
3882- onRunFromBlock = { handleContextRunFromBlock }
3883- onRunUntilBlock = { handleContextRunUntilBlock }
3884- hasClipboard = { hasClipboard ( ) }
3885- showRemoveFromSubflow = { contextMenuBlocks . some (
3886- ( b ) => b . parentId && ( b . parentType === 'loop' || b . parentType === 'parallel' )
3887- ) }
3888- canRunFromBlock = { runFromBlockState . canRun }
3889- disableEdit = {
3890- ! effectivePermissions . canEdit ||
3891- contextMenuBlocks . some ( ( b ) => b . locked || b . isParentLocked )
3892- }
3893- userCanEdit = { effectivePermissions . canEdit }
3894- isExecuting = { isExecuting }
3895- isPositionalTrigger = {
3896- contextMenuBlocks . length === 1 &&
3897- edges . filter ( ( e ) => e . target === contextMenuBlocks [ 0 ] ?. id ) . length === 0
3898- }
3899- onToggleLocked = { handleContextToggleLocked }
3900- canAdmin = { effectivePermissions . canAdmin }
3901- />
3902-
3903- < CanvasMenu
3904- isOpen = { isPaneMenuOpen }
3905- position = { contextMenuPosition }
3906- menuRef = { contextMenuRef }
3907- onClose = { closeContextMenu }
3908- onUndo = { undo }
3909- onRedo = { redo }
3910- onPaste = { handleContextPaste }
3911- onAddBlock = { handleContextAddBlock }
3912- onAutoLayout = { handleAutoLayout }
3913- onFitToView = { ( ) => fitViewToBounds ( { padding : 0.1 , duration : 300 } ) }
3914- onOpenLogs = { handleContextOpenLogs }
3915- onToggleVariables = { handleContextToggleVariables }
3916- onToggleChat = { handleContextToggleChat }
3917- isVariablesOpen = { isVariablesOpen }
3918- isChatOpen = { isChatOpen }
3919- hasClipboard = { hasClipboard ( ) }
3920- disableEdit = { ! effectivePermissions . canEdit }
3921- canUndo = { canUndo }
3922- canRedo = { canRedo }
3923- hasLockedBlocks = { hasLockedBlocks }
3924- onToggleWorkflowLock = { handleToggleWorkflowLock }
3925- allBlocksLocked = { allBlocksLocked }
3926- canAdmin = { effectivePermissions . canAdmin }
3927- hasBlocks = { hasBlocks }
3928- />
3929- </ >
3930- ) }
3931-
3932- < Notifications />
3933-
3934- { isWorkflowReady && isWorkflowEmpty && effectivePermissions . canEdit && < CommandList /> }
3935-
3936- < Panel />
3773+ < div className = 'flex h-full w-full overflow-hidden' >
3774+ < div className = 'flex min-w-0 flex-1 flex-col' >
3775+ < div className = 'relative flex-1 overflow-hidden' >
3776+ { ! isWorkflowReady && (
3777+ < div className = 'absolute inset-0 z-[5] flex items-center justify-center bg-[var(--bg)]' >
3778+ < div
3779+ className = 'h-[18px] w-[18px] animate-spin rounded-full'
3780+ style = { {
3781+ background :
3782+ 'conic-gradient(from 0deg, hsl(var(--muted-foreground)) 0deg 120deg, transparent 120deg 180deg, hsl(var(--muted-foreground)) 180deg 300deg, transparent 300deg 360deg)' ,
3783+ mask : 'radial-gradient(farthest-side, transparent calc(100% - 1.5px), black calc(100% - 1.5px))' ,
3784+ WebkitMask :
3785+ 'radial-gradient(farthest-side, transparent calc(100% - 1.5px), black calc(100% - 1.5px))' ,
3786+ } }
3787+ />
3788+ </ div >
3789+ ) }
3790+
3791+ { isWorkflowReady && (
3792+ < >
3793+ { showTrainingModal && < TrainingModal /> }
3794+
3795+ < ReactFlow
3796+ nodes = { displayNodes }
3797+ edges = { edgesWithSelection }
3798+ onNodesChange = { onNodesChange }
3799+ onEdgesChange = { onEdgesChange }
3800+ onConnect = { effectivePermissions . canEdit ? onConnect : undefined }
3801+ onConnectStart = { effectivePermissions . canEdit ? onConnectStart : undefined }
3802+ onConnectEnd = { effectivePermissions . canEdit ? onConnectEnd : undefined }
3803+ nodeTypes = { nodeTypes }
3804+ edgeTypes = { edgeTypes }
3805+ onMouseDown = { handleCanvasMouseDown }
3806+ onDrop = { effectivePermissions . canEdit ? onDrop : undefined }
3807+ onDragOver = { effectivePermissions . canEdit ? onDragOver : undefined }
3808+ onInit = { ( instance ) => {
3809+ requestAnimationFrame ( ( ) => {
3810+ instance . fitView ( reactFlowFitViewOptions )
3811+ setIsCanvasReady ( true )
3812+ } )
3813+ } }
3814+ fitViewOptions = { reactFlowFitViewOptions }
3815+ minZoom = { 0.1 }
3816+ maxZoom = { 1.3 }
3817+ panOnScroll
3818+ defaultEdgeOptions = { defaultEdgeOptions }
3819+ proOptions = { reactFlowProOptions }
3820+ connectionLineStyle = { connectionLineStyle }
3821+ connectionLineType = { ConnectionLineType . SmoothStep }
3822+ onPaneClick = { onPaneClick }
3823+ onEdgeClick = { onEdgeClick }
3824+ onNodeClick = { handleNodeClick }
3825+ onPaneContextMenu = { handlePaneContextMenu }
3826+ onNodeContextMenu = { handleNodeContextMenu }
3827+ onSelectionContextMenu = { handleSelectionContextMenu }
3828+ onPointerMove = { handleCanvasPointerMove }
3829+ onPointerLeave = { handleCanvasPointerLeave }
3830+ elementsSelectable = { true }
3831+ selectionOnDrag = { selectionProps . selectionOnDrag }
3832+ selectionMode = { SelectionMode . Partial }
3833+ panOnDrag = { selectionProps . panOnDrag }
3834+ selectionKeyCode = { selectionProps . selectionKeyCode }
3835+ multiSelectionKeyCode = { [ 'Meta' , 'Control' , 'Shift' ] }
3836+ nodesConnectable = { effectivePermissions . canEdit }
3837+ nodesDraggable = { effectivePermissions . canEdit }
3838+ draggable = { false }
3839+ noWheelClassName = 'allow-scroll'
3840+ edgesFocusable = { true }
3841+ edgesUpdatable = { effectivePermissions . canEdit }
3842+ className = { `workflow-container h-full bg-[var(--bg)] transition-opacity duration-150 ${ reactFlowStyles } ${ isCanvasReady ? 'opacity-100' : 'opacity-0' } ${ isHandMode ? 'canvas-mode-hand' : 'canvas-mode-cursor' } ` }
3843+ onNodeDrag = { effectivePermissions . canEdit ? onNodeDrag : undefined }
3844+ onNodeDragStop = { effectivePermissions . canEdit ? onNodeDragStop : undefined }
3845+ onSelectionDragStart = {
3846+ effectivePermissions . canEdit ? onSelectionDragStart : undefined
3847+ }
3848+ onSelectionDrag = { effectivePermissions . canEdit ? onSelectionDrag : undefined }
3849+ onSelectionDragStop = { effectivePermissions . canEdit ? onSelectionDragStop : undefined }
3850+ onNodeDragStart = { effectivePermissions . canEdit ? onNodeDragStart : undefined }
3851+ snapToGrid = { snapToGrid }
3852+ snapGrid = { snapGrid }
3853+ elevateEdgesOnSelect = { true }
3854+ onlyRenderVisibleElements = { false }
3855+ deleteKeyCode = { null }
3856+ elevateNodesOnSelect = { false }
3857+ autoPanOnConnect = { effectivePermissions . canEdit }
3858+ autoPanOnNodeDrag = { effectivePermissions . canEdit }
3859+ />
3860+
3861+ < Cursors />
3862+
3863+ < WorkflowControls />
3864+
3865+ < Suspense fallback = { null } >
3866+ < LazyChat />
3867+ </ Suspense >
3868+
3869+ < BlockMenu
3870+ isOpen = { isBlockMenuOpen }
3871+ position = { contextMenuPosition }
3872+ menuRef = { contextMenuRef }
3873+ onClose = { closeContextMenu }
3874+ selectedBlocks = { contextMenuBlocks }
3875+ onCopy = { handleContextCopy }
3876+ onPaste = { handleContextPaste }
3877+ onDuplicate = { handleContextDuplicate }
3878+ onDelete = { handleContextDelete }
3879+ onToggleEnabled = { handleContextToggleEnabled }
3880+ onToggleHandles = { handleContextToggleHandles }
3881+ onRemoveFromSubflow = { handleContextRemoveFromSubflow }
3882+ onOpenEditor = { handleContextOpenEditor }
3883+ onRename = { handleContextRename }
3884+ onRunFromBlock = { handleContextRunFromBlock }
3885+ onRunUntilBlock = { handleContextRunUntilBlock }
3886+ hasClipboard = { hasClipboard ( ) }
3887+ showRemoveFromSubflow = { contextMenuBlocks . some (
3888+ ( b ) => b . parentId && ( b . parentType === 'loop' || b . parentType === 'parallel' )
3889+ ) }
3890+ canRunFromBlock = { runFromBlockState . canRun }
3891+ disableEdit = {
3892+ ! effectivePermissions . canEdit ||
3893+ contextMenuBlocks . some ( ( b ) => b . locked || b . isParentLocked )
3894+ }
3895+ userCanEdit = { effectivePermissions . canEdit }
3896+ isExecuting = { isExecuting }
3897+ isPositionalTrigger = {
3898+ contextMenuBlocks . length === 1 &&
3899+ edges . filter ( ( e ) => e . target === contextMenuBlocks [ 0 ] ?. id ) . length === 0
3900+ }
3901+ onToggleLocked = { handleContextToggleLocked }
3902+ canAdmin = { effectivePermissions . canAdmin }
3903+ />
3904+
3905+ < CanvasMenu
3906+ isOpen = { isPaneMenuOpen }
3907+ position = { contextMenuPosition }
3908+ menuRef = { contextMenuRef }
3909+ onClose = { closeContextMenu }
3910+ onUndo = { undo }
3911+ onRedo = { redo }
3912+ onPaste = { handleContextPaste }
3913+ onAddBlock = { handleContextAddBlock }
3914+ onAutoLayout = { handleAutoLayout }
3915+ onFitToView = { ( ) => fitViewToBounds ( { padding : 0.1 , duration : 300 } ) }
3916+ onOpenLogs = { handleContextOpenLogs }
3917+ onToggleVariables = { handleContextToggleVariables }
3918+ onToggleChat = { handleContextToggleChat }
3919+ isVariablesOpen = { isVariablesOpen }
3920+ isChatOpen = { isChatOpen }
3921+ hasClipboard = { hasClipboard ( ) }
3922+ disableEdit = { ! effectivePermissions . canEdit }
3923+ canUndo = { canUndo }
3924+ canRedo = { canRedo }
3925+ hasLockedBlocks = { hasLockedBlocks }
3926+ onToggleWorkflowLock = { handleToggleWorkflowLock }
3927+ allBlocksLocked = { allBlocksLocked }
3928+ canAdmin = { effectivePermissions . canAdmin }
3929+ hasBlocks = { hasBlocks }
3930+ />
3931+ </ >
3932+ ) }
3933+
3934+ < Notifications />
3935+
3936+ { isWorkflowReady && isWorkflowEmpty && effectivePermissions . canEdit && < CommandList /> }
3937+ </ div >
3938+
3939+ < DiffControls />
3940+
3941+ < Terminal />
39373942 </ div >
39383943
3939- < DiffControls />
3940-
3941- < Terminal />
3944+ < Panel />
39423945
39433946 { oauthModal && (
39443947 < Suspense fallback = { null } >
0 commit comments