fix(search): stop cmd+k boosts from lifting weaker matches over stronger ones - #6668
fix(search): stop cmd+k boosts from lifting weaker matches over stronger ones#6668j15z wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Triggers vs blocks/tools: The exact-name lift to Actions: Four tests cover modal ordering and utils-level score comparisons. Reviewed by Cursor Bugbot for commit 3f496a9. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR refines command-palette scoring so same-name blocks outrank their triggers and mid-word action matches no longer leapfrog word-start results.
Confidence Score: 5/5The PR appears safe to merge, with the changed ranking behavior covered by focused component and utility tests. The collision check operates only on available block and tool rows, and the action-bias gate preserves exact-query, section-level, keyword-only, and word-start behavior while correcting the targeted weaker matches.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.tsx | Builds an available block/tool name set and uses it to prevent same-name triggers from receiving an inappropriate exact-query lift. |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/utils.ts | Adds word-boundary detection so action bias is withheld for mid-word visible-name matches while existing exact and section lifts remain intact. |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.test.tsx | Adds integration coverage for same-name trigger ordering and single-letter mid-word action ranking. |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/utils.test.ts | Adds score-level assertions covering both withheld and retained action bias. |
Reviews (1): Last reviewed commit: "fix(search): stop cmd+k boosts from lift..." | Re-trigger Greptile
Summary
PAGE_MATCH_TIERnow applies only when no canvas block/tool shares the trigger's base name — for shared names the trigger ranks organically and the block's exact-name match wins, matching what partial queries already didACTION_MATCH_BIASnow applies only when the action's name match begins at a word start — a mid-word hit keeps its honest score, so word-start matches outrank itType of Change
Testing
Checklist