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 title and remove type from the runs table #1717

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Feb 4, 2025

Important

Update RunHistory to display task titles and modify query types to use new Task type.

  • Behavior:
    • In RunHistory.tsx, table headers changed from "Type" and "Run ID" to "Run ID" and "Title".
    • Displays title for Task or "Untitled Task" if title is null.
  • Types:
    • Added Task type in types.ts with fields like task_id, status, title, etc.
    • Replaced TaskApiResponse with Task in useRunsQuery.ts and RunHistory.tsx.
  • Functions:
    • Renamed isTaskApiResponse to isTask in RunHistory.tsx.

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

…src/'

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Replaces 'Type' with 'Title' in `RunHistory` table and updates types to use `Task`.
>
>   - **Behavior**:
>     - `RunHistory.tsx`: Replaces 'Type' column with 'Title' column in the run history table.
>     - Displays `task_id` and `title` for `Task` and `workflow_run_id` and `WorkflowTitle` for `WorkflowRunApiResponse`.
>   - **Types**:
>     - Adds `Task` type in `types.ts`.
>     - Updates `useRunsQuery.ts` to use `Task` instead of `TaskApiResponse`.
>   - **Functions**:
>     - Renames `isTaskApiResponse` to `isTask` in `RunHistory.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 1e2f6e52282627ae79802bbae375bedbca180aca. 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 163b31c in 56 seconds

More details
  • Looked at 129 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 7 drafted comments based on config settings.
1. skyvern-frontend/src/api/types.ts:85
  • Draft comment:
    Consider deprecating or clarifying TaskApiResponse since Task now represents task records. This may prevent confusion between the two types.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. skyvern-frontend/src/hooks/useRunsQuery.ts:29
  • Draft comment:
    For consistency, consider using async/await syntax rather than mixing await with .then in the queryFn.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. skyvern-frontend/src/routes/history/RunHistory.tsx:28
  • Draft comment:
    Ensure that the type guard in isTask is robust (checking 'task_id' property) and doesn’t conflict with similar properties in WorkflowRunApiResponse.
  • Reason this comment was not posted:
    Comment did not seem useful.
4. skyvern-frontend/src/api/types.ts:85
  • Draft comment:
    Ensure the new 'title' field in Task aligns with the backend API and add documentation for union types like 'extracted_information' for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    None
5. skyvern-frontend/src/hooks/useRunsQuery.ts:21
  • Draft comment:
    Consider adding error handling (e.g., try-catch) in the queryFn for better debugging.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    None
6. skyvern-frontend/src/routes/history/RunHistory.tsx:63
  • Draft comment:
    Recheck the header labeling: 'Run ID' might be ambiguous since tasks show task_id; consider a label like 'Task/Run ID' if needed.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    None
7. skyvern-frontend/src/routes/history/RunHistory.tsx:93
  • Draft comment:
    For better accessibility, consider making clickable rows keyboard-focusable (e.g., using role='button' and onKeyPress handlers).
  • Reason this comment was not posted:
    Confidence changes required: 33%
    None

Workflow ID: wflow_swBaoR0wTGbTj2mB


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 163b31c in 1 minute and 33 seconds

More details
  • Looked at 129 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 8 drafted comments based on config settings.
1. skyvern-frontend/src/api/types.ts:85
  • Draft comment:
    New Task type added. Ensure it aligns with the backend schema and consider deprecating TaskApiResponse if no longer used.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. skyvern-frontend/src/hooks/useRunsQuery.ts:4
  • Draft comment:
    Import now uses Task instead of TaskApiResponse. Verify that the API responses now consistently use Task.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    None
3. skyvern-frontend/src/routes/history/RunHistory.tsx:63
  • Draft comment:
    Updated header: Replacing 'Type' with 'Run ID' to match the new schema.
  • Reason this comment was not posted:
    Comment did not seem useful.
4. skyvern-frontend/src/routes/history/RunHistory.tsx:100
  • Draft comment:
    Display task title with fallback 'Untitled Task' for tasks. Looks good.
  • Reason this comment was not posted:
    Comment did not seem useful.
5. skyvern-frontend/src/routes/history/RunHistory.tsx:124
  • Draft comment:
    WorkflowTitle usage: Ensure the component properly handles the updated workflow run schema.
  • Reason this comment was not posted:
    Comment did not seem useful.
6. skyvern-frontend/src/api/types.ts:82
  • Draft comment:
    New Task type is clearly defined. Ensure its structure remains consistent with backend responses and TaskApiResponse if both are used.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    None
7. skyvern-frontend/src/hooks/useRunsQuery.ts:25
  • Draft comment:
    Appending multiple 'status' query parameters is fine if the backend supports duplicated keys; otherwise consider using a comma‐separated list.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    None
8. skyvern-frontend/src/routes/history/RunHistory.tsx:93
  • Draft comment:
    Clickable table rows should include keyboard accessibility attributes (e.g., role='button' and tabindex='0') to improve UX for keyboard and screen reader users.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_rOs3phzPjejad8XP


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

@msalihaltun msalihaltun merged commit 9b5c4f0 into main Feb 4, 2025
7 checks passed
@msalihaltun msalihaltun deleted the salih/show-title-in-runs-table branch February 4, 2025 16:45
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