diff --git a/web/src/structured.test.ts b/web/src/structured.test.ts index 2bc64e1..42845e7 100644 --- a/web/src/structured.test.ts +++ b/web/src/structured.test.ts @@ -1227,6 +1227,18 @@ describe("structured connection: transcript scrolling", () => { describe("structured connection: pane lifecycle", () => { beforeEach(() => vi.clearAllMocks()); + it("keeps the composer outside the transcript scroll region", () => { + const conn = mount({ sockets: [new FakeSocket()] }); + const main = conn.el.querySelector(".structured-main")!; + const scroll = conn.el.querySelector(".structured-scroll")!; + const composer = conn.el.querySelector(".structured-composer")!; + + expect(main.contains(scroll)).toBe(true); + expect(main.contains(composer)).toBe(true); + expect(scroll.contains(composer)).toBe(false); + conn.dispose(); + }); + it("sendInput is a no-op — there is no PTY behind a structured session", () => { const conn = mount({ sockets: [new FakeSocket()] }); expect(() => conn.sendInput("\x0b")).not.toThrow(); diff --git a/web/src/structured.ts b/web/src/structured.ts index 3c97853..04c3ae1 100644 --- a/web/src/structured.ts +++ b/web/src/structured.ts @@ -65,8 +65,10 @@ export function createStructuredConnection(
-
-
+
+
+
+
diff --git a/web/src/styles.css b/web/src/styles.css index 7b9718a..0315753 100644 --- a/web/src/styles.css +++ b/web/src/styles.css @@ -2193,7 +2193,7 @@ input.leaf-rename:focus { grid-template-rows: auto minmax(0, 1fr); } -.structured-body.st-narrow .structured-scroll { +.structured-body.st-narrow .structured-main { grid-row: 2; } @@ -2204,16 +2204,22 @@ input.leaf-rename:focus { max-height: 40%; } -.structured-scroll { +.structured-main { min-width: 0; - overflow-y: auto; + min-height: 0; display: flex; flex-direction: column; } +.structured-scroll { + flex: 1 1 auto; + min-height: 0; + min-width: 0; + overflow-y: auto; +} + .structured-rows { - flex: 1 0 auto; - padding: var(--sp-3) var(--sp-3) 0; + padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-3); @@ -2616,11 +2622,10 @@ input.leaf-rename:focus { border-color: var(--danger); } -/* composer: sticky at the bottom of the scrolling transcript column */ +/* The composer is a sibling of the scrolling transcript, not part of it: it + stays reachable at the pane edge without changing transcript scroll math. */ .structured-composer { - position: sticky; - bottom: 0; - margin-top: var(--sp-3); + flex: 0 0 auto; padding: var(--sp-3); border-top: 1px solid var(--border); background: var(--surface);