Skip to content

Conversation

@tnzl
Copy link

@tnzl tnzl commented Jan 2, 2026

Problem

When working with large ONNX models, the search sidebar can list thousands of nodes. Filtering by name works, but it's hard to focus on specific operation types (e.g., finding all Conv, MatMul, or GroupQueryAttention nodes). Users had to scroll through many results or type exact names, which is slow for exploratory work.

Solution

image

Add a node type filter in the search sidebar for ONNX models. A filter icon button appears next to the search input, matching the existing toggle button style. Clicking it opens a dropdown with all unique node types found in the model. Selecting a type filters the results to show only nodes of that type, and it works together with text search for more precise filtering.

Implementation Details

Key Features:

  • Filter icon button: A filter icon (three horizontal lines) appears in the search bar for ONNX models, styled like the existing toggle buttons

  • Dynamic node type collection: Automatically collects and lists all unique node types from the model (e.g., Conv, MatMul, Add, GroupQueryAttention, Cast, Concat, etc.)

  • Dropdown menu: Clicking the filter icon opens a dropdown with:

    • "All Types" option to clear the filter
    • Sorted list of all unique node types
    • Visual indication of the selected type (blue color, bold text)
    • Hover effects for better UX
  • Combined filtering: Works with the existing text search — users can filter by type and search by name simultaneously

  • ONNX-only: Only appears when viewing ONNX models (detected by checking if model format starts with "ONNX")

  • State persistence: Selected filter state is preserved when the sidebar is reopened

Technical Changes:

  • Added nodeType to the search state object
  • Implemented _collectNodeTypes() method to extract unique node types from the model graph
  • Modified _node() filtering logic to respect the node type filter
  • Added filter icon SVG symbol (sidebar-icon-filter) to match existing icon style
  • Implemented dropdown menu with proper event handling and click-outside-to-close behavior
  • Added CSS styling with dark mode support

@lutzroeder , long time user, first PR, please help review.

tnzl added 3 commits January 2, 2026 22:06
- Add dropdown filter to search sidebar for filtering nodes by type (Conv, MatMul, Add, etc.)
- Filter only appears when viewing ONNX models
- Collects unique node types from the model automatically
- Minimal design that integrates seamlessly with search bar
- Supports filtering nodes by type in combination with text search
- Replace select dropdown with filter icon button matching toggle buttons style
- Add filter icon SVG symbol (three horizontal lines)
- Implement dropdown menu that appears on icon click
- Update CSS for dropdown menu with dark mode support
- Filter icon matches the theme of existing search bar buttons
@lutzroeder lutzroeder force-pushed the main branch 27 times, most recently from baa1f14 to 84a549d Compare January 7, 2026 18:26
@lutzroeder lutzroeder force-pushed the main branch 3 times, most recently from 0ee38f8 to 04d600c Compare January 8, 2026 05:13
@tnzl
Copy link
Author

tnzl commented Jan 8, 2026

@lutzroeder Can you please review this feature for ONNX models.

@lutzroeder lutzroeder force-pushed the main branch 14 times, most recently from 6e15d57 to 60e9881 Compare January 15, 2026 16:48
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