Skip to content

Conversation

@nbbeeken
Copy link
Collaborator

Description

WIP.

Need to figure out how to navigate from an action properly.

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
  • 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)

const url = new URL(`/v2/${projectId}`, window.location.origin);
const fragmentPath = [
'host',
clusterType === 'REPLICASET' ? 'replicaSet' : 'cluster',
Copy link
Collaborator

Choose a reason for hiding this comment

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

We already have derived metrics type in the atlasMetadata under metricsType field, it's a delibirate decision not to encode this logic on the client and keep it strictly on the backend

You also only need to set the hash part of the url, the first part linking to project would be already correctly set in the url (you can look at getAtlasPerformanceAdvisorLink method for an example of how we do this elsewhere)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yea found that property later oops, I was like there's no way there's just two values for this 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since I want to open in a new tab and I'm using window.open I think I need the whole url unless there's something I'm missing

Copy link
Collaborator

@gribnoysup gribnoysup Oct 31, 2025

Choose a reason for hiding this comment

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

It's the same logic as for anchor tags, you can just pass the hash part to the open method, it will concat it with the current path for you and only replace the hash

gap: spacing[200],
});

function buildMonitoringUrl(atlasMetadata?: AtlasClusterMetadata) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Starting to think that maybe it's worth moving all those in a single place. Creating a new package seems like an overkill, maybe close to atlas service?

@nbbeeken nbbeeken marked this pull request as ready for review October 30, 2025 16:35
@nbbeeken nbbeeken requested a review from a team as a code owner October 30, 2025 16:35
@nbbeeken nbbeeken added the no release notes Fix or feature not for release notes label Oct 30, 2025
Copy link
Contributor

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 pull request adds navigation links to Atlas cluster-level pages from various locations in the Compass UI. The changes enable users to access Atlas monitoring, cluster overview, and query insights directly from the connections navigation sidebar and collection/database headers.

  • Adds three new action types for Atlas cluster navigation: cluster overview, monitoring, and query insights
  • Implements URL builder functions for constructing Atlas page links
  • Integrates monitoring links into collection and database header action bars

Reviewed Changes

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

Show a summary per file
File Description
packages/compass-connections-navigation/src/constants.tsx Defines new action types for Atlas cluster navigation
packages/compass-connections-navigation/src/item-actions.ts Adds new Atlas navigation actions to connection item menus
packages/compass-sidebar/src/components/multiple-connections/connections-navigation.tsx Implements action handlers and URL builders for Atlas navigation
packages/databases-collections-list/src/items-table.tsx Adds monitoring link button to database/collection table headers
packages/compass-collection/src/components/collection-header-actions/collection-header-actions.tsx Adds monitoring link button to collection header actions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nbbeeken nbbeeken changed the title feat(compass-connections-navigation): [WIP] add links to cluster level atlas pages COMPASS-9967 feat(compass-connections-navigation): add links to cluster level atlas pages COMPASS-9967 Oct 30, 2025
@nbbeeken nbbeeken requested a review from Copilot October 30, 2025 19:53
Copy link
Contributor

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nbbeeken nbbeeken requested a review from gribnoysup October 30, 2025 19:55
Comment on lines 130 to 131
isDisabled: false,
disabledDescription: 'Not supported',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I don't think you need to pass this if disabled is always set to false, but not that ot matters too much

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

isDisabled will default to false right? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed!

@nbbeeken nbbeeken merged commit 8f6019c into main Nov 3, 2025
61 checks passed
@nbbeeken nbbeeken deleted the COMPASS-9967 branch November 3, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat no release notes Fix or feature not for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants