-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
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
SidebarContentas they do today - Archived projects render in a collapsible "Archived (N)" section outside
SidebarContent, positioned between it and theSidebarFooter. This keeps the section pinned at the bottom of the sidebar, not scrolling with the active project list - A
SidebarSeparatorvisually divides active projects from the archived section - The archived section uses a
Collapsiblewith a chevron, anArchiveIcon, 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: booleanto theProjecttype - 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
expandedProjectCwdsarray (addarchivedProjectCwdsto the persisted shape) - On read-model sync, restore
archivedfrom 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 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels