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"