Chore: Account Summaries list in UI should be immutable#7147
Chore: Account Summaries list in UI should be immutable#7147david-livefront wants to merge 1 commit into
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This tech-debt PR changes the Code Review Details
|
| BitwardenAccountSwitcher( | ||
| isVisible = isAccountMenuVisible, | ||
| accountSummaries = state.accountSummaries.toImmutableList(), | ||
| accountSummaries = state.accountSummaries, |
There was a problem hiding this comment.
♻️ DEBT: Redundant .toImmutableList() calls remain in other account-switcher screens
Details
Nice cleanup here removing .toImmutableList() now that LandingState.accountSummaries is an ImmutableList. The same conversion is now also redundant in the other screens whose state fields were changed to ImmutableList in this PR, but wasn't removed:
app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/VaultScreen.kt:313app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingScreen.kt:504app/src/main/kotlin/com/x8bit/bitwarden/ui/auth/feature/login/LoginScreen.kt:137app/src/main/kotlin/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockScreen.kt:225
Each calls state.accountSummaries.toImmutableList() on a value that is already ImmutableList<AccountSummary>. Not a bug, but removing them here would complete the objective and keep the call sites consistent.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7147 +/- ##
==========================================
- Coverage 86.76% 86.09% -0.68%
==========================================
Files 868 927 +59
Lines 63975 66090 +2115
Branches 9585 9630 +45
==========================================
+ Hits 55511 56897 +1386
- Misses 5023 5739 +716
- Partials 3441 3454 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0d7c02a to
d923ae3
Compare
🎟️ Tracking
N/A
📔 Objective
This PR updates the
AccountSummarieslist in the UI state to use anImmutableList.