diff --git a/packages/ui/src/features/inbox/hooks/useInboxAllReports.ts b/packages/ui/src/features/inbox/hooks/useInboxAllReports.ts index 276cfe94c..eb5b4e607 100644 --- a/packages/ui/src/features/inbox/hooks/useInboxAllReports.ts +++ b/packages/ui/src/features/inbox/hooks/useInboxAllReports.ts @@ -113,8 +113,8 @@ export function useInboxAllReports(options?: { status: INBOX_PIPELINE_STATUS_FILTER, has_implementation_pr: true, // Mirror the list query's active filters so the badge matches the tab - // body. These are empty when `ignoreFilters` is set (sidebar usage), so - // the count stays scope-only there. + // body. These are empty when `ignoreFilters` is set (e.g. the Runs tab), + // so the count stays scope-only there. source_product: sourceProductFilter.length > 0 ? sourceProductFilter.join(",") diff --git a/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx b/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx index b13a01201..8ced0fe42 100644 --- a/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx +++ b/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx @@ -82,10 +82,11 @@ export function SidebarNavSection({ const isMcpServersActive = view.type === "mcp-servers"; // Open pull requests in the inbox — the main CTA, and the same count the inbox - // Pull requests tab shows, so the badge and the tab always agree. - // `ignoreFilters` keeps the badge stable against the inbox's filter chrome; - // scope still follows the user's For-you / project choice. - const { counts: inboxCounts } = useInboxAllReports({ ignoreFilters: true }); + // Pull requests tab shows, so the badge and the tab always agree. The badge + // tracks the inbox's active source/priority/search filters (and the user's + // For-you / project scope) so it never shows a total that contradicts the + // filtered list the user is looking at. + const { counts: inboxCounts } = useInboxAllReports(); const inboxPullRequestCount = inboxCounts.pulls; // Only subscribe to the task list when a parent hasn't already supplied the