Skip to content

Commit 02023b4

Browse files
posthog[bot]PostHog Code
andauthored
fix(inbox): clarify pipeline hint wording (#1754)
Co-authored-by: PostHog Code <code@posthog.com>
1 parent 126be89 commit 02023b4

4 files changed

Lines changed: 19 additions & 8 deletions

File tree

apps/code/src/renderer/features/inbox/components/InboxSignalsTab.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
buildStatusFilterParam,
2121
buildSuggestedReviewerFilterParam,
2222
filterReportsBySearch,
23+
isReportUpForReview,
2324
} from "@features/inbox/utils/filterReports";
2425
import { INBOX_REFETCH_INTERVAL_MS } from "@features/inbox/utils/inboxConstants";
2526
import { 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(

apps/code/src/renderer/features/inbox/components/list/SignalsToolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)}`

apps/code/src/renderer/features/inbox/utils/filterReports.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
1125
export function filterReportsBySearch(
1226
reports: SignalReport[],
1327
query: string,

apps/code/src/renderer/features/sidebar/components/SidebarMenu.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { DotsCircleSpinner } from "@components/DotsCircleSpinner";
22
import { useCommandCenterStore } from "@features/command-center/stores/commandCenterStore";
33
import { useInboxReports } from "@features/inbox/hooks/useInboxReports";
4+
import { isReportUpForReview } from "@features/inbox/utils/filterReports";
45
import {
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) {

0 commit comments

Comments
 (0)