Repository navigation
Accept a reading part's sidebar outline and a budget beside its total in two playground eval rubrics - #6111
Merged
Conversation
… in two playground eval rubrics Once #6100 made them probes with a page again, parts-take-their-own-layouts and playground-controls-stand-by-their-item failed most runs, though every failing run had read the rule it was graded on. Their rubrics asked for more than the instructions do: - parts-take-their-own-layouts required each reading part's Layout to be a `layout-column`. `page-layout.md` gives a column part its own contents outline, and `page-authoring.md`'s "Contents navigation" composes an outline as a `layout-sidebar` beside the column, which both Claude Code runs wrote. The rubric now accepts that sidebar. - playground-controls-stand-by-their-item required the page budget in the playground's rail, a recipe ("a setting every item shares stays in the rail") that #4991 cut from the playground's `author.md`, leaving each control within sight of what it changes. Three of four runs put the budget once in the preview beside the month's page count. The rubric now accepts either place, and still fails a budget repeated beside each alert or every control in the rail. Regraded under the new rubrics, the eight saved runs (two a harness per case) passed 8 of 8. Only the grading changed, so no subject ran again.
leaf-agent
approved these changes
Nov 16, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 16, 2026
Closes #5595 Every element Leaf names now takes its name from markup it opens with, as a section is named by its heading: a tab, a part, a board column, a sample, a pane, a text document, a worktree, a playground control, choice and preset, a timeline run, lane and event, and a trace with its bookmarks. The registry's `x-name` key is gone, with the `label` attributes it pointed at, the `$attributes` entry that kept `label` as a name on every widget (`NAME_ATTRIBUTE`), and the `summary` attribute of tabs and parts. ```html <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 list of parts shows `README.md` in code type over the coloured diffstat. ## The rule and where it lives An element's name is its leading title: a leading `<summary>`, heading or `<strong>`, looked for inside a leading `<header>` or `<hgroup>` too. The rule already named sections, disclosures and titled members, and now names widgets. A widget that draws, moves or hides its name takes it only where it opens the widget: the title, or the `<header>` or `<hgroup>` holding it, is the widget's first element. A quoted sample whose heading follows its first paragraph keeps the heading where it stands, and a tab whose heading follows a paragraph is unnamed, which `page check` refuses. Where a name is only read, as a section's heading after an eyebrow or an option's title after its chips, it may follow those elements, as on main: requiring it to open them too would have unnamed 41 options, 66 sections and 39 list items in the corpus. Each runtime states the rule once: - **Browser**: `leading-title.js`. Packages get one reader, `openingTitle` (`portable-api.js`, and through it `widget-api.js`), which returns the name an element opens with as `{title, holder}`, or null: the title naming it, and the holder, its first element, which is that title or the `<header>` or `<hgroup>` around it. The board, tabs, text document, worktree, playground, timeline and version diff read names through it, and a widget draws, moves or hides the holder. `leadingTitle`, which reads past an eyebrow or an option's chips, stays internal to the runtime. `addressable-names.js` reads the name's words as the author wrote them (`addressableName`) and copies a node's markup without ids or generated words for a surface that shows a name away from its element (`echoCopy`). - **Python**: `gesture_words.leading_title_node`, `leading_title` and `leading_title_holder`. `tests/name_cases.json` holds both runtimes to the same names and the same holders. - **CSS**: one selector, `:first-child:is(summary, h1, h2, h3, h4, h5, h6, strong, header, hgroup)`, the holder `openingTitle` returns. CSS can't see text, so it also matches a title that loose text precedes, as `strong:first-child` did on main. ## How each widget shows its name - **Tab strip along a row** shows only each panel's name, so the panel keeps its `<strong>` or `<header>` as the eyebrow over its first heading, in the reading theme's `.eyebrow` face, and the block under the eyebrow takes the panel's top edge as the first block would. The tab's copy is an echo (`says: "echo"`), so a comment on the name anchors in the panel. A panel named by a heading keeps the heading as it is. - **Side list and a page's parts** show the name with the summary under it, so on screen the panel hides its name and the list's copy is the page speaking (`says: true`): page search finds the name in the list and a comment on it anchors there. On paper the list is gone and each item prints under its name. A side list reserves a summary's line before upgrade from a panel's header, so a phone's row strip keeps its height when the module draws. - **Column, sample, pane, text document, worktree**: the authored name stands where the widget draws one. A text document's name heads its frame and names its figure. A worktree's `<strong>` stands in its row's room from first paint, before the module slots it into the row. A pane's region is named by its header's title unless its author gave it an `aria-label`. - **Playground control, choice and preset**: the name stays the element's first child, hidden once the playground draws, and the view draws a copy as the radio's label or on the preset's button. The playground refuses a name holding a link, a control or a widget, which the copy would nest inside that control. Its list of such tags and page check's are held together by `tests/nested_name_cases.json`, which both runtimes answer. - **Code block, chart, draft, diagram, diff**: a widget that draws its own content keeps the name it opens with over what it draws. The four light-DOM modules put the holder back first when they replace their children, and `shadowStage`, the runtime's helper for a shadow-DOM widget, keeps it in the light tree and slots it alone at the top of the stage, which covers the diff, the file tree and the file editor. - **Places that take only text** read `addressableName`: every tab's and pane's `aria-label`, a thread card's heading, the timeline's chart labels, the trace chooser and the board's announcements. Each panel is labelled by its tab. ## Checks - Under `x-content: members` and `data`, a widget may open with the element its name stands in, a title or a `<header>` holding one, before its members or its `<pre>`. A `<header>` with no title names nothing and stays a stray member. Which widgets take a name is what their modules keep: `page check --render` reports a name a module drew over (`dropped-name`), so a package's module that drops one hears it, with no per-widget key. - A revision that renames a tab, a part or a pane replaces the widget, as one that changed its `label` did: a members-patched widget's shell holds its own opening name and each member's whole. - `page check` refuses a view whose name doesn't open it (`unnamed-view`), and a link, control or widget in a view's header, which its tab, a control, copies (`interactive-name`). Another widget's name is drawn in place or read as words, so a question's heading or an option's title may link a pull request. - `x-says` is a list of attribute names, each said after the element's words. Its `before` edge served only the column and sample labels this change retires. ## Evidence - **Corpus**: all 57 pages under `examples/`, `examples/developer/`, `docs/` and `tests/fixtures/pages/` build and pass `leaf page check`. - **Tests**: `pnpm run test:runtime` 992 passed; `pnpm run check:browser` clean; the touched model tests (959) pass; 191 browser and journey tests across the tab, document, workspace, playground, sample and version-diff files, the worktree rows, the pane names, the anchors selections, and the four tests CI failed on the first head pass. - **New tests**: a comment on a side list's name anchors on the list's copy and survives a revision (fails on `says: "echo"`); an author's `aria-label` names a pane (fails when the header always wins); a quoted sample's heading after its first paragraph stays a heading (fails on the lenient selector); a tab whose heading follows a paragraph is refused; a playground refuses a link in a preset's name; a code block, a draft and a diff keep and show the name they open with; a revision that renames a tab reaches its strip and one that renames a pane its region (both failed before); the render gate reports a widget that draws over its name; a removal that empties a nameless box stands in it, the version diff's `gapIn`, which kept no test once a tab keeps its name. - **A stale journey**: `test_render_shift_watch.py`, which this branch edits and so CI runs, expected a message head to say "just now"; since #6097 a head says its clock time, so the journey now advances days ("Yesterday 22:10", "13 Nov 22:10") and still holds the thread in place. - **Probes**: a printed queue (`alert-review`) shows each item's header under its group, where main printed the group and label together; a named text document's figure reads as `figure "Reviewed"`. - **Page search** on the root parts (`root-parts`): Workbench 4, Evidence 6, Plan 7, as on main. - **Stills** (`leaf-dev stills --authored` against main; Chromium and Firefox light, Chromium dark): the side list and the root parts are pixel-identical to main. Both text documents' caption bars match main in both schemes. A worktree's first paint differs only by its name standing in the row's room, which main leaves empty, with its body where main's is (Chromium only, since Firefox can't hold the runtime). The gallery's page of parts gains the `README.md` part, in code type over +120 −45. Each horizontal tab panel shows its name as the eyebrow over its first heading, in the face of a section's eyebrow under it: the root tabs, the gallery and a boxed set. A printed queue (`printed-queue`, new) prints each item's group, then its name and summary, where main printed the group and name on one line. A quoted sample whose heading follows its first paragraph keeps the heading where main does (`leaf-dev probe` pair). - **Evals** (Claude Code, paired base): every head sample (8) wrote each name as markup and passed `page check`; base wrote `label` attributes. Rubric results, head vs base: queue 1/1 vs 1/1; presets 2/3 vs 3/3; parts 0/4 vs 3/4, every head sample choosing a `layout-sidebar` with a contents outline, which the rubric then refused and accepts since #6111. ## Calls Max may reverse - **The eyebrow takes a `<strong>` or `<header>` name only**; a heading that names a panel stays a heading. - **`x-says` became a list** rather than a map whose only value is `after`. - **A text document's caption bar keeps the figure's ground**: code's under a source capture, the page's under a preview's tabs. Dropping the ground made a source capture's caption paper where main's is white. - **A widget draws only a name that opens it, and only where a widget draws its name**; reading a name stays as lenient as main's, past an eyebrow or an option's chips. - **Only a view's name is required** (`unnamed-view`); columns, controls, choices and events may go unnamed. - **`lf-event` and `lf-trace-bookmark` declare `x-content: members` with no members** to hold only a name. ## Adds - `openingTitle` in `portable-api.js`, returning `{title, holder}`; `addressableName` and `echoCopy` in `widget-api.js`, documented in `module-reading.md`. - `tests/nested_name_cases.json`, which the validator's `nested_in` and the playground's `nestedIn` both answer. - The findings `unnamed-view` and `interactive-name`; the content-model rule that admits a leading name; the playground's refusal of a name holding a control. - `slot="lf-worktree-name"` on a worktree's authored name, and `slot="lf-name"` on the name of a widget `shadowStage` stages; the `parts-list` and `printed-queue` stills states. - The render finding `dropped-name` (`droppedNames`, `render-checks/words.js`). ## Not verified - Page search finds a worktree's name and its branch separately, but no query spanning both, which it did when both were the row's generated words. - Option labels, board card titles and the quiet word's seat still read `:scope > strong`, a lookup that predates `x-name` and agrees with the rule wherever no text precedes the title. - `tests/journeys/margin/test_card_placement.py::test_the_shipped_long_thread_keeps_the_margin_and_its_height` fails here with a 320 px card where it asks for 379: #5991, on main, made a card slim at 320 px until a message stands tall and left this assertion as it was. It fails without this branch's thread-card change too.
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.
After #6100 made them probes with a page again,
parts-take-their-own-layoutsandplayground-controls-stand-by-their-itemfailed 5 of 8 runs, though every failing run had read the rule. The rubrics asked for more than the instructions do. The first required each reading part to be alayout-column, whilepage-layout.mdgives a column part its own contents outline andpage-authoring.mdcomposes one as alayout-sidebar, which both Claude Code runs wrote. The second required the page budget in the playground's rail, a recipe #4991 cut from the playground'sauthor.mdin favour of keeping each control within sight of what it changes; three of four runs put the budget once beside the month's page count in the preview. Both rubrics now accept those, and still fail the shapes the cases were written for. The eight saved runs regraded 8 of 8.To weigh: if a setting every item shares should stand in the rail, the fix is to restore that sentence to
packages/playground/instructions/author.mdand keep the old rubric.Requested by max-sixty. Checks: the regrade above,
dev/tests/test_evals.py -k 'catalog or model_option or delegates', pre-commit.