Skip to content

Commit 4721345

Browse files
committed
fix(web): keep grouped project delete warning conservative
1 parent c2986f9 commit 4721345

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

apps/web/src/components/Sidebar.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,9 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
13281328
if (clicked !== "delete") return;
13291329

13301330
const projectRef = scopeProjectRef(project.environmentId, project.id);
1331-
const projectThreadCount = sidebarThreads.length;
1331+
// Keep grouped projects conservative here: a grouped sidebar row should
1332+
// still warn when any member project currently has threads.
1333+
const projectThreadCount = projectThreads.length;
13321334
if (projectThreadCount > 0) {
13331335
const warningToastId = toastManager.add({
13341336
type: "warning",
@@ -1401,8 +1403,8 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
14011403
project.environmentId,
14021404
project.id,
14031405
project.name,
1406+
projectThreads.length,
14041407
removeProject,
1405-
sidebarThreads.length,
14061408
suppressProjectClickForContextMenuRef,
14071409
],
14081410
);

0 commit comments

Comments
 (0)