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:

  1. Use legacy tool loading for both modes
  2. Create separate dock-layout components that don't use dynamic loading
  3. Disable legacy loading when dock mode active and use BuilderToolPanelComponent
  4. 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


🔗 Related


Auto-generated by MCP Smart Consolidation