From b89cd266cc76caeac61b0f7c94d53e8d6ed2f4e7 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Martineau Date: Fri, 25 Sep 2026 01:38:00 -0400 Subject: [PATCH] The region editor says when a repeater has no home region MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The firmware parks its home mark on the wildcard when no region is home, so *^ means no home region set. The wildcard row's note now reads 'unscoped · no home' then, and 'unscoped floods' once a region is home. Co-Authored-By: Claude Opus 5.5 (1M context) --- meshterm/ui/region_editor.py | 10 ++++++++-- tests/test_region_admin.py | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/meshterm/ui/region_editor.py b/meshterm/ui/region_editor.py index ec1ec97..5012490 100644 --- a/meshterm/ui/region_editor.py +++ b/meshterm/ui/region_editor.py @@ -270,9 +270,15 @@ def _flood_text(row: RegionRow) -> Text: def _row_note(row: RegionRow, table: RegionTable) -> str: - """The NOTE lane: what the row *is* beyond its flag — unscoped, home, default.""" + """The NOTE lane: what the row *is* beyond its flag — unscoped, home, default. + + The wildcard's ``^`` is not a home: the firmware parks the home mark on ``*`` when no + region has been made home, so ``*^`` reads *no home region set*, and the note says so + (``unscoped · no home``, short enough to stay whole in the 72-column lane) rather than + leaving the mark's one meaning there unsaid. + """ if row.wildcard: - return "unscoped floods" + return "unscoped · no home" if row.home else "unscoped floods" notes = [] if row.home: notes.append("home") diff --git a/tests/test_region_admin.py b/tests/test_region_admin.py index acc84b4..75bd791 100644 --- a/tests/test_region_admin.py +++ b/tests/test_region_admin.py @@ -827,3 +827,14 @@ def tui_ctx(tmp_path: Path): # noqa: ANN201 ctx.ui = TuiUi(TuiSession()) yield ctx ctx.repo.close() + + +def test_the_wildcard_row_says_when_no_home_region_is_set() -> None: + """``*^`` is the firmware parking its home mark on the wildcard: no home region set.""" + from meshterm.ui.region_editor import _row_note + + unset = parse_region_dump("*^ F\n lakeside F\n") + assert _row_note(unset.rows[0], unset) == "unscoped · no home" + homed = parse_region_dump("* F\n lakeside^ F\n") + assert _row_note(homed.rows[0], homed) == "unscoped floods" + assert _row_note(homed.rows[1], homed) == "home"