diff --git a/apps/web/tests/lifecycle-chrome.e2e.ts b/apps/web/tests/lifecycle-chrome.e2e.ts index 65098063ad..8378bf6f5b 100644 --- a/apps/web/tests/lifecycle-chrome.e2e.ts +++ b/apps/web/tests/lifecycle-chrome.e2e.ts @@ -159,7 +159,8 @@ describe('web e2e: lifecycle & chrome (workspace flow / reload / dark mode)', () const settled = scaffold.whenTurnSettled() await input.fill(PROMPT) const observeTurn = async () => { - if (MODE !== 'record') await page.setViewportSize({ width: 640, height: 1000 }) + const originalViewport = page.viewportSize() ?? { width: 1680, height: 1000 } + if (MODE !== 'record') await page.setViewportSize({ width: 480, height: 1000 }) try { await input.press('Enter') if (MODE !== 'record') { @@ -167,11 +168,11 @@ describe('web e2e: lifecycle & chrome (workspace flow / reload / dark mode)', () await expect.poll(async () => await liveTail.evaluate(element => ( element.scrollWidth > element.clientWidth && element.scrollLeft >= element.scrollWidth - element.clientWidth - 1 - )), { timeout: 10_000 }).toBe(true) + )), { timeout: 10_000, interval: 10 }).toBe(true) } return await settled } finally { - if (MODE !== 'record') await page.setViewportSize({ width: 1680, height: 1000 }) + if (MODE !== 'record') await page.setViewportSize(originalViewport) } } const sessionId = await observeTurn() diff --git a/packages/client/ui-conversation/src/client/chat/ToolRow.tsx b/packages/client/ui-conversation/src/client/chat/ToolRow.tsx index 4ec07aa6fc..fa4be6179a 100644 --- a/packages/client/ui-conversation/src/client/chat/ToolRow.tsx +++ b/packages/client/ui-conversation/src/client/chat/ToolRow.tsx @@ -5,7 +5,8 @@ // Enter / Space, icon→chevron hover preview). The collapsed row is always // one line; every row with body, output, or a card material (terminal, diff, // read, search, web) is expandable; the summary stays inline while open, -// except Think, whose body opens with the same first line and would repeat it. +// except Think, where the running collapsed row follows the latest line at its +// scroll end and the summary yields while open to avoid repeating the body. // The expanded body — an IN/OUT gutter-labeled card (figma 1249:35657) for // text input/output, the run_code program through CodeBlock, or a card // primitive (TerminalBlock, DiffBlock, ReadBlock, SearchBlock, WebBlock) for a