Skip to content

test: scroll the thread-walk card's reply box past the 1 px bring-back slack - #6394

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-6390
Nov 18, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-6390

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_a_thread_walk_card_leaves_and_returns_with_its_anchor timed out on its third wait_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 presses c and expects the card to come back into view. off-flow.js's unseen reads 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 at top: -0.86, inside the slack, so c correctly 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 90ec76548 with 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 to top: 8, which confirms the landing itself works.

Closes #6390 — automated triage

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
@max-sixty
max-sixty merged commit 4a3f2ce into main Nov 18, 2026
6 checks passed
@max-sixty
max-sixty deleted the fix/issue-6390 branch November 18, 2026 17:14
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]>
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.

test_a_thread_walk_card_leaves_and_returns_with_its_anchor: c on a reply box half past the window's top never reveals the card since #6272

2 participants