feat: add node configuration types, rich variable input component, no… - #87
Merged
Merged
Conversation
…de executors, and execution history tracking
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Workflow Engine UI & Execution Fixes
Overview
This PR addresses several critical bugs across the workflow engine, ranging from UX issues in the canvas to data interpolation failures in the executor. The fixes ensure that multi-branch nodes, rich text inputs, and edge connections behave predictably, while also cleaning up the trigger selection UI.
Changes Included
1. Canvas & Edge Routing Fixes
BaseNode.tsx): Refactored the node UI to dynamically query the node configuration registry (getNodeConfig) at runtime. Nodes like the Data Filter now accurately render context-aware multi-branch pins (e.g.,UniqueandDuplicates) instead of blindly defaulting to a singleOutputhandle.page.tsx): Fixed a major bug where clicking the+button on a specific branch (likeDuplicates) would incorrectly connect the new edge to the first (Unique) pin. ThesourceHandleIdis now properly passed and preserved through theonAddChildcallback for database-loaded nodes.BaseNode.tsx): Adjusted the transform on output pin labels totranslate(100%, -150%), nudging them slightly upward so they no longer aggressively overlap with the SVG edges.2. Variable Panel & Data Mapping
variable-panel.tsx): Fixed a crash in the Data Mapping sidebar. Previously, if a Data Filter discarded 100% of its data, the "Kept Data" wire was empty, which broke the UI's attempt to unwrap the internal.jsonobject properties. The logic now safely checks if the output is a 2D array and unwraps data correctly regardless of empty wires, restoring normal headers (name,email) instead of"0","1".ConfigModal.tsx): Replaced the standard HTML<input>in thecolumn_mapperfield type with<RichVariableInput />. Mapped columns (like in the Google Sheets node) will now beautifully render interactive colored variable pills instead of raw template strings ({{uuid.email}}).3. Rich Text Editor Stability
RichVariableInput.tsx): Completely overhauled thecontentEditablesync logic.getEditorRawString()parser to deeply intercept and normalize browser-injected<div>and<br>elements into proper\ncharacters, allowing for true multi-line variable inputs.4. Backend Execution & API
executor.ts): Fixed a critical execution loop bug where Webhook triggers were silently dropping their payload. Webhook metadata is now explicitly injected intoexecutedNodeOutputsbefore execution begins, allowing downstream nodes to successfully interpolate webhook variables.userRoutes.ts): Cleaned up the/getAvailableTriggersendpoint by strictly filtering forwhere: { type: 'webhook' }. This prevents accidental "Action" nodes (like Gmail/Google Sheets) from appearing in the Trigger selection dropdown due to legacy database entries.5. General UX Improvements
page.tsx): Removed the aggressive red error toast that fired immediately upon creating a new workflow. The UI now gracefully recognizes an emptyTriggerstate and peacefully mounts the dottedtrigger-placeholdernode on the canvas.Testing Steps
UniqueandDuplicatesoutput pins are visible.+button specifically on theDuplicatespin and add a Gmail node (verify the edge routes perfectly from the bottom pin).