Skip to content

transform palette actions to commands - #34469

Merged
igorkorsukov merged 1 commit into
musescore:mainfrom
igorkorsukov:w/rcmd/rcmd_step28
Aug 5, 2026
Merged

transform palette actions to commands#34469
igorkorsukov merged 1 commit into
musescore:mainfrom
igorkorsukov:w/rcmd/rcmd_step28

Conversation

@igorkorsukov

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The palette module adds command declarations, metadata registration, and project-dependent command state. PaletteActionsController now dispatches palette commands, updates palette settings, and exposes asynchronous request channels. PaletteModule registers the command registry and state services and exports the controller interface. Palette QML models now subscribe to controller notifications instead of registering action-dispatcher handlers. Diagnostic audio menu entries now use command identifiers.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request has no description and omits all required issue, motivation, checklist, testing, and contribution details. Add the required issue reference, change summary, completed checklist, testing information, and details for any prior attempts or exceptions.
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 (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change from palette actions to commands.
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

Warning

Review ran into problems

🔥 Problems

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@src/palette/internal/palettecommandsstate.cpp`:
- Around line 38-81: Update PaletteCommandsState::commandState to return each
palette setting command’s actual checked value from IPaletteConfiguration, while
preserving the existing disabled state when no project is open. In init(),
subscribe to the three configuration change channels for
PALETTE_TOGGLE_SINGLE_CLICK_TO_OPEN_COMMAND,
PALETTE_TOGGLE_SINGLE_PALETTE_COMMAND, and PALETTE_TOGGLE_DRAG_ENABLED_COMMAND,
and refresh the affected command state after each update; disconnect these
subscriptions in deinit().
🪄 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: CHILL

Plan: Pro Plus

Run ID: 50778af2-5f4f-42cf-ae4a-0bdd17390007

📥 Commits

Reviewing files that changed from the base of the PR and between c538e5f and 6f86639.

📒 Files selected for processing (14)
  • src/palette/CMakeLists.txt
  • src/palette/internal/ipalettecommandscontroller.h
  • src/palette/internal/paletteactionscontroller.cpp
  • src/palette/internal/paletteactionscontroller.h
  • src/palette/internal/palettecommandsregister.cpp
  • src/palette/internal/palettecommandsregister.h
  • src/palette/internal/palettecommandsstate.cpp
  • src/palette/internal/palettecommandsstate.h
  • src/palette/palettecommands.h
  • src/palette/palettemodule.cpp
  • src/palette/qml/MuseScore/Palette/internal/paletterootmodel.cpp
  • src/palette/qml/MuseScore/Palette/internal/paletterootmodel.h
  • src/palette/qml/MuseScore/Palette/internal/palettespanelcontextmenumodel.cpp
  • src/palette/qml/MuseScore/Palette/internal/palettespanelcontextmenumodel.h

Comment thread src/palette/internal/palettecommandsstate.cpp
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/palette/internal/palettecommandsstate.h (1)

25-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add direct includes for std::string and std::vector.

PaletteCommandsState uses std::string at Line 46 and std::vector at Line 56, but this header includes only <map>. Add the direct standard-library headers so the header does not depend on transitive includes.

Proposed include fix
 `#include` <map>
+#include <string>
+#include <vector>

Also applies to: 46-56

🤖 Prompt for 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.

In `@src/palette/internal/palettecommandsstate.h` around lines 25 - 33, Update the
includes in PaletteCommandsState to directly include the standard-library
headers declaring std::string and std::vector, alongside the existing <map>
include. Leave the surrounding module and interface includes unchanged.
🤖 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.

Nitpick comments:
In `@src/palette/internal/palettecommandsstate.h`:
- Around line 25-33: Update the includes in PaletteCommandsState to directly
include the standard-library headers declaring std::string and std::vector,
alongside the existing <map> include. Leave the surrounding module and interface
includes unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ea877f26-ae36-40b5-88ce-cd09e6b92d5b

📥 Commits

Reviewing files that changed from the base of the PR and between c538e5f and cf963a0.

📒 Files selected for processing (15)
  • src/appshell/qml/MuseScore/AppShell/appmenumodel.cpp
  • src/palette/CMakeLists.txt
  • src/palette/internal/ipalettecommandscontroller.h
  • src/palette/internal/paletteactionscontroller.cpp
  • src/palette/internal/paletteactionscontroller.h
  • src/palette/internal/palettecommandsregister.cpp
  • src/palette/internal/palettecommandsregister.h
  • src/palette/internal/palettecommandsstate.cpp
  • src/palette/internal/palettecommandsstate.h
  • src/palette/palettecommands.h
  • src/palette/palettemodule.cpp
  • src/palette/qml/MuseScore/Palette/internal/paletterootmodel.cpp
  • src/palette/qml/MuseScore/Palette/internal/paletterootmodel.h
  • src/palette/qml/MuseScore/Palette/internal/palettespanelcontextmenumodel.cpp
  • src/palette/qml/MuseScore/Palette/internal/palettespanelcontextmenumodel.h
🚧 Files skipped from review as they are similar to previous changes (12)
  • src/palette/qml/MuseScore/Palette/internal/paletterootmodel.cpp
  • src/palette/qml/MuseScore/Palette/internal/paletterootmodel.h
  • src/palette/qml/MuseScore/Palette/internal/palettespanelcontextmenumodel.h
  • src/palette/internal/ipalettecommandscontroller.h
  • src/palette/internal/palettecommandsregister.cpp
  • src/palette/internal/palettecommandsstate.cpp
  • src/palette/internal/paletteactionscontroller.cpp
  • src/palette/qml/MuseScore/Palette/internal/palettespanelcontextmenumodel.cpp
  • src/palette/CMakeLists.txt
  • src/palette/internal/paletteactionscontroller.h
  • src/palette/palettemodule.cpp
  • src/palette/internal/palettecommandsregister.h

@igorkorsukov
igorkorsukov merged commit 5c77d9c into musescore:main Aug 5, 2026
14 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