-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: get feature flag supports evaluating minimum required version #21792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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. |
9e76f9a to
f73ccf6
Compare
f73ccf6 to
d78bbe1
Compare
ee9fe41 to
daa18fe
Compare
daa18fe to
f7f554b
Compare
|
| return flagValue.enabled; | ||
| }, | ||
| [toastRef], | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Version Validation Fails in Production
The validateMinimumVersion function incorrectly returns flagValue.enabled for unsupported minimum versions in production. The version support check is currently coupled with the NODE_ENV condition, preventing it from returning false in production when a version is unsupported. This is contrary to test expectations, where version validation should apply regardless of environment.



Description
While fetching feature flag value, flags that support minimum version will automatically validate if the version is supported
Changelog
CHANGELOG entry: null
Related issues
Fixes:
https://consensyssoftware.atlassian.net/browse/MCWP-177
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Updates feature flag context to return raw values and auto-validate boolean-with-minimumVersion flags with a non-production toast on unsupported versions; adjusts UI type export and expands tests.
app/contexts/FeatureFlagOverrideContext.tsx):getFeatureFlagnow returns the raw flag value (orundefined) instead ofFeatureFlagInfo.boolean with minimumVersionflags viaisMinimumRequiredVersionSupported; shows aToast(non-production) and returnsfalseif unsupported.ToastContextandToastVariants; introducesvalidateMinimumVersionhelper.app/components/Views/FeatureFlagOverride/FeatureFlagOverride.tsx):MinimumVersionFlagValueinterface for shared typing.app/contexts/FeatureFlagOverrideContext.test.tsx):getFeatureFlagbehavior and version validation logic across environments.Written by Cursor Bugbot for commit e6e6945. This will update automatically on new commits. Configure here.