Repository navigation
Description
A part's label and summary, and a tab's, are attributes, so they hold only plain text. The tab strip copies them into the tab as text runs (.lf-tab-name and .lf-tab-summary in lf-tabs.js). A page of parts that lists files can't colour a diffstat in each row, or set each file name in code type:
README.md
+120 −45 lines
with +120 in the added colour and −45 in the removed colour, as git diff --stat and forge file lists show them. The .lf-tabdiff count beside a row's name looks like the place for it, but it counts the version diff's marked passages and isn't authorable.
Markup can't go into the attribute itself. An attribute value is a string, and parsing it as HTML would hide that markup from leaf page check, comment anchoring and the version diff, which all read the page's elements.
Being a name doesn't need plain text either. Leaf already names a section by its heading and a disclosure by its <summary>. addressableName in the browser and gesture_words.element_name on the server flatten that markup to words wherever a name must be text: the accessible name, the On me list, a thread's anchor, the activity feed. Fourteen elements, lf-part and lf-tab among them, instead declare a label attribute as their name with x-name.
Expected. A part or tab takes its name and summary as markup, the way a section and a disclosure do. One shape reuses the leading-title rule: a leading <header> whose <strong> or heading names the part and whose next element is its summary, beside the child carrying its Layout.
<lf-part id="part-readme">
<header>
<strong><code>README.md</code></strong>
<p><span class="added">+120</span> <span class="removed">−45</span> lines</p>
</header>
<article class="layout-column">…</article>
</lf-part>The strip draws the header's phrasing in the tab. The tab is a control, so the header holds phrasing only, with no links or buttons, and the tab's accessible name and description take its words. The other x-name elements could follow the same rule, leaving attributes for values such as ids, choices and references.
Seen on leaf 227ccc2, installed 2026-11-05T18:11:37-08:00.
This was written by Claude Code on behalf of max-sixty
Activity
leaf-agent commentedon Nov 6, 2026
This is a feature request with a settled direction. I haven't opened a PR, because two choices below decide how the strip relates to the authored header, and Leaf has no rule yet for one of them.
The name half already works on both runtimes.
gesture_words.leading_title_nodeand the browser'sleadingTitlealready look inside a leading<header>for its<strong>or heading (gesture_words.py, addressable-names.js). Oncelf-partandlf-tabstop declaring"x-name": "label",element_nameandaddressableNamename the part in your exampleREADME.mdwith no new code, andtests/name_cases.jsoncan hold that case. Removinglabelfromrequiredandpropertiesmakespage checkreject the old attribute, so an agent's next attempt sees the change.The summary half needs a new shared rule. No reader takes "the element after the title" as a description today. The tab's
aria-descriptionis built frompanel.getAttribute("summary")(lf-tabs.js). A summary rule belongs next toleadingTitle, as one reading the strip, the accessible description and any server reader share, so the tab strip doesn't keep its own copy.Choices that are still open:
generated({ says: "echo" }), whichelement-markers.jsalready supports for "a copy of words the page says elsewhere". Comments and the version diff then anchor on the authored header in the panel, and the copy in the tab adds nothing to them. If it lives only in the tab, the strip shows authored nodes, and anchoring and the diff have to reach into the tab strip. The first fits existing mechanisms. The second avoids showing the name twice on an open part.lf-partstill hold "exactly one child"? Itsx-instructionssay so today. The header becomes a second child, so the content model andsoleSubstantiveElement's reading of the Layout child would have to skip a leading<header>.page checkis the place to refuse it.The other twelve
x-namedeclarations (timeline, playground, playwright, diff and the rest of default) could move to the same rule afterwards. Doing that in the same change would turnx-nameinto a declaration nothing uses, and it could then be removed fromschema.pyandbrowser/registry.json.If you pick an answer to (1), the rest follows from the code: the registry change, the strip rendering the header's phrasing, the shared summary reading, the eight files under
examples/,docs/,skills/andpackages/that write<lf-part label=…>/<lf-tab label=…>, and the tests that read.lf-tab-name/.lf-tab-summary.Show a tab's or part's face from its leading template, and let a revi…