[CmdPal] Per-provider search weight (Lower/Normal/Higher)#49191
Draft
michaeljolley wants to merge 1 commit into
Draft
[CmdPal] Per-provider search weight (Lower/Normal/Higher)#49191michaeljolley wants to merge 1 commit into
michaeljolley wants to merge 1 commit into
Conversation
Add a per-provider SearchWeight (Lower/Normal/Higher, default Normal) that nudges main-page search results within their relevance tier only. The nudge is a small additive within-tier bonus (+/- 5 points, half a point of lexical quality) so it breaks near-ties but can never move an item across a tier boundary. Applies to installed apps too via the well-known AllApps provider. - ProviderSettings: new ProviderSearchWeight enum + SearchWeight property; legacy/missing JSON deserializes to Normal. - MainListRanker: ProviderWeightBonus constant + ProviderBonus() mapping. - MainListPage.ScoreTopLevelItem: resolves each item's provider weight and feeds it into the within-tier score. - ProviderSettingsViewModel + ExtensionPage.xaml: a Lower/Normal/Higher ComboBox per provider. - Tests: within-tier reorder, never crosses a tier boundary, Normal is a no-op, applies to app items, serialization round-trip + legacy default. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Phase 3 of the stacked CmdPal search overhaul. Based on and targeting
dev/mjolley/frecency-redesign(phase 2), NOT main.What
Adds a per-provider Search weight (Lower / Normal / Higher, default Normal) that nudges main-page search results within their relevance tier only. Tier always dominates; the weight can reorder near-ties but can never move an item across a tier boundary.
Changes
ProviderSettings: newProviderSearchWeightenum (Lower = -1, Normal = 0, Higher = 1) +SearchWeightproperty. Missing/legacy JSON deserializes to Normal.MainListRanker:ProviderWeightBonus = 5.0constant andProviderBonus(weight)mapping (signed magnitude). Half a point of lexical quality (LexicalScale = 10), so it only breaks near-ties.MainListPage.ScoreTopLevelItem: resolves each item's provider weight (top-level commands by their provider id, installed apps by the well-knownAllAppsprovider) and feeds it into the within-tier score. Backward-compatible optional parameter.ProviderSettingsViewModel+ExtensionPage.xaml: a Lower/Normal/Higher ComboBox per provider (shown for built-ins and apps too). New resw strings. RanapplyXamlStyling.Design constant
Tests (all green, x64 host)
CommandPalette.slnfx64/Debug = exit 0. ViewModels 157/157. All other CmdPal unit suites pass (Registry + WindowWalker not run - known pre-existing non-green).Atomic to phase 3; host-side only, no extension SDK changes.