From 72e028c617faf6f5d4f07f72e48ba3f2abef3a14 Mon Sep 17 00:00:00 2001 From: David Kaya Date: Tue, 24 Mar 2026 19:07:02 +0100 Subject: [PATCH] fix: let the new-session button replace the empty state text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When no sessions exist and a creation button is available, show only the button — it already communicates emptiness and provides the CTA. The old 'No sessions yet' text is kept as fallback only when no button is present. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/renderer/components/Sidebar.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/renderer/components/Sidebar.tsx b/src/renderer/components/Sidebar.tsx index d936d6f..51b52f4 100644 --- a/src/renderer/components/Sidebar.tsx +++ b/src/renderer/components/Sidebar.tsx @@ -400,11 +400,7 @@ function ProjectGroup({ {expanded && (
- {visibleSessions.length === 0 ? ( -
- {isScratchpad ? 'No scratchpad chats yet' : 'No sessions yet'} -
- ) : ( + {visibleSessions.length > 0 && visibleSessions.map((session) => ( - )) - )} - {onNewSession && ( + ))} + {onNewSession ? ( + ) : ( + visibleSessions.length === 0 && ( +
+ {isScratchpad ? 'No scratchpad chats yet' : 'No sessions yet'} +
+ ) )}
)}