From 919b2907a1637b5d4e85ee450ed2edc01b8cac1e Mon Sep 17 00:00:00 2001 From: Nidhi Date: Tue, 18 Mar 2025 21:06:31 +0530 Subject: [PATCH] chore: Remove function calling flag (#39790) ## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="" ### :mag: Cypress test results > [!CAUTION] > If you modify the content in this section, you are likely to disrupt the CI result for your PR. ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Refactor** - Updated the logic that determines when the visualization view is enabled, now relying on a refined integration check. - **Chores** - Removed an outdated configuration toggle from overall feature settings. - Streamlined override options by eliminating an unnecessary flag. --- app/client/src/ce/entities/FeatureFlag.ts | 2 -- .../src/components/editorComponents/JSResponseView.tsx | 6 +++--- .../src/layoutSystems/anvil/integrations/selectors.ts | 4 ---- app/client/src/utils/hooks/useFeatureFlagOverride.ts | 1 - 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/client/src/ce/entities/FeatureFlag.ts b/app/client/src/ce/entities/FeatureFlag.ts index 233ba2645e..f67c474ef6 100644 --- a/app/client/src/ce/entities/FeatureFlag.ts +++ b/app/client/src/ce/entities/FeatureFlag.ts @@ -53,7 +53,6 @@ export const FEATURE_FLAG = { "release_external_saas_plugins_enabled", release_tablev2_infinitescroll_enabled: "release_tablev2_infinitescroll_enabled", - release_fn_calling_enabled: "release_fn_calling_enabled", } as const; export type FeatureFlag = keyof typeof FEATURE_FLAG; @@ -98,7 +97,6 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = { release_ads_entity_item_enabled: false, release_external_saas_plugins_enabled: false, release_tablev2_infinitescroll_enabled: false, - release_fn_calling_enabled: false, }; export const AB_TESTING_EVENT_KEYS = { diff --git a/app/client/src/components/editorComponents/JSResponseView.tsx b/app/client/src/components/editorComponents/JSResponseView.tsx index 60196976e2..0cc075c35e 100644 --- a/app/client/src/components/editorComponents/JSResponseView.tsx +++ b/app/client/src/components/editorComponents/JSResponseView.tsx @@ -42,7 +42,7 @@ import { StateInspector } from "./Debugger/StateInspector"; import { getErrorCount } from "selectors/debuggerSelectors"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; import { useLocation } from "react-router"; -import { getReleaseFnCallingEnabled } from "layoutSystems/anvil/integrations/selectors"; +import { getIsAnvilEnabledInCurrentApplication } from "layoutSystems/anvil/integrations/selectors"; import { Visualization } from "PluginActionEditor/components/PluginActionResponse/components/Visualization"; const ResponseTabWrapper = styled.div` @@ -214,7 +214,7 @@ function JSResponseView(props: Props) { const ideViewMode = useSelector(getIDEViewMode); const location = useLocation(); - const isFnCallingEnabled = useSelector(getReleaseFnCallingEnabled); + const isAnvilEnabled = useSelector(getIsAnvilEnabledInCurrentApplication); const ideType = getIDETypeByUrl(location.pathname); @@ -227,7 +227,7 @@ function JSResponseView(props: Props) { }, ]; - if (isFnCallingEnabled) { + if (isAnvilEnabled) { responseTabs.push({ key: DEBUGGER_TAB_KEYS.VISUALIZATION_TAB, title: "AI Response Visualizer", diff --git a/app/client/src/layoutSystems/anvil/integrations/selectors.ts b/app/client/src/layoutSystems/anvil/integrations/selectors.ts index c43d49adab..cdd761f6a4 100644 --- a/app/client/src/layoutSystems/anvil/integrations/selectors.ts +++ b/app/client/src/layoutSystems/anvil/integrations/selectors.ts @@ -10,10 +10,6 @@ export const getIsAnvilLayoutEnabled = (state: AppState) => { return selectFeatureFlagCheck(state, FEATURE_FLAG.release_anvil_enabled); }; -export const getReleaseFnCallingEnabled = (state: AppState) => { - return selectFeatureFlagCheck(state, FEATURE_FLAG.release_fn_calling_enabled); -}; - /** * A selector to verify if the current application is an Anvil application. * This is done by getting the layout system type of the current application (getLayoutSystemType) diff --git a/app/client/src/utils/hooks/useFeatureFlagOverride.ts b/app/client/src/utils/hooks/useFeatureFlagOverride.ts index bdf4641f6f..31d53b646b 100644 --- a/app/client/src/utils/hooks/useFeatureFlagOverride.ts +++ b/app/client/src/utils/hooks/useFeatureFlagOverride.ts @@ -15,7 +15,6 @@ import { export const AvailableFeaturesToOverride: FeatureFlag[] = [ "release_anvil_enabled", "release_layout_conversion_enabled", - "release_fn_calling_enabled", ]; export type OverriddenFeatureFlags = Partial>;