Description
When an identity has a single-value override on a feature that is later made multivariate, the "Edit User Feature" modal stops showing the identity's override value. In multivariate mode the editor renders only the flag's options as radios (control + each variant), so an override whose value is not one of those options has nowhere to appear. The control row shows the environment's control value, so the identity looks like it is on the default.
The override is intact and the SDK serves it correctly, so this is a display issue in the override editor. If the user saves that modal, the displayed control value is written over the override, so the value can be lost on save.
Steps to reproduce
- Create a standard flag with control value
ENV_DEFAULT.
- Set an identity override on it to
MY_OVERRIDE.
- On the Features page, make the feature multivariate: update the control value and add a variant
VARIANT_A.
- Open that identity and open the "Edit User Feature" modal for the flag.
Expected
The editor shows the identity's override value (MY_OVERRIDE).
Actual
The editor shows the flag's control value selected. MY_OVERRIDE is not shown anywhere in the modal. The identities list still shows MY_OVERRIDE, and the SDK still serves it.
Screenshots
- Identities list (correct): the feature row shows the override
MY_OVERRIDE.
- Edit User Feature modal (the bug): only
ENV_DEFAULT (selected) and VARIANT_A are shown; MY_OVERRIDE is absent.
- Features page: the flag's control value and variation as configured.
Impact
Display only, no data lost while viewing. Risk: saving the modal overwrites the override with the displayed control value.
Root cause (initial)
frontend/web/components/modals/create-feature/tabs/FeatureValueTab.tsx passes the environment control value as controlValue to VariationOptions in select mode (changed in #6585, which fixed #6582). The multivariate override editor only models "control or a variant", so a free-form override value has no representation.
Proposed behaviour
Show the identity's own override value in the editor, read-only, with a warning like "This identity override contains a value that is not one of this flag's variations. We recommend changing it.", and offer the variations for selection so the user can migrate it. Guard against a save silently overwriting the override.
References
Description
When an identity has a single-value override on a feature that is later made multivariate, the "Edit User Feature" modal stops showing the identity's override value. In multivariate mode the editor renders only the flag's options as radios (control + each variant), so an override whose value is not one of those options has nowhere to appear. The control row shows the environment's control value, so the identity looks like it is on the default.
The override is intact and the SDK serves it correctly, so this is a display issue in the override editor. If the user saves that modal, the displayed control value is written over the override, so the value can be lost on save.
Steps to reproduce
ENV_DEFAULT.MY_OVERRIDE.VARIANT_A.Expected
The editor shows the identity's override value (
MY_OVERRIDE).Actual
The editor shows the flag's control value selected.
MY_OVERRIDEis not shown anywhere in the modal. The identities list still showsMY_OVERRIDE, and the SDK still serves it.Screenshots
MY_OVERRIDE.ENV_DEFAULT(selected) andVARIANT_Aare shown;MY_OVERRIDEis absent.Impact
Display only, no data lost while viewing. Risk: saving the modal overwrites the override with the displayed control value.
Root cause (initial)
frontend/web/components/modals/create-feature/tabs/FeatureValueTab.tsxpasses the environment control value ascontrolValuetoVariationOptionsin select mode (changed in #6585, which fixed #6582). The multivariate override editor only models "control or a variant", so a free-form override value has no representation.Proposed behaviour
Show the identity's own override value in the editor, read-only, with a warning like "This identity override contains a value that is not one of this flag's variations. We recommend changing it.", and offer the variations for selection so the user can migrate it. Guard against a save silently overwriting the override.
References