Architecture: How to ensure Universe Architect and Modular Universe Builde...
Documentation for Sessions
🏗️ Architecture: How to ensure Universe Architect and Modular Universe Builde...
📋 Decision Context
Question:
How to ensure Universe Architect and Modular Universe Builder display consistent type badges?
Task: Session 32.2: Ensure Universe Architect and Modular Universe Builder work together seamlessly with consistent type display
🎯 Decision Made
Chosen:
Added semanticType field to ContentConfig to preserve module's actual type (galaxy, world, page-module, feature, etc.) separately from generic content.type (module, widget, page, custom)
Options Considered:
- Add semanticType to ContentConfig (chosen)
- Modify content.type to use ModuleType union (breaking change)
- Create separate display component (over-engineering)
💭 Reasoning
The Builder was showing "(MODULE)" for all modules because it displayed ContentConfig.type which is a generic content category. By adding semanticType to preserve the actual ModuleType, both tools now show proper cosmic terms (Galaxy, World, Page Module, Feature, etc.). Updated canvas-module-converter, canvas-section, and tree-node components to use semanticType with fallback to content.type for backward compatibility.
📁 Files Involved
libs/libs-space/universe-canvas/src/lib/models/canvas.types.tslibs/libs-space/universe-canvas/src/lib/services/canvas-module-converter.service.tslibs/libs-space/universe-canvas/src/lib/components/canvas-section/canvas-section.component.tslibs/libs-space/universe-canvas/src/lib/components/canvas-section/canvas-section.component.htmllibs/libs-space/universe-canvas/src/lib/components/tree-node/tree-node.component.ts
🔗 Related
- Decision ID:
dev_1767979922843_elw3vam - Session: 31
- Workspace: editor2
Auto-generated by MCP Smart Consolidation