-
Notifications
You must be signed in to change notification settings - Fork 811
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
Add login block #1264
Add login block #1264
Conversation
…src/' <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Adds `LoginNode` component for login workflows, including UI, types, and integration into the workflow system. > > - **Behavior**: > - Adds `LoginNode` component in `LoginNode.tsx` for login workflows with fields for URL, navigation goal, and credential key. > - Introduces `CredentialParameterSelector` in `CredentialParameterSelector.tsx` for selecting credential parameters. > - **Types**: > - Defines `LoginNodeData` and `LoginNode` types in `types.ts`. > - Updates `WorkflowBlock` and `BlockYAML` types in `workflowTypes.ts` and `workflowYamlTypes.ts` to include `LoginBlock`. > - **Integration**: > - Updates `index.ts` to include `LoginNode` in `WorkflowBlockNode` and `nodeTypes`. > - Modifies `workflowEditorUtils.ts` to handle `LoginNode` in functions like `convertToNode`, `createNode`, and `getWorkflowBlock`. > - Adds `LoginBlock` to `nodeLibraryItems` in `WorkflowNodeLibraryPanel.tsx`. > > <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 f8fbafe609950b5693fc09d4bfcaa6415214dcc2. 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.
❌ Changes requested. Incremental review on 5bb522f in 1 minute and 17 seconds
More details
- Looked at
734
lines of code in8
files - Skipped
0
files when reviewing. - Skipped posting
7
drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/CredentialParameterSelector.tsx:21
- Draft comment:
useId
is not suitable fornoneItemValue
. Consider using a simple string like'none'
instead. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The use ofuseId
is appropriate when a unique identifier is needed, especially in a list of items where uniqueness is important. The comment suggests using a simple string, which might not guarantee uniqueness. Without strong evidence thatuseId
is inappropriate here, the comment seems speculative.
I might be missing some context about whyuseId
would be inappropriate here. Perhaps there's a specific reason why a simple string would be better, but the comment doesn't provide that reasoning.
The comment lacks strong evidence or reasoning for whyuseId
is unsuitable. Without additional context or evidence, the suggestion seems speculative.
The comment should be deleted as it lacks strong evidence and seems speculative about the use ofuseId
.
2. skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/types.ts:7
- Draft comment:
Consider initializingerrorCodeMapping
asnull
instead of the string "null" for clarity and consistency. - Reason this comment was not posted:
Marked as duplicate.
3. skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/types.ts:23
- Draft comment:
Consider initializingerrorCodeMapping
asnull
instead of the string "null" for clarity and consistency. - Reason this comment was not posted:
Marked as duplicate.
4. skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts:266
- Draft comment:
Consider initializingerrorCodeMapping
asnull
instead of the string "null" for clarity and consistency. - Reason this comment was not posted:
Marked as duplicate.
5. skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts:820
- Draft comment:
Consider initializingerrorCodeMapping
asnull
instead of the string "null" for clarity and consistency. - Reason this comment was not posted:
Marked as duplicate.
6. skyvern-frontend/src/routes/workflows/types/workflowTypes.ts:269
- Draft comment:
Consider initializingerrorCodeMapping
asnull
instead of the string "null" for clarity and consistency. - Reason this comment was not posted:
Marked as duplicate.
7. skyvern-frontend/src/routes/workflows/types/workflowYamlTypes.ts:182
- Draft comment:
Consider initializingerrorCodeMapping
asnull
instead of the string "null" for clarity and consistency. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_rhaanvD6QplXF3CB
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
const [inputs, setInputs] = useState({ | ||
url: data.url, | ||
navigationGoal: data.navigationGoal, | ||
errorCodeMapping: data.errorCodeMapping, |
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.
Consider initializing errorCodeMapping
as null
instead of the string "null" for clarity and consistency.
errorCodeMapping: data.errorCodeMapping, | |
errorCodeMapping: data.errorCodeMapping ?? null, |
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.
❌ Changes requested. Reviewed everything up to 5bb522f in 1 minute and 26 seconds
More details
- Looked at
734
lines of code in8
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/CredentialParameterSelector.tsx:21
- Draft comment:
UsinguseId
fornoneItemValue
is unnecessary. Consider using a simple string or constant instead. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The use ofuseId
is a common practice to ensure unique identifiers, especially in React components. The comment suggests a simplification, but it doesn't provide strong evidence that the current approach is incorrect or problematic. Without evidence thatuseId
is causing an issue, the comment seems speculative.
I might be overlooking a simpler solution that achieves the same result withoutuseId
. However, the current implementation seems to follow a standard practice for ensuring uniqueness.
The use ofuseId
is a standard approach in React for generating unique IDs, and without evidence of an issue, the comment's suggestion seems unnecessary.
The comment does not provide strong evidence that usinguseId
is incorrect or problematic. It seems speculative and not actionable, so it should be deleted.
2. skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/LoginNode.tsx:47
- Draft comment:
InitializeerrorCodeMapping
withnull
instead of the string "null" to avoid confusion. - Reason this comment was not posted:
Marked as duplicate.
3. skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/LoginNode.tsx:245
- Draft comment:
InitializeerrorCodeMapping
withnull
instead of the string "null" to avoid confusion. - Reason this comment was not posted:
Marked as duplicate.
4. skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts:266
- Draft comment:
InitializeerrorCodeMapping
withnull
instead of the string "null" to avoid confusion. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_SOBCqRdmpKJDY6hq
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
url: "", | ||
navigationGoal: | ||
"If you're not on the login page, navigate to login page and login using the credentials given. First, take actions on promotional popups or cookie prompts that could prevent taking other action on the web page. If you fail to login to find the login page or can't login after several trials, terminate. If login is completed, you're successful. ", | ||
errorCodeMapping: "null", |
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.
Initialize errorCodeMapping
with null
instead of the string "null" to avoid confusion.
errorCodeMapping: "null", | |
errorCodeMapping: null, |
Important
Adds
LoginNode
component for login workflows, including UI, types, and integration into the workflow system.LoginNode
component inLoginNode.tsx
for login workflows with fields for URL, navigation goal, and credential key.CredentialParameterSelector
inCredentialParameterSelector.tsx
for selecting credential parameters.LoginNodeData
andLoginNode
types intypes.ts
.WorkflowBlock
andBlockYAML
types inworkflowTypes.ts
andworkflowYamlTypes.ts
to includeLoginBlock
.index.ts
to includeLoginNode
inWorkflowBlockNode
andnodeTypes
.workflowEditorUtils.ts
to handleLoginNode
in functions likeconvertToNode
,createNode
, andgetWorkflowBlock
.LoginBlock
tonodeLibraryItems
inWorkflowNodeLibraryPanel.tsx
.This description was created by for 5bb522f. It will automatically update as commits are pushed.