feat: add status filter to list runs and update TraceTable for status…#244
Merged
srijanpatel merged 1 commit intomainfrom Mar 18, 2025
Merged
feat: add status filter to list runs and update TraceTable for status…#244srijanpatel merged 1 commit intomainfrom
srijanpatel merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
👍 Looks good to me! Reviewed everything up to d97e45a in 1 minute and 44 seconds
More details
- Looked at
133lines of code in3files - Skipped
0files when reviewing. - Skipped posting
7drafted 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%<= threshold50%
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%<= threshold50%
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%<= threshold50%
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%<= threshold50%
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%<= threshold50%
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%<= threshold50%
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%<= threshold50%
None
Workflow ID: wflow_KRagzsoETjop6o4h
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
backend/pyspur/api/workflow_run.py: Added astatusparameter to thelist_runsfunction and applied the status filter to the query if provided. [1] [2]Frontend changes:
frontend/src/components/TraceTable.tsx: Introduced aselectedStatusstate and a dropdown for status options, updated thegetWorkflowRunsfunction call to include theselectedStatus, and modified the dependencies of the useEffect hook to includeselectedStatus. [1] [2] [3] [4] [5]API utility changes:
frontend/src/utils/api.ts: Updated thegetWorkflowRunsfunction to accept astatusparameter and include it in the API request URL if provided. [1] [2] [3]… selectionImportant
Add status filter to workflow runs in both backend and frontend, updating API and UI components.
list_runsinworkflow_run.py: Addedstatusparameter to filter runs by status.TraceTable.tsx: AddedselectedStatusstate and status dropdown, updatedgetWorkflowRunscall to includeselectedStatus.api.ts: UpdatedgetWorkflowRunsto acceptstatusparameter and include it in the request URL.This description was created by
for d97e45a. It will automatically update as commits are pushed.