Skip to content

MistDemo web: add phone-number support to /users/discover #398

@leogdion

Description

@leogdion

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions