Prevent unnecessary scrolling in the TUI entry details view #65
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In the entry details view, moving between fields with j, k, arrow keys, or Tab can scroll the screen even when all details already fit within the available viewport. This makes the view visually unstable and moves content without a navigation need.
Required behavior
Acceptance criteria
Implemented and pushed in
e0ce213.The TUI now keeps the entry-details viewport fixed while the selected field remains visible and moves it by only the rows needed when focus crosses an edge. j/k and Up/Down now follow the same field-navigation path as Tab/Shift-Tab. Rendering measures Ratatui wrapped-line heights, recalculates after resize and responsive OTP layout changes, preserves the selected field at the 40x8 minimum, and still permits Page Up/Down within a field taller than the viewport. The command reference documents the behavior.
Verification:
The TUI suite passes all 89 tests, including deterministic fit, overflow in both directions, resize, wrapped fields, oversized fields, compact OTP, and minimum-layout regressions.