Uh oh!
There was an error while loading. Please reload this page.
docs(context-menu): author the trigger card's text under the key ui:card reads - #6807
Merged
Merged
Conversation
…ard reads
`components-overlay-context-menu/basic-context-menu.json` authored its trigger
as `{ "type": "card", "content": "Right-click here" }`.
`packages/components/src/renderers/layout/card.tsx` reads `title`,
`description`, `header`, `children || body` and `footer`, and `content` is not
among the `ui:card` registration's declared `inputs` either — both re-verified
on d06059f. So the tile drew an empty dashed box and the instruction reached
the DOM only as the leaked host attribute `content="Right-click here"` (the
objectui#5574 class, for which `ui:card` is already ledgered in
`widget-dom-leak-sweep.test.tsx`).
`children`, not `body`: the renderer accepts both, but `BaseSchema` marks
`body` legacy and objectui#6771 is retiring it as a `children` dialect, and
objectui#6773 authored `children` in the four sibling `aspect-ratio` card
demos. The renderer was NOT taught to read `content` — that would add a second
dialect for one slot to a published surface (AGENTS.md #0.1).
Adds `examples/schema-catalog/test/card-demo-content-6788.test.tsx`. Its key
assertions run over EVERY `card` node in the catalog (93 nodes, 53 entries, 19
categories on d06059f), not over this one entry, because this defect was
found by hand while correcting its four siblings. Two assertions, because they
fail for different reasons: keys must be DECLARED by the shipped `CardSchema`
(read off its zod shape, so it follows the platform) and must be keys
`card.tsx` READS (literals — `variant` is declared and read by nothing). The
render half is category-scoped and asserts the acceptance criterion directly:
the tile's text is non-empty through the real `SchemaRenderer`. Every
assertion is paired with a counter-probe on the exact pre-fix shape.
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 29, 2026
os-sales
marked this pull request as ready for review
August 29, 2026 22:15
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#6788
What was wrong
examples/schema-catalog/src/schemas/components-overlay-context-menu/basic-context-menu.jsonauthored its trigger as
{ "type": "card", "content": "Right-click here", "className": "p-8 text-center border-dashed" }.Both halves of the card's claim re-verified on this branch's base
d06059f24before choosing the fix:packages/components/src/renderers/layout/card.tsxreadstitle,description,header,children || body,footer(plusclickable/hoverable). It never readscontent.ui:cardregistration declaresinputstitle,description,className. Nocontent.So the tile drew an empty dashed box and the instruction reached the DOM only as the leaked host
attribute
content="Right-click here"-- the #5574 class, for whichui:cardis already ledgeredin
packages/app-shell/src/__tests__/widget-dom-leak-sweep.test.tsx.The fix:
children, one linecard.tsxaccepts two spellings for that slot, and they are not equal choices.BaseSchemamarksbody"Legacy, use children", #6771 is retiringbodyas achildrendialect, and #6773 authoredchildrenin the four siblingaspect-ratiocard demos (dfb889f8d). So the corpus converges onone spelling instead of acquiring a second.
The renderer was not taught to read
content. That would widen a published surface to a seconddialect for one slot -- the shape #6771 is removing elsewhere. The renderer is the contract
(AGENTS.md #0.1).
The pin is the wider half
examples/schema-catalog/test/card-demo-content-6788.test.tsx. This defect was found by handwhile correcting its four siblings, so a pin scoped to this entry would leave the next one to the
next pair of eyes. The key assertions therefore run over every
cardnode in the catalog --93 nodes, 53 entries, 19 categories, at any depth -- not over this entry.
Two key assertions, because they fail for different reasons (the #6157 class-3 shape, where a key is
refused by neither zod nor tsc):
CardSchema's own zod shape, not a hand-copied list, so itfollows the platform.
.successcould not be the probe:BaseSchemais.passthrough()andcarries
[key: string]: any, socontentparses green and type-checks.card.tsxreads, copied as literals on purpose. Strictly stronger than (1):variantis declared onCardSchemaand read by nothing, so a demo authoring it would pass (1)and still draw nothing. There is a counter-probe for exactly that.
Plus the acceptance criterion itself, category-scoped: the tile's text is non-empty when rendered
through the real
SchemaRenderer, it contains the author's own string, and no element carries it asa
contentattribute. Not widened to all 53 card-bearing entries: some sit inside nodes that want adatasource, and
catalog-gallery-render.test.tsxalready owns the corpus-wide render sweep with itsdocumented exclusions.
Every assertion is paired with a counter-probe rendering or judging the exact pre-fix shape.
Verification
All of the below on the final commit
7b02e14de, each under the shared verify lock:The new test file is genuinely inside the type-check program, not merely beside it:
tsc -p tsconfig.test.json --listFilesreports it once.Reverse verification. With the fix committed, the pre-fix
contentspelling was restored ondisk (mutation proved present: injected spelling count 1, removed spelling count 0, blob
1a466c50a->78ba83bd7) and the pin was re-run: 3 failed, 6 passed -- both key assertionsnaming
components-overlay-context-menu/basic-context-menu.trigger/content, and the renderassertion reading
expected '' not to be ''. The counter-probes stayed green, which is the designeddirection: they render their own shapes. The restore leg was then proved byte-identical
(
git diff HEADempty, blob back to1a466c50a), and the union above was run after it.The population question
Asked, and measured by walking all 431 catalog fixtures:
cardnodes authoringcontentinexamples/schema-catalog/= 1, this one. The other four the filing counted are theaspect-ratiodemos already corrected by #6773 (dfb889f8d). After this change the count is 0,which is what the corpus assertion now holds.
Two same-class defects in other node families were measured while sweeping and are filed rather
than fixed here -- out of this card's fence:
content, which ui:scroll-area never reads — every box on the page is empty #6805 -- all sevencomponents-complex-scroll-areademos author their body undercontent;scroll-area.tsxreadschildren. Rendered: 5 elements each, the only text being Radix's owninjected scrollbar stylesheet. A whole published page of empty boxes.
content, which ui:badge never reads — the badges render empty #6806 --sidebar-with-badgesauthors both counts undercontent;badge.tsxreadslabel || body. Rendered: the labels appear,12and3do not.The
valuekeys on this fixture's menu items are not touched here: they are undeclared onMenuItemand read by no renderer, but that population (21 items across three fixture families) isalready owned by open issue #6521.
Release declaration
.changeset/6788-context-menu-demo-content.md, empty frontmatter: no published package sourcechanged, so this declares no release -- the same shape #6773 used.
Generated by Claude Code
Generated by Claude Code