Summary
Add folder and subfolder support to the primary sidebar's conversation list — users can organise conversations into a nested tree structure, drag to reorder, and collapse/expand folders. Mirrors VS Code's file explorer.
Motivation
As conversation history grows, a flat list becomes unmanageable. Folders let users organise by project, topic, or workflow — e.g. a "Work" folder with sub-folders per client, or a "Research" folder grouped by topic.
Proposed behaviour
Data model
interface ConversationFolder {
id: string;
name: string;
parentId: string | null; // null = root
order: number;
collapsed: boolean;
}
conversationStore gains:
folders: ConversationFolder[]
- Each
Conversation gains an optional folderId: string | null
createFolder(name, parentId?), renameFolder, deleteFolder, moveConversation(id, folderId)
UI
- Sidebar conversation list renders as a tree
- Folders show a chevron (▶ / ▼) to collapse/expand
- Click chevron or folder name to toggle
- Conversations inside a folder are indented
- Drag-and-drop to move conversations into/out of folders and reorder
- Right-click context menu on folder: Rename, New subfolder, Delete
- Right-click on conversation: Move to folder, Duplicate, Delete
+ button in sidebar header: New Conversation | New Folder
Root level
- Conversations without a folder appear at the root (unfiled)
- "Unfiled" is not a real folder — just conversations with
folderId: null
Collapsed state
- Collapsed folders show the folder name + conversation count badge
- Collapsed state persisted per folder
Acceptance criteria
Prerequisites
Summary
Add folder and subfolder support to the primary sidebar's conversation list — users can organise conversations into a nested tree structure, drag to reorder, and collapse/expand folders. Mirrors VS Code's file explorer.
Motivation
As conversation history grows, a flat list becomes unmanageable. Folders let users organise by project, topic, or workflow — e.g. a "Work" folder with sub-folders per client, or a "Research" folder grouped by topic.
Proposed behaviour
Data model
conversationStoregains:folders: ConversationFolder[]Conversationgains an optionalfolderId: string | nullcreateFolder(name, parentId?),renameFolder,deleteFolder,moveConversation(id, folderId)UI
+button in sidebar header: New Conversation | New FolderRoot level
folderId: nullCollapsed state
Acceptance criteria
ConversationFoldermodel added toconversationStorePrerequisites