-
Notifications
You must be signed in to change notification settings - Fork 245
feat(compass-collection): Mock Data Generator QA Items Batch 1 - CLOUDP-356788 #7541
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
This PR addresses quality improvements for the Mock Data Generator feature, focusing on better handling of unrecognized faker methods, improved user guidance through confirmation screen messaging, and persistence of user modifications when navigating between screens.
- Replace "Unrecognized" placeholder with sensible default faker methods based on MongoDB field types
- Add informational copy on the confirmation screen about enabling sample field values in Project Settings
- Implement state persistence for user-modified faker method and type mappings when navigating back from document count screen
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| collection-tab.ts | Replaced hardcoded "Unrecognized" faker method with dynamic defaults and added action/reducer for restoring field mappings |
| raw-schema-confirmation-screen.tsx | Added informational text with link to Project Settings for enabling sample field values |
| mock-data-generator-modal.spec.tsx | Removed test validating "Unrecognized" behavior and added tests for persisting user modifications |
| faker-schema-editor-screen.tsx | Refactored to dispatch Redux actions instead of local state management, enabling persistence of user changes |
| faker-mapping-selector.tsx | Updated dropdown logic to include original LLM faker methods even when not in standard method lists |
| faker-mapping-selector.spec.tsx | Added tests verifying original LLM methods are included in dropdowns without duplication |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/compass-collection/src/components/mock-data-generator-modal/faker-schema-editor-screen.tsx
Outdated
Show resolved
Hide resolved
| const projectSettingsLink = projectId ? ( | ||
| <Link | ||
| href={`${window.location.origin}/v2/${projectId}#/settings/groupSettings`} |
Copilot
AI
Nov 6, 2025
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.
[nitpick] The hardcoded URL path /v2/${projectId}#/settings/groupSettings creates tight coupling to the Atlas UI structure. Consider extracting this to a configuration constant or utility function to make future URL changes easier to manage.
| const projectSettingsLink = projectId ? ( | |
| <Link | |
| href={`${window.location.origin}/v2/${projectId}#/settings/groupSettings`} | |
| const getAtlasProjectSettingsUrl = (projectId: string) => | |
| `${window.location.origin}/v2/${projectId}#/settings/groupSettings`; | |
| const projectSettingsLink = projectId ? ( | |
| <Link | |
| href={getAtlasProjectSettingsUrl(projectId)} |
|
The |
Initially thought to leave it in in case we iterate on this experiment, but I went ahead and removed! |
Description
Ensure default faker methods such as
database.mongodbObjectIdfor ObjectID_idfields are selected as backups if the LLM returns Unrecognized.Add copy to the confirmation screen reading "To improve mock data quality, Project Owners can enable sending sample field values to the AI model in Project Settings. Refresh Data Explorer for changes to take effect."
PersistSelections.mov
Checklist
Types of changes