You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): cycle repeat modes for playback flag - #916
Reviewing files that changed from the base of the PR and between ee1262c and 945b94d.
📒 Files selected for processing: 3
CHANGELOG.md
src/cli/cli_app.rs
src/cli/util.rs
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
📝 Walkthrough
The playback --repeat flag now advances repeat mode through Off, Context, and Track. A utility function implements the cycle, and a unit test checks all three transitions.
Changes: CLI Repeat Mode
Layer / File(s)
Summary
Repeat state cycle src/cli/util.rs
Adds next_repeat_state for the Off → Context → Track → Off cycle and tests each transition.
playback --repeat now advances through Off, Context, and Track. No verified issue blocks merging this change.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title uses the valid conventional-commit prefix fix(cli):, clearly describes the repeat-mode cycling change, and remains concise.
Linked Issues check
Issue #816 requires each playback --repeat call to advance Off to Context, Context to Track, and Track to Off. src/cli/util.rs implements these transitions in next_repeat_state, and `src/cli/cli…
Out of Scope Changes check
The changes stay within issue #816. The CLI call site, its pure transition helper, the required unit test, and the related CHANGELOG.md entry all document or implement the requested repeat-cycle beh…
Full details: Linked Issues check
Explanation
Issue #816 requires each playback --repeat call to advance Off to Context, Context to Track, and Track to Off. src/cli/util.rs implements these transitions in next_repeat_state, and src/cli/cli_app.rs sends the next state through the existing absolute-state IoEvent::Repeat. The diff leaves Network::repeat, IoEvent::Repeat, --shuffle, and TUI repeat logic unchanged. The required unit test is present. The PR description reports successful formatting, clippy, and test commands.
Full details: Out of Scope Changes check
Explanation
The changes stay within issue #816. The CLI call site, its pure transition helper, the required unit test, and the related CHANGELOG.md entry all document or implement the requested repeat-cycle behavior. No unrelated implementation or TUI, network, event, or shuffle changes are present.
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
✨ Simplify code
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix
playback --repeatto make it cycles Off, Context and Track instead of sending the current mode.Fixes #816.
Testing
cargo test --no-default-features --features telemetry,tui repeat_cycles_off_context_track_offcargo fmt --all -- --checkcargo clippy --no-default-features --features telemetry,tui -- -D warningscargo test --no-default-features --features telemetry,tuiAdditional notes
💬 Questions or want to chat with other contributors? Join the spotatui Discord.
Summary by CodeRabbit
playback --repeatso each use advances through Off, Context, and Track modes.