Implementation: How should mode toggle buttons work with dock-layout?

Documentation for Sessions

⚙️ Implementation: How should mode toggle buttons work with dock-layout?

📋 Decision Context

Question:

How should mode toggle buttons work with dock-layout?

Task: Fix mode toggle buttons and add custom mode for dock-layout


🎯 Decision Made

Chosen:

Preset layouts applied via dockService.setLayout() with a 'custom' mode that preserves user arrangement

Options Considered:

  1. Update individual node sizes via updateNode()
  2. Apply complete preset layouts via setLayout()
  3. Store multiple preset layouts per mode

💭 Reasoning

Mode buttons (ai-heavy, balanced, canvas-heavy) now apply complete preset layouts instead of trying to update individual node sizes. This approach is more reliable because users can rearrange panels, and the node IDs might change. The 'custom' mode saves the current layout to localStorage and preserves it, allowing users to customize and keep their preferred arrangement.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation