From 18dcb0bea26f000e326ee0fb55ec40e94a4fb7e8 Mon Sep 17 00:00:00 2001 From: Jacob Samuel Lu Date: Thu, 9 Oct 2025 13:52:35 -0400 Subject: [PATCH 1/5] Separate original LLM response from edited faker schema --- .../faker-schema-editor-screen.tsx | 25 +++++-- .../mock-data-generator-modal.spec.tsx | 66 +++++++++++++++++-- .../script-screen.tsx | 2 +- .../mock-data-generator-modal/types.ts | 3 +- .../src/modules/collection-tab.ts | 34 +++++++++- 5 files changed, 115 insertions(+), 15 deletions(-) diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx b/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx index 55ebe80bd0b..a8bbed224a1 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx +++ b/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx @@ -10,10 +10,12 @@ import { SpinLoaderWithLabel, } from '@mongodb-js/compass-components'; import React from 'react'; +import { connect } from 'react-redux'; import FieldSelector from './schema-field-selector'; import FakerMappingSelector from './faker-mapping-selector'; import type { FakerSchema, MockDataGeneratorState } from './types'; import type { MongoDBFieldType } from '@mongodb-js/compass-generative-ai'; +import { updateEditedFakerSchema } from '../../modules/collection-tab'; const containerStyles = css({ display: 'flex', @@ -52,9 +54,11 @@ const schemaEditorLoaderStyles = css({ const FakerSchemaEditorContent = ({ fakerSchema, onSchemaConfirmed, + onSchemaChange, }: { fakerSchema: FakerSchema; onSchemaConfirmed: (isConfirmed: boolean) => void; + onSchemaChange: (updatedSchema: FakerSchema) => void; }) => { const [fakerSchemaFormValues, setFakerSchemaFormValues] = React.useState(fakerSchema); @@ -73,13 +77,15 @@ const FakerSchemaEditorContent = ({ const onJsonTypeSelect = (newJsonType: MongoDBFieldType) => { const currentMapping = fakerSchemaFormValues[activeField]; if (currentMapping) { - setFakerSchemaFormValues({ + const updatedSchema = { ...fakerSchemaFormValues, [activeField]: { ...currentMapping, mongoType: newJsonType, }, - }); + }; + setFakerSchemaFormValues(updatedSchema); + onSchemaChange(updatedSchema); resetIsSchemaConfirmed(); } }; @@ -87,13 +93,15 @@ const FakerSchemaEditorContent = ({ const onFakerFunctionSelect = (newFakerFunction: string) => { const currentMapping = fakerSchemaFormValues[activeField]; if (currentMapping) { - setFakerSchemaFormValues({ + const updatedSchema = { ...fakerSchemaFormValues, [activeField]: { ...currentMapping, fakerMethod: newFakerFunction, }, - }); + }; + setFakerSchemaFormValues(updatedSchema); + onSchemaChange(updatedSchema); resetIsSchemaConfirmed(); } }; @@ -131,10 +139,12 @@ const FakerSchemaEditorContent = ({ const FakerSchemaEditorScreen = ({ onSchemaConfirmed, fakerSchemaGenerationState, + dispatch, }: { isSchemaConfirmed: boolean; onSchemaConfirmed: (isConfirmed: boolean) => void; fakerSchemaGenerationState: MockDataGeneratorState; + dispatch: (action: any) => void; }) => { return (
@@ -160,12 +170,15 @@ const FakerSchemaEditorScreen = ({ )} {fakerSchemaGenerationState.status === 'completed' && ( + dispatch(updateEditedFakerSchema(updatedSchema)) + } /> )}
); }; -export default FakerSchemaEditorScreen; +export default connect()(FakerSchemaEditorScreen); diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.spec.tsx b/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.spec.tsx index 8a786a36197..67d3aecdc28 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.spec.tsx +++ b/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.spec.tsx @@ -824,7 +824,15 @@ describe('MockDataGeneratorModal', () => { currentStep: MockDataGeneratorStep.GENERATE_DATA, fakerSchemaGeneration: { status: 'completed', - fakerSchema: { + originalLlmResponse: { + name: { + fakerMethod: 'person.firstName', + fakerArgs: [], + probability: 1.0, + mongoType: 'String', + }, + }, + editedFakerSchema: { name: { fakerMethod: 'person.firstName', fakerArgs: [], @@ -848,7 +856,15 @@ describe('MockDataGeneratorModal', () => { currentStep: MockDataGeneratorStep.GENERATE_DATA, fakerSchemaGeneration: { status: 'completed', - fakerSchema: { + originalLlmResponse: { + name: { + fakerMethod: 'person.firstName', + fakerArgs: [], + probability: 1.0, + mongoType: 'String', + }, + }, + editedFakerSchema: { name: { fakerMethod: 'person.firstName', fakerArgs: [], @@ -872,7 +888,15 @@ describe('MockDataGeneratorModal', () => { currentStep: MockDataGeneratorStep.GENERATE_DATA, fakerSchemaGeneration: { status: 'completed', - fakerSchema: { + originalLlmResponse: { + name: { + fakerMethod: 'person.firstName', + fakerArgs: [], + probability: 1.0, + mongoType: 'String', + }, + }, + editedFakerSchema: { name: { fakerMethod: 'person.firstName', fakerArgs: [], @@ -919,7 +943,15 @@ describe('MockDataGeneratorModal', () => { connectionInfo: atlasConnectionInfo, fakerSchemaGeneration: { status: 'completed', - fakerSchema: { + originalLlmResponse: { + name: { + fakerMethod: 'person.firstName', + fakerArgs: [], + probability: 1.0, + mongoType: 'String', + }, + }, + editedFakerSchema: { name: { fakerMethod: 'person.firstName', fakerArgs: [], @@ -971,7 +1003,15 @@ describe('MockDataGeneratorModal', () => { currentStep: MockDataGeneratorStep.GENERATE_DATA, fakerSchemaGeneration: { status: 'completed', - fakerSchema: { + originalLlmResponse: { + name: { + fakerMethod: 'person.firstName', + fakerArgs: [], + probability: 1.0, + mongoType: 'String', + }, + }, + editedFakerSchema: { name: { fakerMethod: 'person.firstName', fakerArgs: [], @@ -1001,7 +1041,21 @@ describe('MockDataGeneratorModal', () => { currentStep: MockDataGeneratorStep.GENERATE_DATA, fakerSchemaGeneration: { status: 'completed', - fakerSchema: { + originalLlmResponse: { + name: { + fakerMethod: 'person.firstName', + fakerArgs: [], + probability: 1.0, + mongoType: 'String', + }, + email: { + fakerMethod: 'internet.email', + fakerArgs: [], + probability: 1.0, + mongoType: 'String', + }, + }, + editedFakerSchema: { name: { fakerMethod: 'person.firstName', fakerArgs: [], diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/script-screen.tsx b/packages/compass-collection/src/components/mock-data-generator-modal/script-screen.tsx index 8b9316ae4b7..cdbf0fe2d75 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/script-screen.tsx +++ b/packages/compass-collection/src/components/mock-data-generator-modal/script-screen.tsx @@ -219,7 +219,7 @@ const mapStateToProps = (state: CollectionState) => { return { fakerSchema: fakerSchemaGeneration.status === 'completed' - ? fakerSchemaGeneration.fakerSchema + ? fakerSchemaGeneration.editedFakerSchema : null, namespace, arrayLengthMap: diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/types.ts b/packages/compass-collection/src/components/mock-data-generator-modal/types.ts index af5150fbd55..badc35fc416 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/types.ts +++ b/packages/compass-collection/src/components/mock-data-generator-modal/types.ts @@ -21,7 +21,8 @@ type MockDataGeneratorInProgressState = { type MockDataGeneratorCompletedState = { status: 'completed'; - fakerSchema: FakerSchema; + originalLlmResponse: FakerSchema; // Immutable LLM response + editedFakerSchema: FakerSchema; // User-modified version requestId: string; }; diff --git a/packages/compass-collection/src/modules/collection-tab.ts b/packages/compass-collection/src/modules/collection-tab.ts index a1bfe9866e5..3e6c5e1ff51 100644 --- a/packages/compass-collection/src/modules/collection-tab.ts +++ b/packages/compass-collection/src/modules/collection-tab.ts @@ -127,6 +127,7 @@ export enum CollectionActions { FakerMappingGenerationStarted = 'compass-collection/FakerMappingGenerationStarted', FakerMappingGenerationCompleted = 'compass-collection/FakerMappingGenerationCompleted', FakerMappingGenerationFailed = 'compass-collection/FakerMappingGenerationFailed', + FakerSchemaEdited = 'compass-collection/FakerSchemaEdited', } interface CollectionMetadataFetchedAction { @@ -196,6 +197,11 @@ export interface FakerMappingGenerationFailedAction { requestId: string; } +export interface FakerSchemaEditedAction { + type: CollectionActions.FakerSchemaEdited; + editedFakerSchema: FakerSchema; +} + const reducer: Reducer = ( state = { // TODO(COMPASS-7782): use hook to get the workspace tab id instead @@ -457,7 +463,8 @@ const reducer: Reducer = ( ...state, fakerSchemaGeneration: { status: 'completed', - fakerSchema: action.fakerSchema, + originalLlmResponse: action.fakerSchema, + editedFakerSchema: action.fakerSchema, // Initially same as LLM response requestId: action.requestId, }, }; @@ -487,6 +494,25 @@ const reducer: Reducer = ( }; } + if ( + isAction( + action, + CollectionActions.FakerSchemaEdited + ) + ) { + if (state.fakerSchemaGeneration.status !== 'completed') { + return state; + } + + return { + ...state, + fakerSchemaGeneration: { + ...state.fakerSchemaGeneration, + editedFakerSchema: action.editedFakerSchema, + }, + }; + } + return state; }; @@ -528,6 +554,12 @@ export const mockDataGeneratorPreviousButtonClicked = (): CollectionThunkAction< }; }; +export const updateEditedFakerSchema = ( + editedFakerSchema: FakerSchema +): FakerSchemaEditedAction => { + return { type: CollectionActions.FakerSchemaEdited, editedFakerSchema }; +}; + export const selectTab = ( tabName: CollectionSubtab ): CollectionThunkAction => { From 13788b0c127d0876874c81063b39dd9796b79b3b Mon Sep 17 00:00:00 2001 From: Jacob Samuel Lu Date: Thu, 9 Oct 2025 14:54:34 -0400 Subject: [PATCH 2/5] WIP --- .../faker-schema-editor-screen.tsx | 41 +++++--- .../src/modules/collection-tab.ts | 98 ++++++++++++++++--- 2 files changed, 112 insertions(+), 27 deletions(-) diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx b/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx index a8bbed224a1..f62182dd715 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx +++ b/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx @@ -15,7 +15,16 @@ import FieldSelector from './schema-field-selector'; import FakerMappingSelector from './faker-mapping-selector'; import type { FakerSchema, MockDataGeneratorState } from './types'; import type { MongoDBFieldType } from '@mongodb-js/compass-generative-ai'; -import { updateEditedFakerSchema } from '../../modules/collection-tab'; +import { + fakerFieldTypeChanged, + fakerFieldMethodChanged, + type FakerFieldTypeChangedAction, + type FakerFieldMethodChangedAction, +} from '../../modules/collection-tab'; + +type FakerSchemaDispatch = ( + action: FakerFieldTypeChangedAction | FakerFieldMethodChangedAction +) => void; const containerStyles = css({ display: 'flex', @@ -54,11 +63,11 @@ const schemaEditorLoaderStyles = css({ const FakerSchemaEditorContent = ({ fakerSchema, onSchemaConfirmed, - onSchemaChange, + dispatch, }: { fakerSchema: FakerSchema; onSchemaConfirmed: (isConfirmed: boolean) => void; - onSchemaChange: (updatedSchema: FakerSchema) => void; + dispatch: FakerSchemaDispatch; }) => { const [fakerSchemaFormValues, setFakerSchemaFormValues] = React.useState(fakerSchema); @@ -77,15 +86,17 @@ const FakerSchemaEditorContent = ({ const onJsonTypeSelect = (newJsonType: MongoDBFieldType) => { const currentMapping = fakerSchemaFormValues[activeField]; if (currentMapping) { - const updatedSchema = { + // Update local form state + setFakerSchemaFormValues({ ...fakerSchemaFormValues, [activeField]: { ...currentMapping, mongoType: newJsonType, }, - }; - setFakerSchemaFormValues(updatedSchema); - onSchemaChange(updatedSchema); + }); + + // Dispatch event to Redux + dispatch(fakerFieldTypeChanged(activeField, newJsonType)); resetIsSchemaConfirmed(); } }; @@ -93,15 +104,17 @@ const FakerSchemaEditorContent = ({ const onFakerFunctionSelect = (newFakerFunction: string) => { const currentMapping = fakerSchemaFormValues[activeField]; if (currentMapping) { - const updatedSchema = { + // Update local form state + setFakerSchemaFormValues({ ...fakerSchemaFormValues, [activeField]: { ...currentMapping, fakerMethod: newFakerFunction, }, - }; - setFakerSchemaFormValues(updatedSchema); - onSchemaChange(updatedSchema); + }); + + // Dispatch event to Redux + dispatch(fakerFieldMethodChanged(activeField, newFakerFunction)); resetIsSchemaConfirmed(); } }; @@ -144,7 +157,7 @@ const FakerSchemaEditorScreen = ({ isSchemaConfirmed: boolean; onSchemaConfirmed: (isConfirmed: boolean) => void; fakerSchemaGenerationState: MockDataGeneratorState; - dispatch: (action: any) => void; + dispatch: FakerSchemaDispatch; }) => { return (
@@ -172,9 +185,7 @@ const FakerSchemaEditorScreen = ({ - dispatch(updateEditedFakerSchema(updatedSchema)) - } + dispatch={dispatch} /> )}
diff --git a/packages/compass-collection/src/modules/collection-tab.ts b/packages/compass-collection/src/modules/collection-tab.ts index 3e6c5e1ff51..76b3566ae87 100644 --- a/packages/compass-collection/src/modules/collection-tab.ts +++ b/packages/compass-collection/src/modules/collection-tab.ts @@ -16,7 +16,10 @@ import type { AtlasAiService } from '@mongodb-js/compass-generative-ai/provider' import type { experimentationServiceLocator } from '@mongodb-js/compass-telemetry/provider'; import { type Logger, mongoLogId } from '@mongodb-js/compass-logging/provider'; import { type PreferencesAccess } from 'compass-preferences-model/provider'; -import type { MockDataSchemaRequest } from '@mongodb-js/compass-generative-ai'; +import type { + MockDataSchemaRequest, + MongoDBFieldType, +} from '@mongodb-js/compass-generative-ai'; import { isInternalFieldPath } from 'hadron-document'; import toNS from 'mongodb-ns'; import { @@ -127,7 +130,8 @@ export enum CollectionActions { FakerMappingGenerationStarted = 'compass-collection/FakerMappingGenerationStarted', FakerMappingGenerationCompleted = 'compass-collection/FakerMappingGenerationCompleted', FakerMappingGenerationFailed = 'compass-collection/FakerMappingGenerationFailed', - FakerSchemaEdited = 'compass-collection/FakerSchemaEdited', + FakerFieldTypeChanged = 'compass-collection/FakerFieldTypeChanged', + FakerFieldMethodChanged = 'compass-collection/FakerFieldMethodChanged', } interface CollectionMetadataFetchedAction { @@ -197,9 +201,16 @@ export interface FakerMappingGenerationFailedAction { requestId: string; } -export interface FakerSchemaEditedAction { - type: CollectionActions.FakerSchemaEdited; - editedFakerSchema: FakerSchema; +export interface FakerFieldTypeChangedAction { + type: CollectionActions.FakerFieldTypeChanged; + fieldPath: string; + mongoType: MongoDBFieldType; +} + +export interface FakerFieldMethodChangedAction { + type: CollectionActions.FakerFieldMethodChanged; + fieldPath: string; + fakerMethod: string; } const reducer: Reducer = ( @@ -495,20 +506,67 @@ const reducer: Reducer = ( } if ( - isAction( + isAction( action, - CollectionActions.FakerSchemaEdited + CollectionActions.FakerFieldTypeChanged ) ) { if (state.fakerSchemaGeneration.status !== 'completed') { return state; } + const { fieldPath, mongoType } = action; + const currentMapping = + state.fakerSchemaGeneration.editedFakerSchema[fieldPath]; + + if (!currentMapping) { + return state; + } + return { ...state, fakerSchemaGeneration: { ...state.fakerSchemaGeneration, - editedFakerSchema: action.editedFakerSchema, + editedFakerSchema: { + ...state.fakerSchemaGeneration.editedFakerSchema, + [fieldPath]: { + ...currentMapping, + mongoType, + }, + }, + }, + }; + } + + if ( + isAction( + action, + CollectionActions.FakerFieldMethodChanged + ) + ) { + if (state.fakerSchemaGeneration.status !== 'completed') { + return state; + } + + const { fieldPath, fakerMethod } = action; + const currentMapping = + state.fakerSchemaGeneration.editedFakerSchema[fieldPath]; + + if (!currentMapping) { + return state; + } + + return { + ...state, + fakerSchemaGeneration: { + ...state.fakerSchemaGeneration, + editedFakerSchema: { + ...state.fakerSchemaGeneration.editedFakerSchema, + [fieldPath]: { + ...currentMapping, + fakerMethod, + }, + }, }, }; } @@ -554,10 +612,26 @@ export const mockDataGeneratorPreviousButtonClicked = (): CollectionThunkAction< }; }; -export const updateEditedFakerSchema = ( - editedFakerSchema: FakerSchema -): FakerSchemaEditedAction => { - return { type: CollectionActions.FakerSchemaEdited, editedFakerSchema }; +export const fakerFieldTypeChanged = ( + fieldPath: string, + mongoType: MongoDBFieldType +): FakerFieldTypeChangedAction => { + return { + type: CollectionActions.FakerFieldTypeChanged, + fieldPath, + mongoType, + }; +}; + +export const fakerFieldMethodChanged = ( + fieldPath: string, + fakerMethod: string +): FakerFieldMethodChangedAction => { + return { + type: CollectionActions.FakerFieldMethodChanged, + fieldPath, + fakerMethod, + }; }; export const selectTab = ( From 70c382b0eb4c26f38f6e0b8e41bc8984296f1d7f Mon Sep 17 00:00:00 2001 From: Jacob Samuel Lu Date: Thu, 9 Oct 2025 15:14:44 -0400 Subject: [PATCH 3/5] WIP --- .../faker-schema-editor-screen.tsx | 36 ++++--------------- .../mock-data-generator-modal.tsx | 2 -- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx b/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx index f62182dd715..1744587a0e2 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx +++ b/packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx @@ -69,51 +69,28 @@ const FakerSchemaEditorContent = ({ onSchemaConfirmed: (isConfirmed: boolean) => void; dispatch: FakerSchemaDispatch; }) => { - const [fakerSchemaFormValues, setFakerSchemaFormValues] = - React.useState(fakerSchema); - - const fieldPaths = Object.keys(fakerSchemaFormValues); + const fieldPaths = Object.keys(fakerSchema); const [activeField, setActiveField] = React.useState(fieldPaths[0]); - const activeJsonType = fakerSchemaFormValues[activeField]?.mongoType; - const activeFakerFunction = fakerSchemaFormValues[activeField]?.fakerMethod; - const activeFakerArgs = fakerSchemaFormValues[activeField]?.fakerArgs; + const activeJsonType = fakerSchema[activeField]?.mongoType; + const activeFakerFunction = fakerSchema[activeField]?.fakerMethod; + const activeFakerArgs = fakerSchema[activeField]?.fakerArgs; const resetIsSchemaConfirmed = () => { onSchemaConfirmed(false); }; const onJsonTypeSelect = (newJsonType: MongoDBFieldType) => { - const currentMapping = fakerSchemaFormValues[activeField]; + const currentMapping = fakerSchema[activeField]; if (currentMapping) { - // Update local form state - setFakerSchemaFormValues({ - ...fakerSchemaFormValues, - [activeField]: { - ...currentMapping, - mongoType: newJsonType, - }, - }); - - // Dispatch event to Redux dispatch(fakerFieldTypeChanged(activeField, newJsonType)); resetIsSchemaConfirmed(); } }; const onFakerFunctionSelect = (newFakerFunction: string) => { - const currentMapping = fakerSchemaFormValues[activeField]; + const currentMapping = fakerSchema[activeField]; if (currentMapping) { - // Update local form state - setFakerSchemaFormValues({ - ...fakerSchemaFormValues, - [activeField]: { - ...currentMapping, - fakerMethod: newFakerFunction, - }, - }); - - // Dispatch event to Redux dispatch(fakerFieldMethodChanged(activeField, newFakerFunction)); resetIsSchemaConfirmed(); } @@ -154,7 +131,6 @@ const FakerSchemaEditorScreen = ({ fakerSchemaGenerationState, dispatch, }: { - isSchemaConfirmed: boolean; onSchemaConfirmed: (isConfirmed: boolean) => void; fakerSchemaGenerationState: MockDataGeneratorState; dispatch: FakerSchemaDispatch; diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.tsx b/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.tsx index f20bb70d2f5..56f28818594 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.tsx +++ b/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.tsx @@ -82,7 +82,6 @@ const MockDataGeneratorModal = ({ case MockDataGeneratorStep.SCHEMA_EDITOR: return ( @@ -102,7 +101,6 @@ const MockDataGeneratorModal = ({ }, [ currentStep, fakerSchemaGenerationState, - isSchemaConfirmed, documentCount, setDocumentCount, ]); From d0cfc122e54ac7a589a56e00b5e3c1fec8eb5370 Mon Sep 17 00:00:00 2001 From: Jacob Samuel Lu Date: Wed, 15 Oct 2025 14:04:16 -0400 Subject: [PATCH 4/5] Merge conflict --- .../mock-data-generator-modal/mock-data-generator-modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.tsx b/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.tsx index e1485edad9e..74f48452bc9 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.tsx +++ b/packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.tsx @@ -99,7 +99,7 @@ const MockDataGeneratorModal = ({ From a0366d5426c62f7ae751be8af7b640acb64bf6b4 Mon Sep 17 00:00:00 2001 From: Jacob Samuel Lu Date: Wed, 15 Oct 2025 17:43:45 -0400 Subject: [PATCH 5/5] Readonly --- .../src/components/mock-data-generator-modal/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/types.ts b/packages/compass-collection/src/components/mock-data-generator-modal/types.ts index badc35fc416..e206c97adeb 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/types.ts +++ b/packages/compass-collection/src/components/mock-data-generator-modal/types.ts @@ -21,7 +21,7 @@ type MockDataGeneratorInProgressState = { type MockDataGeneratorCompletedState = { status: 'completed'; - originalLlmResponse: FakerSchema; // Immutable LLM response + originalLlmResponse: Readonly; // Immutable LLM response editedFakerSchema: FakerSchema; // User-modified version requestId: string; };