Repository navigation
Keep every tab strip to one row, so a phone opens a queue's item under it - #1903
Merged
Merged
Conversation
…r it At 390px a side-list queue stacked its list as rows that wrapped, so a 20-item queue's list ran 629px and its first item started 770px down, below the fold. The theme already said the narrow list was "a row over" the item; only the page's own strip was held to one row, and every other strip wrapped. Every tab strip is now one row whose names scroll sideways when they outrun it, with the edge presses and the one-row height the page strip already had. On that 20-item queue the list is one 70px row and the item starts 71px below the queue's top. A walk or a press brings the opened tab into the row. A side list's column at desktop width is unchanged and still runs down. The same wrap was why a framed tab set with many names moved its panel at startup: the first paint keeps one row for the strip, and the names wrapped onto five. At 390px a 20-tab framed set now keeps its panel where it first painted (it moved 184px before). A queue whose rows carry a summary reserves that summary's line too (`--lf-tab-summary-h`). The first paint also gave a tab set at its frame's edge a margin the upgraded set trims, so a set first in `main` jumped 24px up on upgrade; the reserved margins now sit under `:where`, as the upgraded set's do. What changed for the user: - A framed tab set with more names than fit scrolls them sideways under edge presses rather than wrapping them onto more rows. - The edge presses show wherever a strip holds more names that way, keyed on the layer's `data-lf-more-*` marks rather than on the page's flow. Tests: `test_a_side_list_is_a_queue_beside_the_item_it_opens` checks the phone row is one row that runs past and that End brings the last tab into it (each half fails against the old theme or the old `#showTab`). `test_a_widget_first_paints_the_box_it_presents` gains a framed set and a queue at 390px. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… presses Holding every strip to one row exposed three rules the page strip had never needed, since it never changes from a column and has no inline padding: - The open tab came into the row only when a tab opened. A strip that narrows under it (a smaller window, a side list's column turning into a row) left the open tab past the edge: open the last of 20 queue items at 1200px, narrow to 390px, and the row showed the first two. The module now watches the strip's size and brings the open tab back into the row after each change, and a walk or press onto the tab already open does the same, so Home is a way back after a swipe. - A column that turns into a row becomes a scroller after the runtime's sweep read it, so it got no edge presses or marks. The strip hands itself back to the sweep (`reachScrollers`, now on the widget API) when its declared overflow changes. - An edge press stuck inside the strip's inline padding, leaving 8px of names unfaded beyond it and the opened tab partly under its fade. It now sticks at the strip's edge (`--lf-tabstrip-pad`). `test_a_tab_strip_keeps_its_open_tab_in_its_one_row` covers a framed set and a queue narrowing under an open last tab, then Home, Home again after a scroll, and walks back across the start press. Taking out the size watch, the re-sweep, the press inset, or the press on the open tab each fails it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The previous commit gave a side list's column that turns into a row its edge presses by re-running the reach sweep from lf-tabs. That repeats reach.js's rule in one caller: reach.js reads which boxes declare a scroll only when it sweeps them, so any box that a narrower window or a container turns into a scroller misses its stop and its continuation marks, tab strip or not. The fix belongs in reach.js, which an open PR (#1902) is changing, so this commit drops the lf-tabs re-sweep and the `reachScrollers` export, and records the defect as a strict xfail (`test_a_box_that_starts_scrolling_at_a_narrower_window_takes_a_stop`). Until it is fixed, a queue narrowed from a desktop width to a phone's keeps its open tab in the row, but shows no edge presses until reload. Swiping and the keyboard walk still reach every tab. `test_a_tab_strip_keeps_its_open_tab_in_its_one_row` walks the framed strip, a scroller from load, for the press checks. The size watch now scrolls after the observer's delivery, since the scroll shows or hides a press. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ArrowRight walked to the next tab whatever the direction, so in a right-to-left strip, where the names run from the right, it moved against the row. Back and ahead now follow the set's direction, as the ARIA tabs pattern asks, and the keyboard reference names them so. `test_a_tab_strip_keeps_its_open_tab_in_its_one_row` walks an RTL strip. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 6, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 7, 2026
…e moves them (#1953) The runtime's scroller sweep (`reachScrollers`, `runtime/reach.js`) decides which boxes scroll from their computed overflow. Three things depend on that answer: a keyboard tab stop, the edge marks that say more is off to one side, and the restart of the sticky-header slot `--lf-top`. Three defects found while landing #1902 and #1903 came from that answer, and this PR fixes all three. ## A box that starts scrolling after it arrives The sweep read each box's overflow only when the box arrived or was first drawn. A box that a media query, a container query or a script turned into a scroller later got no stop, no edge marks and no restart until reload. A side-list queue narrowed from a desktop window to a phone's width showed no edge arrows on its row of tabs. The sweep now reads a box again when an input to its computed style moves: - the whole page when the window resizes; - a size container's subtree when the size its queries read changes; - a subtree a module announces with `layoutChanged`, which is how a class a page script adds reaches it. Residency (`content-layout.js`) now announces `main` when it seats a resident, because the Layout makes a seated sidebar scroll. A sidebar loaded in the margin had no stop. A re-read waits until what asked for it holds still, per box, then sweeps the outermost due boxes once. A window drag therefore reads the page once when it stops rather than every frame (a sweep is about 28ms on the corpus). No sweep runs inside a size delivery, where it raised ResizeObserver loops. The settled reading counts a box's wait. A container that keeps moving for longer than a second is the exception, whatever moves it. It is playing, as a meter that pulses while work runs is, so it stops holding the page and waits 100ms still on a timer. For this, `sizeObserver` (`rendering.js`) gained `counted: false`. A box that stops scrolling gives back its stop and its restart. A style that moves with none of these inputs, such as a rule on `:checked`, is read only at the next one, because the browser announces nothing when it applies. ## A page tab panel the page makes scroll The tab strip stacked its height onto its panel's `--lf-top` with a selector that outranked the runtime's restart, so a diff in a panel the page made scroll pinned 113px down. The restart (`[data-lf-scrolls]`) moves from `shadow.css`, where it sat in the packages' layer at no specificity, to `state.css`, above packages and Layouts. A box whose slot starts somewhere other than 0 says so in `--lf-top-start`, which the restart reads. The workspace pane body and the thread list do this. `module-authoring.md` now tells package authors about `--lf-top-start` and `overflow: clip`. Two eval cases score that paragraph: - `package-scroller-headers-stand-on-its-edge`: base 0/3, candidate 3/3 (Claude Code). - `package-card-keeps-its-headers-pinned`: 3/3 on both arms, so it guards. ## An `overflow: hidden` box `geometry.js` counted `hidden` as a scroller when reading what sticky headers cover, and the sweep did not. The sweep, `scroll-motion.js`'s `scrollContainer` and `scrollsContent` (#1944), and geometry's header reading now share one predicate, `scrollsBy` with its per-axis `scrollport`. The undecided option card and a hidden page tab panel used `hidden` only to clip. That made the card the scroller a diff's file header in an option stuck in, so the header scrolled off with the page. Both now say `overflow: clip`, and the header pins under the banner. ## Behavior that changed - A box that starts scrolling at a shorter window, a narrower container, or after a module's `layoutChanged` takes a stop, edge marks and the restart once the layout settles. One that stops gives all three back. - A column sidebar loaded seated in the margin takes its tab stop. - A diff in a page tab panel the page makes scroll pins at the panel's content edge. - A diff in an undecided option pins under the banner as the page scrolls past. - A page that moves a size container for longer than a second reads as settled about a second later than on main. ## Is there a more underlying fix? Yes, and this PR makes it. The first version answered the reported cases. Review then ran other routes to the same answer, and each one failed until fixed here: - a sidebar seated by residency, which announced nothing; - a box a script inserts and announces; - a `layoutChanged` sent from inside a ResizeObserver callback; - an endlessly animating container that starved every re-read and kept the page from settling; - a finite transition that read settled before its sweep; - an animating sibling that resized a container. Merging main exposed a third copy of the scroller predicate in #1944's `scrollsContent`, which now reads the shared one. Still open, each run and confirmed: - a style flipped by a pseudo-class, or a class a script adds without `layoutChanged`, waits for the next resize or announcement; - a padded scroller that doesn't state `--lf-top-start` pins its headers below its padding. ## Tests - `test_a_box_that_starts_scrolling_after_it_arrives_takes_a_stop` replaces #1903's strict xfail. It covers each route above, a table drawn when its disclosure opens, a sidebar loaded seated in the margin, and a size container animating from load that a script announces, after which the page still settles. - `test_any_box_that_scrolls_starts_the_sticky_header_slot_again` gains an `overflow: hidden` box. - `test_a_diff_pins_to_its_page_tab_panel_or_past_an_option_card` is new. - Each fails with its part of the change taken out. That holds for all 15 parts tried, from the three re-read routes to the card's `clip`. - A render selection across the scroller, slot, tab, pane, option, margin and aim tests (926 tests): the only failures also fail on main. `npm run test:runtime` passes. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[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.
At 390px a side-list queue (
lf-tabs list="side") wrapped its list into rows above the open item. On a 20-item queue the list ran 629px and the first item started 770px down, below the fold. The theme already described the narrow list as "a row over" the item, but only the page's own strip was held to one row; every other strip wrapped.What changes
skills/leaf/packages/default/theme.css). A strip's names scroll sideways when they outrun it, under the edge presses the page strip already had. On the 20-item queue the list is one 70px row and the item starts 71px below the queue's top. A side list's column at desktop width still runs down.data-lf-more-before,data-lf-more-after), not only on the page strip. They stick at the strip's edge rather than inside its inline padding (--lf-tabstrip-pad), and their fade uses the strip's own background.lf-tabs.js). A walk, Home/End, or a press brings it in, including onto the tab already open, so Home is a way back after a swipe. So does any change to the strip's size: a narrower window, a panel opening beside the page, or a side list's column turning into a row.--lf-tab-summary-h), and the reserved strip includes it where any row has a summary.:where, as the upgraded set's do, so a set at its frame's edge loses its margin at first paint too.Behavior that changed for the user
mainno longer jumps 24px up when it upgrades.Is there a more underlying fix?
Yes, in two rounds.
The first version of this branch fixed only the side list's narrow row. The queue was one case of a wider defect. The first paint keeps one row for every strip (
--lf-tabstrip-h), every strip except the page's wrapped, and #1484 listed "names that wrap the strip onto a second row" as not reserved. A framed set with 20 tabs at 390px wrapped onto five rows and moved its panel 184px at startup. The fix makes one row a property of every strip and deletes the page strip's private copies of the scrolling and press rules, along with the "names that wrap" exception. The new first-paint casetab-names-outrunning-a-phonefailed on the first version and passes now. Running it also exposed the 24px first-paint margin above.Review then ran the other routes to a strip that runs past its row, and three rules held only for the page strip, which never changes from a column and has no inline padding. The open tab came into view only when a tab opened. The presses sat 8px inside a padded strip. A row made from a column had no presses at all. The first two are fixed here, and each failed when run: taking out the size watch, the press inset, or the press on the open tab fails
test_a_tab_strip_keeps_its_open_tab_in_its_one_row.The third is general rather than a tab-strip case.
reach.jsreads which boxes declare a scroll only when it sweeps them, so any box that a narrower window or a container turns into a scroller gets no stop or continuation marks. A plaindivwith@media (width < 600px) { overflow-x: auto }, loaded wide and narrowed, shows it. Re-running the sweep from lf-tabs would repeat reach's rule in one caller, and #1902 is changingreach.js'sclassify. So this PR records the defect as a strict xfail (test_a_box_that_starts_scrolling_at_a_narrower_window_takes_a_stop) and leaves the fix toreach.js. Until then, a queue narrowed from a desktop width shows no edge presses until reload. Swiping and the keyboard walk still reach every tab.Evidence
test_a_side_list_is_a_queue_beside_the_item_it_openschecks that the phone list is one row that runs past. It fails against the old theme.test_a_tab_strip_keeps_its_open_tab_in_its_one_rowis new (above).test_a_widget_first_paints_the_box_it_presentsgains a framed set and a queue at 390px. Both failed before this change.uv run pytestover the render, gate, widget-quality, pages, threads, anchors and chrome-contract files, selecting tab, strip, queue, side, first-paint, widget, reach and scroll cases, passes.npm run test:runtimepasses.leaf-dev stills(new statealert-queue-touch): the alert queue at 390px goes from a 14-row block before the first alert to one scrolling row over it. The other changed states are on pages without a tab set and differ by caret or timestamp pixels between runs.Not in this PR
alert-reviewswitches the queue from the open alert back to the first one, on main as well. Version continuity's resize restore reveals a reading recorded before the switch, because lf-tabs brackets a switch withpreserveReadingRegionsonly in page flow. Keep a let-go in the pane the user reads, and name Threads and its cards #1897 is changing that continuity code, so this went to the coordinator.reach.jsre-reading which boxes scroll after a width change (above).