Skip to content

fix(frontend): hide 'Enabled by default' toggle when editing identity override#6584

Merged
talissoncosta merged 1 commit intomainfrom
fix/enabled-by-default-toggle-identity-override
Jan 23, 2026
Merged

fix(frontend): hide 'Enabled by default' toggle when editing identity override#6584
talissoncosta merged 1 commit intomainfrom
fix/enabled-by-default-toggle-identity-override

Conversation

@talissoncosta
Copy link
Contributor

@talissoncosta talissoncosta commented Jan 23, 2026

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

  • I have read the Contributing Guide.
  • 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.

Changes

Closes #6580

This PR fixes a regression introduced in PR #6356 where the CreateFeature component was extracted with isEdit hardcoded to false. This caused the "Enabled by default" toggle and its tooltip to incorrectly appear when editing an identity override.

The fix: Change isEdit={false} to isEdit={!!identity} so that:

  • When creating a new feature: identity is undefined, so isEdit = false → Shows "Enabled by default" with tooltip
  • When editing an identity override: identity is set, so isEdit = true → Shows "Enabled" without tooltip

How did you test this code?

  1. Open an identity override edit modal by navigating to an identity's feature list and clicking on a feature
  2. Verify the toggle shows "Enabled" instead of "Enabled by default"
  3. Verify no tooltip about "initial enabled state for all environments" appears
  4. Create a new feature and verify "Enabled by default" still shows correctly with the tooltip

🤖 Generated with Claude Code

… override

The 'Enabled by default' toggle and its tooltip were incorrectly shown
when editing an identity override. This was a regression introduced in
PR #6356 where the CreateFeature component was extracted with isEdit
hardcoded to false.

When editing an identity override, isEdit should be true so that:
- The toggle shows 'Enabled' instead of 'Enabled by default'
- The tooltip about initial enabled state is not shown

Fixes #6580

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@talissoncosta talissoncosta requested a review from a team as a code owner January 23, 2026 11:04
@talissoncosta talissoncosta requested review from Zaimwa9 and removed request for a team January 23, 2026 11:04
@vercel
Copy link

vercel bot commented Jan 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Jan 23, 2026 11:06am
flagsmith-frontend-staging Ready Ready Preview, Comment Jan 23, 2026 11:06am
1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Ignored Ignored Jan 23, 2026 11:06am

Request Review

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard fix labels Jan 23, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-6584 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-6584 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-6584 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-6584 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6584 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-6584 Finished ✅ Results

@talissoncosta talissoncosta merged commit 141d69c into main Jan 23, 2026
28 checks passed
@talissoncosta talissoncosta deleted the fix/enabled-by-default-toggle-identity-override branch January 23, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'Enabled by default' toggle shown for identity override

2 participants