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 1 commit into
Conversation
|
| 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.
Master independently landed the resolved→Archive half of this PR (excluded statuses, isDismissedReport, the resolved status/labels/badge, the Archive query, resolved Restore-hiding in ReportCard/DismissedReportDetail, and the resolved→Archive detail redirect). Re-applying only the still-unique part on top of the moved-on master to clear the merge conflicts: - Add the staff-only Not actionable tab (gated on user.is_staff via INBOX_STAFF_ONLY_TAB_KEYS / isStaffOnlyInboxTab), listing reports the actionability judgment marked not_actionable. - isNotActionableReport mirrors isReportTabReport's gate order (excludes excluded/failed/PR-bearing/in-flight runs) so a report can't double-list in both Runs and Not actionable. - isReportTabReport excludes not-actionable reports so they don't also show in Reports. - Route + detail wiring: /code/inbox/not-actionable list + $reportId detail, ReportCard detailTab, ReportDetail backTo/backLabel, gate + frame + prefetch route unions, regenerated routeTree.gen.ts. - Tests for isNotActionableReport (incl. the in-flight/failed guards) and isStaffOnlyInboxTab; CLAUDE.md updated to a five-tab IA. Generated-By: PostHog Code Task-Id: 3a7dec81-6f1d-425a-a7cb-f468c36b3ec7
4d4b2a8 to
bdf1ff7
Compare
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
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