Skip to content

refactor(compass-web): add enableCompassWebSettings feature flag COMPASS-10867#8248

Open
dkwncho wants to merge 8 commits into
mainfrom
COMPASS-10867-add-enableCompassWebSettings-feature-flag
Open

refactor(compass-web): add enableCompassWebSettings feature flag COMPASS-10867#8248
dkwncho wants to merge 8 commits into
mainfrom
COMPASS-10867-add-enableCompassWebSettings-feature-flag

Conversation

@dkwncho

@dkwncho dkwncho commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Description

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

Copilot AI review requested due to automatic review settings July 16, 2026 20:41
@dkwncho
dkwncho requested a review from a team as a code owner July 16, 2026 20:41
@dkwncho
dkwncho requested review from Anemy and removed request for Anemy July 16, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a new enableCompassWebSettings feature flag intended to control exposure of the Settings experience in Compass Web, wiring up the settings plugin and using preferences to conditionally surface settings UI.

Changes:

  • Added enableCompassWebSettings to the shared feature flags/preferences model.
  • Added @mongodb-js/compass-settings to Compass Web and mounted CompassSettingsPlugin.
  • Updated the sidebar header to conditionally show the Settings action based on the new preference.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/compass-web/src/entrypoint.tsx Mounts the settings plugin within the Compass Web app tree.
packages/compass-web/package.json Adds the Compass Settings package dependency for the web build.
packages/compass-sidebar/src/components/multiple-connections/header/sidebar-header.tsx Switches Settings action visibility to be controlled by the new preference flag.
packages/compass-preferences-model/src/feature-flags.ts Defines the new enableCompassWebSettings feature flag in preferences.

Comment thread packages/compass-web/src/entrypoint.tsx Outdated
dkwncho and others added 2 commits July 16, 2026 16:52
@dkwncho dkwncho changed the title refactor(compass-web): add enableCompassWebSettings feature flag refactor(compass-web): add enableCompassWebSettings feature flag COMPASS-10867 Jul 16, 2026
Comment thread packages/compass-preferences-model/src/feature-flags.ts
Comment thread packages/compass-web/src/entrypoint.tsx Outdated
Comment on lines +604 to +605
{preferences.getPreferences()
.enableCompassWebSettings && (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is not reactive so won't actually re-render the component if the value changes: this might not matter too much here, but the worst bugs are usually caused by small compounding issues like that 🙂 While it's a bit more work, you should wrap this in a component that can access the preferences value via a React hook instead of reading directly from the service (CompassComponentsWeb is an example of how to do this)

@github-actions

Copy link
Copy Markdown
Contributor

New Feature Flag Definition Detected

The following new feature flag was added to FEATURE_FLAG_DEFINITIONS in feature-flags.ts:

enableCompassWebSettings

  • Description: Enable settings in compass web
  • Atlas Cloud Scope: group

Once this PR is merged, mms PR will be created automatically. It will add 1 new feature flag config to MMS and will be assigned to the author of this PR. If that fails for some reason, follow the steps listed below instead

Steps to create MMS feature flag manually

For each feature flag, create a new file in the feature-flags/definitions/developer-tools directory with contents corresponding to that feature flag definition.


data-explorer-compass-web-enable-compass-web-settings.yml

# This feature flag config was added from Compass, https://github.com/mongodb-js/compass. If the
# usage of this does not appear within mms codebase, it should not be removed before verifying if its
# being used in Compass. `/explorer/v1/groups/:id/preferences` API exposes this feature flag value
# to Compass dynamically, without being added to `FeatureFlag.java` enum. You can also reach out to
# the compass team on #compass slack channel for more information.
name: mms.featureFlag.dataExplorerCompassWeb.enableCompassWebSettings
namespace: global
scope: "group"
description: "Enable settings in compass web"
phases:
  local: enabled
  local-gov: disabled
  test: controlled
  test-gov: disabled
  dev: controlled
  dev-gov: disabled
  qa: controlled
  qa-gov: disabled
  stage: controlled
  prod: controlled
  prod-gov: disabled
  internal: disabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants