Skip to content

Wip/featureflag groupsets v2 - #3325

Draft
danoswaltCL wants to merge 12 commits into
devfrom
wip/featureflag-groupsets-v2
Draft

danoswaltCL wants to merge 12 commits into
devfrom
wip/featureflag-groupsets-v2

Conversation

@danoswaltCL

Copy link
Copy Markdown
Collaborator

No description provided.

danoswaltCL and others added 9 commits September 15, 2026 14:40
Refactor groupset registration logic to include definition comparison and clear feature flags if necessary.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Batch middleware can misroute query-string requests and mishandle invalid bodies before validation.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds multi-groupset feature-flag evaluation across the backend, JavaScript SDK, and a new Angular playground.

Changes:

  • Adds validated single- and multi-groupset API modes with batched evaluation.
  • Extends the JavaScript SDK with per-groupset configuration, caching, and lookup.
  • Adds documentation, Postman examples, tests, and a playground application.
File summaries
File Description
postman/ClientAPI.postman_collection.json Documents new request modes.
packages/backend/test/unit/services/FeatureFlagService.test.ts Tests batched evaluation.
packages/backend/test/unit/middlewares/UserCheckMiddleware.test.ts Tests groupset user resolution.
packages/backend/test/unit/controllers/validators/FeatureFlagRequestValidator.test.ts Tests request validation.
packages/backend/src/types/index.ts Adds resolved sub-groupset documents.
packages/backend/src/api/services/FeatureFlagService.ts Implements batched flag evaluation.
packages/backend/src/api/middlewares/UserCheckMiddleware.ts Resolves groupset-specific users.
packages/backend/src/api/controllers/validators/FeatureFlagRequestValidator.ts Defines groupset schemas and constraints.
packages/backend/src/api/controllers/ExperimentClientController.v6.ts Exposes and documents batch mode.
clientlibs/js/src/UpGradeClient/UpgradeClient.ts Adds groupset configuration and caching.
clientlibs/js/src/UpGradeClient/UpgradeClient.spec.ts Tests SDK groupset behavior.
clientlibs/js/src/types/requests.ts Adds request body variants.
clientlibs/js/src/types/Interfaces.ts Adds public groupset interfaces.
clientlibs/js/src/DataService/DataService.ts Stores flags by groupset ID.
clientlibs/js/src/ApiService/ApiService.ts Sends new feature-flag requests.
clientlibs/js/src/ApiService/ApiService.spec.ts Tests request serialization.
clientlibs/js/ff-playground-app/tsconfig.json Configures TypeScript and Angular.
clientlibs/js/ff-playground-app/tsconfig.app.json Configures application compilation.
clientlibs/js/ff-playground-app/src/styles.css Adds global style placeholder.
clientlibs/js/ff-playground-app/src/main.ts Bootstraps the playground.
clientlibs/js/ff-playground-app/src/index.html Defines the application host page.
clientlibs/js/ff-playground-app/src/app/feature-flag-playground.service.ts Demonstrates groupset evaluation.
clientlibs/js/ff-playground-app/src/app/app.ts Implements the playground UI.
clientlibs/js/ff-playground-app/src/app/app.config.ts Configures Angular providers.
clientlibs/js/ff-playground-app/README.md Documents playground usage.
clientlibs/js/ff-playground-app/package.json Declares playground dependencies.
clientlibs/js/ff-playground-app/angular.json Configures Angular build and serve.
clientlibs/js/ff-playground-app/.gitignore Excludes generated artifacts.
Review details

Suppressed comments (1)

packages/backend/src/api/controllers/ExperimentClientController.v6.ts:727

  • mainGroupset uses SingleGroupSetValidator, so groups is mandatory here too, but the published schema says it is optional. Mark it required so API consumers do not generate requests that fail validation.
   *                   mainGroupset:
   *                     type: object
   *                     properties:
  • Files reviewed: 28/30 changed files
  • Comments generated: 6
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +29 to +30
req.body?.useMultipleGroupSets &&
Array.isArray(req.body.useMultipleGroupSets.subGroupsets)
Comment thread clientlibs/js/ff-playground-app/src/app/feature-flag-playground.service.ts Outdated
Comment thread packages/backend/src/api/middlewares/UserCheckMiddleware.ts
Comment thread clientlibs/js/ff-playground-app/README.md
Comment thread clientlibs/js/ff-playground-app/src/app/app.ts Outdated
danoswaltCL and others added 3 commits September 16, 2026 12:57
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Updated remove button to include aria-label for accessibility.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Ensure unique values are stored in allGroups for each type.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants