fix(ui): add searchable filter to User Usage page - #25751
Conversation
User Usage filter only allowed selecting from a static preloaded list, unlike Global Usage which supports debounced text search via useInfiniteUsers. Add UserSingleSelect component (single-select with useInfiniteUsers + 300ms debounce + infinite scroll) and wire it into EntityUsage for entityType === 'user', mirroring the TeamMultiSelect fix in PR BerriAI#25107. - Add src/components/common_components/user_single_select.tsx - Add src/components/common_components/user_single_select.test.tsx (10 tests) - Update EntityUsage.tsx to render UserSingleSelect for user entity type - Update EntityUsage.test.tsx to mock user_single_select
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Too many files changed for review. ( |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| - | - | Generic High Entropy Secret | da67018fe3d06730f1d212c99124966a6cde0463 | litellm/proxy/management_endpoints/sso/happyelements_endpoints.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
9924444 to
5d21637
Compare
|
Rebuilt this PR as a clean, focused branch on top of
The fix itself is unchanged: adds |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Description
Fixes #25750
The User Usage filter only showed a static preloaded list. Users could not type to search for a specific user, unlike the Global Usage page which supports debounced server-side search.
This PR introduces
UserSingleSelect— a dedicated single-select component withuseInfiniteUsers+ 300ms debounce + infinite scroll — and wires it intoEntityUsageforentityType === "user".Root Cause
EntityUsage.tsxdelegated user filtering toUsageExportHeader, which renders a plain<Select>withoutshowSearch/onSearch. The same issue was fixed for Team Usage in PR #25107 usingTeamMultiSelect.Changes
ui/litellm-dashboard/src/components/common_components/user_single_select.tsx— new componentui/litellm-dashboard/src/components/common_components/user_single_select.test.tsx— 10 testsui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/EntityUsage.tsx— wire upUserSingleSelectforentityType === "user"ui/litellm-dashboard/src/components/UsagePage/components/EntityUsage/EntityUsage.test.tsx— add mock foruser_single_selectTesting
cd ui/litellm-dashboard npx vitest run src/components/UsagePage/components/EntityUsage/ --reporter=verbose npx vitest run src/components/common_components/user_single_select.test.tsx --reporter=verboseAll 92 existing tests pass + 10 new tests for
UserSingleSelect.Related