diff --git a/meshterm/ui/node_detail_screen.py b/meshterm/ui/node_detail_screen.py index c2e411f..13cb7d3 100644 --- a/meshterm/ui/node_detail_screen.py +++ b/meshterm/ui/node_detail_screen.py @@ -389,10 +389,10 @@ class NodeDetailScreen(Screen): to learn it. It names the tab it would take you *to*, never the one you are on — the strip already marks that, and a chip repeating it would say nothing about what pressing it does. (A per-tab chip on F1/F2 was tried and reverted — JP, 2026-08-09: - the toggle was better.) Unlike the Time Machine's window chip, this one carries no - ``▸`` lead-in: ``Routes`` is exactly six cells on its own, and the strip beside it - makes the direction plain anyway. A page with one tab has nothing to switch, so - the slot stays empty. + the toggle was better.) Like every cycling chip, it is the target's name alone, + with no lead-in: ``Routes`` is exactly six cells, and the strip beside it makes the + direction plain anyway. A page with one tab has nothing to switch, so the slot + stays empty. The pager gates on the route list actually being windowed: on the Info tab, and on a node whose routes all fit, the keys move nothing. diff --git a/meshterm/ui/scopering.py b/meshterm/ui/scopering.py index a2f39ce..e3bd88d 100644 --- a/meshterm/ui/scopering.py +++ b/meshterm/ui/scopering.py @@ -86,6 +86,10 @@ def scope_atom(key: ScopeKey, *, bare: bool = False) -> str: def scope_chip(key: ScopeKey | None) -> str: - """The F-lane chip naming the view a press goes *to*, within the lane's 6 cells.""" + """The F-lane chip naming the view a press goes *to*: the word alone, in all 6 cells. + + No ``▸`` lead-in (JP, 2026-10-04): it took two of the chip's six cells to say what the + chip's place on the lane already says, and cut a region's name to four. + """ word = "all" if key is None else key[-1] - return "▸ " + fit_cells(word, 4).rstrip() + return fit_cells(word, 6).rstrip() diff --git a/meshterm/ui/timemachine_screen.py b/meshterm/ui/timemachine_screen.py index 37e0557..e50f4e4 100644 --- a/meshterm/ui/timemachine_screen.py +++ b/meshterm/ui/timemachine_screen.py @@ -250,15 +250,16 @@ class TimeMachineScreen(Screen): The chip names the span it would *take you to*, not the one on screen: the title already says where you are, so a chip repeating it would be the same claim twice - and would never tell you what pressing it does. ``all time`` shortens to ``all`` - to stay inside the 6-cell chip — the only span whose name doesn't already fit, - and one this platform's ring may not even offer (see :func:`_bind_windows`). + and would never tell you what pressing it does. It is the span alone, with no + ``▸`` lead-in (JP, 2026-10-04), so it has all six cells: ``all time`` still + shortens to ``all`` — the only span whose name doesn't fit, and one this platform's + ring may not even offer (see :func:`_bind_windows`). """ from .tui.fkeys import FPair, default_lane lane = list(default_lane(nav=self.content_overflows)) nxt, _delta = _WINDOWS[(self._window_index + 1) % len(_WINDOWS)] - lane[2] = FPair(f"▸ {'all' if nxt == 'all time' else nxt}", "window") + lane[2] = FPair("all" if nxt == "all time" else nxt, "window") # The scope cycle beside it, on the same terms: the chip names where a press goes. views = self._ring() if len(views) > 1: diff --git a/tests/test_timemachine.py b/tests/test_timemachine.py index 032371c..7b98a10 100644 --- a/tests/test_timemachine.py +++ b/tests/test_timemachine.py @@ -975,10 +975,10 @@ def test_screen_cycles_windows_and_caches(tmp_path: Path) -> None: # The F-key chip is the same behaviour under another name — the only way a platform # that draws no hint line can learn that `w` exists at all. It names the span it takes # you *to*, since the title already says where you are. - assert screen.fkey_lane[2].label == "▸ all" + assert screen.fkey_lane[2].label == "all" screen.handle("window") assert "all time" in screen.title - assert screen.fkey_lane[2].label == "▸ 24 h" # the ring wraps back around + assert screen.fkey_lane[2].label == "24 h" # the ring wraps back around def test_picocalc_window_ring_stops_at_30_days() -> None: @@ -996,7 +996,7 @@ def test_picocalc_window_ring_stops_at_30_days() -> None: assert "7 d" in screen.title # opens on 7 d, as everywhere screen.handle("text", "w") assert "30 d" in screen.title - assert screen.fkey_lane[2].label == "▸ 24 h" # never "▸ all" on this ring + assert screen.fkey_lane[2].label == "24 h" # never "all" on this ring screen.handle("window") assert "24 h" in screen.title # wrapped straight past where all time would sit @@ -1312,6 +1312,20 @@ def test_s_cycles_the_mesh_pages_scope_and_retitles_it(tmp_path: Path) -> None: assert screen.short_title == "the whole mesh · 7 d · unscoped" +def test_the_scope_chip_is_the_word_alone_in_all_six_cells() -> None: + """No ``▸`` lead-in: the view a press goes to gets the chip's whole six cells.""" + from rich.cells import cell_len + + from meshterm.ui.scopering import scope_chip + + assert scope_chip(None) == "all" + assert scope_chip(("region", "yul")) == "yul" + assert scope_chip(("region", "harbor")) == "harbor" # whole, where it read "▸ har…" + for key in (("unscoped",), ("unknown",), ("region", "lakeshore")): + chip = scope_chip(key) + assert cell_len(chip) == 6 and chip.endswith("…") and "▸" not in chip + + def test_a_page_with_no_scope_offers_no_cycle() -> None: """A node's page is its adverts, which carry no scope: no hint, no chip, no cycle.""" screen = TimeMachineScreen(