Skip to content

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

Draft
andrewm4894 wants to merge 3 commits 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 3 commits 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

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
@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.

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
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.

1 participant