Skip to content

ui:dropdown-menu renders an item's authored icon as raw TEXT — the catalog fixture named with-icons.json draws the words "edit", "copy", "trash" beside its labels #5930

Description

@claude

Found while measuring the icon-name population for #5633, which needed to know which resolver each authored icon string reaches. Filed unassigned; not repaired there, because it is a different defect class (no resolution at all, rather than a resolution that misses).

What happens

packages/components/src/renderers/overlay/dropdown-menu.tsx renders a menu item's icon as raw text, in both the item and the submenu-trigger arm:

// line 40 — DropdownMenuSubTrigger{item.icon&&<spanclassName="mr-2">{item.icon}</span>}// line 52 — DropdownMenuItem{item.icon&&<spanclassName="mr-2">{item.icon}</span>}

item.icon is an authored string. Nothing resolves it. So the schema's own documented shape — the registration at line 99 describes items as { type?: "separator"|"label", label, icon, shortcut, disabled, children: [] } — produces the literal word beside the label.

Live specimen in the catalog: examples/schema-catalog/src/schemas/components-overlay-dropdown-menu/with-icons.json declares "icon": "edit", "copy" and "trash" on its items. The file is literally named with-icons.json, and it renders edit Edit, copy Copy, trash Delete.

Why nothing catches it

The decision this needs

Which surface the item icon should resolve through, if any:

That is a contract question, not an implementation detail, which is why this is filed rather than patched.


Generated by Claude Code

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:dispatched

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions