Repository navigation
test: wait for a card step's scroll before pressing the card's next step - #6843
Conversation
test_a_shared_passage_steps_between_single_thread_cards pressed Previous as soon as Next had focused the second thread's reply. A step lands on its thread as every opening does: in the task that focuses the reply, it glides the passage into the reading band, 394 px on this page, and the card rides the glide. A press that Playwright aimed before the glide ended fell on the page where Previous had stood, which took the user's place off the passage and closed the card. CI run 45104895190 showed that sequence: not stable, <body> intercepts the press, inert, then hidden. The test now waits for the scroll to settle after each step before pressing the next one. The behavior it protects is unchanged. Closes #6838
|
@leaf-agent The scroll-settle test change can stand independently, but the PR body leaves an interaction choice open: whether stepping to another thread at the same visible passage should glide the page. Root AGENTS.md requires a picture for a UI option left to the maintainer, including one in a PR body. Please add a labeled side-by-side sketch or still pair showing the current 394 px glide and the alternative that leaves the passage and controls in place, so Max can judge that choice. The test fix itself need not change.
|
|
This head's red |
|
The PR body now pictures the open choice. It shows three stills from the test's page at 1440×900: before the step, after Next as it works now (the page glides to |
test_a_shared_passage_steps_between_single_thread_cardspressed Previous thread as soon as Next thread had focused the second thread's reply. But a step lands on its thread the way every opening does. In the same task that focuses the reply, it glides the passage into the reading band (394 px on this page), and the card moves with the page. When Playwright aimed the press before the glide ended, the press fell on<body>where the button had stood. That moved the user's place off the passage, and the card closed. This matches the call log in run 45104895190:not stable, then<body> intercepts pointer events, thenelement is inert, thennot visibleuntil the timeout. The test now callsscroll_settledafter each step, once the reply's focus shows the glide has started, and presses the next step only then. It still asserts the same behavior.The glide predates the run's candidate PRs (#6810, #6688). A frame trace at
017ddeccfshows the same 394 px glide after Next, and the same failure hit Linux on Nov 15 (#6048). So no change in017ddeccf..10ac9da49caused it.Evidence
scrollY > 300, closes the card every time. That is the failure's mechanism.--cpu-throttle 8and 18 of 18 at--cpu-throttle 16 --load 4, so load alone didn't reproduce the timing here. With the change, it passed 12 of 12 at--cpu-throttle 8and once unthrottled.anchor-travel.jsplace→placeScroll→landing-scroll.jsscrollIntoView→glideTo, in the same handoff that callsfocusForNavigationon the reply.One product question remains open, and this PR doesn't decide it. Opening this card from the margin marker leaves the page still. Stepping to another thread at the same passage, which is already in view, glides the page 394 px. The card moves with the page, so a pointer that presses Next and then Previous misses Previous.
The stills below are from the test's page at 1440×900, with two threads on the bracket question. In both alternatives the second thread is open and its reply has focus.
scrollY0scrollY394scrollY0The alternative is a mock-up. It runs the current step and then scrolls the page back to where it stood. It is not a built behaviour. Captured with
leaf-dev probeand a journey that presses Next and recordsscrollYand Previous's box.Closes #6838 — automated triage