Skip to content

Conversation

@eyeinsky
Copy link
Contributor

@eyeinsky eyeinsky commented Dec 16, 2025

WPB-21366: [Backend] Add type field to search contacts endpoint response

This PR adds the type field to contacts retrieved from GET /search/contacts. To achieve this it needs to send that field to Elastic Search as that's where the search happens. The challenge (sometimes) is in how to determine whether the user is an app or not, as that depends on whether there is an according row in the apps table for the user (i.e, it's a derived field and not a field on the user row).

Leaving this as draft, as there is still work outstanding:

  • comments marked with XXX, all these should be resolved before merging
  • adapt wire-subsystems' unit tests for the new field. Started adding State [StoredApp] there to the UserStore interpreter, as consulting the apps determines a user's type

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Dec 16, 2025
@eyeinsky eyeinsky force-pushed the ml/WPB-21366--add-type-field-to-search-contacts branch 2 times, most recently from fbd0b50 to c76d34c Compare December 19, 2025 16:57
@eyeinsky eyeinsky force-pushed the ml/WPB-21366--add-type-field-to-search-contacts branch 5 times, most recently from 5ec54b8 to 83fcf33 Compare December 31, 2025 11:25
@akshaymankar akshaymankar force-pushed the ml/WPB-21366--add-type-field-to-search-contacts branch from 164945d to f5501ad Compare January 5, 2026 09:04
- fix comment
- add `getUserType` helper, use it
It needs to be constructed at sync time: it's a derived field (i.e,
not a field on the user table in Cassandra).
@akshaymankar akshaymankar force-pushed the ml/WPB-21366--add-type-field-to-search-contacts branch from f5501ad to 38aa39c Compare January 5, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants