Wip/featureflag groupsets v2 - #3325
Draft
danoswaltCL wants to merge 12 commits into
Draft
danoswaltCL wants to merge 12 commits into
danoswaltCL wants to merge 12 commits into
Conversation
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>
Contributor
There was a problem hiding this comment.
🟡 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
mainGroupsetusesSingleGroupSetValidator, sogroupsis 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) |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.