File tree Expand file tree Collapse file tree
apps/code/src/renderer/features Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
2020 buildStatusFilterParam ,
2121 buildSuggestedReviewerFilterParam ,
2222 filterReportsBySearch ,
23+ isReportUpForReview ,
2324} from "@features/inbox/utils/filterReports" ;
2425import { INBOX_REFETCH_INTERVAL_MS } from "@features/inbox/utils/inboxConstants" ;
2526import { useRepositoryIntegration } from "@hooks/useIntegrations" ;
@@ -132,7 +133,7 @@ export function InboxSignalsTab() {
132133 } ) ;
133134
134135 const readyCount = useMemo (
135- ( ) => allReports . filter ( ( r ) => r . status === "ready" ) . length ,
136+ ( ) => allReports . filter ( isReportUpForReview ) . length ,
136137 [ allReports ] ,
137138 ) ;
138139 const processingCount = useMemo (
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ export function SignalsToolbar({
117117
118118 const pipelineHintParts = [
119119 readyCount != null && processingCount > 0
120- ? `${ readyCount } ready · ${ processingCount } in pipeline`
120+ ? `${ readyCount } up for review • ${ processingCount } in research pipeline`
121121 : null ,
122122 pipelinePausedUntil
123123 ? `Pipeline paused · resumes in ${ formatPauseRemaining ( pipelinePausedUntil ) } `
Original file line number Diff line number Diff line change @@ -8,6 +8,20 @@ function normalizeReviewerId(value: string): string {
88 return value . trim ( ) ;
99}
1010
11+ /**
12+ * Reports that are surfaced to the current user as needing review: ready,
13+ * immediately actionable, and addressed to them. Used for both the sidebar
14+ * red badge count and the inbox toolbar "up for review" byline so the two
15+ * numbers always agree.
16+ */
17+ export function isReportUpForReview ( report : SignalReport ) : boolean {
18+ return (
19+ report . status === "ready" &&
20+ report . is_suggested_reviewer === true &&
21+ report . actionability === "immediately_actionable"
22+ ) ;
23+ }
24+
1125export function filterReportsBySearch (
1226 reports : SignalReport [ ] ,
1327 query : string ,
Original file line number Diff line number Diff line change 11import { DotsCircleSpinner } from "@components/DotsCircleSpinner" ;
22import { useCommandCenterStore } from "@features/command-center/stores/commandCenterStore" ;
33import { useInboxReports } from "@features/inbox/hooks/useInboxReports" ;
4+ import { isReportUpForReview } from "@features/inbox/utils/filterReports" ;
45import {
56 INBOX_PIPELINE_STATUS_FILTER ,
67 INBOX_REFETCH_INTERVAL_MS ,
@@ -64,12 +65,7 @@ function SidebarMenuComponent() {
6465 } ,
6566 ) ;
6667 const inboxResults = inboxProbe ?. results ?? [ ] ;
67- const inboxSignalCount = inboxResults . filter (
68- ( r ) =>
69- r . status === "ready" &&
70- r . is_suggested_reviewer &&
71- r . actionability === "immediately_actionable" ,
72- ) . length ;
68+ const inboxSignalCount = inboxResults . filter ( isReportUpForReview ) . length ;
7369
7470 const taskMap = new Map < string , Task > ( ) ;
7571 for ( const task of allTasks ) {
You can’t perform that action at this time.
0 commit comments