From 547f7ac14ea2c1efe206eaf9d05962c5a1b43e54 Mon Sep 17 00:00:00 2001 From: "unleash-bot[bot]" <194219037+unleash-bot[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 08:51:00 +0200 Subject: [PATCH] chore(AI): changeRequestApproverEmails flag cleanup (#10572) --- .../ChangeRequestOverview.tsx | 44 ++------------- .../EnvironmentChangeRequest.tsx | 54 ++++--------------- frontend/src/interfaces/uiConfig.ts | 1 - src/lib/types/experimental.ts | 5 -- 4 files changed, 13 insertions(+), 91 deletions(-) diff --git a/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestOverview.tsx b/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestOverview.tsx index 38e4829b1b..ec1f5c8825 100644 --- a/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestOverview.tsx +++ b/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestOverview.tsx @@ -31,7 +31,6 @@ import { usePendingChangeRequests } from 'hooks/api/getters/usePendingChangeRequ import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled'; import { Dialogue } from 'component/common/Dialogue/Dialogue'; import { changesCount } from '../changesCount.ts'; -import { ChangeRequestReviewers } from './ChangeRequestReviewers/ChangeRequestReviewers.tsx'; import { ChangeRequestRejectDialogue } from './ChangeRequestRejectDialog/ChangeRequestRejectDialog.tsx'; import { ApplyButton } from './ApplyButton/ApplyButton.tsx'; import { @@ -42,7 +41,6 @@ import { ScheduleChangeRequestDialog } from './ChangeRequestScheduledDialogs/Sch import type { PlausibleChangeRequestState } from '../changeRequest.types'; import { useNavigate } from 'react-router-dom'; import { useActionableChangeRequests } from 'hooks/api/getters/useActionableChangeRequests/useActionableChangeRequests'; -import { useUiFlag } from 'hooks/useUiFlag.ts'; import { ChangeRequestRequestedApprovers } from './ChangeRequestRequestedApprovers/ChangeRequestRequestedApprovers.tsx'; const breakpoint = 'md'; @@ -166,7 +164,6 @@ export const ChangeRequestOverview: FC = () => { useChangeRequestsEnabled(projectId); const [disabled, setDisabled] = useState(false); const navigate = useNavigate(); - const approversEnabled = useUiFlag('changeRequestApproverEmails'); const theme = useTheme(); if (!changeRequest) { @@ -353,18 +350,8 @@ export const ChangeRequestOverview: FC = () => { {...timelineProps} timestamps={changeRequest.stateTimestamps} /> - - } - elseShow={ - - } + @@ -441,28 +428,6 @@ export const ChangeRequestOverview: FC = () => { } /> - - setShowScheduleChangeDialog( - true, - ) - } - > - Apply or schedule changes - - } - /> { diff --git a/frontend/src/component/changeRequest/ChangeRequestSidebar/EnvironmentChangeRequest/EnvironmentChangeRequest.tsx b/frontend/src/component/changeRequest/ChangeRequestSidebar/EnvironmentChangeRequest/EnvironmentChangeRequest.tsx index 31c25b7970..a664468645 100644 --- a/frontend/src/component/changeRequest/ChangeRequestSidebar/EnvironmentChangeRequest/EnvironmentChangeRequest.tsx +++ b/frontend/src/component/changeRequest/ChangeRequestSidebar/EnvironmentChangeRequest/EnvironmentChangeRequest.tsx @@ -24,7 +24,6 @@ import Input from 'component/common/Input/Input'; import { ChangeRequestTitle } from './ChangeRequestTitle.tsx'; import { UpdateCount } from 'component/changeRequest/UpdateCount'; import { useChangeRequestApi } from 'hooks/api/actions/useChangeRequestApi/useChangeRequestApi'; -import { useUiFlag } from 'hooks/useUiFlag'; import { DraftChangeRequestActions } from '../DraftChangeRequestActions/DraftChangeRequestActions.tsx'; import type { AvailableReviewerSchema } from 'hooks/api/getters/useAvailableChangeRequestReviewers/useAvailableChangeRequestReviewers.ts'; @@ -78,7 +77,6 @@ export const EnvironmentChangeRequest: FC<{ const [reviewers, setReviewers] = useState([]); const [disabled, setDisabled] = useState(false); - const approversEnabled = useUiFlag('changeRequestApproverEmails'); const sendToReview = async (project: string) => { setDisabled(true); try { @@ -167,49 +165,17 @@ export const EnvironmentChangeRequest: FC<{ - } - elseShow={ - <> - - onReview(sendToReview) - } - count={changesCount( - environmentChangeRequest, - )} - disabled={disabled} - /> - - - + } /> diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 3a4980293c..7303cc43a4 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -86,7 +86,6 @@ export type UiFlags = { edgeObservability?: boolean; customMetrics?: boolean; impactMetrics?: boolean; - changeRequestApproverEmails?: boolean; reportUnknownFlags?: boolean; lifecycleGraphs?: boolean; addConfiguration?: boolean; diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 98f7c18191..524a5f361b 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -55,7 +55,6 @@ export type IFlagKey = | 'reportUnknownFlags' | 'customMetrics' | 'impactMetrics' - | 'changeRequestApproverEmails' | 'lifecycleGraphs' | 'addConfiguration' | 'etagByEnv' @@ -251,10 +250,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_REPORT_UNKNOWN_FLAGS, false, ), - changeRequestApproverEmails: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_CHANGE_REQUEST_APPROVER_EMAILS, - false, - ), impactMetrics: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_IMPACT_METRICS, false,