Skip to content

feat: add status filter to list runs and update TraceTable for status…#244

Merged
srijanpatel merged 1 commit intomainfrom
feat/run-status-filter
Mar 18, 2025
Merged

feat: add status filter to list runs and update TraceTable for status…#244
srijanpatel merged 1 commit intomainfrom
feat/run-status-filter

Conversation

@srijanpatel
Copy link
Collaborator

@srijanpatel srijanpatel commented Mar 18, 2025

This pull request introduces a new feature to filter workflow runs by their status. The changes span both backend and frontend code to support this new feature. The most important changes include adding the status filter to the backend API, updating the frontend components to include a status dropdown, and modifying the API utility functions to handle the new filter.

Backend changes:

Frontend changes:

  • frontend/src/components/TraceTable.tsx: Introduced a selectedStatus state and a dropdown for status options, updated the getWorkflowRuns function call to include the selectedStatus, and modified the dependencies of the useEffect hook to include selectedStatus. [1] [2] [3] [4] [5]

API utility changes:

  • frontend/src/utils/api.ts: Updated the getWorkflowRuns function to accept a status parameter and include it in the API request URL if provided. [1] [2] [3]… selection

Important

Add status filter to workflow runs in both backend and frontend, updating API and UI components.

  • Backend:
    • list_runs in workflow_run.py: Added status parameter to filter runs by status.
  • Frontend:
    • TraceTable.tsx: Added selectedStatus state and status dropdown, updated getWorkflowRuns call to include selectedStatus.
  • API Utility:
    • api.ts: Updated getWorkflowRuns to accept status parameter and include it in the request URL.

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

@srijanpatel srijanpatel merged commit 59ed4e9 into main Mar 18, 2025
1 check passed
@srijanpatel srijanpatel deleted the feat/run-status-filter branch March 18, 2025 17:32
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 d97e45a in 1 minute and 44 seconds

More details
  • Looked at 133 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 7 drafted comments based on config settings.
1. backend/pyspur/api/workflow_run.py:718
  • Draft comment:
    Good addition of the 'status' query parameter. The filter applied with RunModel.status looks correct.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
2. frontend/src/components/TraceTable.tsx:201
  • Draft comment:
    Introduces selectedStatus state and integrates the new status dropdown in the filter UI. This is consistent with backend changes.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
3. frontend/src/components/TraceTable.tsx:242
  • Draft comment:
    Passing 'selectedStatus || undefined' to getWorkflowRuns is concise and properly handles the case when no status is selected.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
4. frontend/src/utils/api.ts:215
  • Draft comment:
    The updated getWorkflowRuns function correctly appends the status filter to the API URL if provided.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
5. backend/pyspur/api/workflow_run.py:718
  • Draft comment:
    Good use of an optional query param for 'status'. The filter is applied correctly. Consider adding tests to cover filtering by various RunStatus values.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
6. frontend/src/components/TraceTable.tsx:201
  • Draft comment:
    The typed state for 'selectedStatus' and corresponding dropdown implementation are clear. The dependency array in the useEffect correctly includes 'selectedStatus'.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
7. frontend/src/utils/api.ts:227
  • Draft comment:
    In getWorkflowRuns, the status parameter is appended as a query string correctly. For future robustness, consider using URLSearchParams or encodeURIComponent for building the URL.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None

Workflow ID: wflow_KRagzsoETjop6o4h


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant