Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jts/2006 improve search #94

Merged
merged 6 commits into from
Sep 20, 2024
Merged

Conversation

JohnSimonsen
Copy link

@JohnSimonsen JohnSimonsen commented Sep 18, 2024

Ensure there are no UI leakage of memberinfo in searches in SpotLightDialog / InviteDialog

  • Added a new feature flags:

    • showRoomMembersInSuggestions
      • true - Use Elements own suggestion logic, using all room memberships/space memberships as suggestions.
      • false - exclude suggestions, and use mostly search results to populate Suggestions.
    • showRecentsInSuggestions
      • true - User Element default logic for displaying "Recents" in InviteDialog
      • false - exclude "Recents" in invite dialog
  • It should not worsen the security/privacy, as the filtered recents should only be users you already share a DM with

  • If we don't allow "recents" I think we should consider create our own cache / some other solution

    • As it is bothersome to "have" to search, in order to select a member you wish to invite to a room.

Notes for later

  • Initially attempted to make the suggestions adhere to our business logic.
    • Some code from these attempts still in effect, as a security fallback / future use (SortMembers.ts buildMemberScores
    • Experimented with "building" a roomlist based on rooms tagged with "app.verji.tenant_nfo"
      • Was very ineffective because in order to check if a room has tag, we must call the async method cli.getStateEvent() which uses a synapse endpont to get the tag/info. Which will spam the server when iterating through all the rooms
      • A better solution would be to create a seperate endpoint to get the roomIds which are relevant in tenant for user.

While developing I also did extensive testing of the Business logic, our Custom User Search, and frontend to make sure the following:

image

Some changes required in backend, usersearch in order to solve the discrepancies, from expected result. As we in frontend, "trust" the search results fully.

@JohnSimonsen JohnSimonsen added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Sep 18, 2024
@JohnSimonsen JohnSimonsen merged commit ef73d22 into verji-develop Sep 20, 2024
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant