Repository navigation
test(web): the selected-text actions test gives the list time to settle after each scroll - #731
Merged
Merged
Conversation
…le after each scroll "keeps the actions beside the selected text as the list scrolls" failed on CI (on main and on PRs) when the actions hadn't come back within Vitest's default one-second wait after a scroll. After a scroll the list draws the rows coming into view and finishes the scroll on its own timers before the actions move; on a slow runner that takes longer than a second. With Chrome's CPU throttled 20x the old test failed; with a five-second wait it passed every time, and wheel scrolls (what a reader does, and what the file's other scrolls already use) settled faster than bare scrollTop writes. The test now scrolls with the wheel helper and waits up to five seconds after each scroll. It passes 10 of 10 repeats at a 20x throttle.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 31, 2026
This was referenced Oct 31, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"keeps the actions beside the selected text as the list scrolls" (
MessagesTimeline.real-list.browser.tsx) failed on CI, on main (after #727) and on #728. The actions next to the selected text hadn't come back within Vitest's default one-second wait after a scroll.Why. After a scroll, the chat list draws the rows coming into view and finishes the scroll on its own timers. Only then do the actions move to the text's new place. On a slow runner that takes longer than a second.
How I checked. I slowed Chrome down with its CPU throttle (via
cdp(); not part of the change):So the wait was the cause, and wheel scrolls settle faster than bare
scrollTopwrites.Fix. The test now scrolls with the file's
wheelScrollhelper (what a reader does, and what the setup helper already uses since #574). It also waits up to 5 s after each scroll (AFTER_SCROLL), like the file's other list waits. The final version passes 10/10 repeats at a 20x throttle, and the whole file passes at normal speed.