feat: add search icon and fetching spinner to filter sidebar search inputs - #3563
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds a ChangesFilter Loading Indicators
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
0070c54 to
2b5d5f0
Compare
2b5d5f0 to
7eb45ab
Compare
7eb45ab to
ff813e1
Compare
Confidence Score: 5/5UI-only change adding icons and a loading spinner to filter inputs; no data-fetching logic or state management is altered. All changes are confined to presentational wiring in two sidebar components. The one noted issue is a narrow timing window where "No metadata keys" could flash when clearing a search, requiring a one-line fix; it does not corrupt state or affect functionality. The isEmpty guard in MetadataFilters inside logsFilterSidebar.tsx is the only line worth a second look. Important Files Changed
Reviews (6): Last reviewed commit: "chore: added search icon for sidebar fil..." | Re-trigger Greptile |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ui/components/filters/mcpFilterSidebar.tsx (1)
224-224: 💤 Low valueLoading indicator implementation looks solid.
The conditional LoaderCircle/Search icon rendering with proper positioning and the optional
fetchingprop is well designed. The separation betweenisLoading(skeleton) andisFetching(spinner) provides clear feedback for initial vs. subsequent loads.♿ Optional: Consider adding screen reader feedback
For improved accessibility, you could add
aria-busyto the input or anaria-liveregion to announce loading state to screen readers:<Input ref={inputRef} value={query} onChange={(e) => setQuery(e.target.value)} onKeyDown={(e) => { if (e.key === "Enter") { e.preventDefault(); commitCustom(); } }} placeholder={placeholder} className="h-8 border-0 pl-8 text-xs" + aria-busy={fetching} />Also applies to: 233-233, 258-276
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ui/components/filters/mcpFilterSidebar.tsx` at line 224, The component currently toggles visual loading states (isLoading skeleton vs isFetching spinner) but lacks screen-reader feedback; update the input or surrounding element in mcpFilterSidebar to include aria-busy={isFetching || isLoading} and/or add a small visually-hidden aria-live region that announces "Loading" when isFetching/isLoading changes (tie it to the same state used for rendering the LoaderCircle/Search icons and the fetching prop) so screen readers receive loading updates.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@ui/components/filters/mcpFilterSidebar.tsx`:
- Line 224: The component currently toggles visual loading states (isLoading
skeleton vs isFetching spinner) but lacks screen-reader feedback; update the
input or surrounding element in mcpFilterSidebar to include
aria-busy={isFetching || isLoading} and/or add a small visually-hidden aria-live
region that announces "Loading" when isFetching/isLoading changes (tie it to the
same state used for rendering the LoaderCircle/Search icons and the fetching
prop) so screen readers receive loading updates.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a0108f78-78b8-49ca-a107-afbbf95ce093
📒 Files selected for processing (2)
ui/components/filters/logsFilterSidebar.tsxui/components/filters/mcpFilterSidebar.tsx
df4e09d to
7cd531c
Compare
502c146 to
27d3dc2
Compare
7cd531c to
73ed460
Compare
73ed460 to
e115afb
Compare
Merge activity
|
The base branch was changed.
e115afb to
559e3c4
Compare
…nputs (#3563) ## Summary Adds a search icon and a loading spinner to the search inputs in the logs and MCP filter sidebars. When a filter list is actively fetching data, the search icon is replaced with an animated spinner to give users visual feedback. When idle, a static search icon is shown instead of a bare input field. ## Changes - Added a `Search` icon inside the search input for all `SearchableCheckboxList` filter sections in both `logsFilterSidebar.tsx` and `mcpFilterSidebar.tsx`, positioned absolutely on the left side of the input with appropriate padding adjustments. - Added a `LoaderCircle` spinner that replaces the `Search` icon while `isFetching` is true, providing real-time feedback during server-side search queries. - Exposed `isFetching` from `useGetAvailableFilterDataQuery` and `useGetMCPLogsFilterDataQuery` in all filter components (Stop Reason, Models, Aliases, Selected Keys, Virtual Keys, Routing Engines, Routing Rules, Metadata, Tool Names, Servers) and passed it down as a `fetching` prop to `SearchableCheckboxList`. - Added the `Search` icon to the Session and User plain text inputs, which previously had no icon. - Fixed indentation in the metadata filter entries block. ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test 1. Open the logs or MCP logs page with the filter sidebar visible. 2. Expand any searchable filter section (e.g., Models, Aliases, Virtual Keys). 3. Verify a search icon appears on the left side of the search input. 4. Type a query and observe the spinner replacing the search icon while results are being fetched, then reverting to the search icon once the fetch completes. 5. Check the Session and User filter inputs also display the search icon. ```sh cd ui pnpm i pnpm build ``` ## Screenshots/Recordings Before: Search inputs had no icon and no loading indicator. After: Search inputs display a `Search` icon at rest and an animated `LoaderCircle` spinner while fetching filter options. ## Breaking changes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Adds a search icon and a loading spinner to the search inputs in the logs and MCP filter sidebars. When a filter list is actively fetching data, the search icon is replaced with an animated spinner to give users visual feedback. When idle, a static search icon is shown instead of a bare input field.
Changes
Searchicon inside the search input for allSearchableCheckboxListfilter sections in bothlogsFilterSidebar.tsxandmcpFilterSidebar.tsx, positioned absolutely on the left side of the input with appropriate padding adjustments.LoaderCirclespinner that replaces theSearchicon whileisFetchingis true, providing real-time feedback during server-side search queries.isFetchingfromuseGetAvailableFilterDataQueryanduseGetMCPLogsFilterDataQueryin all filter components (Stop Reason, Models, Aliases, Selected Keys, Virtual Keys, Routing Engines, Routing Rules, Metadata, Tool Names, Servers) and passed it down as afetchingprop toSearchableCheckboxList.Searchicon to the Session and User plain text inputs, which previously had no icon.Type of change
Affected areas
How to test
cd ui pnpm i pnpm buildScreenshots/Recordings
Before: Search inputs had no icon and no loading indicator.
After: Search inputs display a
Searchicon at rest and an animatedLoaderCirclespinner while fetching filter options.Breaking changes
Related issues
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelines