chore: Clean up Schema Preview feature flag (no-changelog) (#15191)

This commit is contained in:
Shireen Missi
2025-05-07 17:35:56 +01:00
committed by GitHub
parent a149b04a09
commit b37387180c
3 changed files with 4 additions and 30 deletions

View File

@@ -43,7 +43,6 @@ import {
MAX_DISPLAY_DATA_SIZE, MAX_DISPLAY_DATA_SIZE,
MAX_DISPLAY_DATA_SIZE_SCHEMA_VIEW, MAX_DISPLAY_DATA_SIZE_SCHEMA_VIEW,
NODE_TYPES_EXCLUDED_FROM_OUTPUT_NAME_APPEND, NODE_TYPES_EXCLUDED_FROM_OUTPUT_NAME_APPEND,
SCHEMA_PREVIEW_EXPERIMENT,
TEST_PIN_DATA, TEST_PIN_DATA,
} from '@/constants'; } from '@/constants';
@@ -90,7 +89,6 @@ import { useRoute } from 'vue-router';
import { useUIStore } from '@/stores/ui.store'; import { useUIStore } from '@/stores/ui.store';
import { useSchemaPreviewStore } from '@/stores/schemaPreview.store'; import { useSchemaPreviewStore } from '@/stores/schemaPreview.store';
import { asyncComputed } from '@vueuse/core'; import { asyncComputed } from '@vueuse/core';
import { usePostHog } from '@/stores/posthog.store';
import ViewSubExecution from './ViewSubExecution.vue'; import ViewSubExecution from './ViewSubExecution.vue';
import RunDataItemCount from '@/components/RunDataItemCount.vue'; import RunDataItemCount from '@/components/RunDataItemCount.vue';
import RunDataDisplayModeSelect from '@/components/RunDataDisplayModeSelect.vue'; import RunDataDisplayModeSelect from '@/components/RunDataDisplayModeSelect.vue';
@@ -231,7 +229,6 @@ const sourceControlStore = useSourceControlStore();
const rootStore = useRootStore(); const rootStore = useRootStore();
const uiStore = useUIStore(); const uiStore = useUIStore();
const schemaPreviewStore = useSchemaPreviewStore(); const schemaPreviewStore = useSchemaPreviewStore();
const posthogStore = usePostHog();
const toast = useToast(); const toast = useToast();
const route = useRoute(); const route = useRoute();
@@ -585,13 +582,7 @@ const hasInputOverwrite = computed((): boolean => {
const isSchemaPreviewEnabled = computed( const isSchemaPreviewEnabled = computed(
() => () =>
props.paneType === 'input' && props.paneType === 'input' &&
!(nodeType.value?.codex?.categories ?? []).some( !(nodeType.value?.codex?.categories ?? []).some((category) => category === CORE_NODES_CATEGORY),
(category) => category === CORE_NODES_CATEGORY,
) &&
posthogStore.isVariantEnabled(
SCHEMA_PREVIEW_EXPERIMENT.name,
SCHEMA_PREVIEW_EXPERIMENT.variant,
),
); );
const hasPreviewSchema = asyncComputed(async () => { const hasPreviewSchema = asyncComputed(async () => {

View File

@@ -35,13 +35,8 @@ import {
} from 'vue-virtual-scroller'; } from 'vue-virtual-scroller';
import MappingPill from './MappingPill.vue'; import MappingPill from './MappingPill.vue';
import { import { EnterpriseEditionFeature, PLACEHOLDER_FILLED_AT_EXECUTION_TIME } from '@/constants';
EnterpriseEditionFeature,
PLACEHOLDER_FILLED_AT_EXECUTION_TIME,
SCHEMA_PREVIEW_EXPERIMENT,
} from '@/constants';
import useEnvironmentsStore from '@/stores/environments.ee.store'; import useEnvironmentsStore from '@/stores/environments.ee.store';
import { usePostHog } from '@/stores/posthog.store';
import { useSchemaPreviewStore } from '@/stores/schemaPreview.store'; import { useSchemaPreviewStore } from '@/stores/schemaPreview.store';
import { useSettingsStore } from '@/stores/settings.store'; import { useSettingsStore } from '@/stores/settings.store';
import { isEmpty } from '@/utils/typesUtils'; import { isEmpty } from '@/utils/typesUtils';
@@ -81,7 +76,6 @@ const workflowsStore = useWorkflowsStore();
const schemaPreviewStore = useSchemaPreviewStore(); const schemaPreviewStore = useSchemaPreviewStore();
const environmentsStore = useEnvironmentsStore(); const environmentsStore = useEnvironmentsStore();
const settingsStore = useSettingsStore(); const settingsStore = useSettingsStore();
const posthogStore = usePostHog();
const { getSchemaForExecutionData, getSchemaForJsonSchema, getSchema, filterSchema } = const { getSchemaForExecutionData, getSchemaForJsonSchema, getSchema, filterSchema } =
useDataSchema(); useDataSchema();
@@ -131,7 +125,7 @@ const getNodeSchema = async (fullNode: INodeUi, connectedNode: IConnectedNode) =
let schema = getSchemaForExecutionData(data); let schema = getSchemaForExecutionData(data);
let preview = false; let preview = false;
if (data.length === 0 && isSchemaPreviewEnabled.value) { if (data.length === 0) {
const previewSchema = await getSchemaPreview(fullNode); const previewSchema = await getSchemaPreview(fullNode);
if (previewSchema.ok) { if (previewSchema.ok) {
schema = getSchemaForJsonSchema(previewSchema.result); schema = getSchemaForJsonSchema(previewSchema.result);
@@ -151,10 +145,6 @@ const getNodeSchema = async (fullNode: INodeUi, connectedNode: IConnectedNode) =
}; };
}; };
const isSchemaPreviewEnabled = computed(() =>
posthogStore.isVariantEnabled(SCHEMA_PREVIEW_EXPERIMENT.name, SCHEMA_PREVIEW_EXPERIMENT.variant),
);
const isVariablesEnabled = computed( const isVariablesEnabled = computed(
() => settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.Variables], () => settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.Variables],
); );
@@ -228,7 +218,7 @@ const contextItems = computed(() => {
const nodeSchema = asyncComputed(async () => { const nodeSchema = asyncComputed(async () => {
const search = props.search; const search = props.search;
if (props.data.length === 0 && isSchemaPreviewEnabled.value) { if (props.data.length === 0) {
const previewSchema = await getSchemaPreview(props.node); const previewSchema = await getSchemaPreview(props.node);
if (previewSchema.ok) { if (previewSchema.ok) {
return filterSchema(getSchemaForJsonSchema(previewSchema.result), search); return filterSchema(getSchemaForJsonSchema(previewSchema.result), search);

View File

@@ -758,12 +758,6 @@ export const AI_CREDITS_EXPERIMENT = {
variant: 'variant', variant: 'variant',
}; };
export const SCHEMA_PREVIEW_EXPERIMENT = {
name: '028_schema_preview',
control: 'control',
variant: 'variant',
};
export const WORKFLOW_BUILDER_EXPERIMENT = { export const WORKFLOW_BUILDER_EXPERIMENT = {
name: '30_workflow_builder', name: '30_workflow_builder',
control: 'control', control: 'control',
@@ -774,7 +768,6 @@ export const EXPERIMENTS_TO_TRACK = [
CREDENTIAL_DOCS_EXPERIMENT.name, CREDENTIAL_DOCS_EXPERIMENT.name,
EASY_AI_WORKFLOW_EXPERIMENT.name, EASY_AI_WORKFLOW_EXPERIMENT.name,
AI_CREDITS_EXPERIMENT.name, AI_CREDITS_EXPERIMENT.name,
SCHEMA_PREVIEW_EXPERIMENT.name,
WORKFLOW_BUILDER_EXPERIMENT.name, WORKFLOW_BUILDER_EXPERIMENT.name,
]; ];