feat(feature-flags): show dropdown for string flags with known variants#33716
Conversation
When the platform API returns variant values for a string feature flag, render a Dropdown selector instead of a free-text input in the developer panel. Falls back to the existing text input when values are unavailable.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae53d23055
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… for unknown values - Gate the feature-flag-definitions useQuery on useIsOrgReady() to prevent caching an empty response when the org header isn't available yet - Fall back to free-text input when the current flag value isn't in the known variants list (e.g. manual overrides or stale definitions)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: decc19b12b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
GET /v1/feature-flags/to discover which string flags have known variant values<Dropdown>instead of a free-text<input>inStringFlagRowwhen variant values are available; falls back to the existing text input when they aren'tvaluesfield toFlagDefinitionandFlagDisplayEntrytypesOriginal prompt
The user wanted to upgrade the feature flags developer panel so that string flags with known variant values (surfaced by the platform's
GET /v1/feature-flags/definitions endpoint, added in platform PR #8232) show a dropdown selector instead of a free-text input. The change should gracefully degrade to the existing text input when the definitions API is unavailable or a flag has no known values.