refactor: atlas-admin-api service COMPASS-10893 - #8311
Open
paula-stacho wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new @mongodb-js/atlas-admin-api package and wires it into Compass (desktop + web) and the assistant plugin via a shared provider/locator pattern, aiming to centralize Atlas Admin API access.
Changes:
- Added the new
@mongodb-js/atlas-admin-apiworkspace package (service, provider/locator, pagination/types utilities, tests). - Wrapped existing Atlas providers with
AtlasAdminApiServiceProviderin Compass, Compass Web, and the shared testing-library wrapper. - Updated Compass Assistant to consume the new Atlas Admin API service via app-registry injection.
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/compass/src/app/components/entrypoint.tsx | Adds the admin API provider to the desktop app provider tree. |
| packages/compass/package.json | Adds the new workspace package as a dependency. |
| packages/compass-web/src/entrypoint.tsx | Adds the admin API provider to the web app provider tree. |
| packages/compass-web/package.json | Adds the new workspace package to the web workspace deps list. |
| packages/compass-assistant/src/compass-assistant-provider.tsx | Switches assistant extra-args injection to use the new admin API service. |
| packages/compass-assistant/package.json | Adds the new workspace package as a dependency. |
| packages/atlas-admin-api/tsconfig.json | New package TypeScript config. |
| packages/atlas-admin-api/tsconfig-build.json | New package build TS config. |
| packages/atlas-admin-api/src/util.ts | Adds shared helpers for connection-string matching and 404 detection. |
| packages/atlas-admin-api/src/provider.tsx | Adds the provider + locator for app-registry injection. |
| packages/atlas-admin-api/src/provider.spec.tsx | Tests provider/locator behavior and cache clearing on auth events. |
| packages/atlas-admin-api/src/pagination.ts | Adds pagination helpers and response assertion. |
| packages/atlas-admin-api/src/index.ts | Defines public exports for the new package. |
| packages/atlas-admin-api/src/cluster-types.ts | Adds cluster-related types and runtime assertions. |
| packages/atlas-admin-api/src/atlas-admin-api-service.ts | Refactors/renames service and adds caching for project/cluster lookup. |
| packages/atlas-admin-api/src/atlas-admin-api-service.spec.ts | Expands tests for caching behavior and error semantics. |
| packages/atlas-admin-api/package.json | Adds the new workspace package manifest and exports map. |
| packages/atlas-admin-api/.mocharc.js | Adds mocha config for the new package. |
| packages/atlas-admin-api/.eslintrc.js | Adds eslint config for the new package. |
| packages/atlas-admin-api/.eslintignore | Adds ignores for build/test outputs. |
| packages/atlas-admin-api/.depcheckrc | Adds depcheck config for the new package. |
| package-lock.json | Links the new workspace package into the lockfile. |
| configs/testing-library-compass/src/index.tsx | Wraps test wrapper with the admin API provider and improves auth service stub. |
| configs/testing-library-compass/.depcheckrc | Updates depcheck ignores for the new import. |
paula-stacho
force-pushed
the
COMPASS-10893
branch
from
August 3, 2026 10:50
0f24d1c to
2dd0af2
Compare
paula-stacho
force-pushed
the
COMPASS-10893
branch
from
August 3, 2026 10:51
2dd0af2 to
5378b06
Compare
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
Main change: Moves the logic related to Atlas Admin API to a dedicated service (the original code introduced in #8262 - unfortunately the git diff isn't quite clear on what has been just moved 🙈 )
Other notable changes:
Note: this is dead code at the moment but I tested the atlas log in + cluster state request with a dummy code.
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes