From 5364eb925b74707685e47d579212dff1c8e2de3f Mon Sep 17 00:00:00 2001 From: ak2k <19240940+ak2k@users.noreply.github.com> Date: Mon, 26 Oct 2026 15:04:19 -0400 Subject: [PATCH 1/2] flight-cli: test that the memo says an over-wide legend entry is folded Unit: work-k4v5l --- tests/test_carrier_legend_docs.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_carrier_legend_docs.py b/tests/test_carrier_legend_docs.py index 348790da..33d4cfd4 100644 --- a/tests/test_carrier_legend_docs.py +++ b/tests/test_carrier_legend_docs.py @@ -24,3 +24,14 @@ def test_memo_says_a_wrapped_legend_breaks_only_between_entries() -> None: "code and its name; Rich breaks at any space, a no-break space included, so " "`_print_carrier_legend_line` picks the break itself." ) in memo + + +def test_memo_says_an_entry_wider_than_the_console_is_folded() -> None: + text = (_ROOT / "docs/memories/gf_routing_and_carriers.md").read_text() + memo = " ".join(text.split()) + assert ( + "When the legend outgrows the console it breaks only between entries, never between a " + "code and its name, unless one entry is wider than the console; Rich then folds that " + "entry. Rich breaks at any space, a no-break space included, so " + "`_print_carrier_legend_line` picks the break itself." + ) in memo From 14629ed4727117614f5a66b5ed96053886b2a549 Mon Sep 17 00:00:00 2001 From: ak2k <19240940+ak2k@users.noreply.github.com> Date: Mon, 26 Oct 2026 15:04:35 -0400 Subject: [PATCH 2/2] flight-cli: the memo says Rich folds a legend entry wider than the console Unit: work-k4v5l --- docs/memories/gf_routing_and_carriers.md | 5 +++-- tests/test_carrier_legend_docs.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/memories/gf_routing_and_carriers.md b/docs/memories/gf_routing_and_carriers.md index 35137885..81280fd5 100644 --- a/docs/memories/gf_routing_and_carriers.md +++ b/docs/memories/gf_routing_and_carriers.md @@ -325,5 +325,6 @@ naming each code by Matrix's `shortName`. Both go through `_print_carrier_legend_line`, which collapses the whitespace runs of an entry, a newline and a tab included, to one space, so a name cannot break the legend over two lines. When the legend outgrows the console it breaks only between entries, -never between a code and its name; Rich breaks at any space, a no-break space -included, so `_print_carrier_legend_line` picks the break itself. +never between a code and its name, unless one entry is wider than the console; +Rich then folds that entry. Rich breaks at any space, a no-break space included, +so `_print_carrier_legend_line` picks the break itself. diff --git a/tests/test_carrier_legend_docs.py b/tests/test_carrier_legend_docs.py index 33d4cfd4..3a17a0cd 100644 --- a/tests/test_carrier_legend_docs.py +++ b/tests/test_carrier_legend_docs.py @@ -21,7 +21,8 @@ def test_memo_says_a_wrapped_legend_breaks_only_between_entries() -> None: memo = " ".join(text.split()) assert ( "When the legend outgrows the console it breaks only between entries, never between a " - "code and its name; Rich breaks at any space, a no-break space included, so " + "code and its name, unless one entry is wider than the console; Rich then folds that " + "entry. Rich breaks at any space, a no-break space included, so " "`_print_carrier_legend_line` picks the break itself." ) in memo