From f6c00d2121f1f590c566baa18dce6685b3b91ab0 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Mon, 9 Feb 2026 13:37:21 +0200 Subject: [PATCH] fix(SessionSidebar): center items when show branch subtitle --- .../ui/src/components/session/SessionSidebar.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/ui/src/components/session/SessionSidebar.tsx b/packages/ui/src/components/session/SessionSidebar.tsx index 62325b93..a0c81130 100644 --- a/packages/ui/src/components/session/SessionSidebar.tsx +++ b/packages/ui/src/components/session/SessionSidebar.tsx @@ -1978,6 +1978,7 @@ export const SessionSidebar: React.FC = ({ const allGroupSessions = collectGroupSessions(group.sessions); const normalizedGroupDirectory = normalizePath(group.directory ?? null); const isGitProject = Boolean(projectId && projectRepoStatus.get(projectId)); + const showBranchSubtitle = !group.isMain && isBranchDifferentFromLabel(group.branch, group.label); const isActiveGroup = Boolean( normalizedGroupDirectory && currentSessionDirectory @@ -1987,7 +1988,7 @@ export const SessionSidebar: React.FC = ({ return (
{ setCollapsedGroups((prev) => { const next = new Set(prev); @@ -2017,20 +2018,20 @@ export const SessionSidebar: React.FC = ({ }} aria-label={isCollapsed ? `Expand ${group.label}` : `Collapse ${group.label}`} > -
+
{isCollapsed ? ( - + ) : ( - + )} {!group.isMain || isGitProject ? ( - + ) : null} -
+

{group.label}

- {!group.isMain && isBranchDifferentFromLabel(group.branch, group.label) ? ( + {showBranchSubtitle ? ( {group.branch}