From 81587c4f8fd0acc29a317dd3e92f54d9bd01218c Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Thu, 13 Aug 2026 02:09:50 -0500 Subject: [PATCH] fix(desktop): inbox cards render in every sidebar view, not just flat recents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The card prop was gated off whenever Project grouping was active, so the Inbox style toggle silently did nothing there. It is a render variant, not a grouping: project lanes and overview previews now render the same card the flat list does. Also mirrors the section's real virtualization inputs (projectOverview / entered-project content, not the persistent agentProjectTree cache) when deciding the wrapper's scroll classes, and stops gating SCROLL_Y on that parallel guess — the section is the single authority on which scroller lives, so the recents pane can no longer end up with no scroller at all (the "no sessions under Updated grouping after toggling settings" blank). --- apps/desktop/src/app/chat/sidebar/index.tsx | 31 +++++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/apps/desktop/src/app/chat/sidebar/index.tsx b/apps/desktop/src/app/chat/sidebar/index.tsx index 4fb0bc0c4dd66..f1587dcc3dc80 100644 --- a/apps/desktop/src/app/chat/sidebar/index.tsx +++ b/apps/desktop/src/app/chat/sidebar/index.tsx @@ -1311,8 +1311,17 @@ export function ChatSidebar({ [agentProjectTree] ) + // Mirror the section's own virtualization inputs (the props it receives), + // not the raw tree cache: agentProjectTree persists after leaving Project + // grouping, and keying on it here while the section keys on projectOverview + // (which is nulled the moment grouping changes) left the two disagreeing — + // wrapper classes built for a virtualized list around a non-virtual one. + // Entered-project content is the third prop that suppresses virtualization. const recentsVirtualizes = - !displayAgentGroups?.length && !agentProjectTree?.length && displayAgentSessions.length >= VIRTUALIZE_THRESHOLD + !displayAgentGroups?.length && + !projectOverview?.length && + !(inProject && enteredProjectContent) && + displayAgentSessions.length >= VIRTUALIZE_THRESHOLD // Keep the persisted parent + worktree orders reconciled with what's on screen: // freshly-seen repos/worktrees surface at the top, vanished ones drop out of @@ -1552,17 +1561,21 @@ export function ChatSidebar({