close
Skip to content

Feature: Ability to Disable Nodes#6422

Open
udaykumar-dhokia wants to merge 3 commits into
FlowiseAI:mainfrom
udaykumar-dhokia:feature/disable-nodes
Open

Feature: Ability to Disable Nodes#6422
udaykumar-dhokia wants to merge 3 commits into
FlowiseAI:mainfrom
udaykumar-dhokia:feature/disable-nodes

Conversation

@udaykumar-dhokia
Copy link
Copy Markdown
Contributor

@udaykumar-dhokia udaykumar-dhokia commented May 22, 2026

Summary

This PR introduces a “Disable Node” capability, allowing users to exclude nodes from execution without deleting nodes or rewiring the graph. (addresses #5625)

With Condition node disabled:

Flowise.-.Build.AI.Agents.Visually.-.DuckDuckGo.2026-05-22.15-27-30.mp4

With Condition node enabled:

Flowise.-.Build.AI.Agents.Visually.-.DuckDuckGo.2026-05-22.15-28-06.mov

Features

  • Disable / Enable Node: Adds toolbar actions to disable or re-enable nodes directly from the canvas.
  • Stop Execution: Disabled nodes terminate their branch during execution. Downstream nodes depending on the disabled node are skipped.
  • Downstream Disable Propagation: Disabling an upstream node automatically and transitively disables all downstream nodes. Re-enabling the upstream node automatically re-enables those downstream nodes.
  • Visual Disabled State: Disabled nodes render with faded opacity and dashed borders. Connected edges are muted/dashed to make inactive paths easy to identify.

Changes

  1. Node Disable State
  • Added persisted data.disabled support across node data models.
  • Added disabledBy tracking for downstream nodes disabled by an upstream node.
  1. UI
  • Added Disable/Enable toolbar buttons for nodes.
  • Updated disabled node and edge styling.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a feature to disable nodes within a flow, preventing them and their downstream descendants from being executed or validated. The implementation includes UI updates to visualize disabled states, a toggle action in the node toolbar, and server-side logic to filter executable flow data and remove references to disabled nodes. Feedback highlights several areas for improvement in the server-side filtering logic, such as preserving array structures, broadening the reference-matching regex, and avoiding data corruption from unconditional string trimming. There are also notes regarding logic consistency in downstream re-enabling and code duplication across packages.

if (Array.isArray(value)) {
return value
.map((item) => removeDisabledNodeReferences(item, disabledNodeIds))
.filter((item) => item !== '' && item !== undefined && item !== null)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Filtering out empty strings from arrays after removing disabled node references can be problematic. If a node expects a fixed-length array or relies on specific indices, removing elements will shift the remaining items and likely cause logic errors. It is generally safer to preserve the array structure by keeping the empty values.

Suggested change
.filter((item) => item !== '' && item !== undefined && item !== null)
.filter((item) => item !== undefined && item !== null)
References
  1. When handling potentially invalid data, prefer throwing an error or maintaining structure rather than silently returning a default or empty value to promote fail-fast behavior.

Comment thread packages/server/src/utils/index.ts Outdated
Comment thread packages/server/src/utils/index.ts Outdated
Comment thread packages/agentflow/src/core/utils/disabledNodes.ts
@@ -0,0 +1,81 @@
export const isNodeExplicitlyDisabled = (node) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This file is a duplicate of packages/agentflow/src/core/utils/disabledNodes.ts. Maintaining identical logic in two separate files across packages increases maintenance overhead and the risk of bugs. Consider centralizing this logic in a shared utility module.

References
  1. Maintain consistency across the repository by following established patterns and avoiding code duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant