[PR #11534] fix(frontend): implement weighted search scoring for command menu #9424

Closed
opened 2026-02-05 09:03:48 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/community-scripts/ProxmoxVE/pull/11534

State: closed
Merged: Yes


✍️ Description

The previous cmdk search was filtered correctly but then sorted by category order rather than match strength. This caused "Dokpoly" to appear above "Traefik", if you searched for Traefik, simply because its category (Containers) comes before Traefik's category alphabetically.

  • Flatten search results into a single "Search Results" group.
  • Implement scoring to prioritize name matches over descriptions.
  • Revert to category grouping only when the search query is empty.

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.
**Original Pull Request:** https://github.com/community-scripts/ProxmoxVE/pull/11534 **State:** closed **Merged:** Yes --- <!--🛑 New scripts must be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing. PRs without prior testing will be closed. --> ## ✍️ Description The previous `cmdk` search was filtered correctly but then sorted by category order rather than match strength. This caused "Dokpoly" to appear above "Traefik", if you searched for Traefik, simply because its category (Containers) comes before Traefik's category alphabetically. - Flatten search results into a single "Search Results" group. - Implement scoring to prioritize name matches over descriptions. - Revert to category grouping only when the search query is empty. ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [x] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [ ] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [x] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs.
OVERLORD added the pull-request label 2026-02-05 09:03:48 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#9424