feat(inbox): Source product icons, PR badges, and rendering improvements#1755
Merged
feat(inbox): Source product icons, PR badges, and rendering improvements#1755
Conversation
Prompt To Fix All With AIThis is a comment left during a code review.
Path: apps/code/src/renderer/features/inbox/components/utils/ReportCardContent.tsx
Line: 80-82
Comment:
**Per-row `usePrDetails` calls in the list**
`ReportImplementationPrLink` calls `usePrDetails` (a tRPC + GitHub fetch) for every list row that has an `implementation_pr_url`. Previously this hook was only triggered when a single detail pane was open. With a list of N reports that all have PRs, this fires N parallel queries on mount. React Query's 60 s `staleTime` prevents re-fetching for cached URLs, but the cold-load burst could saturate the GitHub API or the main-process queue. Consider lazy-loading PR status only when a row is visible (e.g. via an `IntersectionObserver` or a separate hover-to-load trigger).
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: apps/code/src/renderer/features/inbox/components/list/ReportListRow.tsx
Line: 9-28
Comment:
**Multi-product tooltip implies single source**
When `sourceProducts` has more than one entry, only the first is used, and the tooltip reads "Report initiated by a signal from X" — implying a single source. If a report legitimately aggregates signals from multiple products, the icon and tooltip silently drop the rest. Either show a generic icon with an aggregate tooltip (e.g. "…from Product Analytics, Session Replay") or document that only the primary product is surfaced here.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat(inbox): source product icons, PR ba..." | Re-trigger Greptile |
5505938 to
0765488
Compare
fcb4bdf to
20c2118
Compare
…nts in report list - Show source product icon (with tooltip) in report list rows - Show mini PR badge in report list when implementation_pr_url is set - Move PR badge from detail header to implementation task bar - Show "Working on a PR…" when implementation task is in progress - Extract ReportImplementationPrLink component with merged/closed states - Add source_products and implementation_pr_url to SignalReport type - Tighter list row layout, improved summary markdown rendering Depends on PostHog/posthog#55464 for backend source_products and implementation_pr_url fields.
20c2118 to
dea86d7
Compare
joshsny
approved these changes
Apr 21, 2026
| ? "bg-red-4 text-red-11 hover:bg-red-5" | ||
| : "bg-green-4 text-green-11 hover:bg-green-5"; | ||
|
|
||
| const tooltip = merged |
Contributor
There was a problem hiding this comment.
Should we give this some kinda styling or something nice to go see the link?
Member
Author
There was a problem hiding this comment.
We could make it a bit nicer. The button itself is already a link, so just visuals here. @cursoragent Make this tooltip show the PR in the format org/repo#pr_number, e.g. PostHog/posthog#2323
sortafreel
approved these changes
Apr 22, 2026
Co-authored-by: Michael Matloka <dev@twixes.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
Twixes
added a commit
to PostHog/posthog
that referenced
this pull request
Apr 22, 2026
…ability ordering to reports (#55464) ## Problem The signal reports API lacks metadata needed by PostHog Code to show source product icons and PR badges in the inbox list, and the inbox ordering doesn't distinguish between actionable and not-actionable ready reports. ## Changes As summarized by Claude: - Added `source_products` field to `SignalReportSerializer` — batch-fetched from ClickHouse per page via `fetch_source_products_for_reports()` - Added `implementation_pr_url` field — annotated via correlated subquery through `SignalReportTask` → `Task` → `TaskRun` → `output->'pr_url'` - Split ready status ordering by actionability: rank 0 = actionable (or no judgment), rank 1 = not_actionable - Suppressed `is_suggested_reviewer` for not_actionable reports - Extracted `_Q_READY_NOT_ACTIONABLE` shared constant to avoid duplicate Q expressions - Dropped legacy `choice` fallback in serializer (only `actionability` key is read now) - Passed serializer context in the `signals` detail action See what this looks like in the Code app in the companion PR: PostHog/code#1755 ## How did you test this code? Bunch of tests. ## Publish to changelog? No
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The report list in Code lacked indication for source products and PR status. Users couldn't quickly identify what type of signal initiated a report or whether a PR already exists. Some of the spacing was rough too, and we were losing a lot of info due to truncated headings or description.
Changes
A few things (as summarized by Claude):
SOURCE_PRODUCT_META) in report list rows, with tooltip "Report initiated by a signal from X"ReportCardContentwhenimplementation_pr_urlis set, with merged/closed/open color states viausePrDetailsimplementationPrUrlstate, andonPrUrlChangecallback fromReportDetailPaneBackend companion: PostHog/posthog#55464
How did you test this code?
Recorded a demo.