Skip to content

Name a width or height Leaf ignores where it stands - #5820

Merged
max-sixty merged 1 commit into
mainfrom
diagnose-thin-playground
Nov 14, 2026
Merged

max-sixty merged 1 commit into
mainfrom
diagnose-thin-playground

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

A playground exploration of comment marks reached Max in the reading column instead of the window's width. Its lf-playground carried data-width="available" inside an lf-ask, as the playground guide says since #5566, but the session serving it ran a checkout from before #5566, where only a width on the ask widened the playground: in Firefox at 1728px it stood 720px wide there and 1680px on main. That session then moved the width onto the ask, which main's delivery drops without a word because lf-ask declares x-flow. Neither page check nor its render check reported it.

Check. page check now advises inert-allocation for an authored data-width, data-bound or data-height that means nothing where it stands. registry.kernel.authored_inert decides this for delivery and the check alike, and delivery paints what it painted before. Across the 337 page directories on this machine it fires on 36 asks and nowhere else.

Guidance. /developing-leaf, "Author or revise a page", now says to serve a page built in another checkout with that checkout's launcher and judge it against its instructions. In a replay of the serving decision, 0 of 6 runs did so on the current text and 6 of 6 on the new.

Max asked why the page came out thin; leaf-agent approved. Test: test_check_advises_an_allocation_leaf_ignores_where_it_stands, which also passes on current main merged in.

This was written by Claude Code on behalf of max-sixty

A playground exploration reached Max in the reading column. Its
`lf-playground` carried `data-width="available"` inside an `lf-ask`, as
main's playground guide says since #5566, but the session serving it ran
a checkout from before #5566, where only a width on the ask widened the
playground. In Firefox at 1728px the playground stood 720px wide there
and 1680px on main. That session then moved the width onto the ask,
which main's delivery drops without a word, since `lf-ask` declares
`x-flow`, and neither `page check` nor its render check reported it. On
this machine 13 page directories carry such a width, on 36 asks.

**Check.** `page check` now advises `inert-allocation` for each authored
`data-width`, `data-bound` or `data-height` that means nothing where it
stands: a width on a flow such as `lf-ask`, a width or bound on `main`,
`body` or `html`, and a height on an element whose tag doesn't draw into
a stated height. `registry.kernel.authored_inert` now decides this for
delivery and the check alike, and delivery paints what it painted
before. On the 337 page directories on this machine it fires only on
the widths on asks; a sweep that left out pages' own registries also
named four `lf-pr-brief` heights, whose page registry declares
`x-height`, so `page check` doesn't name them.

**Guidance.** `/developing-leaf`, "Author or revise a page", says a page
built in another checkout, such as a subagent's worktree, is served with
that checkout's launcher and judged against its instructions. In a
replay of the serving decision with each arm's version of the section,
0 of 6 runs on the current text served the subagent's page from its own
Leaf, and 6 of 6 did on the new text; every current-text run copied the
page into the older checkout and served it there.

Test: `test_check_advises_an_allocation_leaf_ignores_where_it_stands`
asserts the three ignored allocations, and that a width on a table
inside a question and a height on a chart go unreported.
@max-sixty
max-sixty merged commit 06948a8 into main Nov 14, 2026
5 checks passed
@max-sixty
max-sixty deleted the diagnose-thin-playground branch November 14, 2026 21:01
max-sixty added a commit that referenced this pull request Nov 14, 2026
The skill is 30,189 characters on main since #5820, over the 30,000 cap
`test_every_skill_file_reads_in_one_command` holds, so the sentence naming
`leaf-dev usage` under "Regular maintenance" can't land until the file has
room. The command's own header and `leaf-dev --help` describe it meanwhile.
max-sixty added a commit that referenced this pull request Nov 14, 2026
`page check --render` now refuses a page with `under-panel` when 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,
a `main` or `body` that 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 `!important` padding would
override spacing the author set on body. So the gate reads the outcome.
`paintedRuns` gives 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.
`coveredWords` reports a run whose end box overlaps a box the panel
covers (`coverBoxes`, now exported through `check-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 reads
`coverBoxes()`, 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, `main` scrolls, `body` scrolls) and the covered-words
and `paintedWords` neighbours pass, as do `pnpm run check:browser` and
pre-commit. CI's `test` job fails one test, inherited from main:
`test_every_skill_file_reads_in_one_command` finds
`.claude/skills/developing-leaf/SKILL.md` at 30,189 bytes since #5820;
this branch leaves that file alone, and #5967 shrinks it.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 15, 2026
The widget API stopped exporting Lit's names (9aaab75) and `notice`
(d59e50c), and sixteen browser and journey tests still read them off
`window.__lfWidgetApi()`. A pull request's test job runs a browser test only
when its own source changed, so one of them ran there and failed, and the rest
would have failed after landing. They now take Lit's names from /vendor/lit.js
and `notice` from check-api.js, which gains that export. No assertion changes.

Main's new allocation test (#5820) asks with `required`, as pages now do.
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.

2 participants