Architecture: How should dock-layout panels load their content components ...
Documentation for Sessions
🏗️ Architecture: How should dock-layout panels load their content components ...
📋 Decision Context
Question:
How should dock-layout panels load their content components in the unified-builder integration?
Task: Session 39: Integrate dock-layout into unified-builder with dynamic tool loading
🎯 Decision Made
Chosen:
DockPanelComponent dynamically creates panel components (like BuilderToolPanelComponent) and passes panelId via setInput(). BuilderToolPanelComponent then uses panelId to determine which tool to lazy-load (vibe-universe, universe-canvas, etc.). The UnifiedBuilderComponent's legacy tool loading effect must be disabled when dock-layout mode is active to prevent conflicts.
Options Considered:
- Use legacy tool loading for both modes
- Create separate dock-layout components that don't use dynamic loading
- Disable legacy loading when dock mode active and use BuilderToolPanelComponent
- Embed tools directly in dock-layout without wrapper components
💭 Reasoning
The dock-layout system has its own component loading pipeline: DockContainerComponent → DockLayoutService → DockPanelComponent → loadComponent(). When integrating with unified-builder, we have TWO competing tool loading systems: (1) Legacy: UnifiedBuilderComponent effect using #toolContainer ViewChild, (2) Dock: DockPanelComponent → BuilderToolPanelComponent. The legacy system must check useDockLayout() and skip loading when true. BuilderToolPanelComponent uses @ViewChild with static:true for the container and maps panelId to tool types via PANEL_TO_TOOL constant.
📁 Files Involved
libs/libs-ui/dock-layout/src/lib/components/dock-panel/dock-panel.component.tslibs/libs-space/unified-builder/src/lib/components/dock-integration/builder-tool-panel.component.tslibs/libs-space/unified-builder/src/lib/components/unified-builder/unified-builder.component.ts
🔗 Related
- Decision ID:
dev_1768307838283_isr5jxw - Session: 39
- Workspace: editor2
Auto-generated by MCP Smart Consolidation