feat(tui): paginate keyboard shortcuts overlay#30
Merged
Conversation
The single-page help modal was clipping Watchlist/Orders sections on short terminals. Now shows one logical group per page (Global / Market & Detail / Chart & Watchlist / Trade & Orders) with left/right navigation. - `←` `→` / Tab / `[` `]` cycle pages (wrap both directions). - Esc or any non-navigation key dismisses (preserves the legacy "any key closes" contract). - Modal shrunk from 33 → 26 rows so each page fits on ~25-row terminals. - Footer shows page counter + nav hint. - Opening via `?` always resets to page 1 (Global). Tests cover the cycle helpers (wrap both directions), the reset-on-open contract, the critical "nav keys must not dismiss" guarantee, and the unchanged "Esc closes" fallback. Mutation-verified.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
?help modal was clipping Watchlist/Orders sections on ~30-row terminals (see beta feedback screenshot).←→/Tab/[]cycle pages (wrap both directions). Esc or any other key closes — preserves the familiar "any key dismisses" contract.?always lands on page 1 (Global) — fresh mental anchor every time.n/4and the nav hint inline.Test plan
cargo test -p cdcx-tui --lib→ 60 passed, 5 new, 0 failedcargo fmt --all --checkcleancargo clippy --workspace --all-targetscleannext_help_pageto be a no-op failsright_arrow_inside_help_advances_page_without_closing; replacing theprev_help_pagewrap withsaturating_subfailshelp_overlay_prev_page_wraps_from_first_to_last?, cycle all 4 pages with→/Tab/←, confirm wrap in both directions, confirm Esc/letters dismiss, confirm reopen resets to page 1