Skip to content

chore: support deprecating controller by controller#33368

Open
juanmigdr wants to merge 3 commits into
mainfrom
chore/support-deprecating-each-controller
Open

chore: support deprecating controller by controller#33368
juanmigdr wants to merge 3 commits into
mainfrom
chore/support-deprecating-each-controller

Conversation

@juanmigdr

@juanmigdr juanmigdr commented Jul 15, 2026

Copy link
Copy Markdown
Member

Description

Extends the existing assetsUnifyState remote feature flag to support a deprecatedControllers array, mirroring the pattern already used on the Extension. This allows individual controllers to be deprecated one-by-one via LaunchDarkly without a code deploy.

Changes:

  • Added deprecatedControllers?: string[] to the AssetsUnifyStateFeatureFlag type
  • Added getIsDeprecatedController(flagValue, controllerName) helper to check if a specific controller is listed for deprecation
  • Added selectIsControllerDeprecated(controllerName) selector factory for use in controller init files
  • Updated the feature-flag registry to include deprecatedControllers: [] in the assetsUnifyState production default shape

Changelog

CHANGELOG entry: support deprecating controller by controller from assets

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-3637

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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

Low Risk
Flag-shape and selector-only changes with defensive defaults; no runtime controller behavior changes until consumers adopt the new API.

Overview
Adds remote-config support to mark individual Engine controllers as deprecated under the assetsUnifyState flag, aligned with the Extension pattern.

AssetsUnifyStateFeatureFlag now accepts an optional deprecatedControllers string array. getIsDeprecatedController and selectIsControllerDeprecated(controllerName) read that list from remote flags (missing/invalid flag data safely yields false). Unit tests cover list membership, empty/absent arrays, and bad flag values.

The feature-flag registry updates assetsUnifyState production defaults to include deprecatedControllers: [] and adds an 8.3.0 version entry with the flag enabled at feature version 1. Controller init files are not changed in this PR—the new selector is intended for follow-up wiring.

Reviewed by Cursor Bugbot for commit f364668. Bugbot is set up for automated code reviews on this repo. Configure here.

@juanmigdr juanmigdr requested a review from a team as a code owner July 15, 2026 16:55
@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jul 15, 2026
@metamask-ci

metamask-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

  • Manual testing steps still contain template content (the Gherkin example title or a [...] placeholder). Replace with real steps, or write N/A — <reason>.
  • Screenshots/Recordings section is empty. Add an image/video for user-facing changes, logs/console output for non-user-facing changes, or write N/A if no evidence is applicable.
  • Pre-merge author checklist has unchecked items (e.g. "I've followed MetaMask Contributor Docs and MetaMask Mobile Coding Standards."). Every box must be consciously checked — see docs/readme/ready-for-review.md.

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

Comment thread app/selectors/featureFlagController/assetsUnifyState/index.ts
@github-actions github-actions Bot added the risk:low AI analysis: low risk label Jul 15, 2026
@juanmigdr juanmigdr removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants