diff --git a/meshterm/ui/walk_screen.py b/meshterm/ui/walk_screen.py index 502da41..4694663 100644 --- a/meshterm/ui/walk_screen.py +++ b/meshterm/ui/walk_screen.py @@ -576,13 +576,27 @@ class WalkScreen(Screen): return max(4, height) def _compose_title(self, links: list[Link]) -> str: - """``Mesh walk — focus`` plus the graph's status atoms.""" - title = f"Mesh walk — {self._label(self._focus)}" - title += f" · {len(self._all_nodes())} nodes · {len(links)} links" + """``Mesh walk`` plus the graph's status atoms — the size of what is being walked. + + The focus used to lead it (``Mesh walk — YUL-Cartierville · …``) and it was the + title's longest atom, its most changeable, and its only redundant one: the + breadcrumb trail ends on the focus and the line under it names the same node in + colour, with its hash, its ring and when it was last heard. Spending a fifth of a + 53-column title bar on a third telling — and rewriting the top row at every step of + the walk — cost more than it said (JP, 2026-08-30). So the title reads like the + map's, the other spatial screen, whose centre is likewise the body's to name: + status atoms only. + + The match count **swaps** for the node count rather than joining it, exactly as the + map's does, so a narrowed walk says how much of the mesh answered the query without + the title growing a fourth atom the bar would have to clip. + """ + nodes = len(self._all_nodes()) if self._filter: - matches = self._matches() - title += f" · {len(matches)} match{'es' if len(matches) != 1 else ''}" - return title + count = f"{len(self._matches())} of {nodes} match" + else: + count = f"{nodes} nodes" + return f"Mesh walk · {count} · {len(links)} links" def _header_lines(self, width: int, depths: dict[str, int]) -> list[str]: """The breadcrumb trail and the focus node's identity line. diff --git a/tests/test_walk.py b/tests/test_walk.py index f5f1b15..088d1da 100644 --- a/tests/test_walk.py +++ b/tests/test_walk.py @@ -69,7 +69,9 @@ def test_walk_opens_focused_on_us_with_the_link_list() -> None: assert "Links" in body and "strongest observed first" in body assert "YUL-Cartierville" in body # our one neighbour, as a selectable row assert "edge = SNR" in body # the canvas legend - assert screen.title == "Mesh walk — Homestead · 3 nodes · 2 links" + # Status atoms only, like the map's: the focus is the trail's and the focus line's + # to name, and it is named there in colour, with its hash and its ring. + assert screen.title == "Mesh walk · 3 nodes · 2 links" def test_walk_link_rows_carry_snr_evidence_and_onward_count() -> None: @@ -561,7 +563,7 @@ def test_walk_find_lists_matches_and_teleports() -> None: body = _plain(screen.render_body(80)) assert "Matches" in body and "Alice" in body assert "2 hops out" in body # the match row says how far away it sits - assert "1 match" in screen.title + assert screen.title == "Mesh walk · 1 of 3 match · 2 links" # swapped for the count screen.handle("enter") alice = topo.canonical(ALICE.public_key)