Repository navigation
Take a list view's room before news arrives, so scroll anchoring holds its rows - #5553
Merged
Merged
Conversation
…s its rows On main, every card in sight in On me moved down 115px in Chromium (0px in Firefox) when the agent asked a question on the page's opening part. The user had turned On me to On <agent> and back by its tabs, then scrolled the list past its first cards with the wheel, and the cards held the page's own decisions (`lf-ask`), not questions asked in words. The new question's card joins On me's head, above the cards in sight. The existing `on-me-row` case, where On me holds the agent's questions asked in words and the user focused a card, held still, and so did Threads, which holds a joining thread behind its notice (#3883). The panel pins a list view's height to the height it stands at (`holdRoom`, the view's room), and took it at the start of the next paint after the list was drawn. A tab press refits the list and releases the room, and nothing took it again until a later paint. In On me two paints usually come first: a focus move inside the panel repaints it, and `present` repaints it once Leaf's reader has drawn the messages the cards ask. Neither ran here, since the tab press was the user's last act and decision cards hold no message. So the paint that brought the question was the first to take the room, and it wrote the view's `height` in the same layout that added the card. Chromium suspends a scroller's scroll anchoring for a layout in which the scroller's `height` changes, even to the height it already stands at, so the new card pushed every card below it down by its height. Consistent with that: taking the room at the end of the news paint instead, after a forced layout had already placed the card, also held the cards. The room is now taken as soon as the list stands at what it fits: at the end of the paint that first draws the list, in the frame after a refit settles, and, as before, once Leaf's reader has drawn the cards' messages. The paint that brings news then writes no height, and scroll anchoring holds the cards in sight. The take at the start of each paint goes, since each case it served is now taken earlier, and when it did fire it caused this move. This ports the 3 Nov prototype 037a422b9, which found the same move in Threads on a branch that drew joining threads at once (b44ea3318, not on main); on main Threads holds them, so On me is where the move showed. `tests/journeys/test_page_holds_still.py` gains a `decisions` page, fourteen `lf-ask` decisions with one on each part but the first, and the place `on-me-turned-back`, crossed with the existing `ask` change. With main's `floating-panel.js` the Chromium case fails (moved 115px) and the Firefox case passes; with the fix both pass, and `on-me-row-ask` passes on both as the control. The whole matrix passes at `-n 2` (92 passed, 16 expected failures), as do `pnpm run test:runtime`, `pnpm run check` and pre-commit on the changed files. Of 19 browser tests over the panel's lists, run by node id, `test_on_me_s_tabs_stand_where_a_view_names_itself` and `test_the_chosen_grouping_orders_on_me_and_the_m_walk_alike` (both in `tests/browser/widgets/test_on_panel.py`) fail with the same assertions on main, so they are inherited. > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
approved these changes
Nov 5, 2026
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.
On main, every card in sight in On me moved down 115px in Chromium (0px in Firefox) when the agent asked a question on the page's opening part. The user had turned On me to On and back by its tabs, then scrolled the list past its first cards with the wheel, and the cards held the page's own decisions (
lf-ask), not questions asked in words. The new question's card joins On me's head, above the cards in sight. The existingon-me-rowcase, where On me holds the agent's questions asked in words and the user focused a card, held still, and so did Threads, which holds a joining thread behind its notice (#3883).The panel pins a list view's height to the height it stands at (
holdRoom, the view's room), and took it at the start of the next paint after the list was drawn. A tab press refits the list and releases the room, and nothing took it again until a later paint. In On me two paints usually come first: a focus move inside the panel repaints it, andpresentrepaints it once Leaf's reader has drawn the messages the cards ask. Neither ran here, since the tab press was the user's last act and decision cards hold no message. So the paint that brought the question was the first to take the room, and it wrote the view'sheightin the same layout that added the card. Chromium suspends a scroller's scroll anchoring for a layout in which the scroller'sheightchanges, even to the height it already stands at, so the new card pushed every card below it down by its height. Consistent with that: taking the room at the end of the news paint instead, after a forced layout had already placed the card, also held the cards.The room is now taken as soon as the list stands at what it fits: at the end of the paint that first draws the list, in the frame after a refit settles, and, as before, once Leaf's reader has drawn the cards' messages. The paint that brings news then writes no height, and scroll anchoring holds the cards in sight. The take at the start of each paint goes, since each case it served is now taken earlier, and when it did fire it caused this move. This ports the 3 Nov prototype 037a422b9, which found the same move in Threads on a branch that drew joining threads at once (b44ea3318, not on main); on main Threads holds them, so On me is where the move showed.
tests/journeys/test_page_holds_still.pygains adecisionspage, fourteenlf-askdecisions with one on each part but the first, and the placeon-me-turned-back, crossed with the existingaskchange. With main'sfloating-panel.jsthe Chromium case fails (moved 115px) and the Firefox case passes; with the fix both pass, andon-me-row-askpasses on both as the control. The whole matrix passes at-n 2(92 passed, 16 expected failures), as dopnpm run test:runtime,pnpm run checkand pre-commit on the changed files. Of 19 browser tests over the panel's lists, run by node id,test_on_me_s_tabs_stand_where_a_view_names_itselfandtest_the_chosen_grouping_orders_on_me_and_the_m_walk_alike(both intests/browser/widgets/test_on_panel.py) fail with the same assertions on main, so they are inherited.