feat: Match IDs lists only the rule provider's models - #2
Open
Ruivalim wants to merge 2 commits into
Open
Conversation
handleInput() dereferenced this.selectList after SelectList.handleInput(), but Enter (single-select) and Escape callbacks close the submenu and set selectList to null, throwing 'TypeError: null is not an object'. Guard the post-input index tracking and return early: the input was already consumed by the closed submenu. Adds submenu tests covering Enter-select, Esc-cancel and Esc-apply.
Previously, editing a rule with provider '*' listed every model from every provider in the Match IDs picker, mixing ids that can never match the rule together. Now the picker always uses getModelsForProvider(rule.provider). When the rule still has provider '*', Match IDs refuses to open and shows 'Pick a provider first' instead of an everything-list. Adds menu tests: provider-scoped listing, and the '*' refusal.
Ruivalim
force-pushed
the
feat/ids-only-provider-models
branch
from
September 1, 2026 22:43
e0fe6e6 to
dfaf591
Compare
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.
Change
The Match IDs picker now always lists only models of the rule's provider.
Before: a rule with
provider: "*"opened Match IDs with every model from every provider mixed together, so the list was full of ids that could never be relevant to pick side by side.After: the picker calls
getModelsForProvider(rule.provider)unconditionally. If the rule still hasprovider: "*", Match IDs refuses to open and showsPick a provider first, since a per-provider list is meaningless without one.Tests
Two new menu tests:
provider: "*"rule: refuses to open, shows the error messageFull suite: 85 passed, typecheck clean.
Depends on #1 (branch is stacked on the submenu crash fix).