Conversation
Contributor
There was a problem hiding this comment.
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
originalLlmResponseandeditedFakerSchemafields - Add Redux actions for tracking field type and method changes
- Update components to use
editedFakerSchemafor 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 |
kpamaran
approved these changes
Oct 15, 2025
| type MockDataGeneratorCompletedState = { | ||
| status: 'completed'; | ||
| fakerSchema: FakerSchema; | ||
| originalLlmResponse: FakerSchema; // Immutable LLM response |
Collaborator
There was a problem hiding this comment.
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
lerouxb
approved these changes
Oct 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.