Sidebar projects and conversations
The registry owns project membership. The projectGroups join applies the selected sort and pins; session ownership never changes.
Lists and order
| Item | Rule |
|---|---|
| Pinned | A separate top-level list above Projects, same header typography and indentation, independent collapse. Each project appears once. Omitted when empty. |
| Projects | Header stays for filtering even when empty. Custom sections are peer lists and stay manageable when empty. |
| Project sort | Recent activity (newest conversation), oldest activity, alphabetical, or manual once dragged. Independent of conversation order. |
| Conversation sort | Explicit ascending or descending |
| Visibility | Only projects with visible, non-archived conversations, pinned ones included. Archiving the last conversation hides the project; restoring one brings it back. Registration, selection, management, archive and stored order are untouched. |
Stored order
A project ID array in the recents view preference, per browser, synchronized between windows by storage events. Unknown IDs are ignored, new projects follow the fallback sort, hidden projects keep their place when another moves. Invalid arrays fall back to the default. Storage failures keep the visible order for this window and announce that saving failed.
Dragging
- Start
- Pointer capture and a 6px movement threshold, no dependency
- Motion
- The group follows the pointer vertically, neighbours shift with the Favorite Programs spring (stiffness 600, damping 40). No insertion line or name preview. Reduced motion removes the spring.
- Drop
- Saves order and manual sort; section and pinned placement follow the destination. Sessions move with their project.
- Cancel
- Escape or a drop outside the list changes nothing
- Keyboard
Alt+ArrowUpandAlt+ArrowDownkeep focus and announce the result
Project menu
Right-click and the options button open the same menu.
| Item | Effect |
|---|---|
| Pin, Unpin | Only here; rows have no pin button |
| Edit | Name, plain-text icon or emoji, description, source folders. One editor shared with project settings. |
| Section | Local view preference. Removing a section returns its projects to the default section. |
| Reveal folder | The platform file-manager action |
| New worktree | From source HEAD on a new user-named branch, at an absolute path outside the source checkout; Git validates both. A repeat registers the exact existing worktree. Source and uncommitted files stay unchanged. |
| Archive all chats | Persists each chat before broadcasting; failures report the completed IDs |
| Remove | Sets a hidden registry flag only. Ownership, files and content stay, and history remains under date or flat grouping. The Projects page or reopening the folder restores it. The default home project cannot be removed. |
| Also | Project settings, new project conversation |
Metadata
- Updates validate supported fields, lengths and absolute existing directories, then replace the registry atomically under its lock, and notify all windows.
- Editing never changes the main folder or membership; relocation is a project-settings operation. Moved folders: Project location.
- Source folders are defaults when a chat has no explicit folder list; a deliberately empty list stays empty.
- Filters use registry IDs, so renames do not break them.
- Save failures keep the form and show the error.
Row controls and feedback
| Element | Rule |
|---|---|
| New chat, options | One class (sidebarProjectActionClass): 24px square, no padding, 15px icon, one step stronger hover than the row; 2px gap between them, ending 4px inside the row, level with a chat row's options. Pinned to pixels against the 14px root font. |
| Folder icon | Opens and closes with the group, the only expand cue. A custom icon stays as set. |
| Project row | Neutral hover only while pointed at or its menu is open. Clicks, keyboard activation, drafts and conversation changes persist no selection. |
| Conversation row | Keeps its hover background and options button while its menu is open, including with the pointer in the menu. A selected row keeps its normal background. No glow or shadow. |
| Options trigger | Stays visible while its menu or editor is open |
| Pin item | Animated on hover and keyboard focus, at rest on leave or blur; static under reduced motion |
Context menus
- Desktop project and conversation menus use Electron
Menu.popup. Coordinates are the invocation point in CSS pixels, scaled by renderer zoom; keyboard uses the focused control. - The Web fallback uses the same point with viewport collision handling, and also takes over when a native menu fails.
- The bridge accepts bounded plain menu descriptions from the owning shell frame and returns only a selected action ID.
- Cancellation, renderer navigation, unmount and window destruction close the request and clear transient feedback.
Project settings editor
- Uses the application's Input and Textarea, with theme tokens and system font. Focused fields have a thin accent border and soft glow; the dialog has a restrained accent edge.
- Icon choices show a persistent selected state and the header previews the choice.
- Labels are 13px, fields use the shared 10px corner scale, content is left-aligned, and the body scrolls on narrow screens. Folder paths wrap without displacing remove controls.
- Dialogs and overlays sit above narrow-screen sidebars, so the editor and its folder picker stay visible.
- Reduced motion disables added transitions.
Acceptance
- Dragging either way changes order only on drop, and reload keeps it.
- Collapse, new-session buttons, membership and filters are unaffected.
- Real menu entry, computed focus and selected styles, light and dark, reduced motion, cancellation and unchanged save payloads.
Implemented in full. Sources: apps/web/lib/projects/project-groups.ts, apps/web/components/sidebar/sessions/use-project-drag.ts, apps/web/components/sidebar/projects/project-menu.tsx, apps/web/lib/prefs/recents-view.ts, openprogram/state/store/project/project_store.py.