What happened
The Desktop E2E test a gesture a nested scroller consumed does not release the tail (apps/desktop/e2e/transcript-scroll.spec.ts:425) intermittently samples the transcript before tail-follow has settled after its second answer.
Observed in CI run 33795505196, which otherwise passed the build, typecheck, static checks, and affected standard tests:
Expected: <= 4
Received: 1779
at apps/desktop/e2e/transcript-scroll.spec.ts:498
The test already recognizes this ordering for the first answer and polls until the tail-follow write has landed:
await expect.poll(async () => (await scrollMetrics(page)).distance).toBeLessThanOrEqual(4);
After the second answer, however, it waits only two animation frames and takes a one-shot sample:
await expect(answeredTurns(page)).toHaveCount(2, { timeout: 30_000 });
await waitForPaintedFrames(page);
expect(await distanceToTail(page)).toBeLessThanOrEqual(4);
The answer becoming visible and the transcript tail-follow write are separate state transitions. Under four-worker Xvfb load, two frames do not prove the second transition has completed. The failure screenshot shows the new answer present and the “scroll to bottom” affordance visible. The exact test passed immediately when rerun alone on macOS after a production build.
Suggested fix
Use the same state-based poll after the second answer that the test already uses after the first one, while preserving the strict <= 4 contract and the final assertion that the scroll button is absent:
await expect.poll(async () => (await scrollMetrics(page)).distance, {
message: 'the transcript follows the second landed answer to the tail',
}).toBeLessThanOrEqual(4);
expect(await scrollButtonOffered(page)).toBe(false);
This is distinct from #4648: that report covered the viewport-resize precondition of a different test. Its call site has since been converted to a poll; this failure occurs after the second answer in the nested-scroller gesture test.
Environment
- Linux GitHub runner with Xvfb
- Desktop E2E, 109 tests across 4 workers
- Node/Electron versions pinned by the repository
What happened
The Desktop E2E test
a gesture a nested scroller consumed does not release the tail(apps/desktop/e2e/transcript-scroll.spec.ts:425) intermittently samples the transcript before tail-follow has settled after its second answer.Observed in CI run 33795505196, which otherwise passed the build, typecheck, static checks, and affected standard tests:
The test already recognizes this ordering for the first answer and polls until the tail-follow write has landed:
After the second answer, however, it waits only two animation frames and takes a one-shot sample:
The answer becoming visible and the transcript tail-follow write are separate state transitions. Under four-worker Xvfb load, two frames do not prove the second transition has completed. The failure screenshot shows the new answer present and the “scroll to bottom” affordance visible. The exact test passed immediately when rerun alone on macOS after a production build.
Suggested fix
Use the same state-based poll after the second answer that the test already uses after the first one, while preserving the strict
<= 4contract and the final assertion that the scroll button is absent:This is distinct from #4648: that report covered the viewport-resize precondition of a different test. Its call site has since been converted to a poll; this failure occurs after the second answer in the nested-scroller gesture test.
Environment