Repository navigation
fix: style message widgets in a thread seated in a widget's shadow tree - #5945
Merged
Merged
Conversation
A package's defaults.css reached only the document, so message markup in a thread a widget seats in its shadow tree, such as a diff's line thread, lost its widgets' look: an lf-options group drew as run-together inline text. Every declared shadow tree now also takes each package's defaults.css within `@scope (.lf-thread-transcript)`, in lf-shadow after that package's widget-shadow.css, the order it holds in the document, so a message reads the same wherever its thread is drawn and the widget's own elements take none of it. The render check's undeclared-attribute probe refused `part`, which the runtime itself gives a box in a widget's shadow tree to anchor it from the document (css-anchors.js), so `page check --render` failed such a page. `part` joins the platform attributes a module may write, as a look rather than a state. Closes #5944
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A package's
defaults.cssreached only the document. A diff seats its line threads in its own shadow tree, so message markup there lost every package widget's look. Anlf-optionsgroup drew as run-together inline text. Every declared shadow tree now also takes each package'sdefaults.cssinside@scope (.lf-thread-transcript), inlf-shadowright after that package'swidget-shadow.css. That is the same order and tier it holds against the shared sheets in the document. So a message reads the same wherever its thread is drawn, and the widget's own elements pick up none of it. The second symptom came from the render check. Its undeclared-attribute probe refusedpart, which the runtime itself sets on a box in a shadow tree so the document can anchor it (css-anchors.js).partnow joins the platform attributes a module may write, besideclassandstyle.test_a_widget_in_a_diff_line_thread_wears_its_package_s_lookseats the issue's choice in a diff line thread. It checks that the group draws asgridand its options asflow-root, and that the render probe finds no undeclared attribute. It fails onmain(display: inline,partrefused) and passes here. In that thread the options now measure 16px padding-top and 74px tall, the paragraph-thread values the issue records.tests/model/test_interact_layer.pyand the neighbouring diff-thread browser tests pass.Cost and what this leaves
shadow.cssgrows from 129 KB to 232 KB (23 KB → 40 KB gzipped). The default package's widget rules make up most of the growth. A page fetches it once, and only when it has anx-shadowwidget (widget-loader.js).<style>. In headless Chromium, 200 shadow roots took 58 ms with the base sheet and 93 ms with this one. That is about 3 ms the first time and roughly 0.2 ms for each further root.body buttonorhtml[data-lf-interactive] …, still match nothing inside the scope, as before. The page's own unlayered CSS still doesn't reach a shadow-seated transcript. This PR doesn't change that.skills/leaf/references/packages.mdchanges with the code.Closes #5944 — automated triage