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

Fix parameters being lost on save bug #818

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

ykeremy
Copy link
Contributor

@ykeremy ykeremy commented Sep 12, 2024

<!-- ELLIPSIS_HIDDEN -->
🚀 This description was created by Ellipsis for commit 3c54830

fix: resolve parameter loss on save in WorkflowEditor

Summary:

Fixes parameter loss in WorkflowEditor.tsx and updates types for optional SMTP parameters by introducing convertEchoParameters().

Key points:

  • Fixes parameter loss on save in WorkflowEditor.tsx by filtering and converting parameters using convertEchoParameters().
  • Handles aws_secret, bitwarden_sensitive_information, and context parameter types.
  • Updates SendEmailNodeData in types.ts to include optional SMTP parameter keys.
  • Modifies SendEmailBlock in workflowTypes.ts to make SMTP parameters optional.
  • Adds new parameter types in workflowYamlTypes.ts for AWSSecretParameterYAML, ContextParameterYAML, and BitwardenSensitiveInformationParameterYAML.
  • Adds convertEchoParameters() in workflowEditorUtils.ts to handle parameter conversion.

Generated with ❤️ by ellipsis.dev

…src/'

<!-- ELLIPSIS_HIDDEN -->

| 🚀 | This description was created by [Ellipsis](https://www.ellipsis.dev) for commit 378c6890dbaa6d20e772cf175dc1a642edb9475f  |
|--------|--------|

fix: resolve parameter loss on save in WorkflowEditor

### Summary:
Fixes parameter loss on save in `WorkflowEditor.tsx` by filtering and converting parameters, and updates types for optional SMTP parameters in email nodes.

**Key points**:
- **Behavior**:
  - Fixes parameter loss on save in `WorkflowEditor.tsx` by filtering and converting parameters using `convertEchoParameters()`.
  - Handles `aws_secret`, `bitwarden_sensitive_information`, and `context` parameter types.
- **Types**:
  - Updates `SendEmailNodeData` in `types.ts` to include optional SMTP parameter keys.
  - Modifies `SendEmailBlock` in `workflowTypes.ts` to make SMTP parameters optional.
  - Adds new parameter types in `workflowYamlTypes.ts` for `AWSSecretParameterYAML`, `ContextParameterYAML`, and `BitwardenSensitiveInformationParameterYAML`.
- **Functions**:
  - Adds `convertEchoParameters()` in `workflowEditorUtils.ts` to handle parameter conversion.

----
Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev)

<!-- ELLIPSIS_HIDDEN -->
@ykeremy ykeremy added the sync label Sep 12, 2024
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 3c54830 in 17 seconds

More details
  • Looked at 246 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/editor/nodes/SendEmailNode/types.ts:11
  • Draft comment:
    The addition of optional SMTP parameter keys aligns with the changes in SendEmailBlock and is consistent with the PR description.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The smtpHostSecretParameterKey, smtpPortSecretParameterKey, smtpUsernameSecretParameterKey, and smtpPasswordSecretParameterKey are being added as optional fields in SendEmailNodeData. This is consistent with the changes in SendEmailBlock where these fields are made optional. The change is appropriate and aligns with the PR description.
2. skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts:578
  • Draft comment:
    The convertEchoParameters function is well-implemented, handling specific parameter types and including a check for unknown types.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The convertEchoParameters function is correctly implemented to handle the conversion of specific parameter types. It includes a check for unknown parameter types, which is a good practice to catch potential errors.
3. skyvern-frontend/src/routes/workflows/types/workflowTypes.ts:172
  • Draft comment:
    The update to make SMTP parameters optional in SendEmailBlock aligns with changes in SendEmailNodeData and is consistent with the PR description.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The SendEmailBlock type has been updated to make SMTP parameters optional, which aligns with the changes in SendEmailNodeData. This is consistent with the PR description and ensures flexibility in handling email nodes.

Workflow ID: wflow_LO9j2vCCCOpk0UfJ


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

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! Incremental review on 3c54830 in 29 seconds

More details
  • Looked at 245 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts:578
  • Draft comment:
    Consider adding a return type annotation to convertEchoParameters for better readability and maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The convertEchoParameters function in workflowEditorUtils.ts is missing a return type annotation. Adding it will improve code readability and maintainability.
2. skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts:471
  • Draft comment:
    Consider adding a return type annotation to getWorkflowBlock for better readability and maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The getWorkflowBlock function in workflowEditorUtils.ts is missing a return type annotation. Adding it will improve code readability and maintainability.

Workflow ID: wflow_WLyO9LPSeNKYTM8h


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

@msalihaltun msalihaltun merged commit a6cc34e into main Sep 12, 2024
2 checks passed
@msalihaltun msalihaltun deleted the salih/email-node-smtp-parameters branch September 12, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants