Repository navigation
Closed
Labels
bugSomething isn't working
Description
What happened
The Desktop E2E test evicting a turn-owned sibling interaction hands focus back to the transcript intermittently leaves the focused bottom Turn mounted after the test scrolls the transcript to the top.
The failing assertion expected the retained Turn count to become 0, but it remained 1 for the full 10-second timeout. The intended behavior is to collapse the selection, hand focus to the transcript, and evict the Turn once it is outside the virtual window.
How to reproduce
The observed failure occurred in the full Linux CI E2E lane:
apps/desktop/e2e/prompt-rail.spec.ts:246
Expected: 0
Received: 1
Locator: [data-virtual-turn-id="turn-prompt-rail-120"]
Focused command:
cd apps/desktop
npx playwright test \
--config e2e/playwright.config.ts \
e2e/prompt-rail.spec.ts \
--grep 'evicting a turn-owned sibling interaction hands focus back to the transcript'The same PR revision passed three consecutive focused runs locally, so the failure is timing-sensitive rather than deterministic.
Environment
- Maka commit:
08da21936 - Surface: Desktop E2E
- Failing environment: GitHub Actions Linux runner with Xvfb
- Local comparison: macOS, three focused runs passed
Logs, screenshots, or additional context
- The test and the virtualizer implementation were introduced together in perf(ui): virtualize long chat transcripts #2975.
- The failing PR, feat(desktop): keep multiple Runtime Hosts connected #3097, does not modify
turn-virtualizer.ts,use-turn-virtualizer.ts,chat-view.tsx, orprompt-rail.spec.ts. - A recent full Desktop E2E run on
mainpassed: https://github.com/maka-agent/maka-agent/actions/runs/31945306113/job/95160280532 - Useful diagnostics for the next failure would be the observed
scrollTop, current virtual-window bounds, retained interaction range, active element, and selection state when the timeout expires.
Filed automatically by Codex after CI triage at the maintainer's request.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
1625567290 commentedon Aug 16, 2026
I'm working on this. The eviction assertion waits for the Turn to unmount after a one-shot
scrollTop = 0. Injecting the turn-owned control can resize the tail Turn and queue a scroll-anchor restore; if that restore lands after the test jumps to the top, the viewport is pinned back onturn-prompt-rail-120and the virtualizer never excludes it.I'll settle layout after the injected interaction, keep the scroller at the top across the virtualizer's rAF, and add a focused virtualizer test that a far retained sibling is handed off and evicted.
Grok is assisting with the implementation; I will review the change and remain the human contributor of record.
简体中文对照
我来处理。失败是一次性
scrollTop = 0之后 Turn 没有卸载。注入 turn-owned 控件会改变尾部 Turn 高度并排队 scroll-anchor restore;如果 restore 发生在测试跳到顶部之后,视口会被钉回turn-prompt-rail-120,virtualizer 就不会把它排除。我会在注入交互后等布局稳定,并在 virtualizer 的 rAF 期间把 scroller 保持在顶部;再补一个 focused virtualizer 测试,覆盖远处 retained sibling 的 handoff 和 eviction。
Grok 协助实现;我会审阅改动,并作为 human contributor of record。
M4n5ter commentedon Aug 16, 2026
Thank you!
1625567290 commentedon Aug 16, 2026
Update: the change is test-only. After injecting the turn-owned control I wait for painted frames so a bottom-captured scroll-anchor restore can settle, then hold
scrollTop = 0across the virtualizer rAF and assert eviction with the scroll/window/focus snapshot the next failure would need.I am not changing
use-turn-virtualizeritself. The far-retain window bound is already covered inturn-virtualizer.test.ts.test(desktop): hold the prompt-rail eviction jump at the top
test(desktop): 稳定 prompt-rail 焦点回收用例
test(desktop): 稳定 prompt-rail 焦点回收用例
test(desktop): hold the prompt-rail eviction jump at the top (apache#…
test(desktop): deflake the prompt-rail bottom jump before the tail-tu…
fix(desktop): address review — resolution order, strict parsing, plat…