Skip to content

Conversation

@isabellaenriquez
Copy link
Member

before

Screenshot 2025-10-14 at 10 10 46 AM

after

Screenshot 2025-10-14 at 10 10 35 AM

@linear
Copy link

linear bot commented Oct 14, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 14, 2025
@isabellaenriquez isabellaenriquez marked this pull request as ready for review October 14, 2025 14:11
@isabellaenriquez isabellaenriquez requested a review from a team as a code owner October 14, 2025 14:11
? prepaid * GIGABYTE
: isContinuousProfiling(category)
? prepaid * MILLISECONDS_IN_HOUR
: prepaid;
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Incorrect Calculation of Reserved Total

The reservedTotal calculation now relies solely on prepaid, which often defaults to zero or doesn't include the reserved and free amounts. This results in an incorrect denominator for percentage calculations, potentially causing division by zero or displaying an inaccurate usage percentage to users.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

prepaid is made up of reserved and free on the backend

zero division is not a problem since we only call getPercentage if reservedTotal is truthy

@isabellaenriquez isabellaenriquez merged commit b5a5925 into master Oct 14, 2025
46 checks passed
@isabellaenriquez isabellaenriquez deleted the isabella/bil-1674 branch October 14, 2025 15:55
chromy pushed a commit that referenced this pull request Oct 17, 2025
# before
<img width="403" height="509" alt="Screenshot 2025-10-14 at 10 10 46 AM"
src="https://github.com/user-attachments/assets/acb4dd30-a9bb-482f-9d8c-0cf260ef1e40"
/>

# after
<img width="420" height="491" alt="Screenshot 2025-10-14 at 10 10 35 AM"
src="https://github.com/user-attachments/assets/eee79083-49fc-41be-878b-c6e7875bd607"
/>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants