-
Notifications
You must be signed in to change notification settings - Fork 236
feat(compass-collection): Separate original LLM response from edited faker schema in Mock Data Generator – CLOUDP-350455 #7437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Refactor Mock Data Generator to separate original LLM response from user-edited faker schema, enabling better debugging by comparing original output against user modifications.
- Split faker schema state into
originalLlmResponse
andeditedFakerSchema
fields - Add Redux actions for tracking field type and method changes
- Update components to use
editedFakerSchema
for script generation while preserving original LLM response
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/compass-collection/src/modules/collection-tab.ts | Add new Redux actions and reducer logic for field editing; update state structure |
packages/compass-collection/src/components/mock-data-generator-modal/types.ts | Update state type to include separate original and edited schema fields |
packages/compass-collection/src/components/mock-data-generator-modal/script-screen.tsx | Update to use editedFakerSchema instead of fakerSchema |
packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.tsx | Remove unused isSchemaConfirmed prop from FakerSchemaEditorScreen |
packages/compass-collection/src/components/mock-data-generator-modal/mock-data-generator-modal.spec.tsx | Update test data structure to include both original and edited schema fields |
packages/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx | Replace local state management with Redux actions; connect component to dispatch |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Assigned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
type MockDataGeneratorCompletedState = { | ||
status: 'completed'; | ||
fakerSchema: FakerSchema; | ||
originalLlmResponse: FakerSchema; // Immutable LLM response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typing as Readonly and/or using Object.freeze when it's created will help enforce immutability
a0ebd38
to
a0366d5
Compare
…m-response-from-edited-schema-2
Description
Spawned from this nit PR comment: #7433 (comment)
Refactor Mock Data Generator state to maintain separate copies of the original LLM response and user-edited faker schema.