Mesh walk: the title says how big the mesh is, not where you are

"Mesh walk — YUL-Cartierville · 42 nodes · 61 links · 3 matches" ran 62 cells,
which a 53-column title bar clips rather than wraps — the link count went, and
so did the bar's clip arrows and its Esc hint. The focus was the longest atom,
the one that rewrote the top row at every step of the walk, and the only
redundant one: the breadcrumb trail ends on it and the line under that names it
in colour, with its hash, its ring and when it was last heard.

So the title reads like the map's — the other spatial screen, whose centre is
likewise the body's to name — status atoms only, and the match count swaps for
the node count instead of joining it, the same way the map's does:

  Mesh walk · 42 nodes · 61 links
  Mesh walk · 3 of 42 match · 61 links

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Opus 5 committed 2026-08-30 02:53:07 -04:00
1 parent 7c36f809fd
commit 2252f2622e
2 files changed
+24 -8

No files matched your search

+20 -6
View File
@@ -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.
+4 -2
View File
@@ -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)