Repository navigation
feat(dashboard): run filters - #900
jamescmartinez wants to merge 1 commit into
Conversation
commit: |
|
| const backend = await getBackend(); | ||
| const result = await backend.listWorkflowRuns(getPaginationOptions(data)); | ||
| const params: ListWorkflowRunsParams = getPaginationOptions(data); | ||
| if (data.status !== undefined) params.status = data.status; |
There was a problem hiding this comment.
For databases with older runs stored as sleeping or succeeded, clicking Running or Completed excludes runs counted by that card. toWorkflowRunCounts folds these older statuses into the displayed counts, but listWorkflowRuns matches the requested status exactly. The migrations do not rewrite those statuses, so a nonzero card can lead to an empty list. Make the dashboard filters include the same statuses as the counts.
| status: z.enum(RUN_FILTER_STATUSES).optional(), | ||
| workflowName: z | ||
| .string() | ||
| .trim() |
There was a problem hiding this comment.
A workflow created through runWorkflow can have a name such as " report ", which the client stores unchanged. Both RunFiltersForm and runFiltersSchema trim that name to "report", so the backend’s exact match cannot find it. Users must be able to search for the name as stored; preserve meaningful spaces in both places.
| </div> | ||
| <div className="space-y-4"> | ||
| <RunFiltersForm | ||
| key={`${search.status ?? "all"}:${search.workflowName ?? ""}`} |
There was a problem hiding this comment.
If a user types a workflow name and then clicks a status card before applying it, their text disappears. The card changes search.status, which changes this key and mounts a fresh RunFiltersForm. Its input resets to the saved search.workflowName rather than the pending edit. Keep the typed name when changing the selected status so users do not have to enter it again.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Uh oh!
There was an error while loading. Please reload this page.