Files
paseo/packages
Mohamed Boudra 9c1bea7135 feat(app): sidebar Workspaces/Sessions toggle with History rename
Adds a Notion-style pill toggle at the top of the always-visible sidebar
that switches between Workspaces (current tree) and Sessions (flat
live-updating list of agents across the daemon). Sessions are sorted by
createdAt desc (stable, tie-broken by id) and filtered to agents whose
cwd maps to an opened workspace; clicking a row focuses the matching
workspace tab via prepareWorkspaceTab + navigateToPreparedWorkspaceTab.
The existing "Sessions" sidebar row is renamed to "History" (same
destination).

Lives in its own module at packages/app/src/sidebar-sessions/ with the
sidebar shell pieces extracted to packages/app/src/components/sidebar/.
Render performance is treated as first-class: parent subscribes to an
ordered id list with shallow array equality (useAggregatedAgentIds),
each row uses a per-agent shallow Zustand selector, the inactive view
is unmounted on toggle, and the filter dropdown subscription is gated
to Sessions mode. Filter state resets on host change. Agents whose cwd
doesn't map to an opened workspace are hidden from both list and
dropdown options.

Includes a Playwright user-journey spec and unit/integration tests for
the new ids hook, slice selector, render boundaries, navigation,
filtering, and the sidebar-sessions controller.
2026-05-08 17:58:50 +07:00
..
2026-05-07 19:40:10 +07:00