Skip to content

Conversation

@asalsys
Copy link
Contributor

@asalsys asalsys commented Dec 16, 2025

Explanation

This PR upgrades @metamask/remote-feature-flag-controller from v3.0.0 to v3.1.0 across the monorepo and bumps the monorepo version to 728.0.0.

Current State

The @metamask/remote-feature-flag-controller package is currently at version 3.0.0, which supports version-gated feature flags but lacks the ability for clients to locally override feature flag values for testing, debugging, or development purposes.

Solution

Version 3.1.0 introduces new override functionality that allows clients to set local overrides for feature flags. These overrides take precedence over remote feature flags, enabling:

  • Local testing of feature flags without modifying remote configuration
  • Debugging specific flag combinations
  • Development workflows that require flag manipulation

Changes in v4.0.0

New APIs:

  • setFlagOverride(flagName, value) - Set a local override for a specific feature flag
  • removeFlagOverride(flagName) - Clear the local override for a specific feature flag
  • clearAllFlagOverrides() - Clear all local feature flag overrides

New Optional State Properties:

  • localOverrides - Local overrides for feature flags that take precedence over remote flags
  • rawRemoteFeatureFlags - Raw flag value for all feature flags (separate from the merged view)

New Exports:

  • RemoteFeatureFlagControllerSetFlagOverrideAction
  • RemoteFeatureFlagControllerRemoveFlagOverrideAction
  • RemoteFeatureFlagControllerClearAllFlagOverridesAction

Breaking Changes

While this release is primarily additive, it's marked as a major version bump (v3.1.0) because:

  1. New state properties (localOverrides, rawRemoteFeatureFlags) are added to the controller state, which affects state serialization/deserialization
  2. Consumers need to ensure their state migration handles these new properties
  3. Type definitions have been updated to include the new action types

Package Updates

The following packages have been updated to use @metamask/remote-feature-flag-controller@^3.1.0:

  • @metamask/bridge-controller
  • @metamask/transaction-controller
  • @metamask/transaction-pay-controller

All changelogs have been updated to document this breaking dependency upgrade.

References

  • Related to #7271 - Add override functionality to remote feature flags
  • Related to #7519 - Upgrade remote-feature-flag-controller to v3.1.0

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Bumps the monorepo to 728.0.0 and upgrades @metamask/remote-feature-flag-controller to 3.1.0 with flag override APIs, updating dependent packages and changelogs.

  • Versioning
    • Bump monorepo version to 728.0.0.
  • Packages
    • packages/remote-feature-flag-controller
      • Release 3.1.0; adds local flag override APIs (setFlagOverride, removeFlagOverride, clearAllFlagOverrides) and optional state/exports; update CHANGELOG.md.
    • Dependents
      • Update dependencies to @metamask/remote-feature-flag-controller@^3.1.0 in packages/bridge-controller, packages/transaction-controller, and packages/transaction-pay-controller.
      • Reflect dependency bump in respective CHANGELOG.md files.
  • Tooling
    • Update yarn.lock to resolve new dependency versions.

Written by Cursor Bugbot for commit 53e3b53. This will update automatically on new commits. Configure here.

@asalsys asalsys requested review from a team as code owners December 16, 2025 19:19
@asalsys
Copy link
Contributor Author

asalsys commented Dec 16, 2025

extension preview build
MetaMask/metamask-extension#38879
mobile preview build
MetaMask/metamask-mobile#23487

@asalsys asalsys self-assigned this Dec 16, 2025
@github-project-automation github-project-automation bot moved this to Needs dev review in PR review queue Dec 16, 2025

## [Unreleased]

## [4.0.0]
Copy link
Member

Choose a reason for hiding this comment

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

Why a major version bump? Is one of these changes breaking?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I didn't know that is what constitute breaking. I put Major change because it added new functions and state objects

Copy link
Member

Choose a reason for hiding this comment

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

We use SemVer for package versions. See here for more guidance on when a change is breaking, and how to properly document it: https://github.com/MetaMask/core/blob/main/docs/breaking-changes.md

Copy link
Member

Choose a reason for hiding this comment

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

I noticed that the new properties you added are mandatory, so this is a breaking change at least for the state type.

Can you update the changelog to add a change entry about this? Or we can update the type in a separate PR to make those properties optional instead if you'd prefer, so that this isn't a breaking change anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the state variables and made them optional in this PR: #7521

and changed to a minor bump 3.1.0


- Bump `@metamask/assets-controllers` from `^93.1.0` to `^94.1.0` ([#7444](https://github.com/MetaMask/core/pull/7444), [#7488](https://github.com/MetaMask/core/pull/7488))
- Bump `@metamask/transaction-controller` from `^62.5.0` to `^62.7.0` ([#7430](https://github.com/MetaMask/core/pull/7430), [#7494](https://github.com/MetaMask/core/pull/7494))
- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
Copy link
Contributor

Choose a reason for hiding this comment

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

This PR is 7519 — can you update this PR number? That's why you were getting the errors from the changelog checker.

Suggested change
- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7519](https://github.com/MetaMask/core/pull/7519))


### Changed

- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here:

Suggested change
- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7519](https://github.com/MetaMask/core/pull/7519))

- Bump `@metamask/assets-controllers` from `^93.1.0` to `^94.1.0` ([#7444](https://github.com/MetaMask/core/pull/7444), [#7488](https://github.com/MetaMask/core/pull/7488))
- Bump `@metamask/transaction-controller` from `^62.6.0` to `^62.7.0` ([#7494](https://github.com/MetaMask/core/pull/7494))
- Bump `@metamask/bridge-controller` from `^64.1.0` to `^64.2.0` ([#7509](https://github.com/MetaMask/core/pull/7509))
- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here:

Suggested change
- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7499](https://github.com/MetaMask/core/pull/7499))
- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^4.0.0` ([#7519](https://github.com/MetaMask/core/pull/7519))

@georgeweiler georgeweiler requested a review from a team as a code owner December 16, 2025 20:46
## Explanation

The `localOverrides` and `rawRemoteFeatureFlags` properties were
recently added to `RemoteFeatureFlagControllerState` in PR #7271 as
required properties. However, consumers with existing persisted state
from before these properties were added will experience TypeScript
errors when their state is loaded, since these properties won't exist in
the persisted data but are marked as required.

This PR marks `localOverrides` and `rawRemoteFeatureFlags` as optional
in the `RemoteFeatureFlagControllerState` type to ensure backwards
compatibility with existing persisted state. The
`getDefaultRemoteFeatureFlagControllerState()` function continues to
initialize these properties with empty objects, so newly created state
will still have them populated.

## References

- Related to #7271

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them
@github-actions

This comment has been minimized.

@asalsys asalsys requested review from Gudahtt and mcmire December 16, 2025 22:26
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

LGTM.

@github-project-automation github-project-automation bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Dec 17, 2025
@asalsys asalsys added this pull request to the merge queue Dec 17, 2025
Merged via the queue into main with commit 4dd1d2b Dec 17, 2025
285 checks passed
@asalsys asalsys deleted the release/728.0.0 branch December 17, 2025 06:05
@github-project-automation github-project-automation bot moved this from Review finalised - Ready to be merged to Merged, Closed or Archived in PR review queue Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants