Skip to content

Conversation

@pcapriotti
Copy link
Contributor

@pcapriotti pcapriotti commented Oct 22, 2025

Add channel search endpoint.

https://wearezeta.atlassian.net/browse/WPB-16885

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 Oct 22, 2025
@pcapriotti pcapriotti marked this pull request as ready for review October 23, 2025 08:50
@pcapriotti pcapriotti requested review from a team as code owners October 23, 2025 08:50
@battermann battermann requested a review from Copilot October 27, 2025 10:55
Copy link
Contributor

Copilot AI left a 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 searchChannels implementation 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 SearchChannels permission 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.

Copy link
Contributor

@battermann battermann left a 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)

@pcapriotti pcapriotti merged commit d3377ce into develop Oct 28, 2025
9 checks passed
@pcapriotti pcapriotti deleted the channel-search branch October 28, 2025 10:18
Copilot AI mentioned this pull request Nov 4, 2025
2 tasks
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.

4 participants