Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Dec 10, 2025

Adds a flow filter combobox to the /runs page that allows filtering flow runs by specific flows. This is part of the Vue to React UI migration effort.

Changes

  • Add FlowFilter component with multi-select combobox for filtering flow runs by specific flows
  • Support searching/filtering within the dropdown using debounced search
  • Wire selected flows to URL query parameter (?flows=uuid1,uuid2)
  • Sync flow filter to flow runs query using the flows filter parameter
  • Reset pagination to page 1 when filter changes
  • Add MSW mock for /flows/filter endpoint
  • Add unit tests and Storybook story for FlowFilter component

Updates since last revision

  • Fixed TypeScript errors: added missing selectedFlows and onFlowFilterChange props to Storybook story
  • Fixed API filter structure: added required operator: "and_" property to flows filter
  • Fixed pagination to show "Page 0 of 0" when no results (instead of "Page 1 of 0")
  • Removed redundant selected prop from ComboboxCommandItem (using Checkbox for selection state instead)
  • Removed hardcoded className from Checkbox components

Human Review Checklist

  • Verify the API filter structure { operator: "and_", id: { any_: flowIds } } matches the backend contract for /flow_runs/paginate
  • The filteredFlows useMemo in flow-filter.tsx (lines 103-109) does client-side filtering even though the API already filters by name - verify this is intentional or remove if redundant
  • Visual verification that the flow filter renders correctly alongside existing filters (especially checkbox spacing after className removal)
  • Test URL state sync behavior manually (selecting flows updates URL, refreshing page preserves selection)
  • Note: Flow list is limited to 100 results - verify this is acceptable for typical usage

Link to Devin run: https://app.devin.ai/sessions/c928c537967849dca2836e219e6d2311
Requested by: [email protected] (@desertaxle)

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

- Add FlowFilter component with multi-select combobox for filtering flow runs by specific flows
- Support searching/filtering within the dropdown
- Wire selected flows to URL query parameter (?flows=uuid1,uuid2)
- Sync flow filter to flow runs query using flow_id parameter
- Reset pagination to page 1 when filter changes
- Add MSW mock for /flows/filter endpoint
- Add unit tests for FlowFilter component
- Add Storybook story for FlowFilter component

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions github-actions bot added the ui-replatform Related to the React UI rewrite label Dec 10, 2025
- Add selectedFlows and onFlowFilterChange props to RunsPageWithState in story
- Add required operator property to flows filter in route

Co-Authored-By: [email protected] <[email protected]>
search: (prev) => ({
...prev,
flows: flowsArray.length > 0 ? flowsArray.join(",") : "",
page: 1, // Reset pagination when filter changes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are no results after the filter is applied then the pagination shows Page 1 of 0. It should show Page 0 of 0 in this case.

aria-label="All flows"
onSelect={handleClearAll}
closeOnSelect={false}
selected={selectedFlows.size === 0}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
selected={selectedFlows.size === 0}

>
<Checkbox
checked={selectedFlows.size === 0}
className="mr-2 pointer-events-none"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
className="mr-2 pointer-events-none"

>
<Checkbox
checked={selectedFlows.has(flow.id)}
className="mr-2 pointer-events-none"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
className="mr-2 pointer-events-none"

aria-label={flow.name}
onSelect={() => handleSelectFlow(flow.id)}
closeOnSelect={false}
selected={selectedFlows.has(flow.id)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
selected={selectedFlows.has(flow.id)}

- Fix pagination to show 'Page 0 of 0' when no results (instead of 'Page 1 of 0')
- Remove redundant 'selected' prop from ComboboxCommandItem (using Checkbox instead)
- Remove 'className' from Checkbox components

Co-Authored-By: [email protected] <[email protected]>
@desertaxle desertaxle marked this pull request as ready for review December 11, 2025 15:11
@desertaxle desertaxle merged commit c377987 into main Dec 11, 2025
13 checks passed
@desertaxle desertaxle deleted the ui-v2/1765405757-flow-filter-combobox branch December 11, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui-replatform Related to the React UI rewrite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants