Skip to content

Expose system-object staves to plugins - #34882

Open
mnorrisvuw wants to merge 1 commit into
musescore:mainfrom
mnorrisvuw:codex/fix-30712-system-object-staves
Open

mnorrisvuw wants to merge 1 commit into
musescore:mainfrom
mnorrisvuw:codex/fix-30712-system-object-staves

Conversation

@mnorrisvuw

Copy link
Copy Markdown
Contributor

Resolves: #30712

Summary

Expose curScore.systemObjectStaves to QML plug-ins.

Description

Plug-ins currently cannot directly access the staves configured by the user to display system objects.

This PR adds a read-only systemObjectStaves property, returning the existing score-level list as API Staff objects. The list contains the additional system-object staves and excludes the top staff, which MuseScore handles separately.

Validation

The following commands completed successfully:

git diff --check
git diff --cached --check
git diff upstream/main...HEAD --check
_deps/uncrustify/bin/uncrustify -c muse/tools/codestyle/uncrustify_muse.cfg --check -l CPP src/engraving/api/v1/score.cpp src/engraving/api/v1/score.h
cmake --build builds/Mac-Qtopt-qt-Ninja-Release --target src/engraving/CMakeFiles/engraving.dir/api/v1/score.cpp.o -j 4

Uncrustify version: 0.74.0. The changed API source compiled successfully; the repeat build check was up to date. A full application build and manual plug-in test have not been performed for this change. No new test was added for this basic API exposure change. No prior PR referencing #30712 was found; the issue contains an earlier request from another contributor to be assigned.

Checklist

  • I signed the CLA as 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.
  • 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 Sep 10, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview 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: Advanced

Run ID: 96cd45ea-e7c3-4873-8074-b2b30357db3e

📥 Commits

Reviewing files that changed from the base of the PR and between 1bc6458 and 8dfd850.

📒 Files selected for processing (2)
  • src/engraving/api/v1/score.cpp
  • src/engraving/api/v1/score.h

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


📝 Walkthrough

Walkthrough

The Score API now exposes a read-only systemObjectStaves QML property. The property returns configured system-object staves as wrapped Staff objects and excludes the top staff.

Merge Risk: ⚪ Minimal · up to 8dfd8

This adds read-only plug-in access to configured system-object staves while preserving exclusion of the separately handled top staff. The change is ready to merge.

🚥 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. 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 and concisely describes the main change: exposing system-object staves to plug-ins.
Description check ✅ Passed The description includes the issue reference, motivation, implementation details, validation results, limitations, and checklist status. It also clearly states that full application testing and a new …
Linked Issues check ✅ Passed The PR satisfies issue #30712 by exposing the score's systemObjectStaves list to QML plug-ins as API Staff objects, while excluding the top staff as specified.
Out of Scope Changes check ✅ Passed The changes are limited to the Score API declaration and implementation required to expose systemObjectStaves. No unrelated code changes are identified.
  • 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.

This branch has not been deployed

No deployments
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.

[API] Expose 'systemObjectStaves' of the Score object

3 participants