-
Notifications
You must be signed in to change notification settings - Fork 823
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
Editable workflows #792
Editable workflows #792
Conversation
…src/' <!-- ELLIPSIS_HIDDEN --> | 🚀 | This description was created by [Ellipsis](https://www.ellipsis.dev) for commit bcb9334de610d5cb11b2e5d7fe074855eefb937f | |--------|--------| ### Summary: This PR introduces editable workflows in the Skyvern frontend, enhancing UI components and state management for workflow and parameter editing. **Key points**: - Introduces editable workflows in Skyvern frontend. - Adds `GarbageIcon`, `SaveIcon`, and `Popover` components. - Updates `FlowRenderer` for node and edge management. - Implements `WorkflowEditor` for workflow fetching and saving logic. - Adds `WorkflowHeader` with save and parameter toggle functionality. - Creates `WorkflowParametersStateContext` for parameter state management. - Defines `REACT_FLOW_EDGE_Z_INDEX` for edge layering. - Develops `EdgeWithAddButton` to add nodes between edges. - Updates node components for editability and data changes. - Adds `WorkflowNodeLibraryPanel` for node selection. - Implements `WorkflowParameterAddPanel` and `WorkflowParameterEditPanel`. - Utilizes `zustand` for state management. - Enhances `WorkflowParametersPanel` for adding/editing workflow and credential parameters. - Adds `DropdownMenu` for parameter type selection. - Enhances state management with `operationPanelState`. ---- Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev) <!-- ELLIPSIS_HIDDEN -->
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.
👍 Looks good to me! Reviewed everything up to 1dd88c9 in 57 seconds
More details
- Looked at
3521
lines of code in43
files - Skipped
0
files when reviewing. - Skipped posting
7
drafted comments based on config settings.
1. skyvern-frontend/src/components/icons/GarbageIcon.tsx:5
- Draft comment:
Consider adding a default value forclassName
to avoid potential issues if the component is used without specifying it. - Reason this comment was not posted:
Confidence changes required:50%
TheGarbageIcon
component is missing adefaultProps
definition forclassName
. This can lead to potential issues if the component is used without specifying aclassName
.
2. skyvern-frontend/src/components/icons/SaveIcon.tsx:1
- Draft comment:
Consider allowing aclassName
prop to be passed to theSaveIcon
component for more flexible styling. - Reason this comment was not posted:
Confidence changes required:50%
TheSaveIcon
component does not accept any props, which limits its flexibility. It would be beneficial to allow passing aclassName
prop for styling purposes.
3. skyvern-frontend/src/components/ui/popover.tsx:12
- Draft comment:
Ensure that theref
is forwarded to the correct DOM element inPopoverContent
. - Reason this comment was not posted:
Confidence changes required:50%
ThePopoverContent
component usesReact.forwardRef
but does not handle theref
properly. It should ensure that theref
is forwarded to the correct DOM element.
4. skyvern-frontend/src/routes/workflows/Workflows.tsx:96
- Draft comment:
Consider adding error handling tocreateNewWorkflowMutation
to provide feedback to the user in case of a failure. - Reason this comment was not posted:
Confidence changes required:50%
ThecreateNewWorkflowMutation
function in theWorkflows
component does not handle errors. It's important to handle errors to provide feedback to the user.
5. skyvern-frontend/src/routes/workflows/editor/FlowRenderer.tsx:125
- Draft comment:
Consider adding error handling for unrecognizednodeType
values in theaddNode
function. - Reason this comment was not posted:
Confidence changes required:50%
TheaddNode
function inFlowRenderer
does not handle the case wherenodeType
is not recognized. This can lead to unexpected behavior if an invalidnodeType
is passed.
6. skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx:18
- Draft comment:
Ensure thatworkflowPermanentId
is defined before using it in theWorkflowEditor
component to prevent unexpected behavior. - Reason this comment was not posted:
Confidence changes required:50%
TheWorkflowEditor
component does not handle the case whereworkflowPermanentId
is undefined. This can lead to unexpected behavior if the component is used without a validworkflowPermanentId
.
7. skyvern-frontend/src/routes/workflows/editor/WorkflowHeader.tsx:20
- Draft comment:
Ensure thatworkflowPermanentId
is defined before using it in theWorkflowHeader
component to prevent unexpected behavior. - Reason this comment was not posted:
Confidence changes required:50%
TheWorkflowHeader
component does not handle the case whereworkflowPermanentId
is undefined. This can lead to unexpected behavior if the component is used without a validworkflowPermanentId
.
Workflow ID: wflow_ulLmq6sMSZynK5XO
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 1dd88c9 in 1 minute and 5 seconds
More details
- Looked at
3518
lines of code in43
files - Skipped
0
files when reviewing. - Skipped posting
7
drafted comments based on config settings.
1. skyvern-frontend/src/components/icons/GarbageIcon.tsx:2
- Draft comment:
Consider providing a default value for theclassName
prop to prevent potential errors when the component is used without specifying a className. - Reason this comment was not posted:
Confidence changes required:50%
TheGarbageIcon
component is missing a default value for theclassName
prop. This could lead to errors if the component is used without specifying a className.
2. skyvern-frontend/src/components/icons/SaveIcon.tsx:1
- Draft comment:
TheSaveIcon
component is implemented correctly. No changes needed. - Reason this comment was not posted:
Confidence changes required:0%
TheSaveIcon
component does not have any props, so there are no issues related to props. The component is simple and correctly implemented.
3. skyvern-frontend/src/components/ui/popover.tsx:12
- Draft comment:
ThePopoverContent
component is implemented correctly withReact.forwardRef
. No changes needed. - Reason this comment was not posted:
Confidence changes required:0%
ThePopoverContent
component usesReact.forwardRef
correctly and sets a display name. The implementation is correct and follows best practices.
4. skyvern-frontend/src/routes/workflows/Workflows.tsx:96
- Draft comment:
ThecreateNewWorkflowMutation
function is implemented correctly. No changes needed. - Reason this comment was not posted:
Confidence changes required:0%
ThecreateNewWorkflowMutation
function in theWorkflows
component correctly handles the creation of a new workflow and navigates to the new workflow's page upon success. The implementation is correct.
5. skyvern-frontend/src/routes/workflows/editor/FlowRenderer.tsx:97
- Draft comment:
TheFlowRenderer
component is implemented correctly. No changes needed. - Reason this comment was not posted:
Confidence changes required:0%
TheFlowRenderer
component correctly manages nodes and edges, and theaddNode
function is implemented correctly. The use ofuseWorkflowPanelStore
is appropriate.
6. skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx:26
- Draft comment:
ThesaveWorkflowMutation
function is implemented correctly. No changes needed. - Reason this comment was not posted:
Confidence changes required:0%
TheWorkflowEditor
component correctly uses theuseMutation
hook to handle saving workflows. The implementation is correct.
7. skyvern-frontend/src/routes/workflows/editor/WorkflowHeader.tsx:20
- Draft comment:
TheWorkflowHeader
component is implemented correctly. No changes needed. - Reason this comment was not posted:
Confidence changes required:0%
TheWorkflowHeader
component correctly handles navigation and saving workflows. The implementation is correct.
Workflow ID: wflow_LcF0ueSY3KMPXsjo
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 2c67ac0 in 20 seconds
More details
- Looked at
12
lines of code in1
files - Skipped
1
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. skyvern-frontend/package.json:30
- Draft comment:
The addition of@radix-ui/react-popover
is consistent with the PR description and necessary for the newPopover
component. - Reason this comment was not posted:
Confidence changes required:0%
The addition of the@radix-ui/react-popover
dependency is consistent with the PR description, which mentions the implementation of aPopover
component. This change is appropriate and aligns with the stated goals of the PR.
Workflow ID: wflow_UQIfW9tuD0TURhho
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Summary:
This PR introduces editable workflows in the Skyvern frontend, enhancing UI components and state management.
Key points:
GarbageIcon
,SaveIcon
insrc/components/icons
.Popover
insrc/components/ui/popover.tsx
.FlowRenderer
for node and edge management.WorkflowEditor
for workflow fetching and saving logic.WorkflowHeader
with save and parameter toggle functionality.WorkflowParametersStateContext
for parameter state management.REACT_FLOW_EDGE_Z_INDEX
for edge layering.EdgeWithAddButton
to add nodes between edges.src/routes/workflows/editor/nodes
.WorkflowNodeLibraryPanel
for node selection.WorkflowParameterAddPanel
andWorkflowParameterEditPanel
.zustand
for state management insrc/store/WorkflowPanelStore.ts
.WorkflowParametersPanel
for adding/editing workflow and credential parameters.DropdownMenu
for parameter type selection.operationPanelState
.Generated with ❤️ by ellipsis.dev