Repository navigation
Keep a sidebar's stuck track still through the document's end room, and the contents map still from the page's top - #7308
Merged
Merged
Conversation
…nd the contents map still from the page's top #7188 gave column and sidebar pages a body padding (`--lf-end-room` now) about a window tall, so the last line can rise to the window's top. A sidebar's sticky track can't leave its aside, and its end margin hung only through the sidebar's own 96px end padding, so through the last ~840px of the scroll the track rode up with the last line and the contents map left the window. #7245 held the test guarding this red for the maintainer, who asked on his review page that lf-toc "ideally wouldn't scroll at all". - The track's end margin now hangs through the document's end room too, where the sidebar is the page's Layout box (`main`, a layoutless `main`'s child, or a part's box). A footer in the sidebar still stops it, and a footer after the sidebar or after its `main` leaves only the sidebar's padding. Only a footer counts after `main`: 1Password, Readwise, AdBlock and Surfingkeys, all active in the maintainer's Firefox, append elements to `body`, and an earlier session found such an element after `main` there, so `:has(~ :not(script, template))` (as #6671 had) would leave the fix off for him. - Under the contents map's narrowed sidebar with no header, the track's start margin hangs through the sidebar's 72px top padding, so the map stands at its sticking line from the first frame rather than moving 40px before it sticks. Other tracks keep their place beside the body's top: a start hang there would cover a block above the track in the same aside. Measured on the maintainer's README page at 1728x999 in Firefox and Chromium: the map's top stood at 64px at the top of the scroll and at -816px at its end, and now stands at 24px through all 8,098px. What a user sees differently: each hang comes off the height the aside asks of the flex row, so a sticky track taller than the body no longer stretches the row. On the triage board with its activity open, the lanes now end just below their cards instead of at the activity list's end. The map's first marker opens 34px above the title's baseline instead of 6px, where it stands at every other scroll position. Left as rare paths: content other than a footer after `main` stands under the track at the page's end; a part shorter than a window still carries its map (the part's `main` is held a window tall, past the sidebar); a track whose own line-height differs from the body's hangs by its own `1lh`. Tests: `test_a_stuck_sidebar_track_keeps_its_place_to_the_page_end` passes again in both engines, now also for a layoutless `main`'s child, beside an element appended to `body` and above a site footer after `main`; the lens test checks the map stands still at the top, middle and foot. `without_end_room` zeroes the token, so the track's hang follows. Closes #7245 > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
reviewed
Nov 26, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
A sidebar nested in a column main now gets the document's end room, so its stuck track paints over the column content that follows it (inline).
`body > main > *` also matched a sidebar inside a `main` that carries its own Layout, which isn't the page's Layout box: its track hung through the end room over the column content after it. Only a layoutless `main`'s child counts now, and a test holds a sidebar among a column's blocks to its own end. > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
approved these changes
Nov 26, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 27, 2026
…e page (#7345) Makes the contents map's narrowed track `position: fixed` where its sidebar spans the page, so the trackpad's rubber band past the page's top or end slides the page under the map rather than carrying the map with it. Firefox and Chrome move a stuck sticky box with an overscroll, and every engine holds a fixed box still (`notes/browser-support.md`); the page-of-parts column already relies on that. To weigh: a fixed box can't stop at a header or footer or stay inside a sidebar placed among a column's blocks, so the track is fixed only where the sidebar is the page's `main` itself, with no header in it or before it, no footer in or after it, and no scroll region Leaf marks around it, and only while its aside stands beside the body. `--lf-sidebar-spans-page` is set beside the end-room rules, which read the same conditions. Elsewhere it sticks as before. 32 of the 33 sidebar pages with a contents map in the maintainer's page store span the page. The fixed track replaces #7308's start hang, which goes; a map in a sidebar with a footer but no header moves 40px at the top again. No package-interface name is added (`leaf-dev interface --base`). Max saw the bounce on his review page and asked for `position: fixed`; he hasn't read the diff. Headless browsers can't overscroll, so he checked it by hand in a preview of his README page: the map stood still. Codex and Tend reviewed it; their findings on a site header and a scroll region are folded in, and a sidebar inside `main` or a part, which can have blocks beside it, keeps the sticky track. An author's transform on an ancestor, or a scroller Leaf doesn't mark, would still capture the fixed track. Tests: the map, lens and sidebar layout tests pass in Chromium and Firefox; the nested-sidebar test gains a contents-map case, and a new test keeps the map below a header in, before or above the sidebar's `main`; each fails without its rule. The stylesheet rule-cost tests pass. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 27, 2026
A column or sidebar page now ends where its content does, as a web page does. This removes the room below the last line that #7188 added, nearly a window of blank space (864px on a 999px-tall window). It also removes everything that existed only for the room: the end-room term in the sidebar track's hang (#7308), and the test helper that took the room away for 16 tests. What a reader sees differently happens only near a page's end. Removing items there drops what stands above them by the removed height, and closing a disclosure there drops its summary. `m` lands a question at the end low in the window rather than at the landing line. Back on a deck that ends the page brings up a shorter card and carries Back 404px down from under the pointer. Higher up a page, nothing changes. Max chose "No room" on his review page after trying each case in a preview, and asked for it to be merged. He raised the deck's case as a separate question, so this leaves the deck's code alone. The hold-still journey lists the deck-back cases under `MOVES_BY_CHOICE`, its list of choices that bound the guarantee, and `layouts.css` records the rejected room. The contents map's fixed track (#7345) and its header and footer conditions stay, as does the stuck track's hang through the sidebar's own end padding (#6671). On a copy of the README page in Firefox at 1728×999, the map's top stays at 32px from the page's top to its end. Tests: I ran every test that took the room away or was adapted to it by node id in Chromium and Firefox (68 passed, and the two deck-back cases fail as the journey's list expects), plus the layer model tests and pre-commit. > _This was written by Claude Code on behalf of max-sixty_
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.
Keeps a sidebar's sticky track, and so the contents map, where it sticks through the end room #7188 put on
body, and stands the contents map at its sticking line from the page's top. The body's room becomes a token,--lf-end-room, and the track's end margin hangs through it as it already hung through the sidebar's own end padding, where the sidebar is the page's Layout box. Under the narrowed contents map with no header, the track's start margin hangs through the sidebar's top padding. On the maintainer's README page at 1728×999 the map's top went from 64px at the top and −816px at the end to 24px throughout, in Firefox and Chromium.To weigh: only a
footerafter the sidebar or itsmainstops the end hang, since browser extensions append elements tobody(all four in the maintainer's Firefox do). Each hang comes off the height the aside asks of the row, so a sticky track taller than the body no longer stretches it: on the triage board with its activity open, the lanes end below their cards.Max asked on his review page for lf-toc not to scroll; he hasn't read the diff. Codex reviewed it twice; its findings on nested sidebars, a layoutless
main's child and a site footer are folded in.Tests: the track test that #7244 left red passes in both engines with new cases; a new test keeps a sidebar among a column's blocks off what follows it; the lens test checks the map stands still; the rule-cost tests pass.
Closes #7245