From a2f61f0e9b636bb90c768c1024f1f7ec9abc3cc5 Mon Sep 17 00:00:00 2001
From: Julius Marminge
Date: Thu, 12 Nov 2026 17:31:07 +0000
Subject: [PATCH] fix(web): a project filter that hides every active thread
says so and offers Show all projects
The sidebar empty state was skipped whenever any settled thread was visible,
so a scope on a project with only settled threads looked like lost data.
Show it whenever a scope leaves no active threads, above the Settled shelf,
with a button that clears the scope.
Fixes pingdotgg/t3code#16692
AI-assisted; verified with the tests and tools listed above.
---
apps/web/src/components/Sidebar.tsx | 76 +++++++++++++++++------------
1 file changed, 45 insertions(+), 31 deletions(-)
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx
index 6cb1e722322b7..5c9203742578c 100644
--- a/apps/web/src/components/Sidebar.tsx
+++ b/apps/web/src/components/Sidebar.tsx
@@ -3285,6 +3285,51 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
)
) : null}
+ {/* A scope can hide every active thread; say so even when its project still has settled ones. */}
+ {!isSearchingThreads &&
+ !hasProjectFolders &&
+ visibleDraftSessionCount === 0 &&
+ pinnedThreads.length +
+ activeThreads.length +
+ workingThreads.length +
+ snoozedThreads.length ===
+ 0 &&
+ (settledCount === 0 || scopedProjectGroups.length > 0) ? (
+