Skip to content

Revert naming widgets by their opening markup (#6088, #6167), restoring the label attribute - #6172

Merged
max-sixty merged 3 commits into
mainfrom
revert/6088
Nov 16, 2026
Merged

max-sixty merged 3 commits into
mainfrom
revert/6088

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Reverts #6088 and its follow-up #6167, as requested in #6088 (comment). Every widget is named by its label attribute again, through the registry's x-name. This brings back NAME_ATTRIBUTE, the summary attribute of tabs and parts, and the x-says map. leading-title.js, openingTitle, echoCopy, tests/nested_name_cases.json, and the unnamed-view, interactive-name and dropped-name findings are removed.

Both reverts applied cleanly to current main. One hunk of #6088 was not part of the naming change: tests/journeys/test_render_shift_watch.py updated its message-age expectations for #6097's clock-time heads. I kept that hunk and switched only the fixture's <strong>Jobs</strong> back to label="Jobs", so the journey doesn't go stale again.

This doesn't reopen #5595. Whether to try naming widgets from markup again is still open.

Verified locally: pnpm run test:runtime 993 passed; pnpm run check:browser clean; tests/model 3480 passed. The five failures there come from the CI sandbox refusing AF_UNIX sockets (test_codex_app_server.py, test_local_concurrency.py, test_codex_adapter.py) and don't involve naming.

@max-sixty
max-sixty merged commit 2388a9d into main Nov 16, 2026
5 checks passed
@max-sixty
max-sixty deleted the revert/6088 branch November 16, 2026 16:15
max-sixty added a commit that referenced this pull request Nov 16, 2026
…sion reach a template's markup (#6222)

A tab or part can now show markup in its list entry that text can't
hold, such as a file's name in code type over a coloured diffstat. The
part opens with a `<template>` holding that markup, and the list shows
it as written in place of the label and summary. `label` stays the name
that accessible names, On Me and the server's words read. Ref #5595,
which #6088 closed and #6172 reverted.

```html
<lf-part id="readme" label="README.md" summary="+120 −45 lines">
  <template><code>README.md</code><br><span class="added">+120</span> <span class="removed">−45</span> lines</template>
  <article class="layout-column">…</article>
</lf-part>
```

Max chose this on the x-keys-design page: keep the name structured and
let the agent write whatever the list shows, rather than deriving the
name from markup as #6088 did (about 1,060 lines more). Leaf derives
nothing from the template; a template is HTML's element for markup not
shown where it is written, so the open part needs nothing hidden or
restyled.

**What changes**

- `lf-tabs.js` (lists of tabs and parts): a member's leading template is
drawn, once copied, in its entry; the tab's accessible name still reads
`label`.
- `version.js`: a revision that changed only a template's markup never
reached the page, for any template. A template's markup is its content,
which `isEqualNode` leaves out, so the patch kept the old one.
`sameAuthoredMarkup` now compares template content, and a member list's
shell carries each member's face, so a rewritten face replaces the set
as a changed `label` does. The new test fails without either half.
- `page-layout.md`: one paragraph saying when to write a face, and to
keep links and controls out of it.

**Checked**: the new tab test (entry markup, accessible name, the open
part not showing the template, a revised face reaching the list); `page
check --render` on a page of parts with faces; Chromium and Firefox
stills; `pnpm run test:runtime` (995); `check:browser`; the
revision-patch and live-sample tests that revise pages holding
templates. The instruction paragraph, scored paired with base on
`parts-take-their-own-layouts` and `queue-is-a-side-list`, two runs
each: 4/4 on both arms, and no head page wrote a template where text
would do.

> _This was written by Claude Code on behalf of max-sixty_
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.

2 participants