From 5e4f2301f8e380cd3fe1b68ca4237d141a81868f Mon Sep 17 00:00:00 2001
From: Brooklyn Nicholson
Date: Fri, 8 May 2026 08:04:55 -0400
Subject: [PATCH] fix(desktop): hide pinned/recents sections until first
session
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
A fresh sidebar showed the Pinned and Recent chats headers with floating empty-state copy underneath. Drop both sections (and the now-orphan SidebarEmptySessionState) when there are no sessions yet — they reappear after the first chat. Skeletons during initial load are unchanged.
---
apps/desktop/src/app/chat/sidebar/index.tsx | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/apps/desktop/src/app/chat/sidebar/index.tsx b/apps/desktop/src/app/chat/sidebar/index.tsx
index c8e1181a43c..d5486565b1c 100644
--- a/apps/desktop/src/app/chat/sidebar/index.tsx
+++ b/apps/desktop/src/app/chat/sidebar/index.tsx
@@ -101,6 +101,7 @@ export function ChatSidebar({
const recentSessions = sortedSessions.filter(session => !visiblePinnedIdSet.has(session.id))
const showSessionSkeletons = sessionsLoading && sortedSessions.length === 0
+ const showSessionSections = showSessionSkeletons || sortedSessions.length > 0
return (
- {sidebarOpen && (
+ {sidebarOpen && showSessionSections && (
setSidebarPinsOpen(!pinsOpen)} open={pinsOpen} />
{pinsOpen && (
@@ -180,7 +181,7 @@ export function ChatSidebar({
)}
- {sidebarOpen && (
+ {sidebarOpen && showSessionSections && (
{showSessionSkeletons && }
- {!showSessionSkeletons && sortedSessions.length === 0 && }
- {!showSessionSkeletons && sortedSessions.length > 0 && recentSessions.length === 0 && (
-
- )}
+ {!showSessionSkeletons && recentSessions.length === 0 && }
{recentSessions.map(session => (
Start a chat to build your history.
- )
-}
-
function SidebarAllPinnedState() {
return (