diff --git a/apps/sim/app/w/[id]/components/control-bar/components/deployment-controls/components/deployed-workflow-card.tsx b/apps/sim/app/w/[id]/components/control-bar/components/deployment-controls/components/deployed-workflow-card.tsx index 4caa779d83..2ee4f25d72 100644 --- a/apps/sim/app/w/[id]/components/control-bar/components/deployment-controls/components/deployed-workflow-card.tsx +++ b/apps/sim/app/w/[id]/components/control-bar/components/deployment-controls/components/deployed-workflow-card.tsx @@ -32,46 +32,6 @@ export function DeployedWorkflowCard({ }: DeployedWorkflowCardProps) { const [showingDeployed, setShowingDeployed] = useState(true) const workflowToShow = showingDeployed ? deployedWorkflowState : currentWorkflowState - console.log('workflowToShow', workflowToShow) - - // Add detailed logging for debugging - useEffect(() => { - if (workflowToShow) { - // Log basic stats - const blockCount = Object.keys(workflowToShow.blocks || {}).length; - const blocksWithSubBlocks = Object.values(workflowToShow.blocks || {}) - .filter(block => block.subBlocks && Object.keys(block.subBlocks).length > 0); - - logger.info(`[WORKFLOW-STATE] ${showingDeployed ? 'Deployed' : 'Current'} workflow with ${blockCount} blocks`, { - type: showingDeployed ? 'deployed' : 'current', - blockCount, - blocksWithSubBlocksCount: blocksWithSubBlocks.length, - // Log a sample of a block with subblocks if any exist - sampleBlock: blocksWithSubBlocks.length > 0 - ? { - id: blocksWithSubBlocks[0].id, - type: blocksWithSubBlocks[0].type, - subBlocksCount: Object.keys(blocksWithSubBlocks[0].subBlocks || {}).length, - subBlocksSample: Object.entries(blocksWithSubBlocks[0].subBlocks || {}).slice(0, 2) - } - : null - }); - - // For deep debug, log each block's subblocks (limited data for readability) - Object.entries(workflowToShow.blocks || {}).forEach(([blockId, block]) => { - if (block.subBlocks && Object.keys(block.subBlocks).length > 0) { - logger.info(`[BLOCK-SUBBLOCKS] ${showingDeployed ? 'Deployed' : 'Current'} block ${blockId}`, { - blockId, - blockType: block.type, - subBlocksCount: Object.keys(block.subBlocks).length, - // Just log IDs to avoid huge logs, but include a couple of values as examples - subBlockIds: Object.keys(block.subBlocks), - sampleValues: Object.entries(block.subBlocks).slice(0, 2).map(([id, value]) => ({ id, value })) - }); - } - }); - } - }, [workflowToShow, showingDeployed]); // Create sanitized workflow state const sanitizedWorkflowState = useMemo(() => { @@ -98,8 +58,6 @@ export function DeployedWorkflowCard({ return `${showingDeployed ? 'deployed' : 'current'}-preview-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`; }, [showingDeployed]); - {console.log('sanitizedWorkflowState', sanitizedWorkflowState)} - return ( state.activeWorkflowId) - // Add debug logging to check deployedWorkflowState - useEffect(() => { - if (isOpen) { - if (deployedWorkflowState) { - logger.info(`DeployedWorkflowModal received state with ${Object.keys(deployedWorkflowState.blocks || {}).length} blocks`) - } else { - logger.warn('DeployedWorkflowModal opened but deployedWorkflowState is null or undefined') - } - } - }, [isOpen, deployedWorkflowState]); - // Get current workflow state to compare with deployed state const currentWorkflowState = useWorkflowStore((state) => ({ blocks: activeWorkflowId ? mergeSubblockState(state.blocks, activeWorkflowId) : state.blocks, diff --git a/apps/sim/app/w/[id]/components/workflow-block/components/sub-block/components/condition-input.tsx b/apps/sim/app/w/[id]/components/workflow-block/components/sub-block/components/condition-input.tsx index fb77d9e01c..9b00032e3f 100644 --- a/apps/sim/app/w/[id]/components/workflow-block/components/sub-block/components/condition-input.tsx +++ b/apps/sim/app/w/[id]/components/workflow-block/components/sub-block/components/condition-input.tsx @@ -511,17 +511,6 @@ export function ConditionInput({ blockId, subBlockId, isConnecting, isPreview = }) }, [conditionalBlocks.length]) - // Log when in preview mode to verify it's working - // useEffect(() => { - // if (isPreview) { - // logger.info(`[PREVIEW] ConditionInput for ${blockId}:${subBlockId}`, { - // isPreview, - // propValue, - // storeValue - // }); - // } - // }, [isPreview, propValue, storeValue, blockId, subBlockId]); - // Show loading or empty state if not ready or no blocks if (!isReady || conditionalBlocks.length === 0) { return ( diff --git a/apps/sim/app/w/[id]/components/workflow-block/components/sub-block/components/dropdown.tsx b/apps/sim/app/w/[id]/components/workflow-block/components/sub-block/components/dropdown.tsx index 033a71ebcb..e248208480 100644 --- a/apps/sim/app/w/[id]/components/workflow-block/components/sub-block/components/dropdown.tsx +++ b/apps/sim/app/w/[id]/components/workflow-block/components/sub-block/components/dropdown.tsx @@ -33,17 +33,6 @@ export function Dropdown({ const [value, setValue] = useSubBlockValue(blockId, subBlockId, true, isPreview, propValue) const [storeInitialized, setStoreInitialized] = useState(false) - // Log when in preview mode to verify it's working - useEffect(() => { - if (isPreview) { - logger.info(`[PREVIEW] Dropdown for ${blockId}:${subBlockId}`, { - isPreview, - propValue, - value - }); - } - }, [isPreview, propValue, value, blockId, subBlockId]); - // Evaluate options if it's a function const evaluatedOptions = useMemo(() => { return typeof options === 'function' ? options() : options