test(app): cover composer growth bottom anchoring

Composer height changes must preserve a bottom-pinned conversation while blank lines expand the input.
This commit is contained in:
Mohamed Boudra
2026-08-16 19:14:05 +02:00
parent 90c97c1b1a
commit 97ac967495
@@ -1,4 +1,10 @@
import { expect, test, type Page } from "../support/fixtures";
import {
expectNearBottom,
scrollAgentChatToBottom,
waitForScrollableChat,
} from "../support/helpers/agent-bottom-anchor";
import { awaitAssistantMessage } from "../support/helpers/agent-stream";
import { composerLocator, expectComposerVisible } from "../support/helpers/composer";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
@@ -86,3 +92,30 @@ test("blank composer lines remain present and keep their measured height", async
await agent.cleanup();
}
});
test("composer growth keeps a bottom-pinned chat at the bottom", async ({ page }) => {
test.setTimeout(90_000);
const agent = await seedMockAgentWorkspace({
repoPrefix: "composer-bottom-anchor-",
title: "Composer bottom anchor",
initialPrompt: "Produce enough content to make the chat scrollable.",
});
try {
await openAgentRoute(page, agent);
await expectComposerVisible(page);
await awaitAssistantMessage(page);
await waitForScrollableChat(page, { minScrollableDistance: 200, timeout: 30_000 });
await scrollAgentChatToBottom(page);
const composer = composerLocator(page);
await composer.fill("alpha");
for (let line = 0; line < 8; line += 1) {
await composer.press("Shift+Enter");
}
await expectNearBottom(page);
} finally {
await agent.cleanup();
}
});