Skip to content

Conversation

Anemy
Copy link
Member

@Anemy Anemy commented Sep 22, 2025

CLOUDP-346490

Looks like we didn't follow having the enableGenAISampleDocumentPassing preference derived enableGenAISampleDocumentPassingOnAtlasProject as it was originally intended. This pr r. That should simplify things.

This will require we update the preferences we pass in the props to CompassWeb:
https://github.com/10gen/mms/blob/8552f2bc333a928a2c161e24a768f14cd60d02c6/client/packages/project/dataExplorerCompassWeb/router.tsx#L401

  • Tested the preference on compass web.

…ct preferences, only use enableGenAISampleDocumentPassing
@github-actions github-actions bot added the fix label Sep 22, 2025
'ENABLE_DATA_EXPLORER_GEN_AI_SAMPLE_DOCUMENT_PASSING'
enableGenAISampleDocumentPassing:
!groupEnabledFeatureFlags.includes(
'DISABLE_DATA_EXPLORER_GEN_AI_SAMPLE_DOCUMENT_PASSING'
Copy link
Member Author

@Anemy Anemy Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use DISABLE_DATA_EXPLORER_GEN_AI_SAMPLE_DOCUMENT_PASSING on web instead of ENABLE_DATA_EXPLORER_GEN_AI_SAMPLE_DOCUMENT_PASSING. (Feature flags would only exist if they're set to true by default. Otherwise it would error in the backend, so we made the logic inverse 🙃 .)
https://jira.mongodb.org/browse/CLOUDP-290870

@Anemy Anemy added the no release notes Fix or feature not for release notes label Sep 22, 2025
@Anemy Anemy marked this pull request as ready for review September 22, 2025 19:32
@Anemy Anemy requested a review from a team as a code owner September 22, 2025 19:32
@Anemy Anemy requested review from Copilot and lerouxb September 22, 2025 19:32
Copy link
Contributor

@Copilot Copilot AI left a 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 refactors the Gen AI sample document passing preference naming by consolidating from the verbose enableGenAISampleDocumentPassingOnAtlasProject to the simpler enableGenAISampleDocumentPassing, aligning with the original design intention.

  • Simplifies preference naming by removing redundant "OnAtlasProject" suffix
  • Updates preference references across multiple files and test cases
  • Inverts the feature flag logic from "ENABLE" to "DISABLE" pattern

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/compass-web/src/preferences.tsx Updates default preference property name
packages/compass-web/sandbox/sandbox-atlas-sign-in.tsx Updates parameter type and inverts feature flag check logic
packages/compass-web/sandbox/index.tsx Updates parameter destructuring and preference property assignment
packages/compass-preferences-model/src/preferences-schema.tsx Removes the verbose preference definition from schema
packages/compass-preferences-model/src/compass-web-preferences-access.ts Updates editable preference key name
packages/compass-generative-ai/src/components/ai-optin-modal.tsx Updates usePreference call to use new preference name
packages/compass-generative-ai/src/components/ai-optin-modal.spec.tsx Updates test cases to use new preference name
packages/compass-e2e-tests/tests/atlas-cloud/collection-ai-query.test.ts Updates e2e test feature flag calls

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Since we fixed the TS for compass web, next bump will have a compile error for the enableGenAISampleDocumentPassing change in the props

@Anemy Anemy merged commit f508d7e into main Sep 24, 2025
89 of 91 checks passed
@Anemy Anemy deleted the CLOUDP-346490-use-one-sample-document-passing-feature-flag branch September 24, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix no release notes Fix or feature not for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants