Skip to content

test: scroll the thread-walk card's reply past the bring-back slack before its click - #7537

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-7528-thread-walk
Nov 28, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-7528-thread-walk

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

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), 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

…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
@max-sixty
max-sixty merged commit f8f1520 into main Nov 28, 2026
7 checks passed
@max-sixty
max-sixty deleted the fix/issue-7528-thread-walk branch November 28, 2026 17:58
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants