Skip to content

Feature/4.1.0 - #480

Open
annipi wants to merge 17 commits into
mainfrom
v4.1.0
Open

Feature/4.1.0#480
annipi wants to merge 17 commits into
mainfrom
v4.1.0

Conversation

@annipi

@annipi annipi commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Dominikkq and others added 17 commits July 30, 2026 15:06
Resolve conflicts in favor of the branch: keep the backoffice
feature-flags service, its wiring and tests, which the revert on main
(676deb0) had removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Resolve conflicts in favor of the branch: keep the backoffice
feature-flags service, its wiring and tests, which the revert on main
(676deb0) had removed.
…t-SUP-868

# Conflicts:
#	package-lock.json
#	package.json
# Conflicts:
#	ENV_VARIABLES.md
#	src/__tests__/unit/features.controller.unit.ts
#	src/__tests__/unit/services/backoffice-feature-flags.service.unit.ts
#	src/controllers/features.controller.ts
#	src/services/backoffice-feature-flags.service.ts
feat: wallet supportedBrowsers from backoffice flags [SUP-868]
Copilot AI lite review requested due to automatic review settings August 13, 2026 15:20
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@types/node 20.19.43 🟢 6.6
Details
CheckScoreReason
Code-Review🟢 9Found 29/30 approved changesets -- score normalized to 9
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 10security policy file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 9license file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 8dependency not pinned by hash detected -- score normalized to 8
Fuzzing⚠️ 0project is not fuzzed

Scanned Files

  • package-lock.json

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.

Pull request overview

This PR introduces a Backoffice integration that fetches and merges remotely managed feature flags (and provider/pairs availability) into the existing /features endpoint response, alongside a minor Node typing update and accompanying documentation/tests.

Changes:

  • Added BackofficeFeatureFlagsService to fetch/cache backoffice flags and merge them into locally stored features.
  • Wired the new service into dependency injection and FeaturesController.get() so /features can include backoffice-driven flags/providers.
  • Added unit tests and documented new environment variables; bumped package version and updated @types/node.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/services/index.ts Re-exports the new backoffice feature flags service.
src/services/daemon.service.ts Updates interval type to NodeJS.Timeout for modern Node typings.
src/services/backoffice-feature-flags.service.ts Implements backoffice flag retrieval, caching, parsing, and feature merging logic.
src/dependency-injection-handler.ts Registers BackofficeFeatureFlagsService as a singleton binding.
src/dependency-injection-bindings.ts Adds a DI binding key for the backoffice flags service.
src/controllers/features.controller.ts Calls backoffice service and merges returned flags/providers into /features output.
src/tests/unit/services/backoffice-feature-flags.service.unit.ts Adds unit coverage for flag/provider retrieval, caching, and merge rules.
src/tests/unit/features.controller.unit.ts Extends controller unit tests to cover merged backoffice flags/providers behavior.
package.json Bumps version to 4.1.0 and updates @types/node (Node engine already >=20).
package-lock.json Updates lockfile to match the new version and @types/node resolution.
ENV_VARIABLES.md Documents backoffice-related environment variables and /features merge semantics.

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

Comment on lines 69 to 75
features = await this.featuresDatService.getAll();
responseCode = this.HTTP_SUCCESS_OK;
const backofficeFlags = await this.backofficeFeatureFlagsService.getProviderFlags();
if (backofficeFlags) {
features = applyProviderFlags(features, backofficeFlags);
}
this.logger.info({method: 'get', featureCount: features.length}, 'Retrieved the features');
Comment on lines +4 to +16
/** Any JSON value the backoffice can hold for a flag, except null. */
export type FlagValue = boolean | string | number | Record<string, unknown> | unknown[];

export type ProviderFlags = Record<string, FlagValue>;

/**
* A feature as `/features` serves it: the stored shape, widened to the flag
* values the backoffice can hold, plus the pairs of a provider.
*/
export type MergedFeature = Omit<FeaturesDbDataModel, 'value'> & {
value: FlagValue;
pairs?: ProviderPair[];
};
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.

6 participants