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

Add export as csv in tasks and workflow runs #1361

Merged
merged 1 commit into from
Dec 9, 2024
Merged

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Dec 9, 2024

Important

Add CSV export functionality to task history and workflow runs with a new utility for downloading files.

  • Features:
    • Add CSV export functionality to TaskHistory.tsx and Workflows.tsx.
    • Introduce handleExport function in both files to compile data into CSV format and trigger download.
  • Utilities:
    • Add downloadBlob function in downloadBlob.ts to handle file download.
  • Types:
    • Update WorkflowRunApiResponse in types.ts to include failure_reason.

This description was created by Ellipsis for eeb52be. It will automatically update as commits are pushed.

…src/'

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Add CSV export functionality to task history and workflow runs, with a new utility for downloading files.
>
>   - **Features**:
>     - Add CSV export functionality to `TaskHistory.tsx` and `Workflows.tsx`.
>     - Introduce `handleExport` function in both files to compile data into CSV format and trigger download.
>   - **Utilities**:
>     - Add `downloadBlob` function in `downloadBlob.ts` to handle file download.
>   - **Types**:
>     - Update `WorkflowRunApiResponse` in `types.ts` to include `failure_reason`.
>
> <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 23f73024a09d07dbfd2833fe4b84195e93396e9a. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
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 eeb52be in 20 seconds

More details
  • Looked at 679 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. skyvern-frontend/src/routes/tasks/list/TaskHistory.tsx:137
  • Draft comment:
    Using v.replace(/"/g, '""') is more concise and avoids creating a new RegExp object each time. This change should be applied here and in Workflows.tsx.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The handleExport function in both TaskHistory.tsx and Workflows.tsx uses a regular expression to escape double quotes, which is unnecessary since the replace method can directly replace double quotes without using a regex.
2. skyvern-frontend/src/routes/workflows/Workflows.tsx:139
  • Draft comment:
    Using v.replace(/"/g, '""') is more concise and avoids creating a new RegExp object each time. This change should be applied here and in TaskHistory.tsx.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The handleExport function in both TaskHistory.tsx and Workflows.tsx uses a regular expression to escape double quotes, which is unnecessary since the replace method can directly replace double quotes without using a regex.

Workflow ID: wflow_VZpI875ZpUx8lywL


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! Reviewed everything up to eeb52be in 1 minute and 36 seconds

More details
  • Looked at 679 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. skyvern-frontend/src/routes/tasks/list/TaskHistory.tsx:121
  • Draft comment:
    The handleExport function duplicates logic found in Workflows.tsx. Consider extracting this logic into a utility function to adhere to DRY principles.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The handleExport function in both TaskHistory.tsx and Workflows.tsx is duplicating logic for CSV export. This logic should be extracted into a utility function to adhere to DRY principles.
2. skyvern-frontend/src/routes/workflows/Workflows.tsx:123
  • Draft comment:
    The handleExport function duplicates logic found in TaskHistory.tsx. Consider extracting this logic into a utility function to adhere to DRY principles.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The handleExport function in both TaskHistory.tsx and Workflows.tsx is duplicating logic for CSV export. This logic should be extracted into a utility function to adhere to DRY principles.

Workflow ID: wflow_IX7mgJci3HeVIr4f


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

@msalihaltun msalihaltun merged commit 8348112 into main Dec 9, 2024
2 checks passed
@msalihaltun msalihaltun deleted the salih/add-export-csv branch December 9, 2024 15:49
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