-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[DNM] Replace Hard-Coded Storage amount #17393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[DNM] Replace Hard-Coded Storage amount #17393
Conversation
|
New Issues (1)Checkmarx found the following issues in this Pull Request
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17393 +/- ##
==========================================
+ Coverage 40.93% 40.94% +0.01%
==========================================
Files 3544 3544
Lines 101725 101727 +2
Branches 15240 15239 -1
==========================================
+ Hits 41643 41656 +13
+ Misses 58327 58299 -28
- Partials 1755 1772 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Claude finished @sbrown-livefront's task —— View job Review of Latest ChangesI've reviewed the recent commits pushed to address the previous feedback. Here's my assessment: SummaryThe author has successfully addressed the previously identified issues: Finding 1: ✅ Null safety issues resolved - The storage calculation logic has been properly refactored in both Finding 2: ✅ Hard-coded template values fixed - The missed hard-coded storage references have been replaced:
Finding 3: ✅ Desktop translation updated - The Architecture ReviewThe implementation follows good practices:
No New IssuesThe changes are clean and focused on the objective. No new concerns identified in the latest commits. |
libs/common/src/billing/models/response/premium-plan.response.ts
Outdated
Show resolved
Hide resolved
apps/web/src/app/billing/organizations/change-plan-dialog.component.ts
Outdated
Show resolved
Hide resolved
amorask-bitwarden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are a few missed, hard-coded locations remaining:
| const additionalStorageTotal = plan.PasswordManager?.hasAdditionalStorageOption | ||
| ? plan.PasswordManager.additionalStoragePricePerGb * | ||
| (sub?.maxStorageGb ? sub.maxStorageGb - 1 : 0) | ||
| (sub.maxStorageGb - plan.PasswordManager.baseStorageGb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If sub.maxStorageGb is null, doing null - number will result in NaN. Can we check for null
| const discountPercentage = 20; | ||
| const acceptingSponsorship = false; | ||
| const storageGb = sub?.maxStorageGb ? sub?.maxStorageGb - 1 : 0; | ||
| const storageGb = sub.maxStorageGb - plan.PasswordManager.baseStorageGb; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If sub.maxStorageGb is null, doing null - number will result in NaN. Can we check for null
Gah, I tried a few combinations with search and still missed these. I'll update these. |


🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-27600
📔 Objective
PricingSummaryServiceNote: This cannot be merged until after bitwarden/server#6571
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes