From 7ffd8aa518611946e6fee2d69fa7572a8477ced6 Mon Sep 17 00:00:00 2001 From: Evgeny Shurakov Date: Wed, 1 Apr 2026 13:15:28 +0200 Subject: [PATCH 1/2] refactor(chat): replace New Session button with icon in sidebar header Replace the prominent 'New Session' button with a compact SquarePen icon button with tooltip. Move search and filter controls to the right side of the header for a cleaner, more minimal sidebar layout. --- .../cloud-agent-next/ChatSidebar.tsx | 48 +++++++++++-------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/src/components/cloud-agent-next/ChatSidebar.tsx b/src/components/cloud-agent-next/ChatSidebar.tsx index 28d7c559ff..2174716c10 100644 --- a/src/components/cloud-agent-next/ChatSidebar.tsx +++ b/src/components/cloud-agent-next/ChatSidebar.tsx @@ -1,9 +1,8 @@ 'use client'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { Button } from '@/components/Button'; import { - Plus, + SquarePen, Search, SlidersHorizontal, MoreHorizontal, @@ -12,6 +11,7 @@ import { X, Pencil, } from 'lucide-react'; +import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'; import { TimeAgo } from '@/components/shared/TimeAgo'; import { usePathname, useRouter } from 'next/navigation'; import { isToday, isYesterday, startOfDay, differenceInCalendarDays, format } from 'date-fns'; @@ -358,21 +358,30 @@ export function ChatSidebar({
{/* Header */}
- - - {(onPlatformChange || onProjectChange) && ( - + + + + + New session + +
+ + {(onPlatformChange || onProjectChange) && ( +
{/* Collapsible search */} From 907dfdc489f3064b8dd479cfc9e128c494b1469b Mon Sep 17 00:00:00 2001 From: Evgeny Shurakov Date: Wed, 1 Apr 2026 14:45:25 +0200 Subject: [PATCH 2/2] style: format ChatSidebar --- .../cloud-agent-next/ChatSidebar.tsx | 118 +++++++++--------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/src/components/cloud-agent-next/ChatSidebar.tsx b/src/components/cloud-agent-next/ChatSidebar.tsx index 2174716c10..42096a3e7a 100644 --- a/src/components/cloud-agent-next/ChatSidebar.tsx +++ b/src/components/cloud-agent-next/ChatSidebar.tsx @@ -382,66 +382,66 @@ export function ChatSidebar({ {(onPlatformChange || onProjectChange) && ( - - + + + {onProjectChange && recentProjects.length > 0 && ( + <> + Project + onProjectChange(undefined)}> + + All projects + + {recentProjects.map(project => { + const isActive = projectFilter === project.gitUrl; + return ( + onProjectChange(project.gitUrl)} + > + + {project.displayName} + + ); + })} + )} - > - - - - - {onProjectChange && recentProjects.length > 0 && ( - <> - Project - onProjectChange(undefined)}> - - All projects - - {recentProjects.map(project => { - const isActive = projectFilter === project.gitUrl; - return ( - onProjectChange(project.gitUrl)} - > - - {project.displayName} - - ); - })} - - )} - {onPlatformChange && ( - <> - {onProjectChange && recentProjects.length > 0 && } - Platform - {PLATFORM_FILTERS.map(p => { - const isFilterActive = p === 'all' ? !platformFilter : platformFilter === p; - return ( - onPlatformChange(p === 'all' ? undefined : p)} - > - - {platformFilterLabel(p)} - - ); - })} - - )} - + {onPlatformChange && ( + <> + {onProjectChange && recentProjects.length > 0 && } + Platform + {PLATFORM_FILTERS.map(p => { + const isFilterActive = p === 'all' ? !platformFilter : platformFilter === p; + return ( + onPlatformChange(p === 'all' ? undefined : p)} + > + + {platformFilterLabel(p)} + + ); + })} + + )} + )}