fix(usage): support searchable API key filter on /usage page#1692
Open
hansnow wants to merge 1 commit intoWei-Shaw:mainfrom
Open
fix(usage): support searchable API key filter on /usage page#1692hansnow wants to merge 1 commit intoWei-Shaw:mainfrom
hansnow wants to merge 1 commit intoWei-Shaw:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/usageAPI key filter UI as aSelect, but make it searchable/keysAPISelectsearch event and the user usage page filter flowProblem
The user usage page could only filter API keys from a preloaded list, which made the control effectively unsearchable and also meant keys beyond the first 100 entries were hard to reach.
Solution
searchevent to the sharedSelectcomponentTesting
docker run --rm -v "$PWD/frontend:/app" -w /app node:24-alpine sh -lc 'corepack enable && corepack prepare pnpm@10.33.0 --activate && pnpm install --frozen-lockfile && pnpm exec vitest run src/components/common/__tests__/Select.spec.ts src/views/user/__tests__/UsageView.spec.ts && pnpm run typecheck'cd deploy && POSTGRES_PASSWORD=testpass JWT_SECRET=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef TOTP_ENCRYPTION_KEY=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789 ADMIN_PASSWORD=admin123 docker compose -f docker-compose.dev.yml build sub2apiDemo
screen recording
sub2api-pr-1692-demo.mp4