Skip to content

fix: count Leaf's apparatus in the render gate only beside elements the page wrote - #6309

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-6297
Nov 17, 2026
Merged

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

Conversation

@leaf-agent

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

Copy link
Copy Markdown
Collaborator

The render gate's apparatus among authored check reported Leaf's own controls on every playground page because, since #6231, lf-playground's content is the author's markup (the registry default), so moduleOwnsBox no longer treats its descendants as the module's. The bar of actions and instruction popover the playground builds inside it (a generated <form>, .lf-playground-instruction-region, <footer>, the popover head) are not the page's elements, yet the submit button, instruction title and wa-copy-button in them were read as standing among the author's markup. #6231 meant to make the fields native markup, not to change where Leaf's bar sits, so the gate was misreading a structure the change intended.

The check now reports a Leaf element only where an element the page's source wrote (servedElements()) stands beside it, which is the situation the finding describes: only those siblings' :first-child or h2 + p rules change. If no source pairing is available, the check behaves as before.

Verification, all --run-nightly by node id on Linux:

  • test_page_fixture_renders[playground], [alert-thresholds] and [data-explorer] fail on main with only the apparatus findings and pass with this change.
  • code-comparison, notification-playground and motion-playground no longer report apparatus, but still fail on their other findings (below).
  • As a negative check, temporarily appending a .lf-ui div into the playground's .lf-playground-stage beside the author's preview content still produces the apparatus among authored finding, so the module's own box doesn't hide Leaf elements placed among the page's elements.
  • pnpm run check:browser passes.

What this leaves of #6297, each with a separate cause:

  • code-comparison: the two lf-code candidates overlap at 720–760px, and the page scrolls sideways by 88px at 360–440px. These come from the example's rewritten candidate CSS.
  • notification-playground: at 760px the absolutely placed .setting > output covers its label's wrapped words.
  • motion-playground: writes at rest on lf-playground#panel-motion (data-lf-user-override, childList), plus a doubled requestFrame.
  • test_render_controls.py::test_each_sampled_focus_ring_is_shown_whole_in_its_surface on motion-playground.

Part of #6297 — automated triage

The render gate's apparatus check treated every box inside a markup
widget as the page's own. Since #6231 a playground's content is the
author's markup, so the bar of actions and instruction popover the
module builds inside it (a generated form, regions, footer and head)
read as the page's elements, and the submit button, instruction title
and copy button in them were reported on every playground page.

The check now reports a Leaf element only where an element the page's
source wrote stands beside it, since only those siblings' structural
rules change. A Leaf element placed beside the author's preview
content, inside the module's own stage box, is still reported.

Refs #6297
@leaf-agent
leaf-agent merged commit a921072 into main Nov 17, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6297 branch November 17, 2026 18:04
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.

1 participant