You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MistDemo web: add phone-number support to /users/discover #398
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.
The implementation follows this issue's spec exactly, and no Sources/MistKit/ change was needed — UserIdentityLookupInfo already had phoneNumber and a phoneNumber: init parameter, so the change is confined to Examples/MistDemo.
One caveat worth recording: the phone-number path was verified only through the mock backend, not against live CloudKit. DiscoverUsersCall + usersDiscoverForwards confirm that phoneNumbers is decoded from the request body and forwarded into discoverUserIdentities(lookupInfos:) as UserIdentityLookupInfo(phoneNumber:) — that is, the plumbing is proven, but not that CloudKit accepts these values or what format it expects.
Phone numbers are the likeliest of the three lookup kinds to have server-side format requirements (E.164 vs. national formatting, punctuation handling). If POST /users/discover is strict about that, the demo will forward whatever the user types and surface an opaque server error. Nothing in this change normalizes or validates the input.
Not proposing a fix — normalization may well belong to the caller rather than the demo — but flagging it so a live test with a real, discoverable phone number happens before this is treated as a working demo path.
Resolved on v1.0.0-beta.4 via #425 (commit b47c779). Phone numbers now flow through the MistDemo web /api/users/discover path; no Sources/MistKit change was required.
Activity
Address PR #396 review: discover-only user lookup + honest lookup sem…
Wire landed MistKit endpoints into MistDemo web app (#394) (#396)
leogdion commentedon Aug 20, 2026
Verification caveat for #425
The implementation follows this issue's spec exactly, and no
Sources/MistKit/change was needed —UserIdentityLookupInfoalready hadphoneNumberand aphoneNumber:init parameter, so the change is confined toExamples/MistDemo.One caveat worth recording: the phone-number path was verified only through the mock backend, not against live CloudKit.
DiscoverUsersCall+usersDiscoverForwardsconfirm thatphoneNumbersis decoded from the request body and forwarded intodiscoverUserIdentities(lookupInfos:)asUserIdentityLookupInfo(phoneNumber:)— that is, the plumbing is proven, but not that CloudKit accepts these values or what format it expects.Phone numbers are the likeliest of the three lookup kinds to have server-side format requirements (E.164 vs. national formatting, punctuation handling). If
POST /users/discoveris strict about that, the demo will forward whatever the user types and surface an opaque server error. Nothing in this change normalizes or validates the input.Not proposing a fix — normalization may well belong to the caller rather than the demo — but flagging it so a live test with a real, discoverable phone number happens before this is treated as a working demo path.
🤖 Generated with Claude Code
Add phone-number support to MistDemo web users/discover
Add phone-number support to MistDemo web users/discover
Add phone-number support to MistDemo web users/discover
leogdion commentedon Aug 28, 2026
Resolved on
v1.0.0-beta.4via #425 (commit b47c779). Phone numbers now flow through the MistDemo web/api/users/discoverpath; noSources/MistKitchange was required.Add phone-number support to MistDemo web users/discover
v1.0.0 beta.4 (#439)