Cache action filter metadata and reuse it in launcher filtering#931
Merged
multiplex55 merged 5 commits intomasterfrom Mar 14, 2026
Merged
Conversation
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.
Motivation
Description
ActionFilterMetadataandActionWithMetadatatosrc/common/query.rsto hold a precomputednormalized_idandnormalized_kind_candidatesand provide constructorsfrom_action/from_actionwrappers.apply_action_filtersto funnel through a newapply_action_filters_with_metadatawhich consumes metadata-aware entries and updates filtering to callaction_matches_filters(metadata, filters)that uses precomputed values instead of rebuilding candidates.action_filter_metadata: Vec<ActionFilterMetadata>intoLauncherAppinsrc/gui/mod.rs, populate it insideupdate_action_cacheand initialize it innew, and short-circuitsearch_actionsto evaluatekind:/id:filters against the cached metadata before performing label/desc fuzzy or exact matching.action_kind_candidatesrebuild and route callers to the metadata-based checks instead.Testing
cargo fmtandcargo fmt --check, both completed successfully.cargo checkwhich progressed through dependency compilation during validation but was left running in CI-like environment (no final failure observed during edit/formatting cycle).cargo testwere initiated but aborted due to long build times in the interactive environment, so no full test-suite run was completed here.Codex Task