From c1701bf26b8a381f272b697d5bfc21b3eaaf4b3b Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Sat, 28 Mar 2026 16:04:02 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20sidebar-item=20flex-shrink:0=20=E2=80=94?= =?UTF-8?q?=20cards=20were=20compressing=20to=20fit,=20eliminating=20scrol?= =?UTF-8?q?l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without flex-shrink:0, flex compresses all sidebar cards proportionally when the container is shorter than their total height. Cards visually fit the screen with no overflow — scrollTop stays 0, touch handler has nothing to scroll. One property restores the intended overflow. --- muxplex/frontend/style.css | 1 + muxplex/tests/test_frontend_css.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/muxplex/frontend/style.css b/muxplex/frontend/style.css index a56861b..24cc1d0 100644 --- a/muxplex/frontend/style.css +++ b/muxplex/frontend/style.css @@ -469,6 +469,7 @@ body { .sidebar-item { height: 120px; + flex-shrink: 0; /* prevent flex from compressing cards to fit */ background: var(--bg-secondary); cursor: pointer; overflow: hidden; diff --git a/muxplex/tests/test_frontend_css.py b/muxplex/tests/test_frontend_css.py index f92d81b..f5aba74 100644 --- a/muxplex/tests/test_frontend_css.py +++ b/muxplex/tests/test_frontend_css.py @@ -604,3 +604,12 @@ def test_sidebar_list_has_touch_action_pan_y(): assert "overscroll-behavior: contain" in block, ( ".sidebar-list must have overscroll-behavior:contain to prevent scroll chaining" ) + + +def test_sidebar_item_has_flex_shrink_zero(): + """Regression: without flex-shrink:0 cards shrink to fit, eliminating scroll overflow.""" + css = read_css() + block = _extract_rule_block(css, ".sidebar-item {") + assert "flex-shrink: 0" in block, ( + ".sidebar-item must have flex-shrink:0 to prevent compression" + )