Skip to content

chore: update version gated feature flag docs#32159

Merged
asalsys merged 3 commits into
mainfrom
chore/update-version-gated-feature-flag-docs
Jun 23, 2026
Merged

chore: update version gated feature flag docs#32159
asalsys merged 3 commits into
mainfrom
chore/update-version-gated-feature-flag-docs

Conversation

@asalsys

@asalsys asalsys commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

Version-gated remote feature flags are evaluated in many places across the codebase, but guidance was scattered across team-specific docs and there was no single canonical pattern for agents and contributors to follow.

This PR centralizes that guidance:

  1. New canonical guidedocs/readme/version-gated-feature-flags.md documents the SSOT (app/util/remoteFeatureFlag), the required selector pattern using validatedVersionGatedFeatureFlag, non-standard flag shapes, and forbidden duplicate helpers.
  2. Cursor agent rule.cursor/rules/version-gated-feature-flags.mdc enforces the same patterns for AI-assisted edits under app/**/*.{ts,tsx}.
  3. Cross-doc updates — Perps, Predict, mUSD, and Compliance docs now link to the canonical guide and show correct import/usage examples instead of implying ad-hoc version checks.
  4. Repo hygiene.gitignore is updated to track *.mdc Cursor rules (matching the existing carve-out pattern for other IDE config), and AGENTS.md references the new guide in the development guidelines table and quick reference.

No runtime or selector code changes — documentation and agent guidance only.

Changelog

CHANGELOG entry: null

Related issues

Refs: fixes: MCWP-653

Manual testing steps

N/A — documentation-only change. Verified by reading rendered markdown links and confirming .cursor/rules/version-gated-feature-flags.mdc is tracked after the .gitignore carve-out.

Screenshots/Recordings

N/A — no UI changes.

Before

N/A

After

N/A

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
Docs and agent guidance only; no runtime, selector, or feature-flag behavior changes.

Overview
Adds a canonical guide at docs/readme/version-gated-feature-flags.md and a matching Cursor rule (.cursor/rules/version-gated-feature-flags.mdc) so contributors and agents use validatedVersionGatedFeatureFlag from app/util/remoteFeatureFlag in selectors instead of duplicating version checks.

Cross-links and examples in Perps, Predict, mUSD, and Compliance docs now point at that guide and show the shared import pattern. AGENTS.md adds the guide to the dev guidelines table and quick reference.

.gitignore is adjusted so tracked *.mdc rules under .cursor/rules/ can be committed (carve-out for IDE config). No app or selector code changes.

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

asalsys and others added 2 commits June 18, 2026 19:31
Track repo-specific Cursor rule so contributors use validatedVersionGatedFeatureFlag
from app/util/remoteFeatureFlag instead of duplicating version-check helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
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.

@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 Jun 22, 2026
@metamask-ci metamask-ci Bot added the team-mobile-platform Mobile Platform team label Jun 22, 2026
@metamask-ci

metamask-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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

Warnings — informational, address before merging:

  • Pre-merge author checklist has unchecked items (e.g. "I've tested on Android"). 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.

@asalsys asalsys changed the title Chore/update version gated feature flag docs chore: update version gated feature flag docs Jun 22, 2026
@asalsys asalsys 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 Jun 22, 2026
caieu
caieu previously approved these changes Jun 23, 2026
@asalsys asalsys marked this pull request as ready for review June 23, 2026 16:51
@asalsys asalsys requested review from a team as code owners June 23, 2026 16:51
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 99%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 9 changed files are purely documentation and developer tooling configuration:

  1. .gitignore - Minor pattern update to allow .cursor/rules/*.mdc files to be tracked (no functional impact)
  2. AGENTS.md - Documentation update adding a reference to version-gated feature flags guide
  3. .cursor/rules/version-gated-feature-flags.mdc - Cursor IDE rules file (developer tooling only)
  4. docs/compliance.md, docs/musd/musd-convert-list.md, docs/perps/perps-feature-flags.md, docs/predict/live-nfl-architecture.md, docs/predict/tasks/00-feature-flag-and-types.md, docs/readme/version-gated-feature-flags.md - All documentation files

None of these changes touch application code, test infrastructure, controllers, UI components, navigation, or any functional behavior. No E2E tests are needed.

Performance Test Selection:
All changes are documentation and developer tooling configuration files. No application code was modified, so there is no performance impact whatsoever. No performance tests are needed.

View GitHub Actions results

@github-actions github-actions Bot added the risk:low AI analysis: low risk label Jun 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

@asalsys asalsys self-assigned this Jun 23, 2026
@asalsys asalsys added this pull request to the merge queue Jun 23, 2026
Merged via the queue into main with commit 35328c8 Jun 23, 2026
130 checks passed
@asalsys asalsys deleted the chore/update-version-gated-feature-flag-docs branch June 23, 2026 23:24
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-8.1.0 Issue or pull request that will be included in release 8.1.0 label Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-8.1.0 Issue or pull request that will be included in release 8.1.0 risk:low AI analysis: low risk size-M team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants