Skip to content

Commit 7a80427

Browse files
authored
Fix UX bug where selecting 'Condition' action type traps the user (#45)
Previously, selecting 'Condition' rendered ConditionConfig which lacked navigation controls (Category/Action selectors). This forced users to delete the node to change the action type. The fix updates node-config-panel.tsx to use ActionConfig for 'Condition' nodes as well. ActionConfig correctly renders condition fields while preserving the navigation dropdowns, allowing users to switch back to other action types. Also removed unused ConditionConfig import.
1 parent 139639a commit 7a80427

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

components/workflow/node-config-panel.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import { IntegrationSelector } from "../ui/integration-selector";
4949
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs";
5050
import { ActionConfig } from "./config/action-config";
5151
import { ActionGrid } from "./config/action-grid";
52-
import { ConditionConfig } from "./config/condition-config";
52+
5353
import { TriggerConfig } from "./config/trigger-config";
5454
import { generateNodeCode } from "./utils/code-generators";
5555
import { WorkflowRuns } from "./workflow-runs";
@@ -574,17 +574,7 @@ export const PanelInner = () => {
574574
) : null}
575575

576576
{selectedNode.data.type === "action" &&
577-
selectedNode.data.config?.actionType === "Condition" ? (
578-
<ConditionConfig
579-
config={selectedNode.data.config || {}}
580-
disabled={isGenerating}
581-
onUpdateConfig={handleUpdateConfig}
582-
/>
583-
) : null}
584-
585-
{selectedNode.data.type === "action" &&
586-
selectedNode.data.config?.actionType &&
587-
selectedNode.data.config?.actionType !== "Condition" ? (
577+
selectedNode.data.config?.actionType ? (
588578
<ActionConfig
589579
config={selectedNode.data.config || {}}
590580
disabled={isGenerating}

0 commit comments

Comments
 (0)