-
Notifications
You must be signed in to change notification settings - Fork 17
fix: open cluster page in same tab #3179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, no comments
There was a problem hiding this 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 removes the conditional target="_blank" attribute from cluster links in the clusters table, ensuring all cluster links (both internal and external) now open in the same tab instead of opening external cluster links in a new tab.
Key Changes
- Removed conditional
targetprop from cluster name links that previously opened external clusters in a new tab - Removed conditional
targetprop from cluster versions links with the same behavior - Simplified the
ExternalLinkcomponent usage by removing the conditional logic based onrow.clusterDomain
| <ExternalLink href={clusterPath} target={row.clusterDomain ? '_blank' : undefined}> | ||
| {row.title || row.name} | ||
| </ExternalLink> | ||
| <ExternalLink href={clusterPath}>{row.title || row.name}</ExternalLink> |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When row.clusterDomain is present, calculateClusterPath() returns an absolute URL pointing to a different domain (see line 30 in utils.ts where clusterDomain is passed as the domain parameter). Opening external cluster links in the same tab will navigate the user away from the current clusters page, potentially losing their context and requiring them to use browser back/forward buttons to return.
Consider:
- If this is intentional, verify that this behavior aligns with user expectations
- Alternatively, consider using
InternalLinkcomponent for internal cluster navigation and keepingtarget="_blank"for external domains to prevent navigation away from the clusters page
Greptile Overview
Greptile Summary
This PR standardizes cluster navigation behavior in the clusters table by removing conditional
target="_blank"attributes from cluster links. Previously, cluster links would open in a new tab only when the cluster had aclusterDomain, creating inconsistent user experience. Now all cluster links (both main cluster name and versions bar) consistently open in the same tab. This change affects theExternalLinkcomponents in the clusters table columns, removing the conditionaltarget={row.clusterDomain ? '_blank' : undefined}logic and simplifying the navigation behavior to be more predictable for users navigating within the YDB monitoring interface.Important Files Changed
target="_blank"from cluster links to standardize same-tab navigationConfidence score: 4/5
Sequence Diagram
sequenceDiagram participant User participant ClustersTable participant ClusterName participant calculateClusterPath participant Browser User->>ClustersTable: "clicks cluster name link" ClustersTable->>ClusterName: "render cluster name with link" ClusterName->>calculateClusterPath: "call calculateClusterPath(row)" calculateClusterPath-->>ClusterName: "return cluster path URL" ClusterName->>Browser: "navigate to cluster path in same tab" Browser-->>User: "display cluster page" User->>ClustersTable: "clicks cluster versions link" ClustersTable->>Versions: "render versions with link" Versions->>calculateClusterPath: "call calculateClusterPath(row, clusterTabsIds.versions)" calculateClusterPath-->>Versions: "return cluster versions path URL" Versions->>Browser: "navigate to cluster versions in same tab" Browser-->>User: "display cluster versions page"CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 62.34 MB | Main: 62.34 MB
Diff: 0.32 KB (-0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information