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(