From 7d75a73fc8a871f1032eb51aaa8a71b44287b9ba Mon Sep 17 00:00:00 2001
From: Anastasiia Solop <35258279+anastasiya1155@users.noreply.github.com>
Date: Fri, 9 Jan 2026 09:22:17 +0100
Subject: [PATCH] Make sidebar sections collapsible in workspaces UI (Vibe
Kanban) (#1867)
* Done! Here's a summary of the changes:
## Summary
I made the sections in the right sidebar collapsible by:
1. **Created `CollapsibleSectionHeader` component** (`frontend/src/components/ui-new/primitives/CollapsibleSectionHeader.tsx`):
- Combines the `SectionHeader` styling (left border accent, border-bottom) with collapsible functionality
- Supports optional icon with action handler (stops propagation to avoid toggling)
- Uses persisted expanded state via `usePersistedExpanded` hook
- Shows caret icon that rotates when collapsed
2. **Added new persist keys** (`frontend/src/stores/useUiPreferencesStore.ts`):
- `gitPanelRepositories` - for Repositories section
- `gitPanelProject` - for Project section
- `gitPanelAddRepositories` - for Add Repositories section
- `processesSection` - for Processes section
3. **Updated `GitPanel.tsx`**: Replaced `SectionHeader` with `CollapsibleSectionHeader` for the Repositories section, wrapping all repo cards and the Advanced section inside
4. **Updated `GitPanelCreate.tsx`**: Made all three sections collapsible:
- Project section
- Repositories section
- Add Repositories section
5. **Updated `ProcessListContainer.tsx`**: Made the Processes section collapsible while keeping the search bar always visible
All sections now:
- Collapse when clicking on the section header
- Expand when clicking again
- Persist their expanded/collapsed state across sessions
* Done! I've made the Changes and Dev Server sections collapsible as well:
**Updated files:**
- `frontend/src/stores/useUiPreferencesStore.ts` - Added `changesSection` and `devServerSection` persist keys
- `frontend/src/components/ui-new/views/FileTree.tsx` - Made the "Changes" section collapsible
- `frontend/src/components/ui-new/views/PreviewControls.tsx` - Made the "Dev Server" section collapsible
All sections now use the `CollapsibleSectionHeader` component and persist their collapsed/expanded state.
* Cleanup script changes for workspace 05769879-a23f-49ac-81f4-b17e18f14025
---
.../containers/ProcessListContainer.tsx | 12 ++-
.../primitives/CollapsibleSectionHeader.tsx | 76 +++++++++++++++++++
.../src/components/ui-new/views/FileTree.tsx | 46 ++++++-----
.../src/components/ui-new/views/GitPanel.tsx | 11 ++-
.../ui-new/views/GitPanelCreate.tsx | 30 +++++---
.../ui-new/views/PreviewControls.tsx | 13 ++--
frontend/src/stores/useUiPreferencesStore.ts | 17 ++++-
7 files changed, 162 insertions(+), 43 deletions(-)
create mode 100644 frontend/src/components/ui-new/primitives/CollapsibleSectionHeader.tsx
diff --git a/frontend/src/components/ui-new/containers/ProcessListContainer.tsx b/frontend/src/components/ui-new/containers/ProcessListContainer.tsx
index ded07b74..dd07bec6 100644
--- a/frontend/src/components/ui-new/containers/ProcessListContainer.tsx
+++ b/frontend/src/components/ui-new/containers/ProcessListContainer.tsx
@@ -2,9 +2,10 @@ import { useEffect, useMemo, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { useExecutionProcessesContext } from '@/contexts/ExecutionProcessesContext';
import { ProcessListItem } from '../primitives/ProcessListItem';
-import { SectionHeader } from '../primitives/SectionHeader';
+import { CollapsibleSectionHeader } from '../primitives/CollapsibleSectionHeader';
import { InputField } from '../primitives/InputField';
import { CaretUpIcon, CaretDownIcon } from '@phosphor-icons/react';
+import { PERSIST_KEYS } from '@/stores/useUiPreferencesStore';
interface ProcessListContainerProps {
selectedProcessId: string | null;
@@ -124,8 +125,11 @@ export function ProcessListContainer({
return (
-
-
+
{sortedProcesses.length === 0 ? (
{t('processes.noProcesses')}
@@ -144,7 +148,7 @@ export function ProcessListContainer({
))}