Skip to content

fix(tui): honour rebound paging keys in the Help menu and episode list - #643

Merged
LargeModGames merged 1 commit into
LargeModGames:mainfrom
kapok-4o:fix/rebound-paging-keys
Sep 28, 2026
Merged

LargeModGames merged 1 commit into
LargeModGames:mainfrom
kapok-4o:fix/rebound-paging-keys

Conversation

@kapok-4o

Copy link
Copy Markdown
Collaborator

Summary

Fixes #598.

  • Help menu: the literal Ctrl+d / Ctrl+u arms now match keys.next_page / keys.previous_page.
  • Episode list: the literal Ctrl+e / Ctrl+a arms now match keys.jump_to_end / keys.jump_to_start, like track_table.rs.
  • The episode list's jump_to_end uses len().checked_sub(1), so an empty page keeps the first row instead of underflowing.

As the issue says, a user who rebinds Next Page loses Ctrl+d on the Help menu, same as on track tables. No app.user_config.keys.X = writes under src/tui/handlers: the tests build a UserConfig first and pass it to App::new.

Tests: rebound_next_page_key_pages_the_help_menu (PageDown pages, then Ctrl+d no longer does), rebound_jump_to_end_key_selects_the_last_episode and jump_to_end_on_an_empty_episode_page_keeps_the_first_row. test_help_menu_pagination is unchanged and still passes.

Testing

  • cargo fmt --all -- --check: clean
  • cargo clippy --no-default-features --features telemetry,tui -- -D warnings: clean
  • cargo test --no-default-features --features telemetry,tui: 1312 passed, 0 failed
  • ... help_menu and ... episode_table list the new tests
  • With the literal arms and the len() - 1 put back, all three new tests fail (the empty-page one with the overflow).

Additional notes

This is one of five small PRs I opened together (for #606, #598, #597, #596 and #601). Each changelog entry sits at a different spot in [Unreleased], and I test-merged all five in three orders without conflicts; together they pass the slim checks (1327 tests).

Written with AI coding assistants: Codex drafted fixes for these issues, and Claude Code rebuilt each one on current main against the issue text and re-tested it.

🤖 Generated with Claude Code

The Help menu paged with a literal Ctrl+d/Ctrl+u and the episode list
jumped with a literal Ctrl+a/Ctrl+e, so rebinding next_page,
previous_page, jump_to_start or jump_to_end did nothing there. Match the
configured bindings like track_table.rs does, and guard jump_to_end
against an empty episode page, which underflowed.

Fixes LargeModGames#598

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: LargeModGames/spotatui/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: d79657bd-2a6d-4a37-b94a-28dff7277fdd

📥 Commits

Reviewing files that changed from the base of the PR and between ea356a0 and 596737b.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • src/tui/handlers/episode_table.rs
  • src/tui/handlers/help_menu.rs

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 Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
src/tui/handlers/episode_table.rs 96.7% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@LargeModGames
LargeModGames merged commit 672ddd3 into LargeModGames:main Sep 28, 2026
31 checks passed
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.

Help menu and episode list ignore rebound paging keys

2 participants