-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM 27122] Individual subscription page for self-hosted customers #17517
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?
[PM 27122] Individual subscription page for self-hosted customers #17517
Conversation
…elf-hosted-customers
|
Claude finished @cyprain-okeke's task —— View job Code Review CompleteSummaryThis PR improves the self-hosted individual subscription page with contextual license upload dialog text and conditional active badge display. The implementation is mostly solid, but has several findings requiring attention. FindingsFinding 1: Incomplete i18n message causes misleading text in user subscription view Finding 2: Duplicate i18n keys present in messages.json Finding 3: Legacy structural directives used instead of modern control flow syntax Finding 4: Inconsistent i18n pattern between components Finding 5: Incomplete test coverage (8.33% patch coverage with 55 lines missing) DetailsFinding 1: Incomplete i18n message causes misleading text ❌ In <p bitTypography="body1" class="tw-m-0" *ngIf="sub.expiration">
{{ "youNeedToUpdateLicenseFile" | i18n }}
<strong>{{ sub.expiration | date: "MMMM d, y" }}</strong>.
</p>The i18n key This appears to be a misuse of the i18n keys. Looking at
The template should either:
Recommendation: Update the template to properly use the i18n pattern with date placeholder, or revise the text to read more naturally (e.g., "You'll need to update your license file by November 27, 2028"). Finding 2: Duplicate i18n keys in messages.json The
Both [title]="(fromUserSubscription ? 'uploadLicense' : 'uploadLicenseFile') | i18n"While this works, it creates maintenance burden. Consider whether both keys are necessary or if one key would suffice with better naming. Finding 3: Legacy structural directives instead of modern control flow 🎨 The codebase uses legacy Angular structural directives ( self-hosted-premium.component.html:
user-subscription.component.html:
update-license-dialog.component.html:
While the CLAUDE.md acknowledges this is part of an active modernization effort and shouldn't be mandated for stable code, this PR introduces a brand new component ( Recommendation: Since Finding 4: Inconsistent i18n pattern between components 💭 The new self-hosted premium component defines feature lists directly in the constructor using protected premiumFeatures = [
this.i18nService.t("builtInAuthenticator"),
this.i18nService.t("secureFileStorage"),
// ...
];This pattern differs from the reactive i18n pipe pattern used extensively in the templates (e.g., Question: Is there a specific reason for using the imperative Finding 5: Incomplete test coverage Codecov reports 8.33% patch coverage with 55 lines missing coverage:
The PR checklist states "Written new unit and / or integration tests where applicable" is checked, but the new Recommendation: Add unit tests for:
Positive Notes
|
|
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 #17517 +/- ##
==========================================
- Coverage 41.25% 41.24% -0.01%
==========================================
Files 3546 3546
Lines 102040 102079 +39
Branches 15308 15315 +7
==========================================
+ Hits 42099 42106 +7
- Misses 58177 58209 +32
Partials 1764 1764 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|


🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-27122
📔 Objective
Improves the self-hosted individual subscription page by:
Changes
1. License upload dialog text updates
2. Active badge conditional display
📸 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