Skip to content

Fuzzy text search, part 4: Search palettes & plugins - #34752

Open
juli27 wants to merge 2 commits into
musescore:mainfrom
juli27:addFuzzySearchPart4
Open

Fuzzy text search, part 4: Search palettes & plugins#34752
juli27 wants to merge 2 commits into
musescore:mainfrom
juli27:addFuzzySearchPart4

Conversation

@juli27

@juli27 juli27 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Part of: #15983
Depends on: musescore/muse_framework#261

This PR adds search to the plugins page and palettes.
The results on the plugins page are sorted by fuzzy score.
Palette results are sorted by fuzzy score as well. Palettes are sorted higher up when they have cells with higher score than the cells of another palette.

  • I signed the CLA
  • The title of the PR describes the problem it addresses.
  • Each commit's message describes its purpose and effects, and references the issue it resolves. If changes are extensive, there is a sequence of easily reviewable commits.
  • The code in the PR follows the coding rules.
  • I understand all aspects of the code I'm contributing and I'm able to explain it if requested.
  • The code compiles and runs on my machine, preferably after each commit individually. I have manually tested and verified that my changes fulfil their intended purpose.
  • No prior attempts to resolve this problem exist, or if they do, I listed them in my PR description and described how I avoided repeating past mistakes.
  • There are no unnecessary changes.
  • I created a unit test or vtest to verify the changes I made (if applicable).

juli27 added 2 commits August 30, 2026 18:40
The required functionality is part of Qt's QSortFilterProxyModel:
  - `recursiveFilteringEnabled` (since Qt 5.10): Recurses down
    the tree and accepts parents with accepted children
  - `autoAcceptChildRows` (since Qt 6.0): Children of accepted parents
    are auto accepted. This is used to be able to search by palette name
Palettes are sorted according to the scores of their cells and their own
score.
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8ff391f4-e63f-47f8-aba8-60c78e6bfe1c

📥 Commits

Reviewing files that changed from the base of the PR and between 2963eb8 and 39fb61d.

📒 Files selected for processing (5)
  • muse
  • src/palette/internal/palettemodel.cpp
  • src/palette/internal/palettemodel.h
  • src/palette/internal/paletteprovider.cpp
  • src/palette/internal/paletteprovider.h
💤 Files with no reviewable changes (2)
  • src/palette/internal/palettemodel.h
  • src/palette/internal/palettemodel.cpp

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The palette provider now uses SortFilterProxyModel with tooltip-based fuzzy filtering, fuzzy score sorting, recursive filtering, and parent-row acceptance. The previous PaletteCellFilterProxyModel implementation and declaration were removed. setFilter now assigns a fuzzy pattern. The muse subproject pointer was advanced to a newer commit.

Merge Risk: 🔵 Low · up to 39fb6

The PR adds fuzzy search and sorting for palettes and plugins while updating a shared dependency revision. Because that dependency revision is unavailable for compatibility verification, the change is mergeable with explicit owner confirmation that the revisions work together.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding fuzzy text search to palettes and plugins.
Description check ✅ Passed The description explains the changes and motivation, references the related issue, and completes the checklist except for the unit-test item, which is marked not completed. The description is otherwis…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the changes and motivation, references the related issue, and completes the checklist except for the unit-test item, which is marked not completed. The description is otherwise mostly complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped musescore/muse_framework.git.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mathesoncalum
mathesoncalum requested a review from Eism August 31, 2026 07:25
@Eism

Eism commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

@DmitryArefiev please check searching palettes on Palettes panel

@DmitryArefiev

Copy link
Copy Markdown
Contributor

@avvvvve Please try Fuzzy text search in the Palettes (it might be to much elements for one simple request)

PR's build and 4.7.5(or main):

bandicam.2026-09-01.18-11-05-240.mp4

@avvvvve

avvvvve commented Sep 2, 2026

Copy link
Copy Markdown

I'm not super concerned about showing too many results for a short string like 'time'. If you continue typing more of the phrase 'time signature' the results narrow down appropriately. However, it is strange that the ordering of elements in the time signatures palette changes whether you've typed 'time ' or 'time s'.

Screen.Recording.2026-09-02.at.8.52.15.AM.mov

Other feedback:

It would be good if we could get exact matches to appear first in the list. Searching 'capo' does not put the actual element titled 'Capo' first—instead, the jump elements containing the word 'capo' are at the top. I'm not sure if this is in conflict with our ranking algorithm is here though, since it seemingly has to decide which order to put the palettes themselves in first before the elements within them.

image

I'm seeing a regression in element order when searching 'accidentals' between 4.7.4 and this PR. Those first four elements in the PR version should not show up at the beginning of the accidental list. I assume it's because they all have the word 'accidental' in their name, so they're ranking higher?

4.7.4 left, this PR right:
image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants