Skip to content

fix(cli): cycle repeat modes for playback flag - #916

Merged
LargeModGames merged 1 commit into
LargeModGames:mainfrom
WaterWhisperer:fix/cli-repeat-toggle
Oct 22, 2026
Merged

LargeModGames merged 1 commit into
LargeModGames:mainfrom
WaterWhisperer:fix/cli-repeat-toggle

Conversation

@WaterWhisperer

@WaterWhisperer WaterWhisperer commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix playback --repeat to 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_off
  • cargo fmt --all -- --check
  • cargo clippy --no-default-features --features telemetry,tui -- -D warnings
  • cargo test --no-default-features --features telemetry,tui

Additional notes


💬 Questions or want to chat with other contributors? Join the spotatui Discord.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed playback --repeat so each use advances through Off, Context, and Track modes.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: LargeModGames/spotatui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b7a73e68-9119-4e93-9854-138c133ef937
📥 Commits

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.
CLI repeat integration
src/cli/cli_app.rs, CHANGELOG.md
The repeat flag sends the next repeat state. The changelog records the cycle.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 945b9

playback --repeat now advances through Off, Context, and Track. No verified issue blocks merging this change.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the valid conventional-commit prefix fix(cli):, clearly describes the repeat-mode cycling change, and remains concise.
Linked Issues check Passed 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 Passed 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cli/cli_app.rs 0.0% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@LargeModGames
LargeModGames merged commit 63f94e5 into LargeModGames:main Oct 22, 2026
32 checks passed
@WaterWhisperer
WaterWhisperer deleted the fix/cli-repeat-toggle branch October 23, 2026 08:58
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.

spotatui playback --repeat doesn't change the repeat mode

2 participants