-
Notifications
You must be signed in to change notification settings - Fork 9
feat: implement conditional execution, branching, and enhanced visualization #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tion Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Add mandatory validation on workflow create/update to catch invalid port connections early - Improve edge validation to reject ghost ports (edges with sourceHandle but missing targetHandle) - Configure Kafka client with explicit timeouts (requestTimeout, retry, sessionTimeout, heartbeatInterval) - Make Kafka ingest services skip gracefully when no brokers are configured instead of throwing errors - Update run-component activity to return activeOutputPorts for conditional execution support Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Add 'rejected' field to approval resolution output so downstream nodes can consume either port's data - Fix test-conditional-execution-e2e.ts to correctly access result.outputs path - Fix test-branching-e2e.ts to use proper edge format with targetHandle - Fix test-branching-e2e.ts to use correct API payload format with responseData.status Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
When a node is skipped due to conditional branching (e.g., the rejected path when approved), display a slate-colored 'Skipped' badge with a Ban icon on the workflow canvas. This provides visual feedback consistent with other status badges (Completed, Failed, Running). Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
…fety - update trace event schemas and interfaces with structured data types - refactor activity and workflow code to use context.trace for automatic event enrichment - remove redundant fields from trace event payloads - implement edge dimming for untaken branches in the execution canvas - add opaque backgrounds to nodes to prevent transparency issues when overlapping Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
…int handle - Reset branch pill visual state when switching from execution to design mode - Re-add default source handle for Entry Point nodes to fix React Flow 'undefined' handle error Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else if (inputType === 'selection') { | ||
| // Activate ports for selected options | ||
| const selection = (resolution.responseData as any)?.selection; | ||
| if (Array.isArray(selection)) { | ||
| selection.forEach((val: string) => activePorts.push(`option:${val}`)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Activate selection output port for manual selections
When inputType === 'selection' you only add option:${val} (plus approved/rejected) to activePorts, but the Manual Selection component still exposes a selection output. The scheduler now uses activePorts to decide which success edges are active, so any workflow that connects the selection output (the existing, non-branching usage) will have those edges treated as inactive and downstream nodes skipped. This is a regression for selection workflows that rely on the selection value without using option-specific branches.
Useful? React with 👍 / 👎.
… events Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
…lection Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
This PR introduces support for conditional execution and branching within workflows, along with significant UI enhancements for better clarity during execution playback.
Key Changes:
1. Conditional Execution & Branching
2. UI & Visualization Enhancements
3. Backend & Worker Updates
Verified with E2E tests for branching and manual approval scenarios.