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
test(tui): exercise Escape through the global handler - #903
Reviewing files that changed from the base of the PR and between 63bad62 and 12dfde8.
📒 Files selected for processing: 3
src/tui/handlers/album_list.rs
src/tui/handlers/album_tracks.rs
src/tui/handlers/recently_played.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
Tests for Album List, Album Tracks, and Recently Played now dispatch Escape through handle_app. They verify the resulting active and hovered blocks. Two left-navigation tests now start from their matching screen block.
Changes: List-screen Escape tests
Layer / File(s)
Summary
Route-state test coverage src/tui/handlers/album_list.rs, src/tui/handlers/album_tracks.rs, src/tui/handlers/recently_played.rs
The Escape tests seed each screen’s route and call handle_app. They verify that the active block becomes Empty and the screen remains hovered. The Album List and Recently Played left-navigation tests now start from their matching blocks.
The changed Escape tests cover the requested route behavior. No actionable merge-blocking risk was found; normal validation remains appropriate.
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 permitted conventional-commit prefix test(tui):, concisely describes the updated Escape tests, and uses an imperative subject.
Linked Issues check
The changes satisfy the coding requirements in directly linked issue #825. The three tests push RouteId::RecentlyPlayed, RouteId::AlbumList, and RouteId::AlbumTracks, assert the matching active …
Out of Scope Changes check
The diff changes only test imports and test setup, names, entry points, and assertions in the three handler test modules. These changes directly implement issue #825. No production handler, Artist tes…
Full details: Linked Issues check
Explanation
The changes satisfy the coding requirements in directly linked issue #825. The three tests push RouteId::RecentlyPlayed, RouteId::AlbumList, and RouteId::AlbumTracks, assert the matching active block before Escape, call crate::tui::handlers::handle_app, and assert ActiveBlock::Empty with the matching hovered block. The Album List and Recently Played on_left_press tests now start on their own blocks. The Album Tracks left-key test is unchanged. The reported test names match the esc_leaves filter.
Full details: Out of Scope Changes check
Explanation
The diff changes only test imports and test setup, names, entry points, and assertions in the three handler test modules. These changes directly implement issue #825. No production handler, Artist test, or unrelated file changes are present in the reviewed diff.
✨ 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
Update the Escape tests for Recently Played, Album List and Album Tracks to start on their respective screens and call
handle_app.Correct the Album List and Recently Played Left-key tests to start on their own blocks.
Fixes #825.
Testing
Testing
cargo fmt --all -- --checkcargo clippy --no-default-features --features telemetry,tui -- -D warningscargo test --no-default-features --features telemetry,tuicargo test --no-default-features --features telemetry,tui esc_leavescargo test --no-default-features --features telemetry,tui on_left_pressAdditional notes
💬 Questions or want to chat with other contributors? Join the spotatui Discord.
Summary by CodeRabbit
Bug Fixes
Tests