Main menu: five sections, each one an answer to the question

The menu asks "What would you like to do?" and then grouped its rows by
subject, which is not an answer to that. Mesh had grown to seven of the
nineteen rows — live watching, passive browsing, and one transmit action
in the same bucket — and Tools said nothing at all, since everything in
the menu is a tool.

So each section now names a doing, and holds what shares it:

  Message      Chat · Channels · Courier · Contacts
  Watch        Dashboard · Live feed · Watchtower · Time machine
  Explore      Map · Mesh walk · Trace target · Trace path · Trophy case
  This node    Device info · Device configuration · Device actions · Send advert
  Other nodes  Repeater admin · TX optimize

Four rows moved for a reason. Contacts is the address book the three
features above it pick a recipient from, not a mesh view. Time machine is
the past tense of the Dashboard, and was stranded in the grab-bag. Send
advert is your own node announcing itself — a device action, filed with
the mesh views only because it was about the mesh. And Repeater admin and
TX optimize are the same job — someone else's radio, over the mesh, with
credentials — which the old Device-management/Tools split hid.

The two walks join the topology views they walk over, with the boards
that score them underneath: see a node, walk to it, get scored. Nothing
is renamed (a menu row still names the screen it opens) and no section is
now larger than five rows or smaller than two.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Opus 5 committed 2026-08-11 02:22:07 -04:00
1 parent 70ccb6b31d
commit 284e35edb4
24 files changed
+117 -74

No files matched your search

+4 -3
View File
@@ -82,15 +82,16 @@ def _col(line: str, needle: str) -> int:
def test_livefeed_tool_registers_under_the_dashboard() -> None:
"""The livefeed tool lands in the Mesh section, right below the dashboard."""
"""The livefeed tool lands in the Watch section, right below the dashboard."""
from meshterm.tools import load_all_tools
from meshterm.tools.base import all_tools
load_all_tools()
tools = {t.name: t for t in all_tools()}
tool = tools["livefeed"]
assert tool.title == "Live feed" and tool.category == "Mesh"
assert tools["dashboard"].order < tool.order < tools["contacts"].order
assert tool.title == "Live feed" and tool.category == "Watch"
assert tools["dashboard"].category == tool.category
assert tools["dashboard"].order < tool.order < tools["watchtower"].order
def test_livefeed_live_events_land_in_the_feed() -> None:
+31
View File
@@ -141,3 +141,34 @@ def test_fit_cells_measures_display_cells_not_characters() -> None:
assert cell_len(fit_cells("日本語の名前", 5)) == 5 # wide chars: truncated by cells
assert fit_cells("abcdef", 5).endswith("…")
assert fit_cells("ab", 5, align="right") == " ab"
def test_main_menu_sections_answer_the_menus_own_question() -> None:
"""Each section is a *doing*, in workflow order, and holds only what shares it.
The menu asks "What would you like to do?", so the grouping is by verb rather than
by subject: the address book sits with the features that message from it, the
recorded history with the live views it is the past tense of, the two walks with the
topology they walk over, and a setting lands under the scope it changes — this radio,
or someone else's over the mesh.
"""
from meshterm.tools import load_all_tools
from meshterm.tools.base import _CATEGORY_ORDER, all_tools
load_all_tools()
sections: dict[str, list[str]] = {}
for tool in all_tools():
if tool.menu_visible:
sections.setdefault(tool.category, []).append(tool.name)
assert list(sections) == _CATEGORY_ORDER # all_tools already sorts them this way
assert sections == {
"Message": ["chat", "channels", "courier", "contacts"],
"Watch": ["dashboard", "livefeed", "watchtower", "timemachine"],
"Explore": ["map", "walk", "trace", "trace-path", "records"],
"This node": ["info", "config", "device-actions", "advert"],
"Other nodes": ["repeater-admin", "tx-optimize"],
}
# No section is so big it stops being a grouping (the old Mesh bucket held seven of
# nineteen rows), and none is a bucket of one.
assert all(2 <= len(names) <= 5 for names in sections.values())