Uh oh!
There was an error while loading. Please reload this page.
fix(examples): author the key each renderer actually reads — children for scroll-area, label for badge - #6832
Merged
Conversation
…n` for scroll-area, `label` for badge The seven `components-complex-scroll-area` demos authored their body under `content`, which `scroll-area.tsx` never reads (it reads `renderChildren(schema.children)`), so all seven boxes drew empty. The two counts in `sidebar-with-badges` authored `content` too, which `badge.tsx` never reads (it reads `schema.label || renderChildren(schema.body)`), so a demo named `sidebar-with-badges` drew a sidebar with no badges. The two members share a defect shape and NOT a repair key: `scroll-area` takes `children`, `badge` takes `label`. A blind `content` -> `children` sweep repairs the first and silently leaves both badges empty. Measured, and pinned by a counter-probe. `text` nodes authoring `content` are excluded by name: `text.tsx` reads `schema.content || schema.value`, so those render correctly — including this fixture's own sibling `text` nodes. Adds a per-renderer corpus sweep in the shape #6788 established for `card`, each renderer judged against its own read set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CRJge11jso9TpXRWFt1Z49
This was referenced Aug 29, 2026
This was referenced Aug 30, 2026
os-sam
marked this pull request as ready for review
August 30, 2026 03:35
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Fixes#6805
Fixes#6806
Folded deliberately: the two cards share a defect shape and not a repair key, and that
divergence is the point.
scroll-arearenderChildren(schema.children)children(7 nodes, the whole category)badgeschema.label || renderChildren(schema.body)label(2 nodes)⛔ A blind
contenttochildrensweep repairs #6805 and silently leaves both badges empty,behind a green "no
contentleft in the catalog" assertion. The shared method is author thekey this renderer actually reads, never rename
contenttochildren.⛔ Neither renderer was taught to read
content. The renderer is the contract (AGENTS.md#0.1), and a second dialect for one slot on a published surface is the opposite of the
repair. For
badge, ⛔ notbodyeither even though the renderer reads it: #6771 isretiring
bodyas achildrendialect, and 31 badge nodes already authorlabel.What moved
examples/schema-catalog/src/schemas/components-complex-scroll-area/*.json— 7 files, rootcontentbecomeschildren. Nothing else in those files changed; the 167 nestedcontentkeys are all on
textnodes and were left alone (see the exclusion list).examples/schema-catalog/src/schemas/components-basic-sidebar/sidebar-with-badges.json—the two
badgenodes'contentbecomeslabel. Its five siblingtextnodes stillauthor
content, untouched.examples/schema-catalog/test/catalog-authored-key-6805-6806.test.tsx— new, 27 tests..changeset/6805-6806-catalog-authored-key.md— empty frontmatter (no release).Measured through the real
SchemaRenderer, the way the docs gallery renders:leakedcounts elements carrying the authored value as the host attributecontent— the#5574 class. All seven scroll-area boxes drew nothing but Radix's own injected scrollbar
stylesheet before this change.
⑤ Exclusion list — named, and encoded in the test
⭐
textnodes authoringcontentare NOT members and were not touched.text.tsxreads
schema.content || schema.value, so they render correctly today.sidebar-with-badges's own siblingtextnodes prove it inside the very fixture #6806repairs: one key, two renderers, opposite outcomes. A sweep that "fixed" them would break
working demos.
Corpus-wide,
contentis authored by: text 666 · untyped 30 · sheet 3 · markdown 3 ·card 1 · tooltip 1 · hover-card 1 (walked over all 431 fixtures). ⛔ So the sweep was not
generalised to "every renderer" — a blanket rule reds on working fixtures. Whether it
generalises at all is #6810's open question; this PR covers only the two renderers these two
cards name.
The exclusion list is executable, not just prose. Three assertions carry it:
textnode authoringcontentdraws its string (live control);contenton 600+textnodes (reads 0 if someone runs theblanket sweep);
contentkey sits on atextnode.Also excluded:
cardnodes. One catalog card still authorscontent(
components-overlay-context-menu/basic-context-menu); that is #6788's fence, in flight onits own branch, and sweeping it here would red this PR on someone else's work.
④ Per-member named assertions, and the ablation
Each member has its own named assertion naming its own key and asserting its own text
reaches the DOM. Ablated in three legs from the committed fix, reverting fixtures only —
git checkout HEAD -- ...restore proven by an emptygit diff HEAD, and each mutationproven on disk by counting the anchor text in both directions before running:
⭐ The isolation is the whole argument for the fold: in leg A every
badgeassertion staysgreen, and in leg B every
scroll-areaassertion stays green. Neither card's pincovers the other. (A + B = 16, C = 15: the one overlap is the exclusion assertion, which
both legs break.)
Named failures in leg A — 7 of 10 are one per scroll-area member:
Leg B, all 6 — two of them one per badge member:
⭐ The single most load-bearing assertion is the counter-probe named the WRONG
generalisation: a
badgerepaired tochildrenis measured to still draw an empty pill,so the mistake this fold exists to prevent is now mechanically red rather than a comment.
Why the existing control did not catch either — two different holes
catalog-gallery-render.test.tsxrenders both families today and passes. Its non-vacuitycontrol is
elements > WRAPPER_ELEMENTS || text:content, which ui:scroll-area never reads — every box on the page is empty #6805 — Radix's own injected scrollbar stylesheet is text, so a category-wide emptyrender clears the control on a string the component itself emitted.
content, which ui:badge never reads — the badges render empty #6806 — the sidebar draws 22 elements and real text(
"InboxDraftsSentTrashMain content area"), so the control structurally cannot see twomissing badges inside it.
scope and would red on working fixtures. The per-renderer sweep is the right instrument, and
it is what both cards proposed themselves.
Deviation from the dispatch, stated rather than papered over
The dispatch asked to extend #6788's corpus sweep in
examples/schema-catalog/test/card-demo-content-6788.test.tsx. That file is not onorigin/main— it exists only on the unmerged branchclaude/issue-6788-context-menu-demo-content. Creating it here would collide with that PR onthe same path. So the sweep was written as its own file in the same shape (the #6773/#6788
precedent), with a per-renderer table (
RENDERERS) that a later PR can foldcardinto once#6788 lands. The fold's stated purpose — one PR, one edit, no conflict between #6805 and
#6806 — is met: both renderers are swept in one file, once.
Out of fence, filed not fixed
⭐ #6829 — while censusing
badgenodes to size this sweep, seven more were foundauthoring
children, whichbadge.tsxdoes not read (unlikecard.tsx, which readschildren || body). Three demos incomponents-basic-spandraw literally nothing;core-schema-renderer/nested-schema-examplesilently drops two badges. That card is the sameclass under a different key, and it is left open here for two reasons: the repair is a real
decision (re-author the fixtures to
label, or widen the renderer's read set), and it is outof this PR's fence. It is a fifth rediscovery of the class #6810 is deciding about, and
the first one the #5574 leak signature cannot find at all — those seven leak nothing.
Those seven are carried in this PR's badge sweep as an exact ledger
(
BADGE_CHILDREN_LEDGER_6829), not a floor, so an eighth node turns the sweep red ratherthan joining a growing allowance.
That census also measured a third hole in the same non-vacuity control, distinct from the
two above: an empty badge's own host element is the third element, so
elements=3 > WRAPPER_ELEMENTS=2withtext=""reads asdrewSomething=true. Recorded on#6829.
Verification
All of the below ran on a clean tree at
ec115764f, this PR's final commit.pnpm exec vitest run examples/schema-catalog/from the repo root — 17 files, 1893tests, all passed. The 17 are the whole folder (
vitest listenumerates them), and theyinclude
catalog-gallery-render.test.tsxandlayout-dom-leak-5574.test.tsx, whoseNODE_CENSUSpins the corpus node counts.tsc --noEmitplustsc -p tsconfig.test.jsonfor the package — clean.--listFilesconfirms 17 of 17 test files are in the type-check program, including the new one, so
"typecheck clean" actually covers it.
check-control-bytes—OK (scanned 5649 tracked text file(s)).check-type-check-coverage—41/41 packages compile their tests.check-changeset-presence—No source of a released package changed in this range, so no changeset is owed; a changeset with empty frontmatter is added anyway, declaring "norelease" explicitly (objectui#3387's first-class form).
check-changeset-no-majorgreen.regenerate:check—examples/schema-catalog/src/index.ts is up to date (431 entries).1 of the 10 changed files (the other 9 are
.json/.mdand eslint itself reports themas ignored — that is eslint's own population, not an assumption), and that one file is
0 errors, 0 warnings via
--format json. No type-aware linting is configured(
eslint.config.jsdeclares noparserOptions.projectorprojectService), so this diffcannot move any rule's verdict on an untouched file.
⛔ The
skip-changesetlabel is not applied: in this repo that label object exists but noworkflow reads it, and a real changeset is present.
Generated by Claude Code
Generated by Claude Code