The region editor says when a repeater has no home region

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) <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Opus 5.5 committed 2026-09-25 01:38:00 -04:00
1 parent 79fe79a857
commit b89cd266cc
2 files changed
+19 -2

No files matched your search

+8 -2
View File
@@ -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")
+11
View File
@@ -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"