Skip to content

Fuzzy text search, part 2: Add fuzzy search to learn page - #197

Open
juli27 wants to merge 1 commit into
musescore:mainfrom
juli27:addFuzzySearchLearnPage
Open

Fuzzy text search, part 2: Add fuzzy search to learn page#197
juli27 wants to merge 1 commit into
musescore:mainfrom
juli27:addFuzzySearchLearnPage

Conversation

@juli27

@juli27 juli27 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Part of: musescore/MuseScore#15983

Refactors the playlist models to a QAbstractListModel subclass to allow the use of our SortFilterProxyModel.

  • I signed the CLA as username:
  • 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).

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5f99bb0d-86e8-4886-868a-b55ea017d064

📥 Commits

Reviewing files that changed from the base of the PR and between 5ff1a47 and 4c42b96.

📒 Files selected for processing (2)
  • framework/learn/qml/Muse/Learn/internal/playlistmodel.cpp
  • framework/learn/qml/Muse/Learn/learnpagemodel.cpp

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds a Qt playlist list model with playlist roles and duration formatting. LearnPageModel now exposes dedicated models for started and advanced playlists and updates them from the learn service. LearnPage.qml applies fuzzy filtering and score-based sorting. Playlist delegates use bound model and index properties for navigation, metadata, scrolling, and URL launching.

Merge Risk: ⚪ Minimal · up to 4c42b

The PR is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. 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 search to the learn page.
Description check ✅ Passed The description provides context, motivation, issue reference, completed checklist items, and clearly identifies that no test was added.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@framework/learn/qml/Muse/Learn/internal/playlistmodel.cpp`:
- Around line 48-50: Update PlaylistModel::rowCount to return zero when the
supplied parent QModelIndex is valid, while preserving m_playlist.size() for the
invalid root index used by this flat list model.

In `@framework/learn/qml/Muse/Learn/LearnPage.qml`:
- Around line 204-222: Update the LearnPage playlist flow around the
SortFilterProxyModel to pass whether a search is active into Playlist.qml, then
handle the zero-row state separately from load failure. When an active fuzzy
search has no matches, display a dedicated no-results message; preserve the
existing “unable to load these videos” message for genuine playlist loading
failures.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ea3f57e1-6b74-42e3-8de8-02a6d6206ee8

📥 Commits

Reviewing files that changed from the base of the PR and between d9878b9 and 5ff1a47.

📒 Files selected for processing (7)
  • framework/learn/qml/Muse/Learn/CMakeLists.txt
  • framework/learn/qml/Muse/Learn/LearnPage.qml
  • framework/learn/qml/Muse/Learn/internal/Playlist.qml
  • framework/learn/qml/Muse/Learn/internal/playlistmodel.cpp
  • framework/learn/qml/Muse/Learn/internal/playlistmodel.h
  • framework/learn/qml/Muse/Learn/learnpagemodel.cpp
  • framework/learn/qml/Muse/Learn/learnpagemodel.h

Comment thread framework/learn/qml/Muse/Learn/internal/playlistmodel.cpp Outdated
Comment thread framework/learn/qml/Muse/Learn/LearnPage.qml
@Eism

Eism commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

/build
musescore: musescore/MuseScore/main
musescore platforms: linux_x64 linux_arm64 macos windows_x64

@github-actions

Copy link
Copy Markdown

@Eism

Eism commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

/build

@github-actions

Copy link
Copy Markdown

Refactors the playlist models to a QAbstractListModel subclass to allow
the use of our SortFilterProxyModel.
@juli27
juli27 force-pushed the addFuzzySearchLearnPage branch from 245d2f4 to 4c42b96 Compare August 19, 2026 16:45
@juli27

juli27 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@Eism I've rebased again to fix the broken build

@Eism

Eism commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

/build

@github-actions

Copy link
Copy Markdown

@DmitryArefiev

Copy link
Copy Markdown
Collaborator

Tested fuzzy search on Home>Learn page on Win10, Mac13.7.8, LinuxUbuntu26.04 LTS.

It seems to better than in main (e.g. 'dnamics' points to videos with 'dynamics' text)

@avvvvve You can try it on your side too

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.

3 participants