Skip to content

Conversation

blackheaven
Copy link
Contributor

@blackheaven blackheaven commented Sep 16, 2025

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

Checklist

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

WIP

  • Rely on persistence (17126)
  • Tests

Design considerations

I'm not happy with the design, I can either:

  • Leave is as it
  • Push the fetch (and options) in the interpreter, making it rely on GalleyAPIAccess
  • Use/Introduce a data-type to enforce channels/channelsCount from the effect

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Sep 16, 2025
@blackheaven blackheaven force-pushed the gdifolco/WPB-19713_user-groups-channels-list branch 2 times, most recently from 228209f to e9cf397 Compare September 22, 2025 11:06
@blackheaven blackheaven changed the base branch from develop to gdifolco/WPB-19712_user-groups-update-endpoint September 22, 2025 14:47
@blackheaven blackheaven force-pushed the gdifolco/WPB-19713_user-groups-channels-list branch from e9cf397 to 4a6c392 Compare September 22, 2025 17:21
@blackheaven blackheaven marked this pull request as ready for review September 22, 2025 17:30
@blackheaven blackheaven requested review from a team as code owners September 22, 2025 17:30
@blackheaven blackheaven force-pushed the gdifolco/WPB-19713_user-groups-channels-list branch from 1dbdc78 to bd253ff Compare September 23, 2025 14:16
@blackheaven blackheaven self-assigned this Sep 23, 2025
@blackheaven blackheaven force-pushed the gdifolco/WPB-19713_user-groups-channels-list branch 2 times, most recently from c325bbe to c71074e Compare October 2, 2025 13:43
@blackheaven blackheaven force-pushed the gdifolco/WPB-19712_user-groups-update-endpoint branch from 4ed864c to 909912b Compare October 2, 2025 15:09
@blackheaven blackheaven force-pushed the gdifolco/WPB-19713_user-groups-channels-list branch from c71074e to b4af1e1 Compare October 2, 2025 15:52
@battermann battermann requested a review from Copilot October 7, 2025 08:22
Copy link

@Copilot 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 implements the channels and channelsCount fields in user-groups endpoints, addressing ticket WPB-19713. The implementation adds functionality to fetch and include channel information when retrieving user groups.

Key changes:

  • Add ListChannels operation to retrieve channels associated with user groups
  • Implement conditional channel fetching based on include_channels query parameter
  • Update API routes and test coverage for the new functionality

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
services/brig/src/Brig/API/Public.hs Implements channel fetching logic in getUserGroup and getUserGroups handlers
services/brig/default.nix Adds vector dependency for channel count calculations
services/brig/brig.cabal Adds vector library dependency
postgres-schema.sql Contains duplicate table definition (appears to be unintentional)
libs/wire-subsystems/test/unit/Wire/MockInterpreters/UserGroupStore.hs Implements mock interpreter for ListUserGroupChannels
libs/wire-subsystems/src/Wire/UserGroupSubsystem/Interpreter.hs Adds listChannels function with proper authorization checks
libs/wire-subsystems/src/Wire/UserGroupSubsystem.hs Defines ListChannels operation in the subsystem interface
libs/wire-subsystems/src/Wire/UserGroupStore/Postgres.hs Implements PostgreSQL query for listing user group channels
libs/wire-subsystems/src/Wire/UserGroupStore.hs Adds ListUserGroupChannels to the store interface
libs/wire-api/src/Wire/API/Routes/Public/Brig.hs Updates API documentation and adds include_channels query parameter
integration/test/Test/UserGroup.hs Updates test to verify channel inclusion functionality
integration/test/API/Brig.hs Adds helper function for testing channel inclusion
changelog.d/2-features/WPB-19713 Documents the feature addition

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@blackheaven blackheaven force-pushed the gdifolco/WPB-19712_user-groups-update-endpoint branch from db1b267 to 2dea4d2 Compare October 8, 2025 08:51
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