Skip to content

feat: Match IDs lists only the rule provider's models - #2

Open
Ruivalim wants to merge 2 commits into
clankercode:masterfrom
Ruivalim:feat/ids-only-provider-models
Open

feat: Match IDs lists only the rule provider's models#2
Ruivalim wants to merge 2 commits into
clankercode:masterfrom
Ruivalim:feat/ids-only-provider-models

Conversation

@Ruivalim

@Ruivalim Ruivalim commented Sep 1, 2026

Copy link
Copy Markdown

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 has provider: "*", Match IDs refuses to open and shows Pick a provider first, since a per-provider list is meaningless without one.

Tests

Two new menu tests:

  • provider-scoped rule: submenu shows that provider's models, excludes other providers' ids
  • provider: "*" rule: refuses to open, shows the error message

Full suite: 85 passed, typecheck clean.

Depends on #1 (branch is stacked on the submenu crash fix).

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
Ruivalim force-pushed the feat/ids-only-provider-models branch from e0fe6e6 to dfaf591 Compare September 1, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant