feat: Add Pull Request Review Intelligence & Bottleneck Analytics System (#468)#469
Conversation
✅ Deploy Preview for github-spy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThis PR adds a comprehensive PR analytics feature to the GitHub Tracker application. It introduces a new ChangesPR Analytics Feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi maintainers, the PR has been updated successfully and all checks are now passing. The implementation includes the complete PR Review Intelligence & Bottleneck Analytics System requested in #468, along with analytics visualizations, repository health insights, and review workflow tracking. Kindly review and merge the PR when convenient. Thank you! |
|
home page is broken |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/PRAnalytics/PRAnalytics.tsx`:
- Around line 148-155: The stalled-PR logic (isStalled) is too narrow: instead
of only checking submittedReviews, compute a lastActivity timestamp that
considers submittedReviews, issue comments, and review comments (e.g., use
submittedReviews, comments, reviewComments arrays) and use now - lastActivity >
7 days as the inactivity criterion; then keep the existing openDuration > 14
days and pr.state === "open" checks but replace the submittedReviews-based check
with the unified lastActivity check so PRs with recent discussion or review
comments aren't incorrectly marked stalled.
- Line 157: The code currently de-duplicates reviewer logins with Array.from(new
Set(...)) (see the reviewers constant derived from reviews.map in
PRAnalytics.tsx), which counts each reviewer once per PR; change this to
aggregate review events instead by removing the Set and keeping each review
event (e.g., const reviewers = reviews.map(r => r.user?.login).filter(Boolean)
as string[]), and update any other identical deduplication sites that use
Array.from(new Set(...)) (the other occurrences of the same pattern) so the
workload chart and overload detection consume review event counts rather than
unique reviewers-per-PR.
- Around line 317-324: trendData currently calls slice(-10) on prDetailsList
without guaranteeing it's ordered by recency; sort prDetailsList by a reliable
timestamp (e.g., pr.mergedAt or fallback to pr.createdAt/updatedAt) in
descending order before filtering/mapping so the last 10 truly represent the
most recent PRs. Update the pipeline around trendData to perform a sort step
(comparing new Date(pr.mergedAt || pr.createdAt || pr.updatedAt)) then filter by
timeToFirstReview and take the first 10 entries for mapping to prNumber,
firstReviewHrs, and turnaroundDays.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8112401d-900c-47e6-957e-37d89cb7ac44
📒 Files selected for processing (4)
src/Routes/Router.tsxsrc/components/Features.tsxsrc/components/Navbar.tsxsrc/pages/PRAnalytics/PRAnalytics.tsx
|
The issue has been fixed and all checks are passing now. Could you please review and merge the PR if everything looks good? Thank you! |
Description
This pull request implements the Pull Request Review Intelligence & Bottleneck Analytics System requested in #468. It introduces a comprehensive review intelligence suite that tracks repository pull requests and review latency to identify reviewer capacity, workload distribution, and delay issues.
Closes #468
Key Features Implemented
Analytical Dashboard (
PRAnalytics.tsx):Visualizations:
Routing & Navigation:
/pr-analyticsto the new dashboard inRouter.tsx.Navbar.tsx.Features.tsx.Verification & Git Pushing
feature/pr-review-analytics.Summary by CodeRabbit
Release Notes
New Features