Repository navigation
Let a landing read the headers over a box that scrolls only sideways - #3217
Merged
Merged
Conversation
The sticky-header slot `--lf-top` restarts at every box that scrolls, which is right for where a sticky box inside it sticks but wrong for what covers that box where it lands: a box the user scrolls only sideways lands nothing down, so what it holds stays under the headers over the box. The runtime's readings walk past the restart (geometry.js, `slotHolder`); the CSS landing margins read the restarted value. So the diff hard-coded its own file header's height for its rows, which missed every header above it, and nothing inside the diff's code read the header at all: - a native landing on a diff row in a framed tab set put the row under the file header (Chromium and Firefox: row top at the strip's foot, 35px under the header); - Tab onto a control in a thread seated in a diff left it behind the pinned file name, on a bare diff, in a page tab and in a framed set; - a native landing on a paragraph under a framed set's stuck strip put it under the strip, since only a focused box took a margin from the slot. reach.js now marks a box scrolled only sideways `data-lf-scrolls="across"`. state.css restarts the slot for what such a box holds rather than for the box, and hands what it holds the headers over the box as negative coverage, so the slot less what is covered counts them inside it. Every box takes its landing margin from that difference (surfaces.css), which replaces the diff's two hard-coded margins; the diff's `pre` says `hidden` down so it is a sideways box. A runtime landing under a framed set's strip now keeps the same 12px of landing room below the headers that a page tab's rows already had, where it had stood flush at the diff header's foot. Code blocks and tables in reading content still scroll down by their declared `overflow-x: auto` and keep restarting the landing band. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/kernel/kernel.json
leaf-agent
approved these changes
Oct 20, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 20, 2026
**For authors:** a prose table or code block (`<pre>`) given only a `max-height` now clips what runs past it instead of scrolling down. Add `overflow-y: auto` to scroll it down. `references/page-authoring.md` now says so. Follows #3217. A prose table or code block declared only `overflow-x: auto`, which the browser computes to `auto` down as well, so the runtime treated it as a box that scrolls down. Such a box starts the landing band again, so a landing on anything inside it cleared none of the sticky headers over it. Tab onto a link in a wide table under a framed tab set's stuck strip brought the link only to the strip's foot, leaving its focus ring under the strip: ring top at 41.6 in Chromium and 42.0 in Firefox, strip foot at 47. Both now say `overflow: auto hidden`, so each counts as a sideways box (`across`, `state.css`) and what it holds counts the headers over it. The table's first-paint `--lf-top: 0px` moves onto its children, where the across restart puts it once the runtime marks the table; the table itself keeps the slot it met. `module-scroll-and-motion.md` asks a package's own sideways scroller for the same `auto hidden`. Checked: - **Clipping:** across the corpus, 63 tables and code blocks now compute `auto/hidden` and none runs taller than its box. - **Print:** a 200-row table and a 200-line code block print on 12 pages on both main and this branch, so both still fragment. - **Stills:** `leaf-dev stills` reports 18 of 18 table, code and tab states unchanged. - **Test:** the new `test_tab_onto_a_link_in_a_wide_table_under_a_framed_strip_clears_the_strip` runs in Chromium and Firefox, and `leaf-dev bugback` shows both failing with the change reverted. The source form of a data widget before it upgrades keeps `overflow-x: auto`. Its tag is sized to the box its module will draw, so source longer than that box should still scroll. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
`test_a_box_that_starts_scrolling_after_it_arrives_takes_a_stop` authored plain divs with `overflow-x: auto` and expected Leaf to find them. Since #3673 reach measures only boxes that declare `class="scroll"`, as page-authoring.md now tells authors to, so the window, container, script and inserted boxes never took a stop. Each now declares the class, as an author following the reference does. The table a disclosure draws has been read as `data-lf-scrolls="across"` since #3217 marked boxes that scroll only sideways, and the theme scrolls a table only sideways; the test now expects that value. The behavior protected is unchanged: a declared surface that comes to scroll after arrival takes a stop, its edge mark and the sticky slot, and gives them back when it stops scrolling. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
#3939) Adds a nightly macOS run of every test tier, and fixes every test that failed in its first run or in the Linux nightly beside it: 89 tests in [run 40156291557](https://github.com/max-sixty/leaf/actions/runs/40156291557), 60 of them only on macOS. ## The macOS nightly `ci.yaml` gains a `test-macos` job: every tier on `macos-15`, `-n 2` on its three cores, in the daily schedule and a dispatch. It belongs to `ci`, so a failure turns that run red and reaches tend through the existing `workflow_run` trigger, with no tend configuration change. GitHub doesn't bill hosted runners for public repositories; the job holds one of the account's macOS slots for about three hours. The test step names `shell: bash`, without which a step runs without `pipefail` and piping pytest through `tee` reported the first run's failures as a green job. The setup action's Ubuntu mirror step now runs only on Linux. `tests/AGENTS.md` counts `test-macos` among what tend repairs and leaves only failures no CI run shows to local sessions. It drops the instruction to confirm a macOS-only failure at normal priority because `taskpolicy -b` slows headless Chrome: a test that fails on a slower host depends on timing, and the fix is to the test. `running-tend` tells the session fixing a red run, which has only a Linux runner, to verify a macOS-only fix by dispatching `ci` on its branch. ## The fixes, by cause Product fixes: - A drafted margin card rose against the window's foot and never came back as the draft shrank (#3524). It now holds the top it opened at and drops back. - A tapped pin reseated 11px lower as it unfolded, because the hold-to-read toggle was pressed before the browser focused it (#3341). - A page's first thread card could cover its passage, because the placement that makes room was dropped while Floating UI loaded (since #1526). - A heading's "Copy link to section" stayed at the heading's far end after the window narrowed and widened, since every engine keeps its last `position-try` fallback (#3836). It now picks its place from the current width. - Putting the response bar away moved focus off the button the press had just focused, so the next `e` found nothing (#3756). - A trace's image-tools status shared a class with the image's loading notice, whose rules hid it (#3707). - WebKit scrolled the outer page 1,386px when a sample editor took focus (#3634). - In draw mode a press left the previous press's release timer pending, so a fast second click reached the page. - Hint refreshes read the geometry of every target inside a closed disclosure, forcing layout of skipped content. - A sidebar page's sticky track clipped focus rings (#3918). A stuck track body now keeps the ring's room inside its edges, so its blocks stand 5px in from each side. - Tab revealed a block's Copy flush with its scroller, cutting its ring (#3916). - The hidden "my change" word inside a choose group took a cell's padding and read as clipped content (exposed by #3837's check). - Visual review case buttons kept their wide padding after the first breakpoint crossing, a Chromium restyle bug avoided by making the case list a plain container. - A held shot's scrolling stage didn't declare that it holds its height (#3703/#3704). - When the log refused a reply, the floating panel's head moved down 69px and the restored draft pushed its controls up 21px (#3400). Through a refusal the panel now holds its head and the field its height, on the holds a press already takes; the refused turn's room goes at the user's next turn. - A reply box's ↑ (edit your last message) appeared only after an unrelated repaint once its last message became editable (#3855). Every message draw, by any thread reader, now recomputes that row's keys. - A trace's images took the page's scroll anchor, so a lane change in the timeline scrolled the page 62px under an arrow key; they no longer anchor scroll. The trace overview wrote its window's new start before reading its size, so for one layout the window ran past its strip and Chromium scrolled the page up to 838px; it now reads before it writes. The image tools' status keeps its line when its text clears. - Web Awesome's radio group moves focus on an arrow with a bare `focus()`, which Leaf's ring scroll margin turned into a page scroll. The vendored bundle is patched (`build/vendor.mjs`) so both calls pass `preventScroll`. - A Leaf page inside an iframe took focus from the page around it when it finished arriving. Its arrival recovery now runs only at top level or in a frame that holds focus. - The margin rail's one Tab stop stayed on whichever row last held it, so a resize could leave it below a row the user sees first. It is now the highest row in view; a focused row keeps it. - A resize that moved a sidebar page's track into the page, with neither place made by the reader, took the track's place over the page's: live-progress jumped 1861px (#3918). On a tie the page's own place wins. - The whole-page rule read a shut disclosure whose children are all generated as showing what it holds (#3908); it now skips only `.lf-ui` apparatus. - The gallery revealed its stamped frame at the centre, carrying the pressed button 45px; it now scrolls only as far as needed. Test fixes: - The Codex fixture copies the running interpreter as `codex`; on a framework Python, as on the runner, the copy fails its code signature and macOS kills it at launch. That broke 39 tests. The copy is now re-signed ad hoc, and the fixture no longer leaks `PYTHONHOME` into the command it runs. - The plain-HTTP copy test missed Chromium's lower-cased host; the event-door refusal test read its answer after the server's reset; the stale-keys sweep raced the browser entering fullscreen; the words watch didn't credit a blur from a press elsewhere. - Several tests read state before it settled (a shown gesture's arm, a side list's smooth scroll, a sample's focus returning, a held reply's menu), and now wait for it. Assertions predating #3830, #3916, #3670, #3673 and #3217 now read the current behavior. - Three waits fixed their own deadline instead of the suite's, among them the async-probe test's 500ms. - The command hub's record now sticks in view, so the Atlas journey opens its news before reading each row; the region-capture journey drags over the unreadable image it means to fail on (#3861 draws only the element that alone paints the crop). - The touch-capture removal test, which fails intermittently on main, now reads the shelf right after the tap and names the elements the tap reached, so its next failure says whether the tap missed or the image came back. - The feature-gallery scroll pass allows a third of its steps to write the contents' `aria-current`, as gestures already do, since the count depends on where sections fall under the platform's fonts. The branch also merges the four open `grind/f-main-tests-*` pull requests, whose fixes cover five more of the run's tests: #3871, #3882, #3887 and #3906. This pull request lands them. Each fix was reproduced failing and then passing by node id, on this Mac or, for a Linux- or runner-only failure, against a run's log, except where its commit says otherwise. Dispatched full runs on this branch ([40156291557](https://github.com/max-sixty/leaf/actions/runs/40156291557), [40186545420](https://github.com/max-sixty/leaf/actions/runs/40186545420), [40196342887](https://github.com/max-sixty/leaf/actions/runs/40196342887)) check both platforms; the second took the macOS job from 86 failures to 38, most of the rest fixed since. A few macOS-only failures pass on every local attempt (two reading-place tests, a scroll repaint, Back from a thread, opening a line under the last, the Android composer's Return, margin-entry order, a card paging on, a turn arriving out of view) and have no fix here; once this lands, the macOS nightly reports them to tend. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Nov 11, 2026
…Firefox 159 (#5830) All three failures in #5826 come from changes in Playwright 1.65's browsers, not from Leaf code. In each case the test relied on the older engine's behavior. Each test now asserts its intended behavior in a way both engines agree on. All four cases fail on `main` with Playwright 1.65 and pass on this branch. The diff test and the tablet wheel test also pass under Playwright 1.64.1's Chromium 156. - **`test_diffs.py::test_tab_onto_a_seat_under_the_pinned_file_name_brings_it_out`.** The setup left the reply field entirely under the pinned file name. Focusing the field opens it, it grows from 24px to 37px, and the page scrolls 25px. The test predates the let-go rule (`keyboard/controller.js`; the user chose it on 2026-11-04): Tab lets go of a field the user can't see and moves on from the line they read below the seat. On Chromium 156, that Tab wrapped back to the first tab stop in the diff's shadow tree, the seat's Resolve button. That is why `inSeat` held. Chromium 158 moves on to the next tab stop in the document instead (the floating panel's leaf button), which is what sequential navigation should do. A plain page shows the same difference. The test now places the open field with its foot in view, so Tab moves from the field onto the dictate control beside it. It checks that the control starts under the pinned name and that the browser's focus scroll brings it out. That is what #3217 added the test to protect. - **`test_card_reply.py`, the two `[firefox_browser]` cases.** Firefox 159 supports view timelines (`CSS.supports('animation-timeline: view()')` is false on Firefox 157), so it now runs the `lf-msg-annotation-exit` animation on a transcript's head annotations. Firefox reports that scroll-driven animation's `endTime` as a finite number (about 30769), so `CARD_AT_REST` saw a motion that never ended. `CARD_AT_REST` and `panel_settled` (which had the same check) now count only animations on `document.timeline`. The `annotation-chrome.css` comment that said Firefox lacks view timelines is updated. - **`test_a_thread_card_reply_stays_in_the_visible_viewport[tablet]`.** At page scale 1.6, Chromium 156 panned the visual viewport 75px for a 120px wheel; Chromium 158 pans it 120px. At 120px the card moves, and `makeRoom` (`comment-placement.js`) scrolls the document 10px to fit it. That 10px is the `scrollY` change. The browser itself still scrolls nothing the document hears. The test now wheels 75px, the pan the test was written against. One related spot I left alone: `carried` in `user-place.js` counts any running animation whose `endTime !== Infinity` and that moves a box. A scroll-driven animation passes that check in both engines, since Chromium's percentage value is not `Infinity` either. It only matters when focus sits inside a head annotation, and a focused annotation is excluded from the animation. So I have not changed runtime code here. Closes #5826 — automated triage Co-authored-by: leaf-agent <[email protected]>
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.
A jump to a diff line inside a framed tab set landed under the diff's sticky file header. The cause is wider than tab sets: the sticky-header slot
--lf-toprestarts at every box that scrolls. That's right for where a sticky box inside it sticks, but wrong for what covers that box where it lands, because a box the user scrolls only sideways lands nothing down. The runtime's JS readings already walk past the restart (geometry.js,slotHolder), but the CSS landing margins read the restarted value. So the diff hard-coded its own header's height for its rows, which missed every header above it, and nothing inside the diff's code read the header at all.Cases run on main, all failing in Chromium; the first two also checked in Firefox:
The change:
reach.jsmarks a box scrolled only sidewaysdata-lf-scrolls="across".state.cssrestarts the slot for what such a box holds rather than for the box itself. It hands what the box holds the headers over the box as negative coverage, so the slot less what is covered still counts those headers inside it.surfaces.cssgives every box itsscroll-margin-topfrom that difference, which replaces the diff's two hard-coded margins.presaysoverflow: auto hidden, so it counts as a sideways box.A runtime landing under a framed set's strip now keeps the 12px of landing room below the headers that a page tab's rows already had. Before, it stood flush at the diff header's foot.
The other half of the report, a comment pin passing under a framed set's strip, didn't reproduce on main in either Chromium or Firefox: the pin is clipped at the strip's foot, and this change leaves that reading alone.
Code blocks and tables in reading content still declare only
overflow-x: auto, which computes toautodown. They therefore keep restarting the landing band, and Tab onto a link in a wide table under a framed strip still leaves it hidden. Moving them toauto hiddenwould clip an author'smax-heighttable orpreinstead of scrolling it, so that is left for a separate decision.Tests:
test_sticky_headers_stack_so_a_diff_in_a_tab_pins_under_the_stripnow runs for page and framed sets, andtest_tab_onto_a_seat_under_the_pinned_file_name_brings_it_outis new.leaf-dev bugbackshows the framed case and the seat case failing with the fix reverted; the page case passes either way and serves as the control.leaf-dev stillsreported 18 of 18 related states unchanged.