Skip to content

Add Not actionable tab and route resolved PRs to Archive in inbox#2943

Draft
andrewm4894 wants to merge 1 commit into
mainfrom
posthog-code/inbox-not-actionable-resolved-archive
Draft

Add Not actionable tab and route resolved PRs to Archive in inbox#2943
andrewm4894 wants to merge 1 commit into
mainfrom
posthog-code/inbox-not-actionable-resolved-archive

Conversation

@andrewm4894

Copy link
Copy Markdown
Member

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/posthog has 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/posthog here.

Changes

Brings the desktop inbox in line with the PostHog/posthog tab structure:

  • Archive now lists resolved reports (merged implementation PR) alongside user-suppressed ones. Resolved reports appear for reference only — no Restore action. Merged PRs finally have a home.
  • New Not actionable tab (staff-only) listing reports the agent judged not_actionable; they're pulled out of the Reports tab so they don't double-list.
  • Adds resolved to the SignalReportStatus enum, labels, and status badge.
  • Runs already matched posthog (Queued / Live / Recently finished) — left unchanged.

How did you test this?

  • pnpm --filter @posthog/core --filter @posthog/ui typecheck — clean
  • pnpm --filter @posthog/core test — 1667 passed (added cases for the new predicates: isDismissedReport incl. resolved, isResolvedReport, isNotActionableReport, isStaffOnlyInboxTab, not-actionable exclusion from Reports)
  • pnpm --filter @posthog/ui test — 804 passed
  • Regenerated the TanStack route tree for the new /code/inbox/not-actionable routes

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code from a Slack thread

@greptile-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. packages/ui/src/features/inbox/components/InboxReportDetailGate.tsx, line 87-95 (link)

    P1 Stale-URL redirect misses resolved reports

    isSuppressed only checks status === "suppressed", so the boundary-redirect that guards against triage actions being shown on an out-of-pipeline report never fires for resolved reports. A user with a bookmarked or history URL for /code/inbox/reports/$reportId whose PR is later merged (transition to resolved) will land on the Reports detail view with the full triage affordances still rendered, rather than being redirected to /code/inbox/dismissed/$reportId.

    resolved was added to INBOX_EXCLUDED_STATUSES in this PR but the corresponding redirect guard was left unchanged. The existing comment on line 80-85 explicitly describes this redirect as protecting against "out-of-pipeline" reports — resolved is now squarely in that category.

Reviews (1): Last reviewed commit: "Add Not actionable tab and route resolve..." | Re-trigger Greptile

Comment on lines +275 to +279
export function isNotActionableReport(report: SignalReport): boolean {
if (isExcludedFromInbox(report)) return false;
if (report.implementation_pr_url) return false;
return report.actionability === "not_actionable";
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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
@andrewm4894 andrewm4894 force-pushed the posthog-code/inbox-not-actionable-resolved-archive branch from 4d4b2a8 to bdf1ff7 Compare June 26, 2026 13:21
@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit bdf1ff7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants