[PATCH b4 0/2] b4 tui: preserve the list viewport across rebuilds
Christian Brauner <[email protected]> Wed, 29 Jul 2026 11:58:18 +0200
| Newsgroups | org.kernel.linux.tools |
|---|---|
| Message-ID | <20260729-work-b4-tui-scroll-preserve-v1-0-42be22445eaf@kernel.org> |
Updating a series with 'u' in the review tracking TUI made the list visibly jump towards the top of the screen while the cursor stayed on the updated entry. The tracker-style lists rebuild their ListView wholesale on every refresh, so the scroll offset died with the replaced widget; restoring the cursor index alone only scrolls the minimum needed to make that row visible again, which pins the view to the top of the list or glues the cursor row to the bottom edge. Signed-off-by: Christian Brauner (Amutable) <[email protected]> --- Christian Brauner (2): b4 tui: preserve list scroll position across ListView rebuilds tests: cover scroll preservation across list rebuilds src/b4/bugs/_tui.py | 11 ++++-- src/b4/review_tui/_common.py | 3 ++ src/b4/review_tui/_tracking_app.py | 9 +++-- src/b4/tui/__init__.py | 3 ++ src/b4/tui/_common.py | 55 ++++++++++++++++++++++++++++- src/tests/test_tui_bugs.py | 72 +++++++++++++++++++++++++++++++++++--- src/tests/test_tui_tracking.py | 53 ++++++++++++++++++++++++++++ 7 files changed, 196 insertions(+), 10 deletions(-) --- base-commit: 99fe195c0aa5a88be5033f87cad22bc32d27cbfe change-id: 20260729-work-b4-tui-scroll-preserve-dd5f70abd1f3