Repository navigation
test: scroll the thread-walk card's reply box past the 1 px bring-back slack - #6394
Merged
Merged
Conversation
The thread-walk journey scrolls the margin card in 10 px steps until its reply box's top passes the window's top, then expects `c` to bring the card back. off-flow.js's `unseen` reads a box within a pixel of the edge as shown, so where the loop stopped depended on the card's offset modulo 10. #6272 moved the reply box 8 px down, and the loop now stopped with the box 0.86 px past the top, inside that slack, so the card stayed put and the wait for it timed out. The loop now scrolls until the box is more than a pixel past, so the step exercises the off-screen landing it describes. No behavior changes. Closes #6390
This was referenced Nov 28, 2026
max-sixty
pushed a commit
that referenced
this pull request
Nov 28, 2026
…efore its click (#7537) `test_a_thread_walk_card_leaves_and_returns_with_its_anchor` timed 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`](https://github.com/max-sixty/leaf/blob/ec5a6e787f2643ace604ee60077d0ecbb5e2ccbc/browser/runtime/readings/off-flow.ts#L65-L75)), 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 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 on its thirdwait_for_function(shown)because the test stopped scrolling inside a tolerance the runtime documents. The test scrolls the margin card in 10 px steps until the Reply box's top passes the window's top, then pressescand expects the card to come back into view.off-flow.js'sunseenreads a box within a pixel of the edge as shown, so that a card held flush at the edge isn't moved. Where the loop stops depends on the card's offset modulo 10. #6272 moved the reply box 8 px down to stand a message's gap under the thread. After that, the loop stopped with the box attop: -0.86, inside the slack, soccorrectly left the card where it was.The loop now runs until the box is more than a pixel past the top. The step then tests what its comment describes: a card whose reply box is cut off at the window's top comes back on
c. #6272's spacing and the runtime are unchanged.The test fails on main
90ec76548with the 120 s timeout and passes with this change. With the original loop the measured box top was -0.86 px. Separately, a loop that went 6 px past brought the card back totop: 8, which confirms the landing itself works.Closes #6390 — automated triage