From 850cbe912df2c754081ddbce9b72c186338b139f Mon Sep 17 00:00:00 2001 From: imccyu <276526105+imccyu@users.noreply.github.com> Date: Thu, 23 Jul 2026 20:28:13 +0800 Subject: [PATCH] fix(gui): cap the question card height and scroll the option list The composer seat lives in a fixed-height conversation column with overflow hidden, so a long question batch pushed the footer actions out of reach (review r3635427112). The card now flexes with a viewport- relative max-height, the option list is the scrollable region (ChatView list pattern: min-height 0 + overflow-y auto), and header/footer are flex-shrink 0 so progress, navigation, skip, submit, and cancel stay reachable. Verified in headless chromium against this sheet (900x600 viewport, 30-option batch): card capped at 360px (60vh), the option list scrolls (scrollHeight > clientHeight), and the footer submit/skip buttons stay inside the viewport. jsdom cannot assert layout; the playwright smoke follow-up tracks composer scrolling with the existing debt. --- .../src/client/QuestionComposer.module.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/client/ui-question/src/client/QuestionComposer.module.css b/packages/client/ui-question/src/client/QuestionComposer.module.css index e41a76caae..6c0c1b854c 100644 --- a/packages/client/ui-question/src/client/QuestionComposer.module.css +++ b/packages/client/ui-question/src/client/QuestionComposer.module.css @@ -5,8 +5,14 @@ } .card { + display: flex; + flex-direction: column; width: 100%; max-width: 720px; + /* Composer seat sits in a fixed-height conversation column (overflow + hidden): cap the card against the viewport and scroll the option list + so header and footer actions stay reachable on long batches. */ + max-height: min(60vh, 520px); padding: 14px 16px 12px; border: 1px solid var(--dsw-alias-border-l2-darkmode-thin); border-radius: 18px; @@ -25,6 +31,7 @@ align-items: flex-start; justify-content: space-between; gap: 16px; + flex-shrink: 0; margin-bottom: 8px; } @@ -110,6 +117,9 @@ display: flex; flex-direction: column; gap: 4px; + /* The scrollable region of the capped card (ChatView list pattern). */ + min-height: 0; + overflow-y: auto; } .option { @@ -271,6 +281,7 @@ align-items: center; justify-content: space-between; gap: 12px; + flex-shrink: 0; margin-top: 8px; padding: 0 2px; }