Python
fix(gui): keep composer controls within narrow session layout (issue 208)
boaz4178d680b045
diff --git a/surfaces/gui/e2e/composer-overflow.spec.ts b/surfaces/gui/e2e/composer-overflow.spec.tsnew file mode 100644index 00000000..fadab8ef--- /dev/null+++ b/surfaces/gui/e2e/composer-overflow.spec.ts@@ -0,0 +1,21 @@+import { expect } from "@playwright/test";+import { test } from "./fixtures";++test("running composer keeps Stop within a narrow session column", async ({ page }) => {+ await page.setViewportSize({ width: 1_100, height: 800 });+ await page.goto("/");+ await page.getByText("Draft the launch note").first().click();++ const box = page.getByPlaceholder(/Ask the coworker/);+ await box.fill("stream the epic");+ await box.press("Enter");++ const [composer, stop] = await Promise.all([+ page.locator(".composer").boundingBox(),+ page.getByRole("button", { name: /Stop/ }).boundingBox(),+ ]);++ expect(composer).not.toBeNull();+ expect(stop).not.toBeNull();+ expect(stop!.x + stop!.width).toBeLessThanOrEqual(composer!.x + composer!.width);+});diff --git a/surfaces/gui/src/components/Composer.tsx b/surfaces/gui/src/components/Composer.tsxindex 053ef341..78d7a31e 100644--- a/surfaces/gui/src/components/Composer.tsx+++ b/surfaces/gui/src/components/Composer.tsx@@ -729,7 +729,7 @@ export function Composer(props: Props) {/>{/* Three-control row (§22): + attach · Mode ⌄ …(right)… model (fresh only) · send */}- <div className="px-2.5 pb-2.5 pt-1 flex items-center gap-1.5">+ <div className="px-2.5 pb-2.5 pt-1 flex min-w-0 items-center gap-1.5">{/* + attach menu */}<div className="relative"><button@@ -921,7 +921,7 @@ export function Composer(props: Props) {{/* send / stop — a pending gate re-opens Send: the reply resolves it */}{props.running && !props.gateOpen ? (- <button className="btn danger" onClick={props.onInterrupt}>+ <button className="btn danger shrink-0" onClick={props.onInterrupt}>{t("composer.stop")}</button>) : (diff --git a/surfaces/gui/src/styles.css b/surfaces/gui/src/styles.cssindex e2d8ff06..e89ed5d5 100644--- a/surfaces/gui/src/styles.css+++ b/surfaces/gui/src/styles.css@@ -637,6 +637,12 @@ button.btn.danger { color: var(--accent); }.pill.chip { background: transparent; border: 1px solid transparent; }.pill.chip:hover { border-color: var(--line); background: var(--paper); }+/* The model picker shares the composer's single control row with the send/stop action. When an+ artifact panel narrows that column, let the model label truncate instead of pushing the action+ outside the composer (issue #208). */+.composer .dd { min-width: 0; flex: 0 1 240px; }+.composer .dd .pill { max-width: 100%; }+/* dropdown popover */.dd { position: relative; }/* Hover card above a pill (UX-048): inverse surface, short delay (Dropdown.tsx). */