Skip to content

feat: add conditional execution to the pipeline editor - #2649

Closed
Mbeaulne wants to merge 1 commit into
masterfrom
conditional-execution-ui
Closed

feat: add conditional execution to the pipeline editor#2649
Mbeaulne wants to merge 1 commit into
masterfrom
conditional-execution-ui

Conversation

@Mbeaulne

@Mbeaulne Mbeaulne commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds conditional task execution to the pipeline editor using TaskSpec.isEnabled as the source of truth.

  • Adds a Conditional execution toggle to container task configuration.
  • Shows a highlighted Run when property and branch indicator directly on conditional task nodes.
  • Allows pipeline inputs and task outputs to be connected as the task's run condition.
  • Serializes the visual condition connection to TaskSpec.isEnabled instead of a component argument.
  • Loads and displays conditions created through YAML or the CLI.
  • Removes the condition connection when conditional execution is disabled.
  • Preserves conditional bindings when creating, unpacking, and round-tripping subgraphs without exposing the internal editor port in the component interface.
  • Displays the conditional state in both detailed and simplified canvas views.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

image image

Test Instructions

  1. Open a pipeline in the editor and select a container task.
  2. Open Config and enable Conditional execution.
  3. Confirm the task displays the violet Run when property and conditional branch indicator.
  4. Connect a pipeline input or task output containing true or false to Run when.
  5. Save and reopen the pipeline, then confirm the condition connection is preserved.
  6. Run the pipeline and confirm the task runs for true and is skipped for false.
  7. Disable conditional execution and confirm the property and its connection are removed.
  8. Check both detailed and simplified canvas views.

Automated validation:

pnpm run validate
pnpm vitest run src/utils/conditionalExecution.test.ts src/routes/v2/pages/Editor/nodes/TaskNode/context/TaskDetails/components/taskConfig.actions.test.ts src/routes/v2/shared/nodes/TaskNode/TaskNodeCard.test.tsx src/models/componentSpec/__tests__/actions/createSubgraph.test.ts src/models/componentSpec/__tests__/actions/unpackSubgraph.test.ts src/models/componentSpec/__tests__/serialization/jsonSerializer.test.ts src/models/componentSpec/__tests__/serialization/yamlDeserializer.test.ts src/models/componentSpec/__tests__/integration/roundtrip.test.ts

Additional Comments

The editor does not use an annotation to track conditional mode. An unset isEnabled means normal execution, while a present value means the task is conditional. Enabling the setting initially writes isEnabled: "true" until a condition is connected.

@github-actions

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: conditional-execution-ui/e19ce98

@Mbeaulne Mbeaulne changed the title feat: add conditional task execution UI feat: add conditional execution to the pipeline editor Aug 20, 2026

Copy link
Copy Markdown
Collaborator Author

@Mbeaulne
Mbeaulne marked this pull request as ready for review August 20, 2026 17:08
@Mbeaulne
Mbeaulne requested a review from a team as a code owner August 20, 2026 17:08

Copy link
Copy Markdown
Collaborator

Closing this in favour of #2657

@camielvs camielvs closed this Aug 21, 2026
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.

2 participants