From 9540ed6e3d723ceacabd3555d24ebe4048aa0037 Mon Sep 17 00:00:00 2001 From: "unleash-bot[bot]" <194219037+unleash-bot[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 07:38:10 -0300 Subject: [PATCH] chore(AI): addConfiguration flag cleanup (#10628) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR cleans up the addConfiguration flag. These changes were automatically generated by AI and should be reviewed carefully. Fixes #10627 ## 🧹 AI Flag Cleanup Summary This change removes the `addConfiguration` feature flag. The feature was discarded, so this cleanup reverts the UI to its state before the `addConfiguration` flag was introduced. The primary change is in the strategy menu, where the single "Add configuration" button is removed and the original "Use template," "Add strategy," and "More" buttons are restored. ### 🚮 Removed - **Flag Definitions** - `addConfiguration` flag from `experimental.ts` on the backend. - `addConfiguration` flag from `uiConfig.ts` on the frontend. - `addConfiguration: true` from the `server-dev.ts` config. - **UI Components & Logic** - The conditional rendering in `FeatureStrategyMenu.tsx` that showed an "Add configuration" button. - The `useUiFlag('addConfiguration')` hook call and its import from `FeatureStrategyMenu.tsx`. ### 🛠 Kept - **UI Components & Logic** - The original set of buttons in `FeatureStrategyMenu.tsx`: "Use template", "Add strategy", and a "More strategies" icon button. This was the code path for when the flag was disabled. ### 📝 Why The `addConfiguration` feature flag was marked as completed with the outcome "discarded". This cleanup removes the flag and all related code, preserving only the intended code path, which is the UI behavior from before the flag was introduced. --------- Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com> Co-authored-by: Nuno Góis --- .../FeatureStrategyMenu.tsx | 101 +++++++----------- frontend/src/interfaces/uiConfig.ts | 1 - src/lib/types/experimental.ts | 5 - src/server-dev.ts | 1 - 4 files changed, 39 insertions(+), 69 deletions(-) diff --git a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyMenu/FeatureStrategyMenu.tsx b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyMenu/FeatureStrategyMenu.tsx index ff2ecba811..7dc3234e9a 100644 --- a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyMenu/FeatureStrategyMenu.tsx +++ b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyMenu/FeatureStrategyMenu.tsx @@ -18,7 +18,6 @@ import { useReleasePlansApi } from 'hooks/api/actions/useReleasePlansApi/useRele import { useReleasePlans } from 'hooks/api/getters/useReleasePlans/useReleasePlans'; import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled'; import { formatUnknownError } from 'utils/formatUnknownError'; -import { useUiFlag } from 'hooks/useUiFlag'; import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import { ReleasePlanReviewDialog } from '../../FeatureView/FeatureOverview/ReleasePlan/ReleasePlanReviewDialog.tsx'; @@ -76,7 +75,6 @@ export const FeatureStrategyMenu = ({ const { refetch } = useReleasePlans(projectId, featureId, environmentId); const { addReleasePlanToFeature } = useReleasePlansApi(); const { isEnterprise } = useUiConfig(); - const addConfigurationEnabled = useUiFlag('addConfiguration'); const displayReleasePlanButton = isEnterprise(); const crProtected = isChangeRequestConfigured(environmentId); @@ -160,13 +158,32 @@ export const FeatureStrategyMenu = ({ return ( event.stopPropagation()}> - {addConfigurationEnabled ? ( + <> + {displayReleasePlanButton ? ( + + Use template + + ) : null} + - Add configuration + {label} - ) : ( - <> - {displayReleasePlanButton ? ( - - Use template - - ) : null} - - {label} - - - - - - - )} + + + + { customMetrics: true, impactMetrics: true, lifecycleGraphs: true, - addConfiguration: true, }, }, authentication: {