Repository navigation
Description
An lf-options group sent in a thread message's --markup draws as plain inline text when the thread is anchored on a line of an lf-diff. The same group in a thread on a paragraph draws as option cards.
What happens
In the thread under the diff line, the two options run together on one line with no cards: "choose one recommended Keep steelchoose oneGo back to plastic Lighter, and it carries less." The "Add another option…" field below them draws normally.
Measured in the browser on the page below:
| thread on a diff line | thread on a paragraph | |
|---|---|---|
| the group's root node | lf-diff's shadow root |
the document |
lf-options computed display |
inline |
grid |
lf-option computed display |
inline |
flow-root |
lf-option padding-top |
0px |
16px |
lf-option height |
16px | 74px |
part attribute on lf-options |
lf-a1 |
none |
leaf page check <page> --render then fails the page with undeclared-attr ({"tag": "lf-options", "attr": "part"}), though the page source and the message markup carry no part.
Expected
The group draws as option cards wherever its thread is anchored, and the render check passes.
Repro
-
leaf page init --package diff <page>, with thisindex.htmlbody:<main class="layout-column"> <h1 id="title">A choice in a thread on a diff line</h1> <p id="intro">One small patch, with a thread on its second line.</p> <lf-diff id="mount-diff"><pre> diff --git a/feeders/mount.py b/feeders/mount.py --- a/feeders/mount.py +++ b/feeders/mount.py @@ -1,2 +1,2 @@ def bracket(): - return "plastic" + return "steel" </pre></lf-diff> <p id="after">A paragraph after the patch.</p> </main>
-
Serve it. In the browser, use the diff's "Comment on feeders/mount.py · new line 2" control and send a comment.
-
Answer that comment with a choice:
leaf thread reply <answer.ref> --text "Which should the bracket be? I'd keep steel." --markup '<lf-options id="bracket-material" choose><lf-option id="bracket-material-steel"><small class="tag ok">recommended</small> <strong>Keep steel</strong></lf-option><lf-option id="bracket-material-plastic"><strong>Go back to plastic</strong> Lighter, and it carries less.</lf-option></lf-options>'
-
Reload the page: the options under the diff line are run-together text.
-
Control:
leaf thread create <page> --section after --text "The same choice, in a thread on a paragraph." --markup '<the same group with new ids>'draws as cards. -
leaf page check <page> --renderreportsundeclared-attrforlf-options'part.
Seen in Chromium 156, headless, on Linux, at a 1280x900 window.
Seen on leaf 624c282, installed 2026-11-13T20:09:37-08:00.
This was written by Claude Code on behalf of max-sixty
Activity
leaf-agent commentedon Nov 14, 2026
I reproduced both symptoms and opened #5945 to fix them.
defaults.cssreached only the document. A diff seats a line thread in its shadow tree, so widgets in that thread's messages lost their look. With fix: style message widgets in a thread seated in a widget's shadow tree #5945, each shadow tree also takes those rules, scoped to the thread transcript and in the same cascade position they hold in the document.undeclared-attronpart: the runtime itself sets that attribute so the document can anchor a box inside a shadow tree. The render check now treatspartas a platform attribute, likeclass.The new browser test fails on
mainand passes on the branch. In the diff thread the options now measure 16px padding-top and 74px tall, matching your paragraph-thread values. The fix costs about 17 KB gzipped inshadow.css; the PR body has the measurements and a cheaper lazy-sheet alternative. CI and landing for #5945 are with tend-land.