-
Notifications
You must be signed in to change notification settings - Fork 941
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
Improve run workflow form #1032
Conversation
…src/' <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Improve workflow parameter forms by enhancing UI, handling default values, and improving JSON parsing. > > - **UI Improvements**: > - Replace table layout with form layout in `RunWorkflowForm.tsx`. > - Add `FormLabel` for better parameter description display in `RunWorkflowForm.tsx`. > - Use `Skeleton` component for loading state in `WorkflowRunParameters.tsx`. > - **Functionality**: > - Handle JSON parsing errors in `parseValuesForWorkflowRun()` in `RunWorkflowForm.tsx`. > - Set default values to `null` if not provided in `WorkflowRunParameters.tsx`. > - Adjust `WorkflowParameterInput.tsx` to handle `null` values for `integer` and `float` types. > - **Parameter Handling**: > - Remove `defaultValue()` function and handle defaults inline in `WorkflowRunParameters.tsx`. > - Update `WorkflowParameterAddPanel.tsx` and `WorkflowParameterEditPanel.tsx` to handle default values more robustly. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for e121af06611b9072d32a7d6edb6b4d2e13addcc5. It will automatically update as commits are pushed.</sup> <!-- 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! Incremental review on 1801f2c in 33 seconds
More details
- Looked at
423
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/WorkflowParameterInput.tsx:44
- Draft comment:
Consider adding a check for NaN after parsing the input to handle invalid number inputs gracefully. - Reason this comment was not posted:
Confidence changes required:50%
The code inWorkflowParameterInput.tsx
handles different input types, including JSON, string, integer, float, boolean, and file_url. However, the integer and float types useparseInt
andparseFloat
without checking for NaN, which could lead to unexpected behavior if the input is not a valid number.
2. skyvern-frontend/src/routes/workflows/editor/panels/WorkflowParameterEditPanel.tsx:259
- Draft comment:
Ensure consistency by settingdefaultValue: value.s3uri
forfile_url
type, similar toWorkflowParameterAddPanel.tsx
. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_YfhXpZLBe1rtUZEQ
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! Reviewed everything up to 1801f2c in 1 minute and 3 seconds
More details
- Looked at
423
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/WorkflowParameterInput.tsx:44
- Draft comment:
Consider adding validation to ensure the input is a valid number before callingparseInt
orparseFloat
. This will preventNaN
from being set as the value. - Reason this comment was not posted:
Comment was on unchanged code.
2. skyvern-frontend/src/routes/workflows/editor/panels/WorkflowParameterEditPanel.tsx:254
- Draft comment:
Consider refactoring the JSONdefaultValue
logic into a utility function to reduce code duplication and potential errors. This logic is also present in theWorkflowParameterAddPanel.tsx
. - Reason this comment was not posted:
Confidence changes required:50%
InWorkflowParameterEditPanel.tsx
, thedefaultValue
logic for JSON parameters is repeated in both theAdd
andEdit
panels. This could be refactored into a utility function to reduce code duplication and potential errors.
Workflow ID: wflow_LOK2DZqEx8sB8YZ7
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Enhance workflow parameter forms with improved UI, error handling, and default value management.
RunWorkflowForm.tsx
.FormLabel
for parameter descriptions inRunWorkflowForm.tsx
.Skeleton
for loading state inWorkflowRunParameters.tsx
.parseValuesForWorkflowRun()
inRunWorkflowForm.tsx
.null
if not provided inWorkflowRunParameters.tsx
.WorkflowParameterInput.tsx
to handlenull
values forinteger
andfloat
types.defaultValue()
function and handle defaults inline inWorkflowRunParameters.tsx
.WorkflowParameterAddPanel.tsx
andWorkflowParameterEditPanel.tsx
to handle default values more robustly.This description was created by
for 1801f2c. It will automatically update as commits are pushed.