mirror of
https://github.com/n8n-io/n8n.git
synced 2026-08-30 18:01:23 +08:00
refactor(editor): Remove the rolled-out instanceAiWorkflowPreviewSuggestions experiment flag (#35639)
This commit is contained in:
@@ -98,9 +98,6 @@ export const SURFACE_MCP_TO_NEW_CLOUD_USERS_EXPERIMENT = createExperiment(
|
||||
);
|
||||
|
||||
export const EVALUATIONS_WIZARD_SIDEPANEL_EXPERIMENT = createExperiment('088_config_evaluations');
|
||||
export const INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_EXPERIMENT = createExperiment(
|
||||
'087_instance_ai_workflow_preview_suggestions',
|
||||
);
|
||||
export const INSTANCE_AI_PERSONALIZED_PROMPT_SUGGESTIONS_EXPERIMENT = createExperiment(
|
||||
'093_instance_ai_personalized_prompt_suggestions',
|
||||
{
|
||||
@@ -168,7 +165,6 @@ export const EXPERIMENTS_TO_TRACK = [
|
||||
FLOATING_CHAT_HUB_PANEL_EXPERIMENT.name,
|
||||
SURFACE_MCP_TO_NEW_CLOUD_USERS_EXPERIMENT.name,
|
||||
EVALUATIONS_WIZARD_SIDEPANEL_EXPERIMENT.name,
|
||||
INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_EXPERIMENT.name,
|
||||
INSTANCE_AI_MCP_CONNECTIONS_EXPERIMENT.name,
|
||||
INSTANCE_AI_PERSONALIZED_PROMPT_SUGGESTIONS_EXPERIMENT.name,
|
||||
INSTANCE_AI_SPLIT_EMPTY_STATE_EXPERIMENT.name,
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
export { useInstanceAiWorkflowPreviewSuggestionsExperiment } from './useInstanceAiWorkflowPreviewSuggestionsExperiment';
|
||||
export {
|
||||
INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS,
|
||||
INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_VERSION,
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
import { computed } from 'vue';
|
||||
|
||||
// Experiment cleanup : remove with InstanceAiWorkflowPreviewSuggestionsExperiment
|
||||
export function useInstanceAiWorkflowPreviewSuggestionsExperiment() {
|
||||
const isFeatureEnabled = computed(() => true);
|
||||
|
||||
return { isFeatureEnabled };
|
||||
}
|
||||
@@ -27,7 +27,6 @@ import {
|
||||
INSTANCE_AI_SOURCE_QUERY,
|
||||
isInstanceAiThreadSource,
|
||||
} from './constants';
|
||||
import { INSTANCE_AI_EMPTY_STATE_SUGGESTIONS } from './emptyStateSuggestions';
|
||||
import { useCreditWarningBanner } from './composables/useCreditWarningBanner';
|
||||
import {
|
||||
InstanceAiProactiveStarterMessage,
|
||||
@@ -55,7 +54,6 @@ import {
|
||||
INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS,
|
||||
INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_VERSION,
|
||||
getPreviewWorkflow,
|
||||
useInstanceAiWorkflowPreviewSuggestionsExperiment,
|
||||
} from '@/experiments/instanceAiWorkflowPreviewSuggestions';
|
||||
import {
|
||||
InstanceAiSplitEmptyState,
|
||||
@@ -76,7 +74,6 @@ import {
|
||||
TEMPLATE_PROMPT_SUFFIX,
|
||||
} from '@/experiments/instanceAiTemplateExamples';
|
||||
|
||||
const INSTANCE_AI_DEFAULT_TITLE_KEY: BaseTextKey = 'instanceAi.emptyState.title';
|
||||
// Experiment cleanup: remove with instanceAiPromptSuggestionsV2.
|
||||
const INSTANCE_AI_PROMPT_SUGGESTIONS_V2_TITLE_KEY: BaseTextKey =
|
||||
'experiments.instanceAiPromptSuggestionsV2.emptyState.title';
|
||||
@@ -131,8 +128,6 @@ const { isFeatureEnabled: isProactiveAgentExperimentEnabled } =
|
||||
useInstanceAiProactiveAgentExperiment();
|
||||
const { isFeatureEnabled: isPromptSuggestionsV2ExperimentEnabled } =
|
||||
useInstanceAiPromptSuggestionsV2Experiment();
|
||||
const { isFeatureEnabled: isWorkflowPreviewSuggestionsExperimentEnabled } =
|
||||
useInstanceAiWorkflowPreviewSuggestionsExperiment();
|
||||
const {
|
||||
isFeatureEnabled: isTemplateExamplesExperimentEnabled,
|
||||
currentVariant: templateExamplesVariant,
|
||||
@@ -350,17 +345,11 @@ const emptyStatePromptSuggestionProps = computed(() => {
|
||||
};
|
||||
}
|
||||
|
||||
if (isWorkflowPreviewSuggestionsExperimentEnabled.value) {
|
||||
return {
|
||||
suggestions: INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS,
|
||||
suggestionsComponent: WorkflowPreviewSuggestions,
|
||||
suggestionCatalogVersion: INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_VERSION,
|
||||
placeholderKey: INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_PLACEHOLDER_KEY,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
suggestions: INSTANCE_AI_EMPTY_STATE_SUGGESTIONS,
|
||||
suggestions: INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS,
|
||||
suggestionsComponent: WorkflowPreviewSuggestions,
|
||||
suggestionCatalogVersion: INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_VERSION,
|
||||
placeholderKey: INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_PLACEHOLDER_KEY,
|
||||
};
|
||||
});
|
||||
// Experiment cleanup: remove with InstanceAiTemplateExamplesExperiment
|
||||
@@ -379,10 +368,7 @@ const emptyStateTitleKey = computed<BaseTextKey>(() => {
|
||||
if (isPromptSuggestionsV2ExperimentEnabled.value) {
|
||||
return INSTANCE_AI_PROMPT_SUGGESTIONS_V2_TITLE_KEY;
|
||||
}
|
||||
if (isWorkflowPreviewSuggestionsExperimentEnabled.value) {
|
||||
return INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_TITLE_KEY;
|
||||
}
|
||||
return INSTANCE_AI_DEFAULT_TITLE_KEY;
|
||||
return INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_TITLE_KEY;
|
||||
});
|
||||
|
||||
const chatInputRef = ref<InstanceType<typeof InstanceAiInput> | null>(null);
|
||||
@@ -649,11 +635,7 @@ function handleShelfSuggestionInsert(payload: {
|
||||
/>
|
||||
<Transition name="workflow-preview-fade">
|
||||
<div
|
||||
v-if="
|
||||
isWorkflowPreviewSuggestionsExperimentEnabled &&
|
||||
activeWorkflowPreview &&
|
||||
hasSpaceForPreview
|
||||
"
|
||||
v-if="activeWorkflowPreview && hasSpaceForPreview"
|
||||
:class="$style.workflowPreviewWrapper"
|
||||
:style="workflowPreviewWrapperStyle"
|
||||
>
|
||||
|
||||
+1
-8
@@ -44,7 +44,6 @@ const {
|
||||
experimentMocks: {
|
||||
proactiveAgentEnabled: { value: false },
|
||||
promptSuggestionsV2Enabled: { value: false },
|
||||
workflowPreviewEnabled: { value: true }, // Experiment cleanup: remove with InstanceAiWorkflowPreviewSuggestionsExperiment
|
||||
splitBelowInputVariant: { value: false },
|
||||
personalizedPromptVariant: { value: undefined as string | undefined },
|
||||
personalizedPromptFormat: { value: null as 'cards' | 'list' | null },
|
||||
@@ -222,9 +221,6 @@ vi.mock('@/experiments/instanceAiPersonalizedPromptSuggestions', () => ({
|
||||
}));
|
||||
|
||||
vi.mock('@/experiments/instanceAiWorkflowPreviewSuggestions', () => ({
|
||||
useInstanceAiWorkflowPreviewSuggestionsExperiment: () => ({
|
||||
isFeatureEnabled: experimentMocks.workflowPreviewEnabled,
|
||||
}),
|
||||
INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS: workflowPreviewSuggestions,
|
||||
INSTANCE_AI_WORKFLOW_PREVIEW_SUGGESTIONS_VERSION: 'v3-workflow-preview',
|
||||
WorkflowPreviewSuggestions: workflowPreviewSuggestionsComponent,
|
||||
@@ -445,7 +441,6 @@ describe('InstanceAiEmptyView', () => {
|
||||
store.getOrCreateRuntime.mockReturnValue(thread);
|
||||
experimentMocks.proactiveAgentEnabled.value = false;
|
||||
experimentMocks.promptSuggestionsV2Enabled.value = false;
|
||||
experimentMocks.workflowPreviewEnabled.value = true; // Experiment cleanup: remove with InstanceAiWorkflowPreviewSuggestionsExperiment
|
||||
experimentMocks.splitBelowInputVariant.value = false;
|
||||
experimentMocks.personalizedPromptVariant.value = undefined;
|
||||
experimentMocks.personalizedPromptFormat.value = null;
|
||||
@@ -607,9 +602,7 @@ describe('InstanceAiEmptyView', () => {
|
||||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
it('passes workflow preview suggestions, component, and catalog version when workflow preview experiment is enabled', () => {
|
||||
experimentMocks.workflowPreviewEnabled.value = true;
|
||||
|
||||
it('passes workflow preview suggestions, component, and catalog version', () => {
|
||||
const { getByTestId, getByText } = renderView();
|
||||
|
||||
expect(getByText('What do you want to automate?')).toBeVisible();
|
||||
|
||||
Reference in New Issue
Block a user