Repository navigation
Hold before-first-frame test interruptions at the trip's history entry, since landings no longer smooth-scroll - #5311
Merged
Merged
Conversation
…t its smooth scroll #5285 moved every Leaf landing onto its own glide of instant writes, so a script's `scrollTo({behavior: 'smooth'})` on the page no longer happens. Four tests held their interruption there, and their hook never fired: the primary-arrival Back case read an unset `backRequestedAt`, and the thread-trip, datum and Resume cases waited out their timeout. Each now holds it at the `pushState` that adds the trip's return stop, which comes in the task that starts the landing, before its first frame (`before_landing_frame` in render_harness). The behavior each test protects is unchanged. Refs #5188
# Conflicts: # tests/browser/navigation/test_threads.py # tests/render_harness.py
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.
#5285 replaced the browser's smooth scroll with Leaf's own glide for every landing, so nothing calls
scrollTo({behavior: 'smooth'})on the page any more. Four tests created their "interrupt before the first frame" moment by wrapping that call, so since #5285 their hook never fires:test_primary_arrival_records_a_return_place_only_when_travelling[False-True-1000-False-True]fails onbackRequestedAt is not defined.test_a_thread_trip_takes_over_an_outgoing_trip_before_its_first_frame[walk|passage],test_a_visible_datum_takes_over_pending_thread_motionandtest_comment_follows_a_thread_current_location_instead_of_an_earlier_draft[-True]time out waiting for the hook.Each test now uses one shared helper,
before_landing_frameintests/render_harness.py, which wraps thepushStatethat adds the trip's return stop.arrivecommits that entry and starts the landing in the same synchronous handoff (anchor-travel.js), and the glide writes nothing until its first frame. So the interruption still lands before the page moves, and it no longer depends on which mechanism scrolls the page. Each test protects the same behavior as before.Verified locally on Linux: all five cases failed on
origin/mainand pass on this branch. Underleaf-dev flake(18 concurrent copies each) every case passed, and the primary-arrival test also passed every copy at--cpu-throttle 4.This leaves the failure #5188 reports open. That failure was a missing history entry on macOS, intermittent across all four primary-arrival cases in the nightly runs before #5285, alongside
scrollYreading 0 instead of 200. It does not reproduce on Linux even throttled, and the next nightly is the firsttest-macosrun on the glide.Refs #5188 — automated triage