From e3d5f3df3577f91b933d7ad51a339dbb05ba53dd Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sat, 5 Sep 2026 17:49:57 +0900 Subject: fix(layout): keep chat transcript region full-height when empty (composer pinned to bottom) --- src/features/layout/ui/TileRoot.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/features/layout/ui/TileRoot.test.ts') diff --git a/src/features/layout/ui/TileRoot.test.ts b/src/features/layout/ui/TileRoot.test.ts index 27b8e0a..aba22a9 100644 --- a/src/features/layout/ui/TileRoot.test.ts +++ b/src/features/layout/ui/TileRoot.test.ts @@ -193,6 +193,19 @@ describe("TileRoot", () => { expect(natural?.getAttribute("style")).toContain("flex: 0 0 auto"); }); + it("the stack column is full-height so a grow child fills it even when empty", () => { + // jsdom can't compute flex layout — the honest seam is the CSS class. + // WITHOUT `h-full` the stack column's height is content-based, so the + // grow child's `flex: 1 1 0%` has no space to fill: an EMPTY chat leaf + // collapses to ~0 and the composer below it rides to the top (instead of + // staying pinned at the bottom of the column). + const { container } = render(TileRoot, { + props: { tree: defaultTestTree(), collapse: createCollapseStore() }, + }); + const stackColumn = container.querySelector("[data-testid='fixture-a']")?.closest(".flex-col"); + expect(stackColumn).toHaveClass("h-full"); + }); + it("the dropdown lists panel-eligible views only (decision 5)", () => { render(TileRoot, { props: { tree: panelsOnlyTree("fix-b"), collapse: createCollapseStore() } }); const select = screen.getByRole("combobox", { name: "Select a view" }); -- cgit v1.2.3