feat(sidebar): collapsible terminal tab list under branch rows#85
feat(sidebar): collapsible terminal tab list under branch rows#85paulovitin wants to merge 21 commits into
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Read isActive before onSelect so freshly-focused branch only focuses (was reading after onSelect flipped it active, causing spurious toggle) - Subitem tab list only renders when branch has more than one terminal
Add setBranchTabsExpanded setter; clicking a branch row ensures its tab list is expanded (open stays open), instead of toggling closed.
- Chevron only renders with >1 terminal - Subitems render one-per-terminal when expanded and >1 terminal - Re-clicking active branch toggles; focusing inactive branch opens (never toggles) - Single-terminal branch neither opens nor toggles
|
@sstraus what do you think about this feature? |
|
@paulovitin in reality I was thinking about the real usefulness of having the tabs also reported in the sidebar. With many open projects at the same time the list may explode. If you show them by clicking there is no difference to opening it and checkign the tabs. In particular, adding elements that reduce the space for the branch name is potentially a problem, especially for those who have small monitors. I'm refering to the arrow to open the collapsed area. If everything is called main, it's simple, but if the branch names start with feat/branch name then the space becomes very little, especially if there are many changes. I haven't had time to try it in production yet. Shall we put it behind feature flag? |
My thinking was that tabs provide a quick overview of active work across projects without having to switch context into each one, but I agree the value decreases as the number of open projects grows. I also agree that branch visibility is probably more important than tab visibility. If we end up truncating branch names to make room for disclosure controls, that's likely a net negative. Im fine putting this behind a feature flag or a in the config settings. That would let people try it in real world workflows and give us feedback before we commit to the UX permanently. What do you prefer? |
|
I merged it in the new release behind a feature flag. let's see how it works. Thx. |
Summary
Adds a collapsible list of a branch's terminal tabs directly under each branch row in the left sidebar, so you can see and jump to a worktree's open terminals without opening the tab bar.
tabsExpandedflag onBranchState, persisted viasave_repositories(same mechanism as sessions).BranchTabListrenders one subitem per terminal — status dot (busy / idle / unseen / error / question) + terminal name. Clicking a subitem callsnavigateToTerminal(switches branch context + focuses the terminal). Active terminal is highlighted.Test Plan
npx tsc --noEmitcleannpx vitest run— full suite green (4149 passed)🤖 Generated with Claude Code