Skip to content

Fix UI layout: dynamic editor/results split and scrollable help#63

Open
muk2 wants to merge 1 commit intomainfrom
feature/issue-61-dynamic-layout
Open

Fix UI layout: dynamic editor/results split and scrollable help#63
muk2 wants to merge 1 commit intomainfrom
feature/issue-61-dynamic-layout

Conversation

@muk2
Copy link
Owner

@muk2 muk2 commented Feb 21, 2026

Summary

  • Fixed autocomplete popup positioning to use the dynamic editor_height_percent instead of a hardcoded Percentage(40), so the popup correctly tracks the editor pane when resized with Ctrl+Shift+Up/Down
  • Made the help overlay scrollable (Up/Down/PageUp/PageDown) and adaptive to small terminal sizes, so all keyboard shortcuts are accessible regardless of terminal dimensions
  • Added scroll hint to the help overlay footer

What Changed

  • src/ui/app.rs: Added help_scroll field to App struct; added scroll handling (Up/Down/PageUp/PageDown) to handle_help_input()
  • src/ui/components.rs: Fixed Constraint::Percentage(40)Constraint::Percentage(app.editor_height_percent) for autocomplete positioning; rewrote draw_help_overlay() to support scrolling and dynamic height

Test Plan

  • Resize the editor/results split with Ctrl+Shift+Up/Down, then trigger autocomplete (type 2+ chars or Ctrl+Space) — the popup should appear correctly positioned relative to the editor cursor
  • Open the help overlay (?) in a small terminal (e.g., 40 rows) — should show as much content as fits, with scroll hint at bottom
  • Scroll the help overlay with Up/Down/PageUp/PageDown — all shortcuts should be reachable
  • Press Esc or ? to close help — scroll position resets
  • Run cargo test — all 230 tests pass

Closes #61

🤖 Generated with Claude Code

- Autocomplete popup now uses the dynamic editor_height_percent
  instead of a hardcoded 40% for positioning, so it tracks the
  actual editor pane when resized with Ctrl+Shift+Up/Down
- Help overlay adapts to small terminals by using available height
  and supports scrolling with Up/Down/PageUp/PageDown
- Added scroll hint to help overlay footer

Closes #61

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

UI window does not resize with content, menus inaccessible

1 participant