Context
PR #396 wired the user-identity routes into the MistDemo web app. During review we removed the two Apple-deprecated lookup routes (/users/lookup/email, /users/lookup/id) from the web surface and routed all lookups through the supported POST /users/discover endpoint instead.
/users/discover currently forwards emails and user record names (both via UserIdentityLookupInfo). The underlying discoverUserIdentities(lookupInfos:) also accepts phone numbers (UserIdentityLookupInfo(phoneNumber:)), but the web demo doesn't expose them yet.
Task
Add phone-number support to the demo's discover panel:
- Request DTO (
WebRequests.DiscoverUsers): add a phoneNumbers: [String] field (decode with decodeIfPresent(...) ?? [], mirroring emails/userRecordNames).
WebBackend.webDiscoverUsers + CloudKitService conformance (CloudKitService+WebBackend+Users.swift): accept phoneNumbers and append phoneNumbers.map { UserIdentityLookupInfo(phoneNumber: $0) } to the combined lookup-info array.
- Frontend (
index.html + js/users.js): add a phone-numbers input to the Discover section; include phoneNumbers in the POST body and the CloudKit JS parity loop (discoverUserIdentityWithPhoneNumber).
- Tests/mock: extend
DiscoverUsersCall + usersDiscoverForwards to cover phone numbers.
References
Context
PR #396 wired the user-identity routes into the MistDemo web app. During review we removed the two Apple-deprecated lookup routes (
/users/lookup/email,/users/lookup/id) from the web surface and routed all lookups through the supportedPOST /users/discoverendpoint instead./users/discovercurrently forwards emails and user record names (both viaUserIdentityLookupInfo). The underlyingdiscoverUserIdentities(lookupInfos:)also accepts phone numbers (UserIdentityLookupInfo(phoneNumber:)), but the web demo doesn't expose them yet.Task
Add phone-number support to the demo's discover panel:
WebRequests.DiscoverUsers): add aphoneNumbers: [String]field (decode withdecodeIfPresent(...) ?? [], mirroringemails/userRecordNames).WebBackend.webDiscoverUsers+CloudKitServiceconformance (CloudKitService+WebBackend+Users.swift): acceptphoneNumbersand appendphoneNumbers.map { UserIdentityLookupInfo(phoneNumber: $0) }to the combined lookup-info array.index.html+js/users.js): add a phone-numbers input to the Discover section; includephoneNumbersin the POST body and the CloudKit JS parity loop (discoverUserIdentityWithPhoneNumber).DiscoverUsersCall+usersDiscoverForwardsto cover phone numbers.References
Examples/MistDemo/Sources/MistDemoKit/Server/WebServer+Users.swiftSources/MistKit/Models/Users/UserIdentityLookupInfo.swift