Files
paseo/packages
Mohamed Boudra 4f047832ac sidebar history: collapsible project sections, indented children
The grouped Sessions view now matches the workspace tree's project-row
UX instead of forking it. Both consumers share one composable.

New: SidebarProjectHeaderRow (memoized, slot-driven) — chevron,
hover/press/selected backgrounds, leading visual override, trailing
slot for kebab/shortcut/new-worktree, optional PressableComponent for
ContextMenuTrigger. Plus sidebarProjectChildIndentStyles for indenting
children under the header.

Workspace tree refactored to consume it: drag handle, status icon,
shortcut badge, kebab menu, and ContextMenuTrigger all flow through
slots. Behavior preserved.

Grouped Sessions:
- Header now collapses on press, with the same chevron-on-hover
  affordance the workspace tree has.
- Section collapse uses the same persistent useSidebarCollapsedSections
  store the workspace tree uses, so collapsing Project A in either
  view collapses it in both.
- Children rows get indented: SidebarSessionRow accepts an `indented`
  prop wired to the shared style. Footer matches.
- Show-more vs section-collapse are now distinct concepts:
  controller's expandedProjects renamed to previewExpandedProjects,
  toggleProjectExpanded -> toggleProjectPreviewExpanded. Collapse
  beats preview-expansion.

deriveGroupedSidebarSessions takes both preview-expanded and
collapsed sets. Collapsed groups return empty visibleIds and the
flattener emits header-only for them.

Tests: 41 passing across 7 files. New cases cover collapsed-hides-rows,
collapsed-wins-over-preview-expanded, and the section-only flatten
emission.
2026-05-08 20:45:18 +07:00
..
2026-05-07 19:40:10 +07:00