Improving Universe Editing and Visuals
Plan to enhance universe visualization, editing tools, and user experience across all platform building interfaces.
Improving Universe Editing and Visuals
Executive Summary
Current universe editing and visualization tools are disconnected and provide poor visibility into platform structure. Users see their entire universe as a single node, making it impossible to understand, navigate, or modify their platform effectively. This plan addresses the visual hierarchy, tool integration, and overall editing experience.
Current State Analysis
Visual Representation Issues
| Tool | Issue | Impact |
|---|---|---|
| Universe Architect | Shows universe as single node | Users can't see structure hierarchy |
| Canvas Builder | Flat stacked sections | No visual hierarchy, modules just stacked |
| Tree View | Generic badges | Shows "(MODULE)" instead of specific types |
| Route Viewer | Disconnected from canvas | Routes don't visually connect to modules |
Screenshot Evidence (Session 33.1)
Universe Architect View:
- Single "Fitness Center" node with
/fitness-centerroute - No child modules visible despite having entities
- No visual hierarchy (expected: Universe Core → Galaxies → Worlds → Pages)
- Single "Fitness Center" node with
Canvas Builder View:
- "Fitness Center" shown as single MODULE section
- No drill-down into module contents
- "Drop here to add new section" - unclear what can be dropped
Tool Disconnection
Current Flow (Broken):
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ AI Generator │───▶│ Canvas Builder │───▶│ Universe Arch. │
│ (Creates code) │ │ (Shows flat) │ │ (Shows 1 node) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└──────────────────────┴──────────────────────┘
No sync / Different views
Type Consistency (Session 32.2 - Completed)
The following fixes were made in Session 32.2:
- ✅ Added
semanticTypetoContentConfig - ✅ Updated
canvas-module-converterto set semantic types - ✅ Updated
canvas-sectionto display cosmic term badges - ✅ Updated
tree-nodecomponent to show proper types
However, modules still display as "(MODULE)" because:
- Existing modules were created before the fix
- New modules need semantic type set during generation
- Backend may not be storing/returning semantic types
Root Cause Analysis
1. Universe Structure Not Loaded
File: libs/libs-space/universe-architect/src/lib/components/architect-canvas/architect-canvas.component.ts
- Universe document loaded successfully (per console logs)
structureLength: 1- only root module in structure- Child modules (Member, Booking, etc.) not being loaded
Root Cause: Modules are generated as FILES but not persisted as UNIVERSE STRUCTURE
2. Module-to-Universe Structure Gap
When AI generates modules:
- Files written to
modules/other/fitness-center/ - BUT modules NOT added to universe's
modules[]array - Universe architect sees empty structure
3. Canvas Builder Shows CanvasSection, Not Modules
- Canvas converts
UniversalModule[]→CanvasSection[] - If no modules in universe, shows empty canvas
- No direct module editing capability
4. Missing API Endpoints
Console errors show:
GET /api/spaces/.../universes/universe_... 404 (Not Found)
GET /api/catalog/modules 404 (Not Found)
These missing endpoints prevent:
- Loading universe structure
- Browsing available modules
Implementation Plan
Phase 1: Fix Universe Structure Persistence (Priority: Critical)
Objective: Ensure generated modules are added to universe structure
Tasks:
After code generation, call universe module API to add modules
// In vibe-coding-orchestrator after file generation: await this.universeModuleService.bulkCreate(universeId, generatedModules);Create proper module hierarchy:
- Platform root (Universe Core)
- Galaxy per feature area (Member Management, Class Scheduling, etc.)
- World per entity domain
- Page-Module per CRUD view
Update
BackendModuleGeneratorServiceto persist structure
Files to Modify:
libs/libs-ai/gograb-ai/src/lib/services/vibe-coding-orchestrator.service.tsapis/backend-api/src/app/generated/backend-module-generator.service.tslibs/libs-foundational/core-angular/src/lib/services/universe-module.service.ts
Phase 2: Fix Missing API Endpoints (Priority: Critical)
Objective: Create missing endpoints for universe and catalog operations
Tasks:
Create
/api/catalog/modulesendpoint@Controller('catalog') export class CatalogController { @Get('modules') async listModules(@Query() filter: ModuleFilter) { // Return available module templates } }Fix universe ID format consistency
- Frontend uses
universe_1767...format - Ensure backend accepts this format
- Or standardize on MongoDB ObjectId
- Frontend uses
Add universe structure endpoints:
GET /api/universes/:id/structure- Full hierarchyPUT /api/universes/:id/structure- Update hierarchyPOST /api/universes/:id/modules- Add module to universe
Files to Create/Modify:
apis/backend-api/src/app/catalog/catalog.controller.ts(new)apis/backend-api/src/app/universes/universe-structure.controller.ts(new)apis/backend-api/src/app/spaces/spaces.controller.ts
Phase 3: Enhance Universe Architect Visualization (Priority: High)
Objective: Show proper hierarchical visualization of universe structure
Tasks:
Load ALL modules for universe, not just root
- Query modules with
universeIdfilter - Build parent-child relationships from
parentId
- Query modules with
Implement hierarchical layout:
Platform Root (center) ├── Galaxy: Member Management (orbit 1) │ ├── World: Members │ │ ├── Page: Member List │ │ ├── Page: Member Detail │ │ └── Page: Member Form └── Galaxy: Class Scheduling (orbit 2) └── World: Classes ├── Page: Class Calendar └── Page: Booking FormAdd visual connections:
- Orbital lines between parent-child
- Route path visualization
- Data flow arrows
Enable drill-down interaction:
- Click galaxy → zoom to show worlds
- Click world → zoom to show pages
- Double-click → edit module
Files to Modify:
libs/libs-space/universe-architect/src/lib/components/architect-canvas/architect-canvas.component.tslibs/libs-space/universe-architect/src/lib/services/architect-state.service.tslibs/libs-space/universe-architect/src/lib/services/architect-module-converter.service.ts
Phase 4: Improve Canvas Builder Integration (Priority: High)
Objective: Make canvas builder actually useful for universe editing
Tasks:
Show module hierarchy in tree view
- Expand/collapse galaxies, worlds, pages
- Show proper type badges (Galaxy, World, Page Module)
Add module editing capabilities:
- Click module → show properties panel
- Edit route, name, description
- Configure module settings
Enable drag-drop module organization:
- Reorder modules within parent
- Move modules between parents
- Visual feedback during drag
Sync canvas with architect:
- Changes in canvas reflect in architect
- Changes in architect reflect in canvas
- Real-time sync via signals
Files to Modify:
libs/libs-space/universe-canvas/src/lib/components/canvas-builder/canvas-builder.component.tslibs/libs-space/universe-canvas/src/lib/services/canvas-module-converter.service.tslibs/libs-space/universe-canvas/src/lib/components/tree-node/tree-node.component.ts
Phase 5: Unified Editing Experience (Priority: Medium)
Objective: Create seamless editing across all tools
Tasks:
Create unified module editor panel
- Works in both Canvas Builder and Universe Architect
- Edit all module properties
- Preview changes before saving
Implement undo/redo across tools
- Shared history stack
- Cross-tool undo (change in architect, undo in canvas)
Add real-time collaboration foundation
- Module lock indicators
- Conflict resolution
- User presence
Create unified save/deploy flow:
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ Edit │───▶│ Review │───▶│ Deploy │ │ (Canvas/ │ │ (Preview) │ │ (Publish) │ │ Architect) │ │ │ │ │ └─────────────┘ └─────────────┘ └─────────────┘
Files to Create/Modify:
libs/libs-space/shared/src/lib/components/unified-module-editor/(new)libs/libs-space/shared/src/lib/services/editing-history.service.ts(new)
Phase 6: Visual Polish (Priority: Low)
Objective: Make the tools visually appealing and intuitive
Tasks:
Improve node styling in architect
- Domain-specific icons (already started in Session 32)
- Color coding by module type
- Visual status indicators
Add minimap for large universes
- Overview of entire structure
- Quick navigation
Implement smooth animations
- Node transitions
- Zoom/pan effects
- Connection animations
Dark/light theme support
- Consistent with platform theme system
- User preference persistence
Success Criteria
| Metric | Current | Target |
|---|---|---|
| Visible hierarchy levels | 1 (root only) | 4+ (root → galaxy → world → page) |
| Tool synchronization | None | Real-time |
| Module editing capability | None | Full CRUD |
| API endpoint coverage | ~60% | 100% |
| User understanding score | Low | High (measurable via user testing) |
Visual Mockup (Expected State)
Universe Architect (After Fix)
┌──────────────────┐
│ 🌟 Fitness │
│ Center │
│ (Universe Core)│
└────────┬────────┘
│
┌────────────────────┼────────────────────┐
│ │ │
┌───────▼───────┐ ┌───────▼───────┐ ┌───────▼───────┐
│ 🌌 Member │ │ 🌌 Class │ │ 🌌 Trainer │
│ Management │ │ Scheduling │ │ Profiles │
│ (Galaxy) │ │ (Galaxy) │ │ (Galaxy) │
└───────┬───────┘ └───────┬───────┘ └───────────────┘
│ │
┌────┴────┐ ┌────┴────┐
│ │ │ │
┌──▼──┐ ┌──▼──┐ ┌──▼──┐ ┌──▼──┐
│List │ │Form │ │Cal- │ │Book │
│Page │ │Page │ │endar│ │Form │
└─────┘ └─────┘ └─────┘ └─────┘
Canvas Builder Tree (After Fix)
📁 Fitness Center (Universe)
├── 🌌 Member Management (Galaxy)
│ ├── 🌍 Members (World)
│ │ ├── 📄 Member List (Page Module)
│ │ ├── 📄 Member Detail (Page Module)
│ │ └── 📄 Member Form (Page Module)
├── 🌌 Class Scheduling (Galaxy)
│ └── 🌍 Classes (World)
│ ├── 📄 Class Calendar (Page Module)
│ └── 📄 Booking Form (Page Module)
└── 🌌 Trainer Profiles (Galaxy)
└── 🌍 Trainers (World)
└── 📄 Trainer List (Page Module)
Dependencies
- Session 32.2 type consistency (✅ Completed)
- Code generation improvements (Plan 1)
- Backend API availability
Risks
| Risk | Probability | Impact | Mitigation |
|---|---|---|---|
| Performance with large universes | Medium | Medium | Virtualization, lazy loading |
| State sync conflicts | High | Medium | Optimistic updates with conflict resolution |
| Breaking existing saved universes | Medium | High | Migration script, backward compat |
Related Documentation
References
- Universe Architect:
libs/libs-space/universe-architect/ - Canvas Builder:
libs/libs-space/universe-canvas/ - Module Services:
libs/libs-foundational/core-angular/src/lib/services/ - Session 32.2 changes: Type consistency across tools