fix: address AutoFill extension code review findings

- Remove dead provideCredentialWithoutUserInteraction override and
  unlockSilently() helper (nothing registers credential identities,
  so it could never run, and it was a footgun for future inline
  QuickType work).
- Surface non-cancellation biometric unlock failures into
  errorMessage instead of swallowing them, matching
  UnlockViewModel.unlockWithBiometrics().
- Forward VaultSession.objectWillChange into ExtensionViewModel via
  Combine so the lock/unlock UI transition no longer depends on an
  accidental isUnlocking side effect, matching VaultViewModel's
  pattern.
- Show the "Open MyPass" deep-link escape hatch whenever unlock
  fails (errorMessage set), not only when there's no bookmark yet,
  per the extension constraints spec.
- Add INFOPLIST_KEY_NSFaceIDUsageDescription to the MyPass and
  AutoFill targets' Debug/Release build configs.

Also folds in pre-existing alphabetical reordering of two
PBXBuildFile/PBXFileReference entries in project.pbxproj from an
earlier task, since this same file is already being touched here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WYqycDFsynHH9VnnK7LNSf
This commit is contained in:
2026-09-19 19:24:35 +02:00
co-authored by Claude Sonnet 5
parent e52cf3f39b
commit 5281ce4895
3 changed files with 14 additions and 32 deletions
@@ -22,32 +22,6 @@ final class CredentialProviderViewController: ASCredentialProviderViewController
showUI(serviceIdentifiers: ids)
}
// Called for inline QuickType suggestion (no UI shown).
override func provideCredentialWithoutUserInteraction(for credentialIdentity: ASPasswordCredentialIdentity) {
Task {
do {
try await unlockSilently()
let all = session.allEntries()
if let entry = all.first(where: { $0.id.uuidString == credentialIdentity.recordIdentifier }) {
let credential = ASPasswordCredential(user: entry.username, password: entry.password.reveal())
self.extensionContext.completeRequest(withSelectedCredential: credential, completionHandler: nil)
} else {
self.extensionContext.cancelRequest(withError: ASExtensionError(.credentialIdentityNotFound))
}
} catch {
self.extensionContext.cancelRequest(withError: ASExtensionError(.userInteractionRequired))
}
}
}
private func unlockSilently() async throws {
guard session.isLocked else { return }
let password = try keychainStore.load(for: "masterPassword")
let url = try bookmarkService.resolveURL()
defer { bookmarkService.stopAccess(url: url) }
try session.unlock(url: url, password: password)
}
private func showUI(serviceIdentifiers: [String]) {
let rootView = ExtensionRootView(
session: session,