diff --git a/sim/app/w/[id]/components/panel/components/console/components/console-entry/console-entry.tsx b/sim/app/w/[id]/components/panel/components/console/components/console-entry/console-entry.tsx index 0f234c1ac9..85f2726ace 100644 --- a/sim/app/w/[id]/components/panel/components/console/components/console-entry/console-entry.tsx +++ b/sim/app/w/[id]/components/panel/components/console/components/console-entry/console-entry.tsx @@ -71,7 +71,7 @@ export function ConsoleEntry({ entry, consoleWidth }: ConsoleEntryProps) { {!entry.error && !entry.warning && (
-
+
@@ -80,7 +80,7 @@ export function ConsoleEntry({ entry, consoleWidth }: ConsoleEntryProps) { {entry.error && (
-
+
Error
{entry.error}
@@ -90,7 +90,7 @@ export function ConsoleEntry({ entry, consoleWidth }: ConsoleEntryProps) { {entry.warning && (
-
+
Warning
{entry.warning}
diff --git a/sim/app/w/[id]/hooks/use-workflow-execution.ts b/sim/app/w/[id]/hooks/use-workflow-execution.ts index 1e31ab7d71..f15c6c8376 100644 --- a/sim/app/w/[id]/hooks/use-workflow-execution.ts +++ b/sim/app/w/[id]/hooks/use-workflow-execution.ts @@ -7,6 +7,7 @@ import { useExecutionStore } from '@/stores/execution/store' import { useNotificationStore } from '@/stores/notifications/store' import { useEnvironmentStore } from '@/stores/settings/environment/store' import { useGeneralStore } from '@/stores/settings/general/store' +import { usePanelStore } from '@/stores/panel/store' import { useWorkflowRegistry } from '@/stores/workflows/registry/store' import { mergeSubblockState } from '@/stores/workflows/utils' import { useWorkflowStore } from '@/stores/workflows/workflow/store' @@ -22,6 +23,7 @@ export function useWorkflowExecution() { const { activeWorkflowId } = useWorkflowRegistry() const { addNotification } = useNotificationStore() const { toggleConsole } = useConsoleStore() + const { togglePanel, setActiveTab } = usePanelStore() const { getAllVariables } = useEnvironmentStore() const { isDebugModeEnabled } = useGeneralStore() const { getVariablesByWorkflowId, variables } = useVariablesStore() @@ -79,13 +81,14 @@ export function useWorkflowExecution() { setIsDebugging(true) } - // Get the current console state directly from the store - const currentIsOpen = useConsoleStore.getState().isOpen - - // Open console if it's not already open - if (!currentIsOpen) { - toggleConsole() + // Check if panel is open and open it if not + const isPanelOpen = usePanelStore.getState().isOpen + if (!isPanelOpen) { + togglePanel() } + + // Set active tab to console + setActiveTab('console') const executionId = uuidv4() @@ -257,6 +260,8 @@ export function useWorkflowExecution() { loops, addNotification, toggleConsole, + togglePanel, + setActiveTab, getAllVariables, getVariablesByWorkflowId, setIsExecuting,