From 76b98f43ca0a5c8324182e76fab2617d31fdc6ef Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Thu, 4 Jun 2026 17:35:34 -0500 Subject: [PATCH] fix(desktop): gate ALL-profiles grouping on multiProfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a user drops back to a single profile while scope is still ALL (persisted), the rail is hidden — they'd be stuck in the grouped view with no toggle out. Fall back to the scoped view when only one profile. --- apps/desktop/src/app/chat/sidebar/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/app/chat/sidebar/index.tsx b/apps/desktop/src/app/chat/sidebar/index.tsx index 39815e094..986387fa7 100644 --- a/apps/desktop/src/app/chat/sidebar/index.tsx +++ b/apps/desktop/src/app/chat/sidebar/index.tsx @@ -242,7 +242,10 @@ export function ChatSidebar({ // Only surface the profile switcher when more than one profile exists, so // single-profile users see the unchanged sidebar. const multiProfile = profiles.length > 1 - const showAllProfiles = profileScope === ALL_PROFILES + // Gate ALL-profiles grouping on multiProfile too: if a user drops back to one + // profile while scope is still ALL (persisted), the rail is hidden and they'd + // otherwise be stuck in the grouped view with no way out. + const showAllProfiles = multiProfile && profileScope === ALL_PROFILES const [agentOrderIds, setAgentOrderIds] = useState([]) const [workspaceOrderIds, setWorkspaceOrderIds] = useState([]) const [searchQuery, setSearchQuery] = useState('')