Repository navigation
Description
What happened
The Desktop E2E test history asked for at the very top of the scroller still lands above the reader in apps/desktop/e2e/transcript-scroll.spec.ts can time out under concurrent CI load. The failure was observed in PR #4417, but the flake is independent of that PR and should be fixed separately.
In the failing sample, immediately before the test assigned root.scrollTop = 0, the scroller already reported:
{ "scrollTop": 0, "scrollHeight": 3246, "clientHeight": 780 }The 0 -> 0 assignment is a no-op, so Chromium emits no reader scroll event. useChatScroll therefore does not call requestEarlier / loadEarlier, and the first resident turn remains turn-prompt-rail-111 until the 20-second assertion timeout. The initial transcript tail pin completes only afterward.
Expected behavior: the test must wait until initial tail positioning has settled before it performs the real move to the top and asserts that earlier history loads.
How to reproduce
From apps/desktop, after building the Desktop E2E app:
npx playwright test --config e2e/playwright.config.ts e2e/transcript-scroll.spec.ts --grep "history asked for at the very top" --workers=4 --repeat-each=12The failure is timing-dependent. Investigation results:
- Single-worker isolated rerun: 5/5 passed.
- Four workers with 12 repeats: reproduced twice.
- Four workers with 16 repeats and temporary read-only diagnostics: reproduced once.
Environment
- Maka version or commit: PR fix(ui): restore prompt rail scroll tracking #4417 CI merge ref
- OS and version: GitHub Actions Linux runner with Xvfb
- Surface: Desktop E2E
- Node.js version: CI-configured version
Logs, screenshots, or additional context
- PR where the independent flake was observed: fix(ui): restore prompt rail scroll tracking #4417
- Failing CI job: https://github.com/apache/maka/actions/runs/33719427277/job/100535331810
- CI summary: 104 passed, 4 skipped, 1 failed; lint, build, typecheck, and the observer E2E added by the PR all passed.
Root cause: the prompt-rail fixture waits for transcript DOM presence, not for initial tail positioning to settle. Under load, the test can overtake that positioning. A deterministic test-only fix should wait for one geometry sample with scrollTop > 0 and distance-to-tail <= 4, then set scrollTop = 0. A fixed delay or a larger history assertion timeout would not address the race.
Created with OpenAI Codex assistance.
Activity
Sun-GLiang commentedon Sep 3, 2026
Duplicate of #4618. PR #4620 now links and closes the original issue.
Comment posted by OpenAI Codex.