-
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
add workflow streaming #892
Conversation
…src/' <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Adds WebSocket streaming for real-time task and workflow updates, with status utilities and UI enhancements in `TaskActions.tsx`, `types.ts`, and `WorkflowRun.tsx`. > > - **Streaming Functionality**: > - Adds WebSocket streaming for tasks in `TaskActions.tsx` and workflows in `WorkflowRun.tsx`. > - Displays real-time status updates and screenshots. > - Handles WebSocket connection lifecycle (open, message, close). > - **Status Utilities**: > - Adds `statusIsNotFinalized` and `statusIsRunningOrQueued` functions in `types.ts` to check task and workflow statuses. > - **UI Updates**: > - Updates `TaskActions.tsx` and `WorkflowRun.tsx` to show streaming status messages based on task/workflow status. > - Modifies UI components to handle streaming states and display appropriate messages. > > <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 f91a0858b76e3cc6a88f74b6b26b7af1a741014b. 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 4e4e721 in 12 seconds
More details
- Looked at
304
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/WorkflowRun.tsx:166
- Draft comment:
Consider encapsulating the WebSocket closing logic in a function to ensure consistency and avoid potential errors. - Reason this comment was not posted:
Confidence changes required:50%
The WebSocket connection is being closed and set to null in multiple places. This could lead to potential issues if the socket is accessed after being set to null. It's better to encapsulate this logic in a function to ensure consistency and avoid potential errors.
2. skyvern-frontend/src/routes/workflows/WorkflowRun.tsx:135
- Draft comment:
Consider encapsulating the WebSocket closing logic in a function to ensure consistency and avoid potential errors. - Reason this comment was not posted:
Confidence changes required:50%
The WebSocket connection is being closed and set to null in multiple places. This could lead to potential issues if the socket is accessed after being set to null. It's better to encapsulate this logic in a function to ensure consistency and avoid potential errors.
Workflow ID: wflow_2obuu26VvXebPLUp
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 4e4e721 in 21 seconds
More details
- Looked at
304
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/WorkflowRun.tsx:166
- Draft comment:
Ensure the WebSocket connection is properly closed to prevent memory leaks or unexpected behavior. Consider using a cleanup function in theuseEffect
hook. - Reason this comment was not posted:
Comment did not seem useful.
2. skyvern-frontend/src/routes/tasks/detail/TaskActions.tsx:58
- Draft comment:
Consider using thestatusIsRunningOrQueued
function consistently to check if a task is running or queued. This will improve code readability and maintainability. This comment also applies to other instances where task status is checked directly. - Reason this comment was not posted:
Marked as duplicate.
3. skyvern-frontend/src/routes/workflows/WorkflowRun.tsx:70
- Draft comment:
Consider using thestatusIsRunningOrQueued
function consistently to check if a workflow is running or queued. This will improve code readability and maintainability. This comment also applies to other instances where workflow status is checked directly. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_LomMjUYdSzu5BJzp
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Adds WebSocket streaming for real-time task and workflow updates, with status utilities and UI enhancements in
TaskActions.tsx
,types.ts
, andWorkflowRun.tsx
.TaskActions.tsx
and workflows inWorkflowRun.tsx
.statusIsNotFinalized
andstatusIsRunningOrQueued
functions intypes.ts
to check task and workflow statuses.TaskActions.tsx
andWorkflowRun.tsx
to show streaming status messages based on task/workflow status.This description was created by for 4e4e721. It will automatically update as commits are pushed.