Repository navigation
fix: repair the four journeys tests #6682's seated thread cards broke - #6748
Conversation
Three separate causes, each reproduced on main and passing after the change: - A ring overlay (a page thread) wore the browser's own focus ring between focus reaching it and the focus paint marking it. #6682 deleted the rule that hid that ring while focus was within the thread, together with the quiet focus ground. A send in a margin card moves focus from the reply field to the thread, and box-motion reads rings during that gap. It found two rings, the thread's and the field's, and drew both on its one moving-ring layer, which left that layer's style unchanged (test_margin_card_holds_its_top_while_read_and_its_reply_while_written). `.lf-ring-overlay:focus-visible` now drops the outline too. Its ring is still the ::after that Leaf's focus mark turns on. - An instant landing asked the browser to scroll by a fraction of a pixel, and the browser snaps scroll offsets to device pixels. When the fraction was above a half, a reply row held at the reading band's foot ended a pixel past where it was asked to stand, under the user's aim. #6682 moved the row by a fraction that rounds up. `land` now travels only the whole device pixels of its move (test_sends_from_a_page_threads_box_hold_its_foot_at_the_bands[diff-4]). - The page_holds_still fixture needed the long thread's last message to start inside the window. The seated card's padding and message width pushed it 93px below the window, so the fixture now has one fewer exchange (test_the_page_holds_still_under_the_user[reading-reply-below-*]). Closes #6741
|
@leaf-agent The new
|
…anding The previous commit made every instant landing travel only the whole device pixels of its move. A reveal then stopped up to a pixel short. In an inner scrollport, a target 1.75px past the edge moved 1px and stayed clipped by 0.75px, and setScroll drops any retry shorter than a pixel. Only keepInBand, which holds a growing reply row's foot at the band, now passes `held` to `land`. Every other landing passes its asked offset to the browser's snapping as before. Runtime tests cover both cases: a held box at a fractional foot travels only whole pixels, and an inner-scrollport reveal travels its fraction.
|
Agreed. Pushed 8adb469, which applies the whole-pixel rule only to One correction to the scenario: for exactly 0.75px, nothing changed. Tests in
|
…olds_still (#6768) The `reading-*` cases of `test_the_page_holds_still_under_the_user` need the `notes` thread's reply box below the window while the thread's last message starts inside it. The only thing between those two edges was the last reply's height, about two lines. On Linux (Chromium) the reply box stood just 6px below the 900px window, and macOS's taller line metrics brought it fully into view. That failed `put_reading`'s setup in all 12 cases (#6766) once #6748 dropped an exchange so the last message would start inside the window under #6682's seated card. The last reply now runs eight times as long. Only text below the last message's top grew, so the message still starts where it did, 775px down the window. The reply box now stands 300px below the window instead of 6px, far more than the two platforms' line heights differ by. What the cases test is unchanged, and so is what #6748 intended. **Verification** - Linux: the 12 cases pass. Probing `put_reading` in Chromium (`reading-reply-above`) before and after, the last message's top stays at 774.7px in both, and the reply box's top moves from 905.7px to 1199.7px. - macOS: two `test-macos` flake dispatches of the 12 cases are running, one on this branch ([run](https://github.com/max-sixty/leaf/actions/runs/45071051936)) and one on main's `75c3a82cb` ([run](https://github.com/max-sixty/leaf/actions/runs/45071054336)). Their results will be added here. Closes #6766 — automated triage Co-authored-by: leaf-agent <[email protected]>
This repairs the four journeys tests that have failed since #6682 seated thread cards. Each fails on main and passes here, in Chromium, and in Firefox where the test runs it. The tests have three separate causes. None of the repairs gives up anything #6682 meant to do.
test_margin_card_holds_its_top_while_read_and_its_reply_while_written(unchanged write ondiv.lf-box-moving-ring). Seat thread cards in their widget's box and ground, as the margin card #6682 deleted the quiet focus ground, and with it the rule that kept a page thread from wearing an outline while focus was within it. A send in a margin card moves focus from the reply field to the thread. For the rest of that task the thread matches:focus-visiblebut doesn't yet carry Leaf'sdata-lf-focus-visible, so it wears the browser's ownautoring. box-motion reads rings during that gap. It found two (the thread's black UA ring and the field's blue ring) and drew both on its one moving-ring layer, which left the layer'sstylewhere it started..lf-ring-overlay:is([data-lf-focus-visible], :focus-visible)now drops the overlay's own outline. The thread's ring is still the::afterthat Leaf's focus mark turns on, as Seat thread cards in their widget's box and ground, as the margin card #6682's surfaces.css header describes.test_sends_from_a_page_threads_box_hold_its_foot_at_the_bands[diff-4-browser](a scroll during Enter moved the box by (0, −22)px). Each Shift+Enter grows the reply box by a line, andkeepInBandscrolls so the row's foot stays at the reading band's foot. It asked forscrollTo(1090.578), and the browser snaps scroll offsets to device pixels, so the page landed at 1091. The box's foot ended a pixel higher than before, which counts as carrying the box under the user's aim. Seat thread cards in their widget's box and ground, as the margin card #6682 only moved the row to a fractional offset that rounds up (the parent's offset rounded down).keepInBandnow haslandinlanding-scroll.jstravel only the whole device pixels of its move, which leaves the row's foot less than a pixel short of the band instead of up to a pixel past it. Every other landing reveals something and keeps the browser's own snapping, so a target a fraction past an inner scrollport's edge still comes fully into view.test_the_page_holds_still_under_the_user[reading-reply-below-chromium|firefox]("the thread doesn't end below the place"). The fixture needs the long thread's last message to start inside the window. The seated card's padding and message width pushed it 93px below the window, so the fixture has one fewer exchange. The behavior under test is unchanged.On screen: the landing change moves a held reply row by under a pixel. The CSS change removes the browser's focus ring from a thread in the moment before Leaf's ring replaces it.
Checks run: the four tests by node id; all of
tests/journeys/test_page_holds_still.py(124 passed, 34 xfailed);tests/journeys/threads/test_composing.py; the browser tests for composing, draft reading place, send placement, navigation reading place, anchors, seated threads and scroll writes (360 passed);pnpm run test:runtime, including runtime tests for the held reply row and a fractional reveal in an inner scrollport;pnpm run check.Left as is: box-motion still has one moving-ring layer, so a reading in which two parts change size while both wear rings would draw only the last one. Nothing hits that once the thread no longer wears the UA ring.
Closes #6741 — automated triage