Skip to content

Conversation

@ndraiman
Copy link
Contributor

@ndraiman ndraiman commented Oct 18, 2025

Implement interactive provider filter with search capability allowing users to filter models by provider.
The filter includes a dropdown popover with searchable provider list, checkbox selection, and URL parameter persistence. Filter state is preserved in URL query params and synchronized with the search functionality.

Wanted to compare OpenCode Zen with OpenRouter and had no easy way to do it on models.dev.

Screen.Recording.2025-10-18.at.10.28.13.mov
image

Implement interactive provider filter with search capability allowing users to filter models by provider. The filter includes a dropdown popover with searchable provider list, checkbox selection, and URL parameter persistence. Filter state is preserved in URL query params and synchronized with the search functionality.

fix: adjust button placement and formatting in the provider filter section

fix: adjust provider popover positioning to align with button

fix: change provider popover position from absolute to fixed

feat(web): add provider reset button and enhance provider filtering functionality

fix: clear provider search input when closing the popover

refactor(web): optimize provider filter performance and reduce code duplication

- Unified filter logic by integrating provider filtering into filterTable function
- Eliminated duplicate search filter code in filterByProviders (reduced from ~30 to 9 lines)
- Cached DOM queries (providerCountSpan) and provider values (allProviderValues) for better performance
- Optimized filter flow with early returns to avoid unnecessary operations
- Reduced table iterations from 2 to 1 when both filters are active
- Improved algorithmic efficiency by checking provider filter first (fast Set lookup)

style: clean up provider filter styles and improve hover effects

fix: improve provider popover closing logic to handle nested clicks

style: optimize provider list and checkbox flex properties for better layout

fix: adjust provider popover positioning to use fixed layout relative to viewport

refactor: remove redundant comments

Reverted css formatting

fix: prevent direct checkbox interaction to ensure consistent provider selection behavior

Clicking directly on the checkbox vs the label was causing inconsistent selection logic due to event handling order. By disabling pointer events on checkboxes, all clicks now flow through the label handler consistently.
@ndraiman ndraiman force-pushed the ndraiman/providers-filters branch from e1c3741 to a929d76 Compare October 18, 2025 07:43
@robertotcestari
Copy link

LGTM!

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.

2 participants