WIDGETS ROUTE CONFUSION FIX
Ecosistema completo para organización y gestión de contenido con interfaces espaciales
🔧 Widgets Route Confusion - Fixed
Date: October 27, 2025
Issue: Widgets showing at wrong URL
Status: ✅ Fixed
Problem
Widgets were accessible at TWO locations:
- ❌
/editor/:universe/widgets(WRONG - universe-scoped) - ✅
/space/widgets(CORRECT - space-scoped)
This violated our modular architecture where widgets should be space-level only.
Root Cause
The editor routes (libs/editor-web-lib/src/lib/editor.routes.ts) incorrectly had a widgets route:
// ❌ WRONG - This was in editor.routes.ts
{
path: ':universeIdentifier/widgets',
loadComponent: () => import('./components/widgets/widgets-panel.component')
}
Solution
Removed the widgets route from editor routes entirely.
File Changed
libs/editor-web-lib/src/lib/editor.routes.ts
Before:
{
path: ':universeIdentifier/widgets', // ❌ Universe-scoped
loadComponent: () => WidgetsPanelComponent
}
After:
// Removed completely ✅
Correct Architecture
/space/widgets ← Space-scoped Widgets Manager ✅
↓
Manages widgets for ENTIRE space
↓
Reusable across ALL universes
/editor/:universe/workspace ← Editor (uses widgets from space) ✅
↓
Uses widgets via Widget Library
↓
Creates instances on pages
URL Structure
✅ Correct URLs
/space/widgets → Widgets Manager Dashboard
/space/widgets/create → Create New Widget
/space/widgets/edit/:widgetId → Edit Widget
/editor/:universe/workspace → Editor Workspace
/editor/:universe/pages → Page Management
❌ Removed URLs
/editor/:universe/widgets → REMOVED (was wrong scope)
Module System Compliance
Following @module-system-overview.md:
| Module | Base Route | Scope |
|---|---|---|
| Editor | /editor/:universe |
Universe-scoped ✅ |
| Widgets Manager | /space/widgets |
Space-scoped ✅ |
| Space Map | /space-map/:universe |
Universe-scoped ✅ |
| Singularity | /singularity/:universe |
Universe-scoped ✅ |
Testing
Verify Fix
Navigate to:
http://localhost:5200/editor/catuniverse-1/widgets- Expected: 404 or redirects to workspace ✅
Navigate to:
http://localhost:5200/space/widgets- Expected: Widgets Manager Dashboard ✅
Access Widgets
From anywhere in the app:
// Correct way to access widgets
router.navigate(['/space/widgets']);
Lesson Learned
Space-scoped vs Universe-scoped:
- Space-scoped = One per user (widgets, templates, assets)
- Universe-scoped = Per universe (pages, editor, space map)
Always check route scope matches data scope! ✅
Related Files:
libs/editor-web-lib/src/lib/editor.routes.ts- Editor routes (universe-scoped)apps/gograb-space/src/app/app.routes.ts- Space routes (space-scoped)@WIDGETS-MANAGER-MODULE-INTEGRATION.md- Module architecture
Status: ✅ Fixed
Last Updated: October 27, 2025