Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bec04d7
feat: add override functionality to remote feature flags
asalsys Nov 30, 2025
e78270a
fix lint
asalsys Dec 1, 2025
fe7db8b
fix lint
asalsys Dec 2, 2025
4413b2d
fix lint
asalsys Dec 2, 2025
e07e67c
fix lint
asalsys Dec 2, 2025
ec17188
edit changelog
asalsys Dec 2, 2025
fbdbd14
update pr info on changelog
asalsys Dec 2, 2025
c9cd5aa
fix test
asalsys Dec 2, 2025
4d02e47
fix transaction-controller test
asalsys Dec 2, 2025
e3a4f8f
fix prettier
asalsys Dec 2, 2025
35b8470
fix transaction pay test
asalsys Dec 2, 2025
4201e40
remove get actions
asalsys Dec 4, 2025
7ae47a3
update changelog and fix lint
asalsys Dec 4, 2025
71e4b7a
fix lint
asalsys Dec 8, 2025
ca479c8
fix tests
asalsys Dec 9, 2025
0063bce
update tests
asalsys Dec 9, 2025
9bbf745
update objects in tests
asalsys Dec 9, 2025
414f0f0
Merge branch 'main' into feat/override-functionality-to-remote-featur…
asalsys Dec 9, 2025
f17c947
fix tests
asalsys Dec 9, 2025
4d349ed
update to use the processVersionBasedFlag
asalsys Dec 10, 2025
6a6b98f
spread state
asalsys Dec 11, 2025
7e3500d
fix lint
asalsys Dec 11, 2025
434c892
Merge branch 'main' into feat/override-functionality-to-remote-featur…
asalsys Dec 11, 2025
6c75509
use rawRemoteFeatureFlags instead of processing each flag
asalsys Dec 11, 2025
e562809
fix update Cache
asalsys Dec 11, 2025
a09ceaa
fix lint
asalsys Dec 11, 2025
ffd58e9
update tests
asalsys Dec 11, 2025
c1af969
fix lint
asalsys Dec 11, 2025
9d99264
Update packages/remote-feature-flag-controller/src/remote-feature-fla…
asalsys Dec 12, 2025
1f49998
Update packages/remote-feature-flag-controller/CHANGELOG.md
asalsys Dec 12, 2025
e8f2ff1
Update packages/remote-feature-flag-controller/src/remote-feature-fla…
asalsys Dec 12, 2025
83017de
Update packages/remote-feature-flag-controller/src/remote-feature-fla…
asalsys Dec 12, 2025
6447545
Update packages/remote-feature-flag-controller/src/remote-feature-fla…
asalsys Dec 12, 2025
28a8548
Update packages/remote-feature-flag-controller/src/remote-feature-fla…
asalsys Dec 12, 2025
c3d09e5
Update packages/remote-feature-flag-controller/CHANGELOG.md
asalsys Dec 12, 2025
10c168d
add changes
asalsys Dec 12, 2025
d1357b7
address comments and fix changes
asalsys Dec 12, 2025
fb818a8
fix lint
asalsys Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/remote-feature-flag-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add override functionality to remote feature flags ([#7271](https://github.com/MetaMask/core/pull/7271))
- `setFlagOverride(flagName, value)` - Set a local override for a specific feature flag
- `clearFlagOverride(flagName)` - Clear the local override for a specific feature flag
- `clearAllOverrides()` - Clear all local feature flag overrides
- Add new controller state properties ([#7271](https://github.com/MetaMask/core/pull/7271))
- `localOverrides` - Local overrides for feature flags that take precedence over remote flags
- `rawProcessedRemoteFeatureFlags` - Raw flag value for arrays that were processed from arrays to single value
- Export additional controller action types ([#7271](https://github.com/MetaMask/core/pull/7271))
- `RemoteFeatureFlagControllerSetFlagOverrideAction`
- `RemoteFeatureFlagControllerClearFlagOverrideAction`
- `RemoteFeatureFlagControllerClearAllOverridesAction`

### Changed

- Enhanced feature flag processing to preserve raw A/B test arrays for visibility and override capabilities ([#7271](https://github.com/MetaMask/core/pull/7271))
- Local overrides now take precedence over remote feature flags when both exist ([#7271](https://github.com/MetaMask/core/pull/7271))
- Controller state now includes metadata for new properties with appropriate persistence and logging settings ([#7271](https://github.com/MetaMask/core/pull/7271))
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this covered by "Add new controller state properties"? Perhaps we don't need it.

Suggested change
- Controller state now includes metadata for new properties with appropriate persistence and logging settings ([#7271](https://github.com/MetaMask/core/pull/7271))


## [3.0.0]

### Added
Expand Down
3 changes: 3 additions & 0 deletions packages/remote-feature-flag-controller/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export type {
RemoteFeatureFlagControllerActions,
RemoteFeatureFlagControllerGetStateAction,
RemoteFeatureFlagControllerUpdateRemoteFeatureFlagsAction,
RemoteFeatureFlagControllerSetFlagOverrideAction,
RemoteFeatureFlagControllerClearFlagOverrideAction,
RemoteFeatureFlagControllerClearAllOverridesAction,
RemoteFeatureFlagControllerEvents,
RemoteFeatureFlagControllerStateChangeEvent,
} from './remote-feature-flag-controller';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,25 @@ export type ServiceResponse = {
remoteFeatureFlags: FeatureFlags;
cacheTimestamp: number | null;
};

/**
* Describes the shape of the state object for the {@link RemoteFeatureFlagController}.
*/
export type RemoteFeatureFlagControllerState = {
/**
* The collection of feature flags and their respective values, which can be objects.
*/
remoteFeatureFlags: FeatureFlags;
/**
* Local overrides for feature flags that take precedence over remote flags.
*/
localOverrides: FeatureFlags;
/**
* Raw A/B test flag arrays for flags that were processed from arrays to single values.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this always true? Will feature flags always contain A/B test arrays from now on? There don't seem to be any changes to the FeatureFlags array, so it seems like the format continues to be quite flexible and accommodate other use cases. (I see that Cursor also commented on this.)

*/
rawProcessedRemoteFeatureFlags: FeatureFlags;
/**
* The timestamp of the last successful feature flag cache.
*/
cacheTimestamp: number;
};
Loading
Loading