Fixed quota number on profile#161
Conversation
|
Warning Review limit reached
Next review available in: 56 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughModified the calculation of the displayed current value for each quota in components/profile/quotas.tsx, changing it from directly using quota.currentValue to deriving it from the progress bar width percentage applied to quota.value, with rounding and a null guard. ChangesQuota Display Fix
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
components/profile/quotas.tsx (1)
113-113: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the unprofessional inline comment.
The comment "eh, rudimentary workaround but works and thats all that matters" should not ship to the main branch. If the workaround is temporary, replace it with a concise TODO referencing the root cause (missing
currentValueon certain quota objects).🤖 Prompt for 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. In `@components/profile/quotas.tsx` at line 113, Remove the unprofessional inline comment attached to the currentVal calculation in quotas.tsx. If the barWidth/quota.value fallback is only a temporary workaround in the profile quotas rendering logic, replace that text with a short TODO that references the underlying missing currentValue issue on certain quota objects, and keep the comment professional and concise.
🤖 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 `@components/profile/quotas.tsx`:
- Line 113: The `currentVal` calculation in `QuotaBar` is using the capped
`barWidth` value, which makes over-quota states display as if they were only at
the limit. Update the logic to prefer `quota.currentValue` when it exists, and
otherwise derive the fallback from the uncapped `pct` rather than `Math.min(pct,
100)`, so the displayed value stays consistent with the “goal exceeded” text.
---
Nitpick comments:
In `@components/profile/quotas.tsx`:
- Line 113: Remove the unprofessional inline comment attached to the currentVal
calculation in quotas.tsx. If the barWidth/quota.value fallback is only a
temporary workaround in the profile quotas rendering logic, replace that text
with a short TODO that references the underlying missing currentValue issue on
certain quota objects, and keep the comment professional and concise.
🪄 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: cc668b00-e05c-49b8-8dbe-02ca09abfbb0
📒 Files selected for processing (1)
components/profile/quotas.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Fixed the "0" number appearing on the quota while they had some quota done, even tho it had the bar which had visual impact, a not so precise number is always welcomed.
Summary by CodeRabbit