[PM-38808] Support optional encrypted Cipher.name#2773
Conversation
Adapts to the SDK making encrypted Cipher.name optional (sdk-internal#1122).
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR adapts two SDK-to-network model conversion sites ( Code Review DetailsNo findings. The change is minimal, targeted, and well-scoped:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2773 +/- ##
==========================================
+ Coverage 87.89% 87.90% +0.01%
==========================================
Files 1716 1717 +1
Lines 167350 167663 +313
==========================================
+ Hits 147092 147390 +298
- Misses 20258 20273 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🤔 Under what circumstances will the user see a blank name because of the nil-coalescing to an empty string? |
The encrypted name will only come back null for blob encrypted ciphers. In such cases the only way to access the decrypted name property is via decrypting the blob and access the resulting |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-38808
📔 Objective
The SDK is making the encrypted
Cipher.namefield optional (String→String?) as part of the blob encryption migration (sdk-internal#1122) — blob-encrypted ciphers carry the name inside the sealeddatablob rather than as a top-level field.The SDK → network conversions
CipherRequestModel.init(cipher:)andCipherDetailsResponseModel.init(cipher:)assign into non-optionalnamefields, so the now-nullablenameno longer compiles. These fall back to an empty string when the name is absent.The decrypted
CipherView/CipherListViewnamefields are unchanged, so all UI is unaffected.