Skip to content

feat(feature-flags): show dropdown for string flags with known variants#33716

Merged
noanflaherty merged 2 commits into
mainfrom
do/string-flag-dropdown
Jun 5, 2026
Merged

feat(feature-flags): show dropdown for string flags with known variants#33716
noanflaherty merged 2 commits into
mainfrom
do/string-flag-dropdown

Conversation

@noanflaherty
Copy link
Copy Markdown
Contributor

Summary

  • Fetch flag definitions from GET /v1/feature-flags/ to discover which string flags have known variant values
  • Render a <Dropdown> instead of a free-text <input> in StringFlagRow when variant values are available; falls back to the existing text input when they aren't
  • Add optional values field to FlagDefinition and FlagDisplayEntry types

Original 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.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)
@noanflaherty
Copy link
Copy Markdown
Contributor Author

@codex review decc19b

@noanflaherty
Copy link
Copy Markdown
Contributor Author

@devin review decc19b

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@noanflaherty
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ 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".

@noanflaherty noanflaherty merged commit a211ccd into main Jun 5, 2026
7 checks passed
@noanflaherty noanflaherty deleted the do/string-flag-dropdown branch June 5, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant