Repository navigation
Revert naming widgets by their opening markup (#6088, #6167), restoring the label attribute - #6172
Merged
Merged
Conversation
…ough the revert
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_
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.
Reverts #6088 and its follow-up #6167, as requested in #6088 (comment). Every widget is named by its
labelattribute again, through the registry'sx-name. This brings backNAME_ATTRIBUTE, thesummaryattribute of tabs and parts, and thex-saysmap.leading-title.js,openingTitle,echoCopy,tests/nested_name_cases.json, and theunnamed-view,interactive-nameanddropped-namefindings 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.pyupdated its message-age expectations for #6097's clock-time heads. I kept that hunk and switched only the fixture's<strong>Jobs</strong>back tolabel="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:runtime993 passed;pnpm run check:browserclean;tests/model3480 passed. The five failures there come from the CI sandbox refusingAF_UNIXsockets (test_codex_app_server.py,test_local_concurrency.py,test_codex_adapter.py) and don't involve naming.