Merged
Conversation
Returns Vec<Option<String>> preserving input order: - None for filtered-out features - Some(canonical_name) for kept features Implemented in OptionsProvider, OptionsWatcher, with tests. Agent-Logs-Url: https://github.com/juharris/optify/sessions/ec068ee7-5519-499c-959f-e336067d565f Co-authored-by: nuharris <273340593+nuharris@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add method to filter features and provide extra details
Add Apr 7, 2026
filter_features method to OptionsRegistry trait
nuharris
previously requested changes
Apr 7, 2026
- JS: filterFeatures on OptionsProvider and OptionsWatcher (returns Array<string | null>) - Python: filter_features and get_filtered_features on both provider and watcher, with type stubs - Ruby: filter_features on both provider and watcher, with method registration and type signatures Agent-Logs-Url: https://github.com/juharris/optify/sessions/da2ca01f-9506-474e-99f8-f5e7a564fedf Co-authored-by: nuharris <273340593+nuharris@users.noreply.github.com>
Copilot
AI
changed the title
Add
Add Apr 7, 2026
filter_features method to OptionsRegistry traitfilter_features method to OptionsRegistry trait and all language bindings
filter_features method to OptionsRegistry trait and all language bindingsmap_feature_names method
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.
Adds a method that filters features by constraints/preferences and returns
Vec<Option<String>>preserving input order —Nonefor filtered-out features,Some(canonical_name)for kept ones. Unlikeget_filtered_feature_nameswhich collapses the result, this preserves positional correspondence with the input.Rust Core
provider_trait.rs): Addedfilter_featurestoOptionsRegistryprovider_impl.rs): Implemented with same constraint/alias logic asget_filtered_feature_names, pushingNoneinstead of skippingwatcher.rs): Delegation to inner providertest_provider.rs): Covers no-filter, partial filter, reversed order, and empty input casesJavaScript (NAPI)
filterFeatures(featureNames, preferences?)→Array<string | null>on bothOptionsProviderandOptionsWatcherPython (PyO3)
filter_features(feature_names, preferences?)→List[Optional[str]]on bothOptionsProviderandOptionsWatcherget_filtered_featuresmethod to both providers.pyitype stubsRuby (Magnus)
filter_features(feature_names, preferences)→Array[String?]on bothOptionsProviderandOptionsWatcherinitfunction.rbsand.rbitype signatures