53 ORM Menu Icon Propagation
Plan Status: completed Last Reviewed: 2026-05-28 Source: User request to propagate ORM
ext:iconinto generatedaction-auth.xml, plus live repo inspection of codegen templates andnop-chaos-nexticon naming docs.
Purpose
Propagate entity-level icon metadata from ORM models into generated menu auth resources, and land semantic Lucide-style icon names for nop-auth menu entries.
Current Baseline
- ORM web auth generation currently hardcodes submenu icons to
ant-design:appstore-twotoneinnop-kernel/nop-codegen/.../_{moduleName}.action-auth.xml.xgen. - Generated
objMetaalready carries selected explicit attributes such asext:model="orm", but it does not forward entity-levelext:iconfrommodel/*.orm.xml. action-authgeneration already readsobjMeta['ext:model'], so once icon metadata reachesobjMeta, the auth template can consume it without new runtime wiring.nop-chaos-nextdocuments configuration icon names as kebab-case Lucide-oriented names, with runtime fallback support for FontAwesome aliases.
Goals
- Preserve ORM entity
ext:iconon generated object metadata. - Generate submenu
iconvalues fromobjMeta['ext:icon']with a stable default fallback. - Assign semantic kebab-case icon names to the
nop-authentities that appear in generated menus. - Verify the generation chain with focused build/test evidence and keep repo docs/logs in sync.
Non-Goals
- Retrofitting semantic icons across every module in the repository.
- Changing the frontend icon renderer contract beyond using already supported kebab-case names.
- Redesigning the whole auth/menu model or replacing existing manual overrides in non-generated files.
Scope
In Scope
- Codegen templates that generate xmeta and action-auth files from ORM entities.
nop-auth/model/nop-auth.orm.xmlentity metadata for generated menu resources.- Required owner-doc and daily-log updates for the changed generation convention.
Out Of Scope
- Non-ORM menu generation templates unless needed for parity in the touched path.
- Frontend rendering changes in
nop-chaos-next. - Bulk icon cleanup in existing handwritten
*.action-auth.xmloverrides.
Execution Plan
Phase 1 - Propagate Entity Icon Metadata
Status: completed
Targets: nop-kernel/nop-codegen/src/main/resources/_vfs/nop/templates/meta/.../_{entityModel.shortName}.xmeta.xgen, nop-kernel/nop-codegen/src/main/resources/_vfs/nop/codegen/xlib/meta-gen.xlib, nop-kernel/nop-codegen/src/main/resources/_vfs/nop/templates/orm-web/src/main/resources/_vfs/{moduleId}/auth/_{moduleName}.action-auth.xml.xgen
-
Item Types:
Fix | Proof -
Update xmeta generation so entity-level
ext:iconis emitted onto generated objMeta. -
Update ORM action-auth generation to consume
objMeta['ext:icon']with a default fallback. -
Keep the change minimal and limited to the existing generation chain.
Exit Criteria:
- Generated objMeta contract includes entity icon metadata for ORM entities.
- Generated action-auth submenu icon resolves from objMeta instead of a hardcoded single value.
- 端到端验证:从
nop-auth.orm.xml的ext:icon到生成的_nop-auth.action-auth.xml的路径已验证。 - 接线验证:确认
action-auth模板运行时读取的是生成后 objMeta 中的ext:icon。 - 无静默跳过:未配置
ext:icon时走显式默认图标,而不是生成空值。 -
docs-for-ai/owner doc updated for the new generation convention. -
ai-dev/logs/对应日期条目已更新.
Phase 2 - Land Semantic Icons For nop-auth
Status: completed
Targets: nop-auth/model/nop-auth.orm.xml, generated nop-auth auth outputs, related docs/logs
-
Item Types:
Fix | Decision | Proof -
Assign semantic kebab-case icon names to the
nop-authentities that generate menu entries. -
Regenerate affected outputs through the normal build path and inspect the generated auth resource file.
-
Record the icon naming decision against
nop-chaos-nextconventions.
Exit Criteria:
-
nop-auth.orm.xmlstores semantic entity icon names instead of UI-library-specific class strings. - Generated
nop-authaction-auth output shows the selected entity icons. - 端到端验证:从 ORM model regeneration to generated auth resource output is verified.
- 接线验证:confirmed generated submenu resources now differ by entity icon where configured.
- 无静默跳过:entities without explicit icons still generate the default fallback icon.
-
docs-for-ai/owner doc updated if the model/codegen convention changed. -
ai-dev/logs/对应日期条目已更新.
Deferred But Adjudicated
- No cross-module icon retrofit in this plan. Other modules can adopt
ext:iconlater without blocking this closure.
Closure Gates
- Phase 1 checklist fully complete.
- Phase 2 checklist fully complete.
- Focused verification command(s) for the touched generation path pass.
-
node ai-dev/tools/check-doc-links.mjs --strictpasses after doc/log updates. - Independent closure audit completed by a separate subagent and recorded in the final report.