Skip to content

finding(examples): the basic-context-menu demo authors its trigger card under content, which ui:card never reads — the tile is an empty dashed box #6788

Description

@claude

Found while fixing #6773 (the five aspect-ratio demos authoring content). Out of that
card's fence — it names content/docs/** and the aspect-ratio fixtures only — so it is
filed rather than fixed.

Measured

examples/schema-catalog/src/schemas/components-overlay-context-menu/basic-context-menu.json
authors its trigger as

"trigger": {
"type": "card",
"content": "Right-click here",
"className": "p-8 text-center border-dashed"
}

packages/components/src/renderers/layout/card.tsx reads title, description, header,
children || body and footer. It never reads content, and content is not among the
ui:card registration's declared inputs (title, description, className).

Rendered through the real SchemaRenderer on c6732825d, the way the docs gallery renders
it — 3 elements, and the tile's whole text content is the empty string:

[div class="h-[120px] w-full ... border-dashed flex items-center justify-center" data-state="closed"]
[div class="rounded-lg border bg-card ... p-8 text-center border-dashed" content="Right-click here" data-obj-type="card"][/div]
[/div]

So the demo draws a dashed empty box, and the string that tells a reader what to do
("Right-click here") reaches the DOM only as the leaked host attribute
content="Right-click here" — the objectui#5574 class, and ui:card is already ledgered
for that in packages/app-shell/src/__tests__/widget-dom-leak-sweep.test.tsx.

The renderer's own fallback would have drawn the right thing: it renders
schema.trigger || { type: 'text', value: 'Right click here' }, and the text renderer
reads content || value. The authored trigger is what silences it.

Population

card nodes authoring content in the catalog: 5. Four are the aspect-ratio demos
corrected in #6773; this is the fifth and last. Verified with
grep -rn -A6 '"type": "card"' examples/schema-catalog/src/schemas/.

Fix shape

"children": "Right-click here"renderChildren renders a bare string directly, and
SchemaNode declares string, so nothing else has to move. Worth a render assertion
alongside it: catalog-gallery-render.test.tsx renders this entry today and passes, because
its non-vacuity control (elements > 2 || text) is satisfied by the trigger box the
context-menu draws around the empty card.

Why nothing caught it

Same four measured reasons as #6773: BaseSchema is .passthrough() and carries
[key: string]: any, so zod and tsc both accept content; check-doc-component-types.mjs
rules the question out by name ("NOT in scope, deliberately: whether the snippet's OTHER
keys are read by the renderer the type resolves to"); the manifest tier reports
unknown-prop, the same warning it gives a typo; and the gallery render pin's stronger
control (the entry's own authored strings on screen) is scoped to
NEWLY_REGISTERED_CATEGORIES, which this family is not in.

Related

#6773 (the card this was found under) - #5931 (same class, icon keys on button-group /
breadcrumb / command) - #6318 (in-repo schema files that fail safeValidateSchema; this
fixture parses clean, so it is a different population)

Generated by Claude Code


Generated by Claude Code

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpriority:p2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions