From 84d8051c18cfce3faebe32c0ac98d128d024ce2e Mon Sep 17 00:00:00 2001 From: gopu-bruno Date: Wed, 4 Mar 2026 23:05:06 +0530 Subject: [PATCH] fix: show '+ Add request' when only transient items exist (#7361) --- .../src/components/Sidebar/Collections/Collection/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js index 80bd84617..ede6ef9d7 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js @@ -69,7 +69,8 @@ const Collection = ({ collection, searchText }) => { const dispatch = useDispatch(); const isLoading = collection.isLoading; const collectionRef = useRef(null); - const itemCount = collection.items?.length || 0; + // Only count persisted items; transients don't affect empty state + const itemCount = collection.items?.filter((i) => !i.isTransient).length || 0; const isCollectionFocused = useSelector(isTabForItemActive({ itemUid: collection.uid })); const { hasCopiedItems } = useSelector((state) => state.app.clipboard);