Repository navigation
Add provider filter and expiry sorting to quota dashboard - #769
Merged
decolua merged 1 commit intoApr 28, 2026
Merged
Conversation
luckystart79-lang
pushed a commit
to luckystart79-lang/minirouter
that referenced
this pull request
May 2, 2026
Co-authored-by: Delynn Assistant <zhen@dkzhen.org>
caothu159
pushed a commit
to diepxuan/9router
that referenced
this pull request
May 14, 2026
Co-authored-by: Delynn Assistant <zhen@dkzhen.org>
Merged
4 of 5 tasks
diegosouzapw
pushed a commit
to diegosouzapw/OmniRoute
that referenced
this pull request
Jun 21, 2026
Adds a single-select Provider dropdown alongside the existing Status/Type/Tier/Env filters on the Quota dashboard. Selecting a provider narrows visible accounts to that provider only; the choice persists in localStorage (`omniroute:limits:providerFilter`) and auto-falls back to "All providers" when the persisted key no longer matches a connection in view. The dropdown only renders when there are >=2 distinct providers so single-provider setups stay clean. The provider key set is derived from `sortedConnections` (already USAGE_SUPPORTED_PROVIDERS-filtered and OAuth/api-key-filtered upstream) and the dropdown labels reuse the local `PROVIDER_LABEL` map, so the list never includes providers the user can't actually inspect. The upstream PR also added an "Expiring first" sort toggle. Skipped on purpose: `visibleConnections` already always sorts by status group (critical -> alert -> ok -> empty) and tie-breaks by soonest `getSoonestResetMs` within each group, so the toggle would either be redundant or weaker than the existing always-on behavior. Filter + dropdown-options logic extracted to pure helpers in `utils.tsx` (`matchesProviderFilter`, `buildProviderOptions`) so the predicates are exercised by a Node native-runner unit test instead of living inline in a React-only `useMemo`. Inspired-by: decolua/9router#769 Co-authored-by: Zhen <zhen@dkzhen.org>
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
Adds lightweight controls to the quota dashboard so users can focus on a specific provider and optionally surface accounts whose quota reset/expiry time is soonest.
Changes
All providersdropdown filter for quota providers.Expiring firsttoggle that sorts accounts by the earliest quotaresetAtvalue.Why
For users with many provider accounts, it is easier to inspect quota status by provider and prioritize accounts with quotas that reset or expire soon.
Testing
npm run build