diff --git a/app/client/cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts index 56caa3725d9..9d38aa357dc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts @@ -21,9 +21,6 @@ describe( }, function () { it("Check if autocommit progress bar is visible and network requests are properly called", function () { - featureFlagIntercept({ - release_git_autocommit_feature_enabled: true, - }); agHelper.GenerateUUID(); cy.get("@guid").then((uid) => { wsName = "GitAC-" + uid; diff --git a/app/client/src/ce/entities/FeatureFlag.ts b/app/client/src/ce/entities/FeatureFlag.ts index 69ac4b7e9c6..63d49c89f77 100644 --- a/app/client/src/ce/entities/FeatureFlag.ts +++ b/app/client/src/ce/entities/FeatureFlag.ts @@ -21,8 +21,6 @@ export const FEATURE_FLAG = { "license_git_branch_protection_enabled", license_git_continuous_delivery_enabled: "license_git_continuous_delivery_enabled", - release_git_autocommit_feature_enabled: - "release_git_autocommit_feature_enabled", license_widget_rtl_support_enabled: "license_widget_rtl_support_enabled", ab_one_click_learning_popover_enabled: "ab_one_click_learning_popover_enabled", @@ -68,7 +66,6 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = { release_drag_drop_building_blocks_enabled: false, release_table_cell_label_value_enabled: false, license_git_branch_protection_enabled: false, - release_git_autocommit_feature_enabled: false, license_git_continuous_delivery_enabled: false, license_widget_rtl_support_enabled: false, ab_one_click_learning_popover_enabled: false, diff --git a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts index d75f566697a..a43305d93bd 100644 --- a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts +++ b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts @@ -12769,7 +12769,6 @@ export const defaultAppState = { release_anvil_enabled: false, release_app_sidebar_enabled: false, license_git_branch_protection_enabled: false, - release_git_autocommit_feature_enabled: true, license_widget_rtl_support_enabled: false, release_show_new_sidebar_announcement_enabled: false, rollout_app_sidebar_enabled: false, diff --git a/app/client/src/pages/Editor/gitSync/GitSettingsModal/TabGeneral/DangerZone.tsx b/app/client/src/pages/Editor/gitSync/GitSettingsModal/TabGeneral/DangerZone.tsx index d7f5a870147..c32b7ab5c23 100644 --- a/app/client/src/pages/Editor/gitSync/GitSettingsModal/TabGeneral/DangerZone.tsx +++ b/app/client/src/pages/Editor/gitSync/GitSettingsModal/TabGeneral/DangerZone.tsx @@ -15,9 +15,8 @@ import { setIsDisconnectGitModalOpen, setGitSettingsModalOpenAction, } from "actions/gitSyncActions"; -import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; import { Button, Divider, Text } from "@appsmith/ads"; -import React from "react"; +import React, { useCallback } from "react"; import { useDispatch, useSelector } from "react-redux"; import { getAutocommitEnabledSelector, @@ -26,7 +25,6 @@ import { } from "selectors/gitSyncSelectors"; import styled from "styled-components"; import AnalyticsUtil from "ee/utils/AnalyticsUtil"; -import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; import { useHasConnectToGitPermission, useHasManageAutoCommitPermission, @@ -71,9 +69,6 @@ const StyledDivider = styled(Divider)` function DangerZone() { const isConnectToGitPermitted = useHasConnectToGitPermission(); const isManageAutoCommitPermitted = useHasManageAutoCommitPermission(); - const isAutocommitFeatureEnabled = useFeatureFlag( - FEATURE_FLAG.release_git_autocommit_feature_enabled, - ); const isAutocommitToggling = useSelector(getIsAutocommitToggling); const isAutocommitEnabled = useSelector(getAutocommitEnabledSelector); const gitMetadataLoading = useSelector(getGitMetadataLoadingSelector); @@ -82,7 +77,7 @@ function DangerZone() { const currentApp = useSelector(getCurrentApplication); - const handleDisconnect = () => { + const handleDisconnect = useCallback(() => { AnalyticsUtil.logEvent("GS_DISCONNECT_GIT_CLICK", { source: "GIT_CONNECTION_MODAL", }); @@ -94,9 +89,9 @@ function DangerZone() { }), ); dispatch(setIsDisconnectGitModalOpen(true)); - }; + }, [currentApp?.id, currentApp?.name, dispatch]); - const handleToggleAutocommit = () => { + const handleToggleAutocommit = useCallback(() => { if (isAutocommitEnabled) { dispatch(setGitSettingsModalOpenAction({ open: false })); dispatch(setIsAutocommitModalOpen(true)); @@ -104,10 +99,9 @@ function DangerZone() { dispatch(toggleAutocommitEnabledInit()); AnalyticsUtil.logEvent("GS_AUTO_COMMIT_ENABLED"); } - }; + }, [dispatch, isAutocommitEnabled]); - const showAutoCommit = - isAutocommitFeatureEnabled && isManageAutoCommitPermitted; + const showAutoCommit = isManageAutoCommitPermitted; const showDisconnect = isConnectToGitPermitted; const showDivider = showAutoCommit && showDisconnect; @@ -128,7 +122,7 @@ function DangerZone() { {createMessage(AUTOCOMMIT_MESSAGE)}