Skip to content

ToolBarItem: add ability to provide new commands while modifiers are held - #363

Open
grliszas14 wants to merge 1 commit into
musescore:mainfrom
grliszas14:modifier_commands
Open

grliszas14 wants to merge 1 commit into
musescore:mainfrom
grliszas14:modifier_commands

Conversation

@grliszas14

Copy link
Copy Markdown
Contributor

Resolves: audacity/audacity#11727

  • 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.
  • 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.

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.

Claude Code, Opus 5.5

Build configuration

audacity: audacity/audacity/master
audacity platforms: linux_x64
musescore: musescore/MuseScore/main
musescore platforms: linux_x64

@coderabbitai

coderabbitai Bot commented Oct 16, 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: 31b45f93-33a4-4dc9-88bd-f462f7bebe25
📥 Commits

Reviewing files that changed from the base of the PR and between 42b0224 and b290019.

📒 Files selected for processing: 2
  • framework/uicomponents/qml/Muse/UiComponents/toolbaritem.cpp
  • framework/uicomponents/qml/Muse/UiComponents/toolbaritem.h

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

ToolBarItem now stores keyboard-modifier and command mappings. During activation, it checks for a valid command mapped to the current Shift, Control, Alt, and Meta modifiers. If the command is enabled, ToolBarItem dispatches it. If a mapping exists but the command is disabled, activation returns without dispatching the original intent. If no valid mapping exists, the existing intent-based dispatch continues.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to b2900

The modifier-command change is mergeable after normal checks; the reported activation crash is not reachable in supported contexts.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Linked Issues check Warning Issue [#11727] requires recording to a new track with Shift+R and with Shift held on the Record button. The diff only adds generic modifier-command lookup and dispatch in ToolBarItem. It does not … Add the Audacity integration that maps the Record ToolBarItem with Shift to the existing record-on-new-track command and binds Shift+R to that command. Add automated coverage for both invocation paths and confirm that the existing `Reco…
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding modifier-held command support to ToolBarItem.
Description check Passed The description includes the issue reference, completed checklist, AI disclosure, and build configuration. It does not include a separate short summary or motivation, but the linked issue and title pr…
Out of Scope Changes check Passed The two changed files implement modifier-command support for ToolBarItem. This is supporting infrastructure for the modifier-based Record action in issue [#11727]. The diff shows no unrelated featur…
Full details: Description check

Explanation

The description includes the issue reference, completed checklist, AI disclosure, and build configuration. It does not include a separate short summary or motivation, but the linked issue and title provide the required context.

Full details: Out of Scope Changes check

Explanation

The two changed files implement modifier-command support for ToolBarItem. This is supporting infrastructure for the modifier-based Record action in issue [#11727]. The diff shows no unrelated feature or cleanup changes.

Full details: Linked Issues check

Explanation

Issue [#11727] requires recording to a new track with Shift+R and with Shift held on the Record button. The diff only adds generic modifier-command lookup and dispatch in ToolBarItem. It does not configure the Record button, map the existing record-on-new-track command, or add the Shift+R shortcut. The existing menu command is not changed, but the requested new behavior is not established.

Resolution

Add the Audacity integration that maps the Record ToolBarItem with Shift to the existing record-on-new-track command and binds Shift+R to that command. Add automated coverage for both invocation paths and confirm that the existing Record > Record on a new track path remains functional.

  • Fix all pre-merge checks with AI
✨ 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.

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.

Implement record to a new track

1 participant