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

View File

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