Skip to content
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

#6228 [enhancement]: Outline error nodes in red #7444

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

achuthanmukundan00
Copy link

@achuthanmukundan00 achuthanmukundan00 commented Dec 14, 2024

Summary

This PR adds a red box shadow ("outline") to nodes that have missing required inputs or execution errors. Addresses issue #6228

image

Key Changes

  1. Error State Tracking:

    • Added isErrorNode and fieldErrors to the InvocationNodeData type for tracking the overall error state of a node and specific errors for individual inputs.
    • Dynamically update fieldErrors and isErrorNode in the node's data when an input field becomes valid/invalid.
  2. Visual Feedback for Error Nodes:

    • I added a red outline at first, but that disappeared when zoomed out, making this feature useless for large workflows.
      image
      image

    • Instead I opted to use a box shadow which remained visible even when zoomed out very far.

    image
    image

  3. State Initialization:

    • Updated all places where invocation nodes are initialized (e.g., buildInvocationNode, graphToWorkflow) to include default values for isErrorNode and fieldErrors.
    • Modified test cases and mock nodes (e.g., validateWorkflow.test.ts) to account for the new fields.
  4. Behavior:

    • Nodes with missing or invalid inputs are highlighted with a red shadow.
    • Once all required inputs are valid, the red shadow disappears automatically.
  5. Testing:

    • Functionality was manually tested locally, no frontend tests are implemented in line with project conventions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant