From 9f5d337cae1bfcfce0469f7cbc96ea58bb559413 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Martineau Date: Tue, 11 Aug 2026 17:55:41 -0400 Subject: [PATCH] About MeshTerm: the page says something now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The three sections were placeholders holding a shape. This writes the first one: what MeshTerm is (one screen for what the radio can tell you, the five menu sections as a list, and the standing promise that nothing transmits unasked), where it came from (June 2026, a few serial scripts, grown by the recording; the mesh's scarce airtime is why it listens more than it speaks; later the PicoCalc), and the licence — MIT, as the package metadata declares, with the credit MeshCore and OpenStreetMap are owed, the ODbL by name. The layout is unchanged: title, standfirst, three sections, rule, colophon. It just runs longer than a screenful now, which is what the sticky headings and the section jumps were for. Link targets also drop a leading www., so the OSM copyright URL reads as the host it is rather than a subdomain nobody types. Co-Authored-By: Claude Opus 5 (1M context) --- meshterm/ui/markdown.py | 8 +++++++- tests/test_about.py | 18 ++++++++++++++++-- tests/test_markdown.py | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/meshterm/ui/markdown.py b/meshterm/ui/markdown.py index 90112c0..d39816e 100644 --- a/meshterm/ui/markdown.py +++ b/meshterm/ui/markdown.py @@ -447,13 +447,19 @@ def _append_link( def _display_url(href: str) -> str: - """A link target as a page shows it: no scheme, no trailing slash, no in-page anchor.""" + """A link target as a page shows it: no scheme, no ``www.``, no trailing slash. + + An in-page anchor shows nothing at all — it names a place in the page the reader is + already on. + """ if not href or href.startswith("#"): return "" for noise in _URL_NOISE: if href.lower().startswith(noise): href = href[len(noise):] break + if href.lower().startswith("www."): + href = href[4:] return href.rstrip("/") diff --git a/tests/test_about.py b/tests/test_about.py index 0d83877..7c0acd3 100644 --- a/tests/test_about.py +++ b/tests/test_about.py @@ -66,12 +66,13 @@ def test_each_page_shows_its_sections(builder, headings) -> None: # noqa: ANN00 assert at == sorted(at), f"{headings} are out of order in the rendered page" -@pytest.mark.parametrize("builder", [about_meshterm, about_author, support_project]) +@pytest.mark.parametrize("builder", [about_author, support_project]) def test_unwritten_sections_speak_the_empty_state_voice(builder) -> None: # noqa: ANN001 """Placeholders read as deliberately unwritten: lowercase, em-dashed, unparenthesized. The app's empty-state rule (see the UX standards in ``CLAUDE.md``) is what keeps a - scaffolded page from looking like a screen that failed to load. + scaffolded page from looking like a screen that failed to load. *About MeshTerm* is + written now and so has none; these two are still scaffolding. """ text = _page(builder) placeholders = [line for line in text.splitlines() if "placeholder" in line] @@ -112,6 +113,19 @@ def test_page_is_a_full_screen_not_a_floating_view() -> None: assert AboutPage("About MeshTerm", about_meshterm()).floating is False +def test_the_licence_section_states_the_terms_and_the_credit_it_owes() -> None: + """This page is where a reader with no shell finds them. + + The terms MeshTerm ships under, the project it stands on, and the map data it draws + with — the ODbL asks for that credit by name, and a page nobody can read it on is no + credit at all. + """ + prose = " ".join(_page(about_meshterm).split()) + + for owed in ("MIT licence", "MeshCore", "OpenStreetMap contributors", "ODbL"): + assert owed in prose, owed + + def test_pages_are_written_markdown_that_ships_with_the_package() -> None: """Filling a page in is editing its ``.md`` file — no Python has to follow.""" from meshterm.ui.about import _PAGES diff --git a/tests/test_markdown.py b/tests/test_markdown.py index 84715d6..88d91fd 100644 --- a/tests/test_markdown.py +++ b/tests/test_markdown.py @@ -214,7 +214,7 @@ def test_each_inline_mark_takes_its_own_style() -> None: def test_a_link_shows_where_it_goes() -> None: """Nothing is clickable on a framebuffer console, so a link that reads "the repo" has to name the repo or it says nothing at all — scheme stripped, it is noise.""" - text = _texts("see [the repo](https://github.com/example/meshterm)\n")[0] + text = _texts("see [the repo](https://www.github.com/example/meshterm/)\n")[0] assert text.plain == "see the repo github.com/example/meshterm"