Fix OAuth provider search ordering#3062
Conversation
Greptile SummaryThis PR adds a live search box to the OAuth2 Providers section of the auth settings page, filtering providers by name or key, and also fixes the secondary sort order so providers with the same enabled-state are now sorted alphabetically rather than by original array order.
Confidence Score: 4/5Safe to merge — the change is self-contained to a single settings page, and the core filtering and sorting logic is correct. The filtering and sorting logic works correctly for all normal cases. The only issue is that the empty-state copy always says 'match your search' regardless of whether a search term is present, which could appear confusing in the edge case where all providers are filtered as internal/mock. src/routes/(console)/project-[region]-[project]/auth/settings/+page.svelte — empty-state message wording when no search term is active. Important Files Changed
Reviews (1): Last reviewed commit: "Fix OAuth provider search ordering" | Re-trigger Greptile |
| <div class="oauth-providers-empty"> | ||
| <Typography.Text>No OAuth2 providers match your search.</Typography.Text> | ||
| </div> |
There was a problem hiding this comment.
The empty-state message always says "No OAuth2 providers match your search." even when
oauthProviderSearch is empty (''). In that case the if (!search) return true branch makes the filter pass every valid provider, so the empty state would only be reached when all providers have been filtered by the !oAuthProvider || oAuthProvider.internal / mock checks — not because of a search. A conditional message keeps the copy accurate.
| <div class="oauth-providers-empty"> | |
| <Typography.Text>No OAuth2 providers match your search.</Typography.Text> | |
| </div> | |
| <div class="oauth-providers-empty"> | |
| <Typography.Text> | |
| {oauthProviderSearch.trim() | |
| ? 'No OAuth2 providers match your search.' | |
| : 'No OAuth2 providers available.'} | |
| </Typography.Text> | |
| </div> |
What does this PR do?
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)