Skip to content

Conversation

@sallem-consensys
Copy link
Contributor

@sallem-consensys sallem-consensys commented Oct 24, 2025

Description

This PR is to show users the fetched feature flags that they pulled from the launch darkly api.

Changelog

CHANGELOG entry: added viewable navigator in settings to testers and developers to view release flag

Related issues

Fixes: #21768

Manual testing steps

Feature: Viewable Feature flags

  Scenario: user views feature flag dashboard
    Given basic functionality is toggled on

    When user navigates to settings Feature Flag Override
    Then they will see a dashboard to view the feature flags they have activated

Screenshots/Recordings

Before

no feature flag override page as it did not exist

After

preview-demo-feature-flag-override.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Adds a non‑production Feature Flag Override screen with override management, wired into Settings/navigation, backed by a new context, hook, and utilities, with tests and i18n updates.

  • UI:
    • Add Views/FeatureFlagOverride screen to list/search/filter flags and edit/reset overrides; displays stats via useFeatureFlagStats.
  • Navigation/Settings:
    • Register Routes.FEATURE_FLAG_OVERRIDE and conditionally add FeatureFlagOverride screen and Settings drawer item (non‑production only).
  • State/Context:
    • Introduce FeatureFlagOverrideProvider context for managing overrides (set/remove/clear, apply, count) and expose processed FeatureFlagInfo list.
    • Wrap app root with FeatureFlagOverrideProvider.
  • Hooks/Utils:
    • Add useFeatureFlagStats hook for flag type counts.
    • Add feature‑flag utilities: getFeatureFlagType, getFeatureFlagDescription, isMinimumRequiredVersionSupported.
  • Localization:
    • Add en strings for Settings “Feature Flag Override”.
  • Tests:
    • Comprehensive tests for the new screen, context, hook, utilities, and updated snapshots.

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

@sallem-consensys sallem-consensys requested review from a team as code owners October 24, 2025 18:48
@sallem-consensys sallem-consensys self-assigned this Oct 24, 2025
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-mobile-platform Mobile Platform team label Oct 24, 2025
cursor[bot]

This comment was marked as outdated.

@github-actions github-actions bot added size-XL and removed size-L labels Oct 24, 2025
@sallem-consensys sallem-consensys changed the title Feat/viewable navigator in settings to testers and developers to view viewable feature flags feat/viewable navigator in settings to testers and developers to view viewable feature flags Oct 27, 2025
@sallem-consensys sallem-consensys changed the title feat/viewable navigator in settings to testers and developers to view viewable feature flags feat: viewable navigator in settings to testers and developers to view viewable feature flags Oct 27, 2025
cursor[bot]

This comment was marked as outdated.

@sallem-consensys sallem-consensys force-pushed the feat/ffr-mwmr-175 branch 2 times, most recently from ff74a75 to 58d51c8 Compare October 28, 2025 17:05
cursor[bot]

This comment was marked as outdated.

@@ -0,0 +1,443 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't disable eslint rules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

using unknown resolves this

...GeneralSettings.navigationOptions,
}}
/>
<Stack.Screen
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we only initialize this stack if not production?

@@ -0,0 +1,174 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't disable the usage of any

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved with unknown

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove the disable?

@@ -0,0 +1,133 @@
# Feature Flag Override Context
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont think we need this documentation for the feature, its self explanatory, wdyt?

If you think otherwise, we should change the name of the file to reflect what it is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok will remove

@@ -0,0 +1,456 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't disable lint rules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

enabled rule again

@@ -0,0 +1,76 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't disable lint rules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

converted to unknown

tommasini
tommasini previously approved these changes Oct 28, 2025
...GeneralSettings.navigationOptions,
}}
/>
{process.env.MM_ENABLE_FEATURE_FLAG_OVERRIDE === 'true' && (
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 true for rc builds?

Copy link
Contributor Author

@sallem-consensys sallem-consensys Oct 29, 2025

Choose a reason for hiding this comment

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

just prod builds updated

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

tommasini
tommasini previously approved these changes Oct 29, 2025
- Reverted all language files except en.json to main branch state
- Kept only the feature_flag_override additions in en.json
thumbColor={theme.brandColors.white}
ios_backgroundColor={theme.colors.border.muted}
/>
);
Copy link

Choose a reason for hiding this comment

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

Bug: Boolean Switch Component Unintentionally Disabled

The Switch component for boolean feature flags is unexpectedly disabled, preventing users from toggling them. This makes the onValueChange handler unreachable and defeats the purpose of overriding boolean flags, which tests expect to be functional. This behavior differs from the boolean with minimumVersion type, where the disabled prop is intentionally commented out with a TODO.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this PR is for read only currently

@sonarqubecloud
Copy link

@sallem-consensys sallem-consensys added this pull request to the merge queue Oct 29, 2025
Merged via the queue into main with commit aae7ae2 Oct 29, 2025
86 of 87 checks passed
@sallem-consensys sallem-consensys deleted the feat/ffr-mwmr-175 branch October 29, 2025 18:35
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2025
@metamaskbot metamaskbot added the release-7.59.0 Issue or pull request that will be included in release 7.59.0 label Oct 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.59.0 Issue or pull request that will be included in release 7.59.0 size-XL team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Flag Improvements Phase 1

6 participants