Skip to content

feat: Archive Projects #350

@choas

Description

@choas

Feature: Archive Projects

Add project archiving to the sidebar so users can move projects out of the main list while keeping them accessible.

Context Menu

  • Right-clicking an active project shows: Archive and Delete
  • Right-clicking an archived project shows: Unarchive and Delete

Sidebar Layout

  • Active (non-archived) projects render inside SidebarContent as they do today
  • Archived projects render in a collapsible "Archived (N)" section outside SidebarContent, positioned between it and the SidebarFooter. This keeps the section pinned at the bottom of the sidebar, not scrolling with the active project list
  • A SidebarSeparator visually divides active projects from the archived section
  • The archived section uses a Collapsible with a chevron, an ArchiveIcon, and a count label — all in muted/subdued styling (text-muted-foreground/60, text-muted-foreground/40)
  • Archived projects inside the section are styled with muted text and do not show the "New thread" action button
  • The archived section is hidden entirely when there are no archived projects
  • The section is collapsed by default (local component state)

Structure

SidebarHeader
SidebarContent (scrollable, flex-1)
  └─ SidebarGroup — active projects
</SidebarContent>
<div class="shrink-0"> — archived section (pinned at bottom, non-scrolling)
  SidebarSeparator
  Collapsible "Archived (N)"
    └─ archived projects with their threads
</div>
<SidebarSeparator />
<SidebarFooter> — "+ Add project" button

State Management

  • Add archived: boolean to the Project type
  • Add a setProjectArchived(projectId, archived) pure function and store action
  • Archive state is a client-side-only concern — no server/event-sourcing changes needed
  • Persist archived project CWDs in localStorage alongside the existing expandedProjectCwds array (add archivedProjectCwds to the persisted shape)
  • On read-model sync, restore archived from the persisted set or from the existing in-memory project state

Files Changed

File Change
apps/web/src/types.ts Add archived: boolean to Project interface
apps/web/src/store.ts Add persistedArchivedProjectCwds set, update readPersistedState() / persistState(), update mapProjectsFromReadModel(), add setProjectArchived() pure function and store action
apps/web/src/store.test.ts Add archived: false to test fixture project object
apps/web/src/components/Sidebar.tsx Filter active vs archived projects, add context menu Archive/Unarchive handling, render archived section outside SidebarContent with muted styling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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