added playback commands state#33850
Conversation
08ead3f to
5fa1cfc
Compare
📝 WalkthroughWalkthroughThe PR splits the existing monolithic 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsLinked repositories: Your configuration references 1 linked repositories, but your current plan allows 0. Analyzed ``, skipped 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. Comment |
There was a problem hiding this comment.
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 @.gitmodules:
- Line 3: The SSH URL format in the `.gitmodules` file for the muse_framework
submodule conflicts with the HTTPS URL validation logic in the
`check_submodules.yml` CI workflow. Either revert the submodule URL back to
HTTPS format in `.gitmodules` or update the URL validation check in
`check_submodules.yml` to accept the SSH format. Choose one approach and ensure
both the submodule configuration and the CI verification contract are aligned.
In `@src/playback/internal/playbackcommandsstate.cpp`:
- Around line 52-54: The isPlayingChanged() signal subscription in the
playbackController is currently commented out at lines 52-54, but the PLAY
command state at line 97 depends on the isPlaying() status. This means when
playback starts or stops, updateCommandStates() is never called and
commandStateChanged notifications become stale. Uncomment the
playbackController()->isPlayingChanged().onNotify() block to re-enable the
signal connection so that updateCommandStates() is triggered whenever the
playing state changes.
🪄 Autofix (Beta)
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
Run ID: 4b82f1b3-b706-4f28-92af-64d5cef66bf4
📒 Files selected for processing (9)
.gitmodulesmusesrc/playback/CMakeLists.txtsrc/playback/internal/playbackcommandsregister.cppsrc/playback/internal/playbackcommandsregister.hsrc/playback/internal/playbackcommandsstate.cppsrc/playback/internal/playbackcommandsstate.hsrc/playback/playbackcommands.hsrc/playback/playbackmodule.cpp
| [submodule "muse_framework"] | ||
| path = muse | ||
| url = https://github.com/musescore/muse_framework.git | ||
| url = git@github.com:igorkorsukov/muse_framework.git |
There was a problem hiding this comment.
Keep the submodule URL aligned with CI.
check_submodules.yml still validates the HTTPS URL, so this SSH change breaks the submodule verification job and fails the build. Either revert this line or update the workflow contract in the same PR.
🤖 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 @.gitmodules at line 3, The SSH URL format in the `.gitmodules` file for the
muse_framework submodule conflicts with the HTTPS URL validation logic in the
`check_submodules.yml` CI workflow. Either revert the submodule URL back to
HTTPS format in `.gitmodules` or update the URL validation check in
`check_submodules.yml` to accept the SSH format. Choose one approach and ensure
both the submodule configuration and the CI verification contract are aligned.
Source: Pipeline failures
| // playbackController()->isPlayingChanged().onNotify(this, [this]() { | ||
| // updateCommandStates(); | ||
| // }); |
There was a problem hiding this comment.
Re-enable isPlayingChanged() updates for PLAY state.
Line 97 derives PLAY state from isPlaying(), but Lines 52-54 disable the isPlayingChanged() subscription. Playback start/stop can therefore leave command state and commandStateChanged notifications stale.
Suggested fix
- // playbackController()->isPlayingChanged().onNotify(this, [this]() {
- // updateCommandStates();
- // });
+ playbackController()->isPlayingChanged().onNotify(this, [this]() {
+ updateCommandStates();
+ });Also applies to: 96-99
🤖 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/playback/internal/playbackcommandsstate.cpp` around lines 52 - 54, The
isPlayingChanged() signal subscription in the playbackController is currently
commented out at lines 52-54, but the PLAY command state at line 97 depends on
the isPlaying() status. This means when playback starts or stops,
updateCommandStates() is never called and commandStateChanged notifications
become stale. Uncomment the playbackController()->isPlayingChanged().onNotify()
block to re-enable the signal connection so that updateCommandStates() is
triggered whenever the playing state changes.
|
replaced by #33854 |
Key points: