The graph holds still while the arrivals scroll past it

Message paths laid its whole body out as one strip — quote, fan, captions,
then every arrival — and let the frame scroll it under the selection. Walk
far enough down a busy message and the picture the routes are being compared
against slides off the top of the dialog, which is the one thing the reader
was looking at (JP, 2026-09-04).

The head is pinned now and only the list moves, the app-wide windowed-list
pattern the node detail's Routes tab already runs: the quote and the fan take
their lines, the arrivals window into what is left with faint `↑ n more` /
`↓ n more` edge markers, and the fan compresses its own lane pitch before the
list would lose its window — floored at two arrivals and a marker, because
comparing one arrival against another is what this dialog is for. PgUp/PgDn
now page the selection by a windowful of arrivals rather than by body lines,
and both they and the F-lane's chips say so only while there is more than one
arrival to move between.

The variable-height fit both screens need moves to `ListWindow.fit_blocks`,
beside the single-line `fit` it is the sibling of; node detail drops its own
copy and its hand-kept top/page state for the shared window.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Opus 5 committed 2026-09-04 02:03:25 -04:00
1 parent 6fc4e7afc9
commit 0eb9845cd9
5 files changed
+237 -88

No files matched your search

+5 -4
View File
@@ -37,7 +37,7 @@ from meshterm.ui.node_detail_screen import (
)
from meshterm.ui.pathgraph import DST_NODE, SRC_NODE
from meshterm.ui.pathline import CRACK_HEAD, CRACK_TAIL, SELF_GLYPH, PathHop, PathLine
from meshterm.ui.tui.screen import CANCEL
from meshterm.ui.tui.screen import CANCEL, ListWindow
from meshterm.ui.widgets import highlighted_hash, route_graph_style, tab_strip
US = "aaaaaaaaaaaa"
@@ -1009,10 +1009,11 @@ def test_node_detail_route_list_windows_inside_the_page() -> None:
def test_fit_blocks_walks_wrapped_rows_into_view() -> None:
"""The variable-height fit keeps whole blocks, spends marker lines only when rows hide,
and walks the window down to the cursor's row."""
screen = _screen()
top, count = screen._fit_blocks([2, 2, 2, 2], 5, 3) # cursor on the last 2-line row
window = ListWindow()
top, count = window.fit_blocks([2, 2, 2, 2], 5, 3) # cursor on the last 2-line row
assert top + count == 4 and top == 2 # slid to the tail; the last two rows fit
top, count = screen._fit_blocks([1, 1], 5, 0)
assert window.page == count # the settled capacity is the paging stride
top, count = window.fit_blocks([1, 1], 5, 0)
assert (top, count) == (0, 2) # everything fits: no window, no markers