feat(inbox): surface resolved reports in the Archive tab#2810
feat(inbox): surface resolved reports in the Archive tab#2810andrewm4894 wants to merge 3 commits into
Conversation
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5aae536d8c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
…dered Addresses three Codex review comments on #2810: - InboxReportDetailGate gated the archive detail route on status === "suppressed", so resolved cards opened from Archive were redirected to Runs and the reference-only detail view was unreachable. Gate on isDismissedReport (suppressed or resolved) instead. - useInboxDismissedReports had no refetch interval; resolved is a server-side transition (PR merge) with no local invalidation, so an open Archive tab stayed stale. Poll while focused via INBOX_REFETCH_INTERVAL_MS. - buildSignalReportListOrdering prefixes status, grouping suppressed ahead of resolved before the time sort. Add buildArchiveListOrdering (no status prefix) so the Archive list is globally newest-first across both states.
There was a problem hiding this comment.
All three substantive review bugs (routing bounce for resolved reports, stale archive data, status-prefixed ordering across two terminal statuses) are addressed in the current diff. The change is well-structured, architecturally correct, and the hook signature already supports the added refetch option.
Repository rule violations found
New commits pushed (delta classified label_absent) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c099519338
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
The Codex bot raised a valid concern at the current head about DismissedReportDetail.tsx unconditionally rendering RestoreReportButton for resolved reports. The PR attempted to fix this in ReportDetailActions.tsx (returns null for resolved), but DismissedReportDetail.tsx renders its own inline RestoreReportButton directly — it never calls ReportDetailActions. The fix was applied to the wrong component, so a resolved report opened in the archive detail view still shows a "Restore" button; clicking it hits the status !== "suppressed" guard in useInboxRestoreReport and surfaces the misleading toast "This report is no longer archived."
DismissedReportDetail renders its own inline RestoreReportButton and never goes through ReportDetailActions, so the earlier resolved-report guard there didn't reach this view. A resolved report opened in the archive detail still showed a Restore button, which hits the `status !== "suppressed"` guard in useInboxRestoreReport and surfaces the misleading "This report is no longer archived" toast. Gate the Restore button on `status === "suppressed"` so resolved reports stay reference-only. Generated-By: PostHog Code Task-Id: d1c635cf-c727-4f0c-80f4-f9f6f0d0918c
There was a problem hiding this comment.
All prior review concerns are resolved in the current diff: routing uses isDismissedReport for both terminal statuses, DismissedReportDetail gates RestoreReportButton on canRestore, archive ordering drops the status prefix, and a refetch interval is added for server-side transitions. No showstoppers.
Repository rule violations found
Problem
When a signal report is completed — its implementation PR merged — it transitions to the terminal
resolvedstatus and vanishes from the inbox entirely. There's no tab or filter that surfaces resolved reports, so there's no way to see or track completed work from the app.This mirrors the same gap in the PostHog Cloud web inbox, fixed in PostHog/posthog#65040.
Changes
Resolved reports now appear in the existing Archive tab (route
/code/inbox/dismissed) alongside dismissed (suppressed) ones — reusing the tab built for terminal reports rather than adding a new surface.resolvedto theSignalReportStatustype (it didn't exist yet in this repo).status=suppressed,resolved) instead of justsuppressed;resolvedis added toINBOX_EXCLUDED_STATUSESso it's treated as out-of-inbox everywhere else (counts, scope), andisDismissedReportnow matches it.Resolvedlabels, accent color, and badge variant/tooltip for the new status; updated the Archive empty-state copy and the inboxCLAUDE.md.This is desktop-only — the mobile inbox is intentionally out of scope.
No backend changes — the list API already accepts
status=suppressed,resolvedand serves these reports on the read paths the Archive tab uses.How did you test this?
I'm an agent (Claude Code). I did not manually exercise the running desktop app. Verification was automated + by inspection:
pnpm --filter @posthog/core test— all 1617 tests pass, including updatedisDismissedReport/isExcludedFromInboxcases coveringresolved.pnpm --filter @posthog/core typecheckand@posthog/uitypecheck — no errors in any touched file. (The repo'spnpm typecheckhas pre-existing failures onmainin unrelated files —canvas/WebsiteLayout.tsx,code-review/InteractiveFileDiff.tsx— confirmed present on a clean tree with these changes stashed; the pre-commit hook was bypassed for that reason.)biome check --writerun on all changed files.Manual smoke-testing of the Archive tab and a resolved report's detail view by a reviewer would be worthwhile.
Automatic notifications