From 219093c823494bc8d760c99a7a55c4a23059abb5 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Wed, 7 Oct 2026 11:38:39 +0200 Subject: fix(hub): move "clear finished" into the finished group's head 9269374 let the transfers header wrap, which broke the one-line header test_layout_measured enforces. The button now sits beside what it clears, and the header is title and summary only. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/tests/test_layout_measured.py | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'packages/meshbay-hub/tests') diff --git a/packages/meshbay-hub/tests/test_layout_measured.py b/packages/meshbay-hub/tests/test_layout_measured.py index c5d6280..57d325a 100644 --- a/packages/meshbay-hub/tests/test_layout_measured.py +++ b/packages/meshbay-hub/tests/test_layout_measured.py @@ -167,7 +167,6 @@ GROUPED = textwrap.dedent("""
Transfers 2 running · 3 waiting -
Running
@@ -195,6 +194,16 @@ GROUPED = textwrap.dedent(""" 1.2 GB
+
+
Finished +
+
+
+ ↓ + A Finished File.mkv +
+
+
🔔 @@ -205,7 +214,8 @@ GROUPED = textwrap.dedent(""" GROUPED_SELECTORS = [".transfer-panel", ".transfer-head", ".transfer-head-summary", ".transfer-group-head", ".transfer-name", - ".transfer-item.transfer-queued .dl-progress"] + ".transfer-item.transfer-queued .dl-progress", + ".transfer-group-head .btn-secondary"] @pytest.fixture(scope="module") @@ -253,6 +263,16 @@ def test_the_header_summary_does_not_push_the_header_taller(grouped): f"at {width} px the summary wrapped to {summary['height']} px") +def test_clearing_finished_rows_stays_inside_the_panel(grouped): + """The button lives in the finished group's head. In the panel header it + pushed the panel into a sideways scroll, or wrapped the header.""" + for width in WIDTHS: + boxes = grouped[str(width)]["boxes"] + button = boxes[".transfer-group-head .btn-secondary"] + assert button["right"] <= boxes[".transfer-panel"]["right"], ( + f"at {width} px the clear button sticks out of the panel: {button}") + + def test_the_waiting_bar_is_as_wide_as_a_progress_bar(grouped): """A waiting row has no inner fill element — the stripes are on the track itself. Getting that wrong renders a zero-width bar, which reads as a -- cgit v1.2.3