You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Floating panel thread view moves without input at teardown after an answer grows it, under load #7180
The floating panel's thread view moves without input at teardown, intermittently, after an answer grows it:
tests/journeys/test_render_floating_panel.py::test_an_answer_the_user_waits_for_grows_the_view_up_to_its_cap errored at teardown on Linux in the scheduled run 45598918111 (118f31f6d): button.lf-inline-action.lf-new-reply … moved without input by (0, 68)px.
On macOS in the same run, tests/browser/test_render_floating_panel.py::test_a_streaming_answer_grows_the_view_until_it_outgrows_its_cap errored at teardown: button.lf-icon-action.lf-fp-back … moved without input by (0, 416)px; the same frame moved leaf-floating-panel …. In the same file, test_an_open_view_covers_the_page_beneath_it failed with TypeError: Cannot read properties of null (reading 'right') in its page.evaluate. I haven't reproduced those two.
Load-dependent, and older than this run's range. At 90bc5d55c, the journeys test failed 3 of 8 copies run four at a time on Linux, every time with the whole panel moving (0, 318)px in one frame (div.lf-fp-messages, lf-msg-head, the close and resolve buttons, all with leaf-floating-panel). Alone it passed. At e7d5808f3, the previous scheduled run's head, it failed 4 of 12 under the same load. So this is not a regression from the changes in e7d5808f3..118f31f6d, and its introducing change is still to find. The panel apparently repositions as the view finishes growing, in a frame the shift watch sees with no input and no carry credited. The next step is to record which writer moves leaf-floating-panel in that frame (the shift watch's failure page captures the frame).
This still reproduces on current main (32dc564a8). 4 of 40 copies run four at a time on a 4-core Linux runner errored at teardown. Every failure falls in the frame where the 80-sentence answer grows the thread view by 318 px to its cap, the third answer(...) call in the test. In both failure shapes the growth's carry animation and the layout change are out of step for a frame. The issue stays open as engineering work, not as a wait for another failure.
Shape 1, the carry starts a frame late (3 of 4). The view's layout top moves 492 → 174 in one step. The shift watch then sees the panel head painted at its grown position (lf-fp-back at y=146) with no carry applied. In the next sample the head is back at y=464, which is where the --lf-box-carry: 0px 318px keyframe starts it. So one frame shows the grown panel, the next jumps back down 318 px, and the slide up follows. A user under load would see this flicker too. My per-frame recorder caught no ResizeObserver loop error in that frame, so a skipped observer delivery does not explain the late carry.
Shape 2, New reply isn't carried with the outlet (1 of 4). This is the shape of the Linux CI failure (lf-new-reply … (0, 68)px). div.lf-fp-messages is mid-carry (translate 39.1 → 10.8 px) while New reply stays still on screen (observed 0.006 px). The watch credits New reply with the outlet's −28.3 px carry, so the residual is 28 px. Either New reply is placed outside the outlet's transform and the watch's credit model is wrong for it, or it should ride the carry and doesn't. I haven't settled which.
Evidence and next step
Reproduction: uv run leaf-dev suite flake --copies 12 --workers 4 'tests/journeys/test_render_floating_panel.py::test_an_answer_the_user_waits_for_grows_the_view_up_to_its_cap'. The three runs gave 2 of 12, 1 of 12 and 1 of 16.
I instrumented the test temporarily (not committed). A requestAnimationFrame loop logged the open .lf-fp-view's getBoundingClientRect().top, its scroll and its message count, and a capture-phase error listener logged any errors. In the failing copy of the last run:
The view's top went 688 → 569 (first answer), → 492 (the user's reply), → 174 (the long answer) at 7780 ms, then held at 174 through the New reply press and the fifth message.
The shift-watch finding for the head: before sample 7748.7 ms at y=146, paint 7812.6 ms, after sample 7839.7 ms at y=464, residual (0, 318) with no scroll or animation credit.
No error event fired.
The shape 2 finding in the second run: before sample 7638 ms, after 7686 ms. The outlet's animation keyframes were --lf-box-carry: 0px 318px → 0px 0px, and New reply's own animations list was empty.
The long answer arrives shortly after the user's own send (streamSend / following.stream() in browser/runtime/panel/floating-panel.js). One open lead is that under load the answer's reading lands inside the send's stream window in browser/runtime/dom/box-motion.js, and that path starts the carry from a later reading. The next experiment is to log, per frame, when followBox runs and what following.theirs() returns around the growth, to see whether follow reads the box only in the frame after the layout changed.
Fix in #7257. Both shapes of the journeys teardown failure are shift-watch false positives: dom/box-motion.js draws the growth correctly, and nothing the user sees moves.
New reply shape: the ride moves .lf-awaited's sticky inset against the outlet's carry, so New reply holds still (a per-frame log showed it at y=798 throughout). The watch credited the outlet's translate to New reply but not the inset effect.
Whole-panel shape: a preparation's landing was still open when the answer arrived. News had already sealed it, but beginsOwned refused to count the head's carry as a carry while any landing was open at all.
Under the load that reproduced it, the journey failed 14 of 48 copies before the fix and passes 48 of 48 after. Two new watch tests fail on main's watch and pass with the fix. CI and landing are with tend-land.
The two macOS-only findings passed 24 of 24 copies each on Linux under load. The streaming test's has the same signature as the whole-panel shape. Nobody has reproduced the TypeError, and a recurrence in the scheduled test-macos run will bring it back.
Activity
leaf-agent commentedon Nov 25, 2026
This still reproduces on current
main(32dc564a8). 4 of 40 copies run four at a time on a 4-core Linux runner errored at teardown. Every failure falls in the frame where the 80-sentence answer grows the thread view by 318 px to its cap, the thirdanswer(...)call in the test. In both failure shapes the growth's carry animation and the layout change are out of step for a frame. The issue stays open as engineering work, not as a wait for another failure.Shape 1, the carry starts a frame late (3 of 4). The view's layout top moves 492 → 174 in one step. The shift watch then sees the panel head painted at its grown position (
lf-fp-backat y=146) with no carry applied. In the next sample the head is back at y=464, which is where the--lf-box-carry: 0px 318pxkeyframe starts it. So one frame shows the grown panel, the next jumps back down 318 px, and the slide up follows. A user under load would see this flicker too. My per-frame recorder caught noResizeObserver looperror in that frame, so a skipped observer delivery does not explain the late carry.Shape 2, New reply isn't carried with the outlet (1 of 4). This is the shape of the Linux CI failure (
lf-new-reply … (0, 68)px).div.lf-fp-messagesis mid-carry (translate 39.1 → 10.8 px) while New reply stays still on screen (observed 0.006 px). The watch credits New reply with the outlet's −28.3 px carry, so the residual is 28 px. Either New reply is placed outside the outlet's transform and the watch's credit model is wrong for it, or it should ride the carry and doesn't. I haven't settled which.Evidence and next step
Reproduction:
uv run leaf-dev suite flake --copies 12 --workers 4 'tests/journeys/test_render_floating_panel.py::test_an_answer_the_user_waits_for_grows_the_view_up_to_its_cap'. The three runs gave 2 of 12, 1 of 12 and 1 of 16.I instrumented the test temporarily (not committed). A
requestAnimationFrameloop logged the open.lf-fp-view'sgetBoundingClientRect().top, its scroll and its message count, and a capture-phaseerrorlistener logged any errors. In the failing copy of the last run:errorevent fired.The shape 2 finding in the second run: before sample 7638 ms, after 7686 ms. The outlet's animation keyframes were
--lf-box-carry: 0px 318px → 0px 0px, and New reply's ownanimationslist was empty.The long answer arrives shortly after the user's own send (
streamSend/following.stream()inbrowser/runtime/panel/floating-panel.js). One open lead is that under load the answer's reading lands inside the send's stream window inbrowser/runtime/dom/box-motion.js, and that path starts the carry from a later reading. The next experiment is to log, per frame, whenfollowBoxruns and whatfollowing.theirs()returns around the growth, to see whetherfollowreads the box only in the frame after the layout changed.leaf-agent commentedon Nov 26, 2026
Fix in #7257. Both shapes of the journeys teardown failure are shift-watch false positives:
dom/box-motion.jsdraws the growth correctly, and nothing the user sees moves..lf-awaited's sticky inset against the outlet's carry, so New reply holds still (a per-frame log showed it at y=798 throughout). The watch credited the outlet's translate to New reply but not the inset effect.beginsOwnedrefused to count the head's carry as a carry while any landing was open at all.Under the load that reproduced it, the journey failed 14 of 48 copies before the fix and passes 48 of 48 after. Two new watch tests fail on
main's watch and pass with the fix. CI and landing are with tend-land.The two macOS-only findings passed 24 of 24 copies each on Linux under load. The streaming test's has the same signature as the whole-panel shape. Nobody has reproduced the
TypeError, and a recurrence in the scheduledtest-macosrun will bring it back.