Skip to content

Conversation

@kyle-ssg
Copy link
Member

@kyle-ssg kyle-ssg commented Dec 2, 2025

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

  • Migrates feature settings, feature value and create feature to typescript components
  • Migrates Row / FormGroup to fix imports
  • Simplifies interface around the create feature modal, this will eventually mean the RTK/redux store no longer needs to create new objects
    • Editing project/feature related stuff is adjusting the ProjectFlag with a single onChange
    • Editing the remote config, enabled state and MV percentages is adjusting a FeatureState with a single on Chnange
  • Minor: add tag button same height as tags
image

How did you test this code?

E2E covers regression testing on everything this affects

kyle-ssg and others added 30 commits August 5, 2025 16:27
Co-authored-by: Zaimwa9 <wadii.zaim@flagsmith.com>
# Conflicts:
#	frontend/web/components/pages/UserPage.tsx
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 10

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

<FeatureValue
error={error}
createFeature={createFeature}
hideValue={false}
Copy link

Choose a reason for hiding this comment

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

Project setting prevent_flag_defaults no longer respected

Medium Severity

The hideValue prop is hardcoded to false, but the old code passed project.prevent_flag_defaults && !identity to conditionally hide the value section. When a project has "Prevent Flag Defaults" enabled, users should not see the value/enabled controls when creating features - they should only set values per-environment after creation. This project setting is now being ignored, allowing users to set default values when the project administrator specifically disabled that capability.

Fix in Cursor Fix in Web

@github-actions github-actions bot added chore and removed chore labels Jan 13, 2026
// Set settingsChanged flag unless it's only metadata changing
if (changes.metadata === undefined) {
updates.settingsChanged = true
}
Copy link

Choose a reason for hiding this comment

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

Settings tab changes never mark settingsChanged flag

Medium Severity

The condition changes.metadata === undefined will always be false because FeatureSettings spreads the entire projectFlag object on every change (e.g., onChange({ ...projectFlag, tags })). Since projectFlag always contains a metadata property (initialized as []), changes.metadata is never undefined. This means settingsChanged is never set to true, so the "unsaved changes" indicator won't appear on the Settings tab and users won't see the discard confirmation prompt when closing the modal after making settings changes.

Additional Locations (1)

Fix in Cursor Fix in Web

onRemoveMultivariateOption={
this.props.removeMultivariateOption
}
/>
Copy link

Choose a reason for hiding this comment

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

Value tab missing FeatureInPipelineGuard protection

High Severity

The FeatureValueTab component is rendered without being wrapped in FeatureInPipelineGuard. The old code wrapped the Value tab content in this guard to prevent editing feature values when the feature is part of a release pipeline, showing a fallback message "This feature is in X release pipeline and its value cannot be changed." The Segment Overrides tab still has this guard (line 943), but the Value tab lost it during the migration. This allows users to bypass release pipeline protection and edit values that should be locked.

Fix in Cursor Fix in Web

onProjectFlagChange({
multivariate_options: [...multivariate_options, newVariation],
})
}
Copy link

Choose a reason for hiding this comment

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

Adding/removing variations doesn't set valueChanged flag

Medium Severity

The addVariation and handleRemoveVariation functions only call onProjectFlagChange, which in the parent component does not set valueChanged: true. In contrast, onEnvironmentFlagChange does set this flag. This means adding or removing multivariate variations won't trigger the "unsaved changes" indicator or the discard confirmation when closing the modal. The old code set valueChanged: true directly in these operations.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API chore front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants