Skip to content

Extract docked plug-in hosting into ExtensionPanel - #368

Merged
igorkorsukov merged 1 commit into
musescore:mainfrom
mnorrisvuw:codex/fix-35226-dockable-plugins
Oct 20, 2026
Merged

igorkorsukov merged 1 commit into
musescore:mainfrom
mnorrisvuw:codex/fix-35226-dockable-plugins

Conversation

@mnorrisvuw

@mnorrisvuw mnorrisvuw commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Related to musescore/MuseScore#35226. Required by musescore/MuseScore#35277.

Summary

Extract docked plug-in hosting into an ExtensionPanel component in Muse.Extensions.

Description

Following the review on musescore/MuseScore#35277, this moves the plug-in loading, unloading, content sizing and deferred-close handling out of MuseScore's NotationPage.qml and into a reusable framework component.

The component exposes the plug-in title, a close request and its requested initial width, with a 360-pixel fallback. Deferred close and width callbacks are associated with the current load request so they do not affect a replacement plug-in. Dock placement, navigation and score-context changes remain the consumer application's responsibility.

This follows the dockable plug-in infrastructure already merged in #366; it does not repeat that implementation. The corresponding MuseScore update already uses this component and pins framework commit 27ab1cfb1c0269330ebb0b72b35f80600e2fa302.

I rebuilt MuseScore and manually retested switching between the Hello world and Test docked panel plug-ins, confirming that switching works.

Validation

From the MuseScore checkout:

git diff --check
git -C muse diff --check
qmllint -I builds/dock-plugins/muse/framework/extensions/qml muse/framework/extensions/qml/Muse/Extensions/ExtensionPanel.qml
cmake --build builds/dock-plugins --target mscore translations -j 6
cmake --install builds/dock-plugins
QT_QPA_PLATFORM=offscreen /opt/homebrew/opt/qtdeclarative/bin/qmltestrunner -input /private/tmp/extension-panel-tests.S6S8bF -import /private/tmp/extension-panel-tests.S6S8bF/imports

The temporary QML harness uses a stub ExtensionBuilder and is not committed. Its five focused checks cover requested/fallback width, content resizing, loading before activation, switching with a deferred close, and unloading with queued callbacks. All passed (seven QtTest passes including setup/cleanup). Real plug-in switching was also manually tested in the rebuilt application. No C++ files changed, so Uncrustify is not applicable to this refactor.

  • I signed the CLA. Username: michaelnorris.
  • 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.
  • 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.

The commit describes the extraction but does not include the related issue number, so the commit-message checklist item is left unchecked.

Complete only if applicable:

  • I created a unit test or vtest to verify the changes I made.
  • This PR was created using AI assistance; I have read, understood and complied following the guidelines for AI-assisted contributions. The AI tool(s) I used are listed below.

AI tool: OpenAI Codex, used for implementation, local validation and description drafting. The commit includes an Assisted-by: OpenAI Codex trailer.

Build configuration

audacity: audacity/audacity/master
audacity platforms: linux_x64
musescore: mnorrisvuw/MuseScore/codex/fix-35226-dockable-plugins
musescore platforms: linux_x64

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: musescore/muse_framework/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 3bd56fcb-3681-4698-a9ca-75b83890b92f
📥 Commits

Reviewing files that changed from the base of the PR and between 3270154 and 27ab1cf.

📒 Files selected for processing: 2
  • framework/extensions/qml/Muse/Extensions/CMakeLists.txt
  • framework/extensions/qml/Muse/Extensions/ExtensionPanel.qml

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

📝 Walkthrough

The QML module now includes ExtensionPanel.qml. The panel exposes methods and signals for extension lifecycle and sizing. It creates a plugin host for active pending requests, loads and unloads builder content, forwards applicable close requests, and tracks content dimensions.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 27ab1

The reported stale-close risk does not occur when the panel recreates its host. No identified issue blocks merging after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: moving docked plug-in hosting into the reusable ExtensionPanel component.
Description check Passed The description is detailed and covers the change, motivation, validation, testing, checklist status, AI assistance, and build configuration. It links the related issues and explains why the commit-me…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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 is detailed and covers the change, motivation, validation, testing, checklist status, AI assistance, and build configuration. It links the related issues and explains why the commit-message and unit-test checklist items remain unchecked.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@igorkorsukov
igorkorsukov merged commit 9656e76 into musescore:main Oct 20, 2026
3 checks passed
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.

2 participants