Skip to content

Hold widgets to growing with their content, in worked examples and across the corpus - #2296

Merged
max-sixty merged 27 commits into
mainfrom
corpus-held-scrollers
Oct 11, 2026
Merged

max-sixty merged 27 commits into
mainfrom
corpus-held-scrollers

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A widget in ordinary flow grows with its content, and a box that needs its own scroll says so with --lf-holds-height: 1. That rule was prose only. This PR makes it a check and applies it in two places: each package's worked examples, and every corpus page, where the widgets hold data.

This branch starts from annotation-rail-no-inner-scroll at f503c6c, so it carries that branch's commits as well as its own:

  • The annotation rail grows with its rows. It no longer fixes its own height at min(70vh, 40rem). Its empty structure moves into x-prepaint, and lf-trace's moment list grows with its moments.
  • grows-with-content in package check --render (widget_quality.py, heldScrollers in render-checks/widgets.js). It names a widget box that scrolls vertically now, or that asks to scroll and overflows once a tall block is added to it. A box declaring --lf-holds-height: 1 is exempt, and so are text fields. test_widget_quality.py holds the bundled packages to it. One finding is listed in known_widget_findings.py as a defect to fix: lf-file-editor's problem panel.
  • The corpus sweep (this branch's own commit). The worked examples carry no data, so a box that holds its height only once rows arrive went unseen there. The nightly test_a_still_page_comes_back_from_every_journey_as_it_was now reads heldScrollers on its first page once the page's journeys hand it back. It reads every bundled widget tag plus the page's own package's, in the page and in each Leaf document the page frames. A finding fails unless known_widget_findings.py lists it for the widget's package.

The first corpus run found every box a full-height workspace scrolls. Each of those holds the window's height by design, so each now declares --lf-holds-height: 1 in the rule that makes it scroll: the workspace Layout's body region and its pane bodies (layouts.css), a side list's list and open item (lf-tabs), the annotation workspace page's rail, and the feature gallery's conversation reader's index, queues and reader. packages.md and module-authoring.md now say that a widget scrolling a part within a workspace's height declares it on that part.

Removing the Layout's declarations fails the sweep on rust-sort and alert-review.

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

max-sixty and others added 27 commits October 9, 2026 16:49
Use maintained dependencies for established capabilities, including prototypes,
while retaining native platform and standard-library reuse. Keep browser builds
in Leaf's development and release pipeline so consumers receive ready assets.
…rollers

The annotation rail fixed its own height at min(70vh, 40rem) and scrolled
inside it wherever a page placed it, against the rule that a widget in
ordinary flow grows with its content. It now takes its height from its rows
and scrolls only where the page bounds it, as the annotation workspace's
region does. Its empty structure moves into x-prepaint, so the rail first
paints at the box it presents; the workspace example and the feature
gallery's practice window drop the heights they set on it.

That rule was prose only, so a widget could record a scroller as a design
choice and pass review. The widget quality report gains `grows-with-content`:
it adds a tall block to each vertical scroller in a package's widgets and
names any box that did not grow, which finds a theme's fixed height even in
an empty widget. A box whose task needs its own scroll declares
`--lf-holds-height: 1` (registered, not inherited); a bounded block's theme
already does, and lf-trace's point metadata and its open saved tree declare
it. A box that scrolls only sideways is not read. The check fails on the old
rail CSS and passes on the fix.

lf-trace's moment list, a second held scroller capped at three rows with
contained overscroll, now grows with its moments.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A vendored component's scroller answers to the Leaf widget that placed it,
and a field the user writes in keeps its own box.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The check asked whether a box grew by the whole added block, so a box that
grew into it from a minimum height or beside a taller sibling read as held.
And a box asking only for sideways scrolling was skipped even while its
content ran past its height and scrolled vertically. A box is now named when
it scrolls vertically, or when it asks to and overflows once the block is
added.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	skills/leaf/assets/theme.css
#	skills/leaf/packages/default/registry.json
#	skills/leaf/packages/default/theme.css
#	skills/leaf/packages/playwright/theme.css
lf-file-editor arrived from main with two held scrollers the new
grows-with-content check names. Its CodeMirror scroller keeps the height
the host states while typing grows the file, so it declares
--lf-holds-height: 1. Its problem panel caps itself with a percentage that
resolves against its own auto row, cutting a two-line problem to 78px and
scrolling it; capping it from the editor height instead shifts the editor
during a conflicted save, so the finding is listed in
known_widget_findings.py as a defect to fix.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`package check --render` reads `grows-with-content` on each package's
worked examples, which carry no data, so a box that holds its height only
once rows arrive went unseen. The nightly corpus journey test
(`test_a_still_page_comes_back_from_every_journey_as_it_was`) now reads
`heldScrollers` last on its first page, in the page and every Leaf
document it frames, over every bundled widget tag and the page's own
package's. A finding fails unless `known_widget_findings.py` lists it for
the widget's package; `PACKAGES` moves there so both tests share it.

The sweep found every box a full-height workspace scrolls, which holds
the window's height by design. Each now declares `--lf-holds-height: 1`
where its owner makes it scroll: the workspace Layout's body region and
pane bodies (layouts.css), a side list's list and open item (lf-tabs), the
annotation workspace page's rail, and the feature gallery's conversation
reader's index, queues, and reader. The package references say a widget
that scrolls a part within a workspace's height declares it too.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit f9afbcd into main Oct 11, 2026
7 of 10 checks passed
@max-sixty
max-sixty deleted the corpus-held-scrollers branch October 11, 2026 02:27
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