-
Notifications
You must be signed in to change notification settings - Fork 334
Channel search #4821
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
Channel search #4821
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a channel search endpoint that allows users to list and search channels within a team, replacing the previous stub implementation. The endpoint is now located at GET /teams/:tid/channels/search instead of the previous /search/channels location.
Key changes:
- Moves the
searchChannelsimplementation from the Update module to the Query module with proper permission checking - Implements PostgreSQL-backed channel search with pagination and sorting support
- Adds a new
SearchChannelspermission requirement for team members
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| services/galley/src/Galley/API/Update.hs | Removes the stub searchChannels function and related imports |
| services/galley/src/Galley/API/Query.hs | Adds the implemented searchChannels function with permission checks and database queries |
| services/galley/src/Galley/API/Public/Team.hs | Adds the search-channels endpoint to the Team API |
| services/galley/src/Galley/API/Public/Conversation.hs | Removes the stub channel search endpoint from Conversation API |
| services/brig/src/Brig/API/Public.hs | Removes unnecessary parentheses in field assignments |
| libs/wire-subsystems/src/Wire/UserGroupSubsystem/Interpreter.hs | Refactors pagination state construction to use new helper function |
| libs/wire-subsystems/src/Wire/UserGroupStore/Postgres.hs | Refactors to use shared pagination clause helper |
| libs/wire-subsystems/src/Wire/Postgres.hs | Adds shared helper functions for query construction and count parsing |
| libs/wire-subsystems/src/Wire/PaginationState.hs | Adds helper functions for pagination state management |
| libs/wire-subsystems/src/Wire/ConversationStore/Postgres.hs | Implements the PostgreSQL query for channel search |
| libs/wire-subsystems/src/Wire/ConversationStore/Cassandra.hs | Adds stub implementation that returns empty results |
| libs/wire-subsystems/src/Wire/ConversationStore.hs | Adds SearchConversations action and ConversationSearch data type |
| libs/wire-api/src/Wire/API/UserGroup/Pagination.hs | Moves SortBy and related types to the shared Pagination module |
| libs/wire-api/src/Wire/API/Team/Member.hs | Adds SearchChannels permission to team member permissions |
| libs/wire-api/src/Wire/API/Routes/Public/Galley/Team.hs | Adds the channel search route definition to Team API |
| libs/wire-api/src/Wire/API/Routes/Public/Galley/Conversation.hs | Removes stub channel search route from Conversation API |
| libs/wire-api/src/Wire/API/Pagination.hs | Adds shared SortBy, sorting helpers, and documentation functions |
| libs/wire-api/src/Wire/API/Conversation/Pagination.hs | Updates to use ConversationSearchResult instead of full Conversation objects |
| integration/test/Test/ChannelSearch.hs | Adds comprehensive integration tests for the channel search endpoint |
| integration/test/API/Galley.hs | Adds helper function for testing channel search |
| integration/integration.cabal | Registers the new test module |
| charts/nginz/values.yaml | Updates nginx routing configuration for the new endpoint path |
| changelog.d/2-features/channel-search | Documents the new feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
battermann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (only very minor comments)
Add channel search endpoint.
https://wearezeta.atlassian.net/browse/WPB-16885
Checklist
changelog.d