-
Notifications
You must be signed in to change notification settings - Fork 79
[PM-27190] Improve performance on Autofill Passwords + Fido2 list #2091
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
[PM-27190] Improve performance on Autofill Passwords + Fido2 list #2091
Conversation
…r autofill Fido2 + passwords in multiple sections flow.
|
Claude finished @fedemkr's task —— View job Code Review CompleteSummary of ChangesThis PR refactors the autofill credentials publisher for the Key changes:
Critical IssuesNone identified. The code appears to be well-implemented with proper error handling, security considerations, and comprehensive test coverage. Suggested Improvements
|
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2091 +/- ##
==========================================
- Coverage 85.28% 83.04% -2.25%
==========================================
Files 1695 1975 +280
Lines 144628 161630 +17002
==========================================
+ Hits 123344 134219 +10875
- Misses 21284 27411 +6127 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… and adding several missing tests.
| public var uri: String? { | ||
| guard let serviceIdentifier = serviceIdentifiers.first else { | ||
| // WORKAROUND: In the Fido2 + Passwords vault list flow the OS is not sending | ||
| // the appropriate `serviceIdentifiers` therefore we cannot get the `URI` to filter | ||
| // so we use the `relyingPartyIdentifier` as the `URI` to filter instead as the | ||
| // temporary fix for this as it might be similar to the original `URI`. | ||
| // If at some point the OS fixes that problem, then this would be automatically sorted out | ||
| // as it wouldn't enter this block of the flow and use the previous working approach | ||
| // of getting it from the `serviceIdentifiers`. | ||
| if case let .autofillFido2VaultList(_, passkeyParameters) = extensionMode, | ||
| !passkeyParameters.relyingPartyIdentifier.isEmpty { | ||
| return passkeyParameters.relyingPartyIdentifier | ||
| } | ||
|
|
||
| return nil | ||
| } |
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.
🤔 Even though Claude has a point in here about adding a ticket TODO to clear this; I may be inclined to leave this code there in case Apple fixes the issue and then breaks it again in a future release. It seems like a good fallback when the uri is not provided from the service identifiers. What do you think? @KatherineInCode @matt-livefront
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 it's fine not having an explicit TODO for this sort of thing. I feel like we've had "check if this is still broken if we're on a future version of iOS" comments before 🤔
...hared/Core/Autofill/Utilities/CredentialProviderContext/CredentialProviderContextTests.swift
Outdated
Show resolved
Hide resolved
BitwardenShared/Core/Vault/Helpers/VaultListSectionsBuilder.swift
Outdated
Show resolved
Hide resolved
… URI on the autofill Fido2 + passwords flow. Inversed the order of the FIdo2 + Passwords sections. Fixed combined single section data preparator to add each cipher once.

🎟️ Tracking
PM-27190
📔 Objective
Refactors the ciphers autofill publisher to use the new approach for the
.combinedMultipleSectionsflow (autofilling Fido2 + Passwords credentials shown in different sections).This is being done in order to improve the overall performance of the list loading, which will load faster and consume less memory given the credentials are being decrypted and filtered in bulk. This is similar to #1939.
⛏️ Also fixed some warnings in the project.
Important
Added a
WORKAROUNDwhen getting the URI on this flow as Apple doesn't seem to be sending the service identifiers thus we can't get the URI from them to filter the vault. Therefore the relying party identifier is taken as the URI to filter in order to fix this scenario until Apple fixes the issue. CheckCredentialProviderContext -> uri(it was moved there in order to add tests)⏰ 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