Skip to content

Keep an embedded lf-parts in its final box from first paint - #3270

Merged
max-sixty merged 2 commits into
mainfrom
agent-a168446028c285d7b
Oct 20, 2026
Merged

max-sixty merged 2 commits into
mainfrom
agent-a168446028c285d7b

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

test_bundled_widgets_meet_the_widget_quality_checks[default] fails on main with keeps-first-box findings for lf-parts and lf-part: an embedded page of parts drew every part stacked under its label until the module upgraded it, then collapsed to a row of names over the open part (workspace pane: 1150x105 first, 1150x67 presented). The failure is deterministic and dates from #3198, which added lf-parts. The test is in tests/journeys/, which only the daily run reaches, and the last daily run predates #3198, so no CI run has hit it yet.

What changes

  • Theme (styles/tabs.css, generated theme.css). Before upgrade, every placement shows only the part the module will open, unlabelled and unpadded, with one empty strip row over it, so an embedded lf-parts paints its final box. The page's own main keeps its layout from layouts.css and drops that row except on a phone, as before.
  • lf-tabs.js. Parts are the page's navigation only in a main that is no Layout's box, read from --lf-layout-box as layouts.css and the prepaint read it. Before, parts in any body > main counted as root, so in a Layout main (which page check refuses, and the report's column wrapper uses) the module drew a vertical list with summaries that the theme laid out as a row. Valid pages are unaffected.

Checks

  • The failing test passes for every package parametrization, along with the parts tests in browser/widgets/test_tabs.py, browser/controls/test_rings.py and browser/test_render_pages.py.
  • leaf-dev probe with leaf.js held: embedded parts in a column section and in a workspace pane, at desktop and at phone width with touch, paint the same box before and after upgrade. code-comparison's root page of parts paints the same first box as on main, at desktop and phone width.

Left open

The reserved row is --lf-tabstrip-h, which resolves on :root. A page that overrides --aim-floor on an ancestor of the parts would get a taller strip than the reserve. The lf-tabs reserve has the same limit, and no shipped CSS overrides --aim-floor below :root.

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

max-sixty and others added 2 commits October 19, 2026 23:37
A page of parts placed anywhere but the page's own `main`, such as inside a
pane, drew every part stacked under its label until the module upgraded it,
then collapsed to a row of names over the open part. The widget quality report
caught it as a `keeps-first-box` finding for `lf-parts` and `lf-part` in both
of its wrappers (workspace pane: 1150x105 first, 1150x67 presented).

Before upgrade, the theme now shows every placement only the part the module
will open, unlabelled and unpadded, with one empty strip row over it. The
page's own `main` keeps its layout from layouts.css and drops that row except
on a phone, as before. Probed at desktop and phone widths: the embedded case
matches its presented box exactly, and code-comparison's root page paints the
same first box as on main.

lf-tabs.js now treats parts as the page's navigation only in a `main` that is
no Layout's box, reading `--lf-layout-box` as layouts.css and the prepaint do.
It used to treat parts in any `body > main` as root, so in a Layout `main`
(which `page check` refuses, and the report's column wrapper uses) it drew a
vertical list with summaries that the theme laid out as a row.

The defect dates from #3198, which added lf-parts. The test lives in the
journeys tier, which runs only in the daily run, and the last daily run
predates #3198.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 56ff5bf into main Oct 20, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-a168446028c285d7b branch October 20, 2026 06:53
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