Skip to content

Control UI: multi-select sessions in the sidebar for batch archive/delete/group actions #104409

Description

@steipete

Problem

The Control UI sessions sidebar only supports acting on one session at a time. Cleaning up after a busy day means archiving or deleting sessions one by one, each with its own context menu round-trip (and its own confirm dialog for delete). The Sessions settings page already has checkbox multi-select with batch delete, but the sidebar — where people actually live — has nothing.

Proposal

Multi-select in the sessions sidebar, matching familiar list UX:

  • Cmd/Ctrl-click toggles a row in and out of the selection.
  • Shift-click extends the selection from the anchor across the visible row order.
  • Right-clicking (or opening the menu on) a selected row shows a batch menu scoped to actions that apply to every selected session: Mark N as unread / Mark N as read, Move N to group, Archive N, Delete N….
  • Right-clicking a row outside the selection retargets to that row (standard behavior).
  • Batch delete asks for one confirmation and reuses the existing sessions.deleteMany batch path; preserved dirty worktrees surface as a single summary alert, same as the Sessions page.

Single-session menu behavior stays unchanged.

Evidence

  • Sidebar menu host: ui/src/components/app-sidebar.ts (single SidebarSessionMenuState, per-session patchSession/deleteSession only).
  • Menu component: ui/src/components/session-menu.ts (no batch mode).
  • Batch RPC already exists: SessionCapability.deleteMany (ui/src/lib/sessions/index.ts), used by ui/src/pages/sessions/sessions-page.ts — the sidebar just never adopted it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions