Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/atlas-service/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,19 @@ const config = {
assistantApiBaseUrl: 'https://knowledge-staging.mongodb.com/api/v1',
userDataBaseUrl: 'https://cloud-stage.mongodb.com/ui/userData',
},
'atlas-internal': {
ccsBaseUrl: '',
// multiplexedWsBaseUrls: ['wss://cloud-internal.mongodb.com/ccs'],
cloudBaseUrl: '',
atlasApiBaseUrl: 'https://cloud-internal.mongodb.com/api/private',
Comment on lines +186 to +190
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

The preset list in the comment above this config doesn’t mention atlas-internal, even though it’s now a supported option. Update the documentation comment so it stays in sync with the available presets.

Copilot uses AI. Check for mistakes.
atlasLogin: {
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.

Huh, was sure we cleaned-up everything atlas login related from compass

clientId: '',
issuer: '',
},
authPortalUrl: '',
assistantApiBaseUrl: '',
userDataBaseUrl: '',
Comment on lines +192 to +197
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

The new atlas-internal preset sets required URLs/oidc fields to empty strings. Downstream code builds absolute URLs from authPortalUrl and atlasLogin.issuer (e.g. new URL(this.config.authPortalUrl) / new URL(${issuer}/v1/introspect)), which will throw or generate invalid endpoints if this preset is selected without env overrides. Provide valid defaults for the internal environment, or add validation in getAtlasConfig that fails fast with a clear error when required fields are missing.

Suggested change
clientId: '',
issuer: '',
},
authPortalUrl: '',
assistantApiBaseUrl: '',
userDataBaseUrl: '',
clientId: '0oajzdcznmE8GEyio297',
issuer: 'https://auth.mongodb.com/oauth2/default',
},
authPortalUrl: 'https://account.mongodb.com/account/login',
assistantApiBaseUrl: 'https://knowledge.mongodb.com/api/v1',
userDataBaseUrl: 'https://cloud-internal.mongodb.com/ui/userData',

Copilot uses AI. Check for mistakes.
},
atlas: {
ccsBaseUrl: '',
cloudBaseUrl: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export type UserConfigurablePreferences = PermanentFeatureFlags &
| 'atlas-dev'
| 'atlas-qa'
| 'atlas-staging'
| 'atlas-internal'
| 'atlas';
optInGenAIFeatures: boolean;
// Features that are enabled by default in Compass, but are disabled in Data
Expand Down Expand Up @@ -869,7 +870,14 @@ export const storedUserPreferencesProps: Required<{
short: 'Configuration used by atlas service',
},
validator: z
.enum(['atlas-local', 'atlas-dev', 'atlas-qa', 'atlas-staging', 'atlas'])
.enum([
'atlas-local',
'atlas-dev',
'atlas-qa',
'atlas-staging',
'atlas-internal',
'atlas',
Comment on lines +875 to +879
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

The doc comment describing available atlasServiceBackendPreset values doesn’t include the newly added atlas-internal option. Please update the comment so the documented presets match the enum values.

Copilot uses AI. Check for mistakes.
])
.default('atlas'),
type: 'string',
},
Expand Down
15 changes: 15 additions & 0 deletions packages/compass-web/scripts/redirect-extension-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@
},
"encoding": "utf-8"
},
{
"enable": true,
"group": "compass-web",
"ruleType": "redirect",
"isFunction": false,
"code": "",
"forceRunner": "auto",
"name": "cloud-internal: compass-web localhost",
"to": "http://localhost:7777/compass-web.mjs",
"condition": {
"regex": "https://downloads\\.mongodb\\.com/compass/compass-web/prod/index.mjs",
"resourceTypes": ["script"]
Comment on lines +71 to +75
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

This adds an enabled redirect rule whose condition regex matches the same .../prod/index.mjs URL as the existing "cloud: compass-web localhost" rule above. Two enabled rules with identical conditions can lead to non-deterministic behavior depending on extension rule ordering; consider removing the duplicate, disabling one by default, or adjusting the regex to match the intended cloud-internal asset URL (if different).

Copilot uses AI. Check for mistakes.
},
"encoding": "utf-8"
},
{
"enable": false,
"group": "mms",
Expand Down
Loading