Repository navigation
Refuse a page whose last words stay under Leaf's panel - #5969
Merged
Merged
Conversation
`page check --render` now reports `under-panel` for a word that stays under the panel's row however far the page scrolls. Leaf keeps the panel's room as body's bottom padding (`--lf-foot-room`), and a page could lose it with no check saying so: a reset zeroing body's padding, a body held to the window's height that its content runs past, a `main` or `body` that scrolls itself, a fixed bar at the window's foot, or a footer beside a page of parts' `main`. The covered-words reading compared page words only with each other. No CSS keeps the room against all of those, since CSS attaches room to the end of a box and the page can end its content past any box Leaf pads. An important padding would also override spacing the author declared on body, which test_plain_pages holds as the author's. So the gate reads the outcome. `paintedRuns` gives each run a second box, where it stands with every scroller holding it at its end, computed by lifting the run by the scroll each scroller above it has left, so the reading still moves nothing. `coveredWords` reports a run whose end box overlaps a box the window chrome declares (`windowChromeBoxes`, now exported through check-api.js). The corpus sweep now holds Leaf's own Layouts to the room as well. Each element's climb is read once rather than once per line. A bar the page sticks to the window's foot is lifted from where it sticks rather than from its place in the flow, so it goes unreported; the header says so. On 198 real pages that today's markup check accepts, the 45-page example corpus and the plain pages, it fired nowhere, and an independent reading that scrolls each scroller to its end found no words under the panel either. On seven hand-made pages that lose the room it fired on each, at the desktop and phone windows, agreeing with that reading.
Brings d6134f5 ("Refuse a page whose last words stay under Leaf's panel") onto main's current code. - words.js: main replaced the every-pair covered-words loop with a sweep down the page (#5769). The sweep now runs over the runs whose current box shows, and the under-panel reading runs over every run first, as the commit had it. - windowChromeBoxes no longer exists: #5361 replaced it with declareCover and coverBoxes. The reading compares each run's end box with coverBoxes(), which the gate reads before it opens a thread, when it is the panel's row, and check-api.js exports coverBoxes in its place. - test_render_gate.py: both sides added a test at the same place; both kept.
leaf-agent
approved these changes
Nov 14, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 23, 2026
…indow (#6688) The page keeps no room for the floating panel: it lays out in the whole window, the panel stands over it, and the user folds the panel with `.` where it covers something. Until now the page kept a 72px band (`--lf-foot-room`) across the window's whole width at the end of every scroller and below every window-sized box, through about eleven rules (body and part padding, `--lf-end-room` threaded through workspace regions, tabs, panes and the file editor, sticky tracks, the trace stage, a landing trim, the `under-panel` render refusal), and it kept needing patches (#3394, #3619, #5969, #6555, #6671). Max asked whether the page could know nothing about the panel; this is that change, which he picked over keeping the band, on the decision page in his session. What still counts the panel is Leaf's own placement: the root's landing band still ends above the panel's band, and an inner scroller the page can't carry, held in a full-window workspace or stuck, now ends its band there too wherever the panel stands across the destination's columns (`landingBand(scroller, across)`), in place of the band each pane kept in its padding. The panel no longer writes the root's `scroll-padding-bottom`, since a band across the whole window made a Tab onto a stuck sidebar link beside the panel scroll the page 340px. A Layout's end padding adds the safe area at the window's foot. Landings also stop scrolling the page past how far it can still carry a scroller (`pageCarry`, geometry.js), so a stuck tab side list's open item stays in the window. Four faults the missing band exposed are fixed where they live: an empty visual-review discussion now lays out where its comment box would stand, so the box takes that seat only where the panel leaves it in sight, rather than opening under the panel's row and jumping between its two seats every 70ms; a comment box the user sees no longer moves to a seat outside the window, which took the draft out of sight when a review's window widened from a phone's width; and a file tree no longer reveals a row the user pressed, which moved the row from under the pointer before mouseup so the click opened nothing (main does this too with a real mouse); and a Tab's landing above the panel, which waits for the next frame, now runs first when a key comes before that frame, so Enter on a link Tab left under the panel follows the link rather than letting go of focus (`landing-scroll.js`). To weigh: where content ends flush with the window's foot under the panel's 540px, the row covers its last 44px until folded (4 of 27 examples at 1728×999, 1 on a phone; 1 on main), and Tab onto a control there, as at the end of a long tab side list, leaves focus out of sight; the browser's own reveals (find, a page field's caret) no longer stop above the panel; and in a visual review that fills the window, the comment box opens over the case's head, covering its help button, rather than in its discussion. Tests: the runs of every tier before last, on this branch (https://github.com/max-sixty/leaf/actions/runs/45015279476) and on main (https://github.com/max-sixty/leaf/actions/runs/45015281683), failed four tests on the branch alone, each only some of the time, and each now has a fix here: the Tab landing above; the aim sweep lets the page's scroll carry a margin marker Leaf anchors to the page (`carriersOf`, now on the check API); the stale-keys sweep shows a sample frame below the window before reading, as a check does; and the file-pick test waits for the page's scroll to start, which fails on main too. All four passed in the last runs (https://github.com/max-sixty/leaf/actions/runs/45044731101, branch; https://github.com/max-sixty/leaf/actions/runs/45044712114, main). Those failed two others on the branch alone on Linux: the drawing test, which #6718 fixes and this branch now holds, and the trace journey, whose `hover` scrolled the page 9px now that the root keeps no scroll padding, which the shift watch misread (#6763, now on main, fixes the watch); the journey now points without scrolling and passes 8 of 8 copies at 4× CPU throttle. Seven more failed once each on the branch's macOS job alone, as eight did on main's; rerun locally at 4× throttle, four fail on main as well and three on neither. The latest runs, with #6718 in (https://github.com/max-sixty/leaf/actions/runs/45073644131, branch; https://github.com/max-sixty/leaf/actions/runs/45073646401, main), failed nothing on Linux that main didn't. Six tests failed on the branch's macOS job alone: - two journeys whose announcements #6702 reworded on main, which fail on main's Linux job too; - a shift-watch teardown of the kind #6763 fixes; - the removal test, which fails on main too at 4× CPU throttle; - the pane pin and comment-box return tests, which passed all 12 local copies, 6 on each tree, both plain and at 4× throttle. Since those runs started, main gained #6720, #6739, #6756 and #6763, which this branch now holds; in `seatFab` it keeps #6739's rule that a seat is judged only as the box moves in, judged by this branch's rules. Their new tests, with this branch's visual-review, card-growth and trace tests, pass on that merge here. Locally the changed tests, the drawing tests, `pnpm run test:runtime` and `pnpm run check:browser` pass on the merge of today's main; the focus-ring sweep fails on `review-a-fix` on main and here alike. > _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.
page check --rendernow refuses a page withunder-panelwhen a word stays under the floating panel's row however far the page scrolls. Leaf keeps the panel's room as body's bottom padding (--lf-foot-room), and a page could lose it with no check saying so: a reset that zeroes body's padding, a body held to the window's height that its content runs past, amainorbodythat scrolls itself, or a fixed bar at the window's foot. Until now the covered-words reading compared the page's words only with each other.No CSS keeps the room against all of those, since the page can end its content past any box Leaf pads, and an
!importantpadding would override spacing the author set on body. So the gate reads the outcome.paintedRunsgives each run a second box, where it would stand with every scroller at its end, by lifting the run by the scroll each scroller above it has left, so the reading scrolls nothing.coveredWordsreports a run whose end box overlaps a box the panel covers (coverBoxes, now exported throughcheck-api.js). The examples' render suite now holds Leaf's own Layouts to the room too.What the diff doesn't show: words in a bar the page sticks to the window's foot go unreported, since the reading lifts that bar from where it sticks (the header says so). The commit was written on 2026-11-03 against
windowChromeBoxes, which #5361 replaced. It now readscoverBoxes(), which the gate takes before it opens a thread, when the panel's box is its row, and runs beside the covered-words sweep #5769 added.Evidence: when written, it fired on none of 198 real pages the markup check accepts, the 45-page example corpus or the plain pages, agreeing with an independent reading that scrolls each scroller to its end, and it fired on each of seven hand-made pages that lose the room, at the desktop and phone windows. On this branch it fires on none of the 48 authored pages at 1280, 540 or 360px, and the full gate refuses a page that zeroes body's padding at every width from 360 to 1920px.
Max asked for this during a stale-work sweep; a subagent had committed it locally and never opened a PR.
Tests:
test_words_the_panel_covers_at_the_page_s_end_are_reported(room kept, reset,mainscrolls,bodyscrolls) and the covered-words andpaintedWordsneighbours pass, as dopnpm run check:browserand pre-commit. CI'stestjob fails one test, inherited from main:test_every_skill_file_reads_in_one_commandfinds.claude/skills/developing-leaf/SKILL.mdat 30,189 bytes since #5820; this branch leaves that file alone, and #5967 shrinks it.