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:

  1. Add semanticType to ContentConfig (chosen)
  2. Modify content.type to use ModuleType union (breaking change)
  3. 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


🔗 Related


Auto-generated by MCP Smart Consolidation