Repository navigation
test: scroll the thread-walk card's reply past the bring-back slack before its click - #7537
Merged
Merged
Conversation
…efore its click The thread-walk journey scrolls the margin card's Reply box up two pixels at a time until its top passes the window's top, clicks it, types, and waits for the card to come back. Off-flow reads a box within a pixel of the edge as shown (`unseen`, off-flow.ts), so a box stopped between 0 and -1px is never brought back. Since #7442 made the card 33px taller, the loop stops at -0.86px and the journey times out after 120s. The loop now scrolls past -1px, as #6394 made the test's other loop do. Refs #7528
leaf-agent
added a commit
that referenced
this pull request
Nov 29, 2026
… its line (#7601) A thread walk opens its card before its landing scrolls the card's words into view. `commentPlacement`'s `choose` reopened the card only for moves Leaf started in the boundary's scroller, which is the page. In a long text document the walk scrolls the document's own `<pre>`, so the card never reopened. It kept the spot it took while line 840 was clipped (`held.top = -35438` from the line), and limitShift stood it at −35,067 px. A second `t` in the same frame found focus out of sight, and the walk returned to line 840 instead of moving on to 880. #7442's taller card exposed the defect: with the card 20 px shorter, limitShift's lower bound happened to win, so the card landed in view by luck. `choose` now counts moves Leaf started in every box that carries the subject, out to the boundary's scroller (`startsUnder`, built on `scrollersOf`). When the walk's landing reopens the card, the card drops its held spot and is placed again where the landing left its words. It keeps the side it chose, as the module header already said it should. A scroll from `makeRoom` still resets the count through `scrolled()`, so the card's own room-making never reopens it. Verification, by node id on Linux: - `tests/journeys/widgets/test_code_and_documents.py::test_a_long_text_document_draws_the_lines_in_view_and_keeps_the_rest_whole[browser]` and `[firefox_browser]` fail on `6e1977ac0` (`assert 1 == 2` on `steps`) and pass on this branch. - The placement sweep `tests/journeys/margin/test_card_placement.py`, the thread-walk and pane-walk browser tests, `test_a_thread_walk_card_leaves_and_returns_with_its_anchor`, and `tests/runtime/{comment,floating,margin,scroll}-placement.test.mjs` pass. - The `browser/types` type check and eslint are clean. This was the last of the eight journeys #7528 tracks. #7535, #7536 and #7537 fixed the other seven. Closes #7528 — automated triage Co-authored-by: leaf-agent <[email protected]>
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.
test_a_thread_walk_card_leaves_and_returns_with_its_anchortimed out after 120 s on main because its last step never started. The step scrolls the margin card's Reply box up 2 px at a time until the box's top passes the window's top, clicks it, and types. It then waits for the card to come back, as a browser brings a field back for its caret. Off-flow counts a box within a pixel of the edge as shown (unseen), so a box the loop stops between 0 and −1 px is never brought back. #7442 made every margin card 33 px taller, and since then the loop stops at −0.86 px. The loop now scrolls past −1 px, as #6394 made the test's other loop do, and the assertion on where the press lands checks the same bound. Product behaviour is unchanged.By node id on Linux, the journey fails on
6313a6f59(main), with the box's top at −0.86 px before and after typing, and passes twice on this branch.Refs #7528 — automated triage