Files
vibe-kanban/frontend
Louis Knight-Webb d9fa2d1fa5 Always show a panel (#1988)
## Summary

**Fixed:** Invalid layout state where only left and right sidebars are visible (no main content area).

### Changes Made:

**1. `frontend/src/stores/useLayoutStore.ts`**
- Added `setMainPanelVisible` setter function to the type and implementation
- Added `useIsRightMainPanelVisible` derived selector hook that checks if Changes/Logs/Preview panel is visible

**2. `frontend/src/components/ui-new/containers/WorkspacesLayout.tsx`**
- Imported `useIsRightMainPanelVisible` from the layout store
- Added `setMainPanelVisible` to the destructured store values
- Replaced verbose `isChangesMode || isLogsMode || isPreviewMode` checks with the helper
- Added guard effect that ensures the left main panel (chat) is visible when the right main panel is hidden - this prevents the invalid state after page reload

The guard effect automatically opens the main panel whenever the layout would otherwise show only sidebars:

```typescript
// Ensure left main panel (chat) is visible when right main panel is hidden
// This prevents invalid state where only sidebars are visible after page reload
useEffect(() => {
  if (!isMainPanelVisible && !isRightMainPanelVisible) {
    setMainPanelVisible(true);
  }
}, [isMainPanelVisible, isRightMainPanelVisible, setMainPanelVisible]);
```
2026-01-12 23:18:14 +00:00
..
2026-01-08 22:14:38 +00:00
2026-01-12 23:18:14 +00:00
2026-01-08 22:14:38 +00:00
2025-06-25 09:36:07 +01:00
2026-01-08 22:14:38 +00:00
2026-01-08 22:14:38 +00:00
2026-01-08 22:14:38 +00:00
2026-01-12 21:53:09 +00:00
2026-01-08 22:14:38 +00:00
2025-06-14 15:14:08 -04:00
2026-01-08 22:14:38 +00:00