Restore Agent Manager sections and worktree drag-and-drop when multiple
projects are shown, with ordering and section moves scoped to the owning
project.
- Extract shared worktree ordering/grouping logic used by both single and
multi-project modes
- Add per-project drag-and-drop providers with scoped identifiers
- Preserve live run statuses when state payloads omit them
- Match single-project label resolution using ordered session titles
- Make section auto-rename tracking request-scoped to prevent stale
renames
- Expand multi-project Storybook story with persisted ordering, sections,
and grouped worktrees
- Add project-store isolation and ordering tests
Navigation (cmd+option+up/down) and jump shortcuts (cmd+1-9) used
sortedWorktrees() which ignores section layout. When sections exist,
the visual order differs from the flat worktree order, causing jumps
to non-adjacent items and mismatched shortcut badges.
Introduce buildSidebarOrder() to compute the true visual order matching
what the user sees (respecting section boundaries and collapsed state),
and buildShortcutMap() for consistent shortcut numbering across all
visible worktrees including those inside sections.
Implement collapsible, color-coded sections in the Agent Manager sidebar.
Sections can be created, renamed, colored, deleted, and reordered via
Move Up/Down context menu. Worktrees are assigned via context menu or
drag-and-drop onto section headers.
- Section CRUD in WorktreeStateManager with JSON persistence
- worktreeOrder normalization on load (backfills missing section IDs)
- setWorktreeOrder filters to top-level only (sections + ungrouped worktrees)
- moveSection operates on visible top-level model, not raw array
- createDroppable sections as worktree drop targets
- sectionAwareDetector skips home section for within-section reorder
- Multi-version worktree groups move together
- Auto-rename on creation with double-rAF focus
- 76 tests (26 state manager + 15 helpers + 35 arch)