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

Bugfix/node title and edges #128

Merged
merged 3 commits into from
Jan 30, 2025
Merged

Bugfix/node title and edges #128

merged 3 commits into from
Jan 30, 2025

Conversation

preet-bhadra
Copy link
Collaborator

@preet-bhadra preet-bhadra commented Jan 30, 2025

Important

Enhance node and edge selection and test input management in flow editor, with updates to FlowCanvas.tsx, RunModal.tsx, and flowSlice.ts.

  • Behavior:
    • Add edge selection functionality in FlowCanvas.tsx using setSelectedEdgeId.
    • Update test inputs in RunModal.tsx with updateTestInput and save workflow on edit.
  • State Management:
    • Add selectedEdgeId to FlowState in flowSlice.ts.
    • Add setSelectedEdgeId reducer in flowSlice.ts.
  • UI Enhancements:
    • Style edges based on selection in useStyledEdges in flowUtils.tsx.
    • Handle edge click events in FlowCanvas.tsx to update selection.

This description was created by Ellipsis for 3dd6852. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 3dd6852 in 1 minute and 30 seconds

More details
  • Looked at 180 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. frontend/src/components/canvas/FlowCanvas.tsx:194
  • Draft comment:
    The onEdgeClick function correctly dispatches setSelectedEdgeId to update the selected edge. Ensure that this action is imported and used consistently across the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The onEdgeClick function is correctly implemented to dispatch the setSelectedEdgeId action. However, the onPaneClick function should also reset the selectedEdgeId to null when the pane is clicked, which is already done. The use of useCallback is appropriate here to prevent unnecessary re-renders.
2. frontend/src/components/modals/RunModal.tsx:104
  • Draft comment:
    Consider debouncing saveWorkflow calls in handleCellEdit to improve performance if saveWorkflow is an expensive operation.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The handleCellEdit function updates the test data and dispatches an action to update the test input in the store. However, it calls saveWorkflow every time a cell is edited, which might be unnecessary and could lead to performance issues if saveWorkflow is an expensive operation. Consider debouncing or batching these updates.
3. frontend/src/store/flowSlice.ts:398
  • Draft comment:
    The setSelectedEdgeId action is correctly implemented to manage the selected edge state. Ensure this is used consistently across the application.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The setSelectedEdgeId action is correctly added to the flow slice to manage the selected edge state. This is consistent with the existing pattern for managing selected nodes.

Workflow ID: wflow_aeWVuR9EL7yRsrmV


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@srijanpatel srijanpatel merged commit 4b2599c into main Jan 30, 2025
1 check passed
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