fix: pr timeline#88
Conversation
WalkthroughSmall UI adjustments and backend metric query changes: cycleTime rendering boolean coercion and approval badge variant change in the PR card UI; metrics service switches date/timestamp boundaries and uses mergedAt for several PR metrics, plus added console logging. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/api/src/app/metrics/services/personal-metrics.service.ts">
<violation number="1" location="apps/api/src/app/metrics/services/personal-metrics.service.ts:110">
P2: Remove the debug console.log or replace it with the service’s structured logger if needed.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/api/src/app/metrics/services/personal-metrics.service.ts`:
- Line 110: Remove the debug console.log that prints raw results and user-scoped
identifiers: delete the line console.log("result", result, workspaceId,
personId) from the PersonalMetricsService method (the function that computes
personal metrics—compare to getCodeReviewMetrics which has no log). If you need
logging, use the service's structured logger (e.g., processLogger / this.logger)
and log only non-PII summaries (counts/aggregates) rather than workspaceId,
personId or raw query results.
Greptile Summary
Fixed personal metrics date range calculations and PR timeline rendering issues. Changed SQL queries to use
NOW()instead ofCURRENT_DATEfor more accurate time-based filtering, switched fromcreatedAttomergedAtfor PR size metrics, fixed cycleTime display condition to properly handle 0 values, and updated approval badge variant for better UX.Key changes:
CURRENT_DATEtoNOW()with 30-day periods (previously 29 days)mergedAtinstead ofcreatedAtfor more accurate merged PR counts!!cycleTimeto properly handle 0 valuestimeToFirstApprovalis nullConfidence Score: 5/5
Important Files Changed
CURRENT_DATEtoNOW()and fromcreatedAttomergedAtfor PR size metrics!!to properly handle 0 valuesLast reviewed commit: 59341b6