From e834fa212d9457a03e6ee363326571b47e538f17 Mon Sep 17 00:00:00 2001 From: yyh <92089059+lyzno1@users.noreply.github.com> Date: Thu, 30 Jul 2026 16:20:31 +0800 Subject: [PATCH] refactor(web): remove dead dataset operator context state (#39800) --- web/__mocks__/provider-context.ts | 1 - .../app/overview/apikey-info-panel/__tests__/test-utils.tsx | 1 - web/context/provider-context-provider.tsx | 3 --- web/context/provider-context.ts | 2 -- 4 files changed, 7 deletions(-) diff --git a/web/__mocks__/provider-context.ts b/web/__mocks__/provider-context.ts index 2c8e2e44989..a8847ecb8a1 100644 --- a/web/__mocks__/provider-context.ts +++ b/web/__mocks__/provider-context.ts @@ -18,7 +18,6 @@ export const baseProviderContextValue: ProviderContextState = { onPlanInfoChanged: noop, enableReplaceWebAppLogo: false, modelLoadBalancingEnabled: false, - datasetOperatorEnabled: false, enableEducationPlan: false, isEducationWorkspace: false, isEducationAccount: false, diff --git a/web/app/components/app/overview/apikey-info-panel/__tests__/test-utils.tsx b/web/app/components/app/overview/apikey-info-panel/__tests__/test-utils.tsx index ebbedd319cf..2f2537bd06e 100644 --- a/web/app/components/app/overview/apikey-info-panel/__tests__/test-utils.tsx +++ b/web/app/components/app/overview/apikey-info-panel/__tests__/test-utils.tsx @@ -50,7 +50,6 @@ const defaultProviderContext = { onPlanInfoChanged: noop, enableReplaceWebAppLogo: false, modelLoadBalancingEnabled: false, - datasetOperatorEnabled: false, enableEducationPlan: false, isEducationWorkspace: false, isEducationAccount: false, diff --git a/web/context/provider-context-provider.tsx b/web/context/provider-context-provider.tsx index b4e9ebf8e07..1ebfb7f3fb4 100644 --- a/web/context/provider-context-provider.tsx +++ b/web/context/provider-context-provider.tsx @@ -72,7 +72,6 @@ export const ProviderContextProvider = ({ children }: ProviderContextProviderPro const [enableBilling, setEnableBilling] = useState(true) const [enableReplaceWebAppLogo, setEnableReplaceWebAppLogo] = useState(false) const [modelLoadBalancingEnabled, setModelLoadBalancingEnabled] = useState(false) - const [datasetOperatorEnabled, setDatasetOperatorEnabled] = useState(false) const [webappCopyrightEnabled, setWebappCopyrightEnabled] = useState(false) const [licenseLimit, setLicenseLimit] = useState({ workspace_members: { @@ -120,7 +119,6 @@ export const ProviderContextProvider = ({ children }: ProviderContextProviderPro } if (data.model_load_balancing_enabled) setModelLoadBalancingEnabled(true) - if (data.dataset_operator_enabled) setDatasetOperatorEnabled(true) if (data.webapp_copyright_enabled) setWebappCopyrightEnabled(true) setLicenseLimit({ workspace_members: resolveMemberInviteLimit(data) }) if (data.is_allow_transfer_workspace) @@ -207,7 +205,6 @@ export const ProviderContextProvider = ({ children }: ProviderContextProviderPro onPlanInfoChanged: fetchPlan, enableReplaceWebAppLogo, modelLoadBalancingEnabled, - datasetOperatorEnabled, enableEducationPlan, isEducationWorkspace, isEducationAccount: isEducationDataFetchedAfterMount diff --git a/web/context/provider-context.ts b/web/context/provider-context.ts index 161a9bd5328..4c6d22ee147 100644 --- a/web/context/provider-context.ts +++ b/web/context/provider-context.ts @@ -27,7 +27,6 @@ export type ProviderContextState = { onPlanInfoChanged: () => void enableReplaceWebAppLogo: boolean modelLoadBalancingEnabled: boolean - datasetOperatorEnabled: boolean enableEducationPlan: boolean isEducationWorkspace: boolean isEducationAccount: boolean @@ -61,7 +60,6 @@ export const baseProviderContextValue: ProviderContextState = { onPlanInfoChanged: noop, enableReplaceWebAppLogo: false, modelLoadBalancingEnabled: false, - datasetOperatorEnabled: false, enableEducationPlan: false, isEducationWorkspace: false, isEducationAccount: false,