Update SDK to 3dbc272 (3.0.0-7302-10ba9cb) - #2894
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2894 +/- ##
==========================================
- Coverage 81.10% 78.89% -2.22%
==========================================
Files 1038 1161 +123
Lines 67332 74631 +7299
==========================================
+ Hits 54608 58878 +4270
- Misses 12724 15753 +3029 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Looks good, just a small ⛏️ . Also would it be possible to add a short summary of what's changing in the PR? i.e. what are the actual platform changes given the SDK being updated.
I believe that would add more context for the reviewer and also if we need to go back to a closed/merged PR to see what it was doing.
Also added the ai-review label.
| /// Whether the type is a bankAccount | ||
| var isBankAccount: Bool { | ||
| switch self { | ||
| case .bankAccount: | ||
| true | ||
| default: | ||
| false | ||
| } | ||
| } |
🤖 Bitwarden Claude Code ReviewOverall Assessment: REQUEST CHANGES Reviewed the SDK revision bump from Code Review Details
Verified as non-issues: the The missing test coverage for Dependency Changes
|
| private static func displayDate(from date: Date?) -> String { | ||
| guard let date else { return "" } | ||
| return date.formatted(date: .long, time: .omitted) | ||
| } |
There was a problem hiding this comment.
Details and fix
The previous implementation parsed the ISO string with TimeZone(identifier: "UTC") specifically so "a stored date reads back as the same calendar day regardless of device locale". That intent (and the parser) is gone, but the render call is still date.formatted(date: .long, time: .omitted), which uses TimeZone.autoupdatingCurrent. Since these SDK values are UTC-anchored calendar dates (midnight UTC — same anchoring Date(year:month:day:) produces, per its timeZone: TimeZone(secondsFromGMT: 0)! default), a DOB of 1989-08-01 renders as "July 31, 1989" for any user west of UTC.
BitwardenKit already has the helper built for exactly this case, and it's what the shared DateFieldPicker from PM-38360 uses:
// BitwardenKit/Core/Platform/Extensions/Date.swift
/// ... pinned to UTC so a UTC-anchored stored date reads back as the same
/// calendar day regardless of device time zone.
var longCalendarDateDisplay: StringSuggested fix (requires import BitwardenKit):
private static func displayDate(from date: Date?) -> String {
guard let date else { return "" }
return date.longCalendarDateDisplay
}The same applies to AddEditDriversLicenseItemState.swift:62-65.
Note the reworked tests won't catch this — #expect(subject.dateOfBirthDisplay == subject.dateOfBirth?.formatted(date: .long, time: .omitted)) asserts the implementation against itself, so it passes in any time zone.
Updates the SDK from
d4ac79827da8d4f293cf1aaae4ffb3cf3883bd47to3dbc27249f48fcb88c56739ece52e2335701de0bWhat's Changed
bitwarden-crypto-cipher-suitecrate sdk-internal#1250XAES-256-GCMto SymmetricCryptoKey, Enstring, and the KeyStoreContext sdk-internal#1264Raw changelog