You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky: the Activity feed keyboard-scroll test reads the wrong first row in view #1006
e2e/console/activity.spec.ts:373 "the Activity page › the feed scrolls inside itself with the keyboard, and counts the events that came in while scrolled down" fails in the Console (1/4) job, its retry too:
Error: expect(received).toEqual(expected) // deep equality
> 395 | expect(await firstRowInView(page)).toEqual(inView);
What you expected
The test passes on every run of an unchanged commit.
How to reproduce
Seen on CI run 40184982178 on main at def25c8 (a commit that leaves the console alone). It passed on PR #1003 and PR #1004 at the same base.
This is a defect in the test, not in the console. It notes the row in view before the history's end row has arrived. When that row arrives late, the feed keeps the reader at the end on purpose and moves the rows by the row's height. That gives the same result CI saw: -51 becomes the next row at -37.
Branch bug/1006-repro, in e2e/console/activity.spec.ts: "the feed scrolls inside itself with the keyboard, and counts the events that came in while scrolled down". The test holds the real daemon's ?before= answer until after inView is noted, then releases it and waits for "Start of the history (".
e2e/console/activity.spec.ts:391 (on main) reads firstRowInView as soon as the box reaches its end. The older-page request that useNearEnd sends (ui/src/ds/feed.tsx:158-161) may still be in flight at that point. When it answers, the end row goes below the box and shrinks it. useStayAtEnd (feed.tsx:131-132) then scrolls to the new end, which is the behaviour the test at activity.spec.ts:404 asks for. The rows move by the end row's height: -51 - 46 + 60 = -37. On a loaded runner the answer can come after line 391.
Simplest fix
In the test only: release the gate once the box is at its end, wait for "Start of the history (", poll again that the box is at its end, and only then note inView. Keep the gate so the late answer is still forced. Locally this passed 5/5 (--repeat-each 5).
Alternatives rejected
Stop useStayAtEnd moving the rows: this breaks the behaviour the test at line 404 pins.
Use PageDown so the reader is not at the end: this needs many more events.
Retry the assertion with expect.poll: this hides the move instead of ordering it.
Risk
The fix must keep the gate. Without it, the test goes back to depending on timing.
Activity
V3RON commentedon Oct 25, 2026
Reproduction
This is a defect in the test, not in the console. It notes the row in view before the history's end row has arrived. When that row arrives late, the feed keeps the reader at the end on purpose and moves the rows by the row's height. That gives the same result CI saw: -51 becomes the next row at -37.
Branch
bug/1006-repro, ine2e/console/activity.spec.ts: "the feed scrolls inside itself with the keyboard, and counts the events that came in while scrolled down". The test holds the real daemon's?before=answer until afterinViewis noted, then releases it and waits for "Start of the history (".Root cause
e2e/console/activity.spec.ts:391(on main) readsfirstRowInViewas soon as the box reaches its end. The older-page request thatuseNearEndsends (ui/src/ds/feed.tsx:158-161) may still be in flight at that point. When it answers, the end row goes below the box and shrinks it.useStayAtEnd(feed.tsx:131-132) then scrolls to the new end, which is the behaviour the test atactivity.spec.ts:404asks for. The rows move by the end row's height: -51 - 46 + 60 = -37. On a loaded runner the answer can come after line 391.Simplest fix
In the test only: release the gate once the box is at its end, wait for "Start of the history (", poll again that the box is at its end, and only then note
inView. Keep the gate so the late answer is still forced. Locally this passed 5/5 (--repeat-each 5).Alternatives rejected
useStayAtEndmoving the rows: this breaks the behaviour the test at line 404 pins.expect.poll: this hides the move instead of ordering it.Risk
Written by an agent.
V3RON commentedon Oct 25, 2026
Delivery run
Merged: #1007 (#1006)
Written by an agent.