Skip to content

Add an lf-scroll box to the feature gallery so the idiom corpus test passes - #5924

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5914
Nov 13, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5914

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

#5865 gave .lf-scroll its own entry in browser/registry.json, which puts it in the idiom catalog that test_every_idiom_in_the_catalog_stands_in_a_corpus_source holds to the corpus. No authored source wore the class, so the test has failed on every ci push run on main since that merge (no example holds .lf-scroll). This adds an lf-scroll scenario to the feature gallery's Page & layout view: a request timeline wider than the page, in a box whose own CSS sets overflow-x: auto. That is the idiom's intended use (page-authoring.md), and the gallery is where examples/AGENTS.md puts core-feature scenarios. The gate stays as it was.

The new gallery section, focused and scrolled by the arrow keys

Verification

  • The gate test fails on 7acf9d5ce and passes with this change.
  • In Chromium, with the Page & layout tab open, Leaf lends the box a tab stop (tabindex=0) and marks data-lf-more-after. After focus and two ArrowRight presses it has scrolled (scrollLeft 0 → 80) and carries both data-lf-more-before and data-lf-more-after.
  • tests/model/test_product_page.py and test_interact_product.py pass, and so does leaf page check on the gallery preview (its one advisory, measurement-lag on bg-latency, was already there). --render couldn't launch Chrome in this sandbox, so it didn't run.

One thing to look at in #5865's registry entry: its x-example puts <svg width="1600"> in an lf-scroll box. Leaf's own img, svg:where(:not([data-lf-icon])) { max-width: 100% } fits that SVG to the box, so the box as written never overflows. This scenario adds max-width: none to its SVG for that reason. The example or the description may want the same note. I left the registry alone here, since that wording belongs to #5865's author.

Closes #5914 — automated triage

…rpus floor holds

#5865 gave `.lf-scroll` its own entry in the kernel registry, which put it in the
idiom catalog that test_every_idiom_in_the_catalog_stands_in_a_corpus_source
requires some authored corpus source to hold. No example wore the class, so the
test failed on every push to main since. The feature gallery's "Page & layout"
view now has a timeline wider than the page in a box its own CSS scrolls, with
`class="lf-scroll"`, so the corpus shows Leaf's keyboard stop and edge fades on a
page-owned scroller. Its SVG sets `max-width: none`, since Leaf fits an SVG to its
container and the box would otherwise never overflow.

Closes #5914
@leaf-agent
leaf-agent merged commit 73f8664 into main Nov 13, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5914 branch November 13, 2026 08:39
leaf-agent added a commit that referenced this pull request Nov 13, 2026
The `.lf-scroll` registry example added in #5865 never scrolled: its box
had no `overflow-x: auto`, and [`base.css`'s media fit
rule](https://github.com/max-sixty/leaf/blob/5606fc2c96d1d33e9988e5e4d49bd0720ce7e8e7/browser/base.css#L772-L777)
shrank its 1600px SVG to the box's width. An agent copying the example
got the class with no tab stop and no continuation cues, and nothing
reported it. The example now sets `overflow-x: auto` on the box and
`max-width: none` on the SVG (an inline declaration, which outranks the
fit rule's selector), and the registry description and
`page-authoring.md`'s `lf-scroll` paragraph say that media inside the
box has to opt out of the fit rule.

This takes the first of the two settlements #5929 lists and leaves
`base.css` alone. The other — exempting `.lf-scroll`'s media from the
fit rule — would make the idiom work without the opt-out, and its
failure (a box missing `overflow-x` spilling sideways) is one the render
gate already refuses, whereas the current failure passes silently. It is
still open as a product choice; if a maintainer takes it, the sentence
added here comes out with it.

**Verification:** the vocabulary, layer-contract and layer interaction
tests (259) pass, and prettier/typos pass on both files. Chrome can't
start in this sandbox (it can't open a unix socket), so I couldn't
render the example; the claim that it overflows rests on the cascade
above. #5924 confirmed in Chromium that a gallery box with the same
`max-width: none` opt-out scrolls and gets Leaf's tab stop and cues.

Closes #5929 — automated triage

Co-authored-by: leaf-agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_every_idiom_in_the_catalog_stands_in_a_corpus_source: no example holds .lf-scroll since #5865

1 participant