Skip to content

Fixed quota number on profile#161

Merged
breadddevv merged 2 commits into
mainfrom
fix/quota-profile
Jul 8, 2026
Merged

Fixed quota number on profile#161
breadddevv merged 2 commits into
mainfrom
fix/quota-profile

Conversation

@breadddevv

@breadddevv breadddevv commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

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.

Before After
Screenshot_20260708_111422 Screenshot_20260708_111310

Summary by CodeRabbit

  • Bug Fixes
    • Improved the displayed quota usage values so they now better match the progress bar and are rounded consistently.
    • Removed an unnecessary UI import to keep the component leaner.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@breadddevv, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1d8af70e-aa01-40eb-80eb-e2caaec2e3df

📥 Commits

Reviewing files that changed from the base of the PR and between 391bb16 and d935e0f.

📒 Files selected for processing (1)
  • components/profile/quotas.tsx
📝 Walkthrough

Walkthrough

Modified 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.

Changes

Quota Display Fix

Layer / File(s) Summary
Recompute currentVal from bar width
components/profile/quotas.tsx
Displayed currentVal now computed as rounded barWidth/100 * quota.value with a guard for missing quota.value, replacing the previous quota.currentValue-based logic; removed unused Tooltip import.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: correcting the quota number shown on the profile page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/quota-profile

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
components/profile/quotas.tsx (1)

113-113: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove 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 currentValue on 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4dc0366 and 391bb16.

📒 Files selected for processing (1)
  • components/profile/quotas.tsx

Comment thread components/profile/quotas.tsx Outdated
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@breadddevv breadddevv merged commit 02ffb69 into main Jul 8, 2026
5 checks passed
@breadddevv breadddevv deleted the fix/quota-profile branch July 8, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant