Repository navigation
feat(tui): H, M and L jump through the Queue and Stats lists - #654
Conversation
The help menu offers H/M/L for top, middle and bottom, but the Queue popup and the Stats Top Tracks list ignored them. Add the three arms, following recently_played.rs. The Queue counts its now-playing header row through row_count, so H selects it and L the last queued item. Only the view cursors move; nothing is dispatched. Fixes LargeModGames#542 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: LargeModGames/spotatui/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Queue and Stats handlers now support H, M, and L navigation. Queue navigation includes the “Now playing” row. Tests cover selection in three-item lists, and the changelog records the behavior. ChangesQueue and Stats list navigation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to H, M, and L navigation appears mergeable after normal checks; no unresolved behavior issue is established. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Fixes #542. Adds the three H/M/L arms, following
recently_played.rs:(row_count(app) - 1) / 2, and L selectsrow_count(app) - 1.app.view.stats_selected_trackoverstats_data.top_trackswith theon_*_press_handlerhelpers, and do nothing without stats data.app.viewcursors move, nothing is dispatched. The Stats tests growtop_tracksthroughapp.stats_data.as_mut(), so no newapp.<field> =line undersrc/tui/handlers.Tests:
l_selects_the_last_queue_row(["A", "B", "C"]→ row 3),h_selects_the_now_playing_row_and_m_the_middle_row,l_selects_the_last_top_track_and_h_the_first,m_selects_the_middle_top_track.The changelog line is under
### Fixed, since the help menu already offered these keys; I didn't want to start an### Addedsection that #543 would also start.Testing
cargo fmt --all -- --check: cleancargo clippy --no-default-features --features telemetry,tui -- -D warnings: cleancargo test --no-default-features --features telemetry,tui: 1332 passed, 0 failed... queue_menuand... statslist the new testsAdditional notes
This is one of five small PRs I opened together (for #544, #607, #546, #542 and #543). I test-merged all five in three orders without conflicts; together they pass the slim checks (1333 tests).
Written with AI coding assistants: Claude Code wrote each change on current main against the issue text and checked it (Codex had drafted fixes earlier, used here only as a reference).
🤖 Generated with Claude Code
Summary by CodeRabbit
H,M, orLnow jumps to the top, middle, or bottom of the Queue popup and the Stats “Top Tracks” list. In the Queue,Hselects the “Now playing” row.