Skip to content

feat: conversation folders and subfolders in sidebar #22

@andrewchumchal

Description

@andrewchumchal

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

  • ConversationFolder model added to conversationStore
  • Conversations can be assigned to folders
  • Folder tree renders in the Chats sidebar panel
  • Folders collapse/expand with state persisted
  • Drag-and-drop to reorganise (at minimum: drag conversation into folder)
  • Right-click context menus on folders and conversations
  • Subfolder support (at least 2 levels deep)
  • Folder structure survives app restarts

Prerequisites

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions