Add Not actionable tab and route resolved PRs to Archive in inbox#2943
Add Not actionable tab and route resolved PRs to Archive in inbox#2943andrewm4894 wants to merge 3 commits into
Conversation
Replicates the PostHog/posthog inbox tab structure in the PostHog Code desktop app: - New staff-only **Not actionable** tab listing reports the agent judged `not_actionable`; these are pulled out of the Reports tab so they no longer double-list. - **Archive** now includes `resolved` reports (merged implementation PR) alongside user-suppressed ones. Resolved reports show for reference only, with no Restore action. This gives merged PRs a home — previously they fell off every tab once merged. - Adds `resolved` to the `SignalReportStatus` enum and its labels/badges. - **Runs** already mirrored posthog (Queued / Live / Recently finished), so it's unchanged. Generated-By: PostHog Code Task-Id: 3a7dec81-6f1d-425a-a7cb-f468c36b3ec7
|
| export function isNotActionableReport(report: SignalReport): boolean { | ||
| if (isExcludedFromInbox(report)) return false; | ||
| if (report.implementation_pr_url) return false; | ||
| return report.actionability === "not_actionable"; | ||
| } |
There was a problem hiding this comment.
In-flight
not_actionable reports double-list in Runs and Not actionable tabs
isNotActionableReport does not guard against isAgentRunReport(report). partitionRunsTabReports partitions directly on isQueuedRunReport/isLiveRunReport, bypassing this predicate entirely. A report that has actionability === "not_actionable" set while still in potential, candidate, in_progress, or pending_input status will therefore satisfy both predicates and appear in both the Runs tab and the Not actionable tab simultaneously.
isReportTabReport avoids this only because it calls isAgentRunReport before isNotActionableReport. Adding the same guard here would make the Not actionable predicate self-consistent, matching the existing pattern in isReportTabReport.
isReportTabReport checks isAgentRunReport / failed before the not-actionable check, but isNotActionableReport had no such guard. A queued/live not_actionable report would therefore classify as a run in one predicate and as not-actionable in the other, double-listing in the Runs queued/live sections and the Not actionable tab. Mirror the same gates so the two predicates agree (per Greptile review). The Runs "Recently finished" overlap for ready reports is separate and intentional. Generated-By: PostHog Code Task-Id: 3a7dec81-6f1d-425a-a7cb-f468c36b3ec7
Adding `resolved` to INBOX_EXCLUDED_STATUSES left two gaps for resolved (merged-PR) reports: - InboxReportDetailGate's stale-URL redirect only checked `suppressed`, so a resolved report opened at a /pulls, /reports, or /runs URL rendered full triage actions instead of redirecting to Archive. Switch to the isDismissedReport predicate (suppressed OR resolved) so both terminal states redirect symmetrically. - DismissedReportDetail always rendered Restore; resolved reports are terminal, so gate it with isResolvedReport — matching the list-card behavior. Per Greptile review. Generated-By: PostHog Code Task-Id: 3a7dec81-6f1d-425a-a7cb-f468c36b3ec7
Problem
In the PostHog Code inbox, once a report's implementation PR is merged it transitioned to a terminal state and fell off every tab — there was no "Done"/archive surface to find shipped work again. The desktop app was also missing the Not actionable tab that
PostHog/posthoghas for auditing signal quality.Why: Andy hit this directly — he shipped a couple of PRs and they "just disappeared" from the inbox with no Done tab to track them. Michael asked to replicate the Archived / Runs / Not actionable tab structure from
PostHog/posthoghere.Changes
Brings the desktop inbox in line with the
PostHog/posthogtab structure:resolvedreports (merged implementation PR) alongside user-suppressed ones. Resolved reports appear for reference only — no Restore action. Merged PRs finally have a home.not_actionable; they're pulled out of the Reports tab so they don't double-list.resolvedto theSignalReportStatusenum, labels, and status badge.How did you test this?
pnpm --filter @posthog/core --filter @posthog/ui typecheck— cleanpnpm --filter @posthog/core test— 1667 passed (added cases for the new predicates:isDismissedReportincl. resolved,isResolvedReport,isNotActionableReport,isStaffOnlyInboxTab, not-actionable exclusion from Reports)pnpm --filter @posthog/ui test— 804 passed/code/inbox/not-actionableroutesAutomatic notifications
Created with PostHog Code from a Slack thread