fix(code-review): show PR comment counts on files - #3433
Conversation
Generated-By: PostHog Code Task-Id: 2e4a7ce2-5055-4c59-99c9-6daed60688c4
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
There was a problem hiding this comment.
Focused, additive UI fix that threads a new headerMetadata ReactNode prop through file-diff headers to display per-file PR comment counts. The logic extracted from usePrDetails.ts into the new prCommentThreads.ts is a pure refactor (same behavior), and the new badge component and count helper are both covered by new unit tests.
|
Reviews (1): Last reviewed commit: "fix(code-review): show PR comment counts..." | Re-trigger Greptile |
Generated-By: PostHog Code Task-Id: 2e4a7ce2-5055-4c59-99c9-6daed60688c4
|
Retaining stamphog approval — delta since last review classified as |
|
Note 🤖 Automated follow-up by PostHog Code, not written by a human Ran the xp-reviewer perspective against this PR. Result✅ Approved with no blocking correctness, scope, duplication, or maintainability findings. Follow-up applied
Validation
|
Generated-By: PostHog Code Task-Id: 2e4a7ce2-5055-4c59-99c9-6daed60688c4
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Purely additive UI fix: extracts a utility, threads an optional prop, adds a badge component, and covers everything with new unit tests. Both bot comments are outdated — the renamed-file concern is already handled in the code, and the incomplete-callers concern is a graceful degradation, not a bug.
Generated-By: PostHog Code Task-Id: 2e4a7ce2-5055-4c59-99c9-6daed60688c4
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
Generated-By: PostHog Code Task-Id: 2e4a7ce2-5055-4c59-99c9-6daed60688c4
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
Generated-By: PostHog Code Task-Id: 2e4a7ce2-5055-4c59-99c9-6daed60688c4
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Purely additive UI fix that threads an optional comment-count badge through file diff headers. Logic is correct, uses quill primitives as required, both greptile concerns (renamed files, direct callers) are addressed in the current diff, and new tests cover all three header variants.
Problem
PR file headers do not show which files have review comments or how many comments they contain, making it hard to look for comments when looking at PR files
Changes
How did you test this?
pnpm --filter @posthog/ui exec vitest run src/features/code-review/components/ReviewRows.test.tsx src/features/code-review/reviewShellParts.test.tsx src/features/code-review/prCommentThreads.test.tspnpm --filter @posthog/ui typecheckpnpm typecheckAutomatic notifications
Created with PostHog Code