sidebar: Click project header row to toggle fold instead of switching worktrees (#53861)

Previously, clicking a project header in the agent sidebar would
activate/switch to that worktree's workspace, resuming whatever thread
was most recently active. This felt jarring — activating a random thread
based on recency isn't that useful when the user can just click the
specific thread they want. There's also no clear semantic for clicking
the overall group header since each thread maps to a specific workspace
and there's no single workspace to activate for the group.

This changes the click target for folding from just the chevron to the
entire header row. The worktree-switching behavior is removed — clicking
anywhere on the row now toggles the fold, which is a more predictable
and useful interaction.

The hover-only buttons on the right side (ellipsis menu, collapse
threads, new thread) continue to work as before, with their own click
handlers that stop propagation.

Release Notes:

- Improved sidebar project headers to toggle fold on click instead of
switching worktrees.
fb9415eca5Nathan Sobo committed on 4/14/2026, 5:07:07 AM· committed by GitHubparentacf5da9
1 file changedLine totals unavailable