[Repo Assist] feat(ui): make help overlay scrollable#176
Draft
github-actions[bot] wants to merge 1 commit intomainfrom
Draft
[Repo Assist] feat(ui): make help overlay scrollable#176github-actions[bot] wants to merge 1 commit intomainfrom
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
The help overlay previously rendered all keybinding lines as a static Paragraph with no scroll support. On a typical 24-row terminal the overlay is ~17 rows tall (70% of height), but the help text has 36 lines — roughly half the content was silently clipped. Changes: - Add help_scroll (u16) and help_max_scroll (u16) to App state - Extract handle_help_input() from the inline match in handle_events() so the scroll logic is testable in isolation - help_scroll resets to 0 when the overlay is closed - help_max_scroll is computed each render frame from the area height and total line count; current scroll is clamped on resize - Title updated to '… ↑↓ to scroll' to hint at the new capability - Vertical scrollbar rendered when content exceeds visible height - 7 new unit tests: initial state, down/clamp, up/saturate, Home, End, and close-resets-scroll (231 → 238) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
21 tasks
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.
🤖 This PR was created by Repo Assist, an automated AI assistant.
What
Makes the
?help overlay scrollable so all keybindings are accessibleon any terminal size.
Before: The help text (36 lines) was rendered as a static
Paragraphwith no scroll support. On a typical 24-row terminal thecentered_rect(60, 70, ...)overlay is only ~17 rows of content — roughlyhalf the keybindings were silently clipped below the bottom border.
After:
↑ ↓ PgUp PgDn Home End(andj/kvim aliases) scrollthe help overlay. A scrollbar appears on the right edge when the content
overflows. The title shows
↑↓ to scrollas a discoverability hint.Closing the overlay (
?orEsc) resets the scroll position to the top.Why
This is a real usability bug: users on compact terminals (e.g. 24-row
VS Code integrated terminal) could never see the Mouse section or the
General section at the bottom of the help. The fix uses only existing
Ratatui primitives — no new dependencies.
Changes
src/app.rshelp_scroll: u16+help_max_scroll: u16fields; initialised to 0src/handler.rshandle_help_input()function; called fromhandle_eventswhenshow_helpis truesrc/ui.rsdraw_help_overlaynow takes&mut App; uses.scroll((app.help_scroll, 0)); renders aScrollbarwhen content overflows; title updatedKeybindings inside the overlay
↑/k↓/jPgUpPgDnHomeEnd?/EscTest Status